diff --git a/.buildkite/README.md b/.buildkite/README.md new file mode 100644 index 0000000000000..6b9be00898d24 --- /dev/null +++ b/.buildkite/README.md @@ -0,0 +1,10 @@ +# Kibana / Buildkite + +## Directory Structure + +- `hooks` - special directory used by Buildkite agents for [hooks](https://buildkite.com/docs/agent/v3/hooks) +- `pipelines` - contains pipeline definitions +- `scripts/common` - scripts that get `source`d by other scripts to set environment variables or import shared functions +- `scripts/lifecycle` - general scripts for tasks that run before or after individual steps or the entire build +- `scripts/steps` - scripts that define something that will run for a step defined in a pipeline +- `scripts/*` - all other scripts are building blocks that make up the tasks in pipelines. They may be run by other scripts, but should not be `source`d diff --git a/.buildkite/agents.json b/.buildkite/agents.json new file mode 100644 index 0000000000000..797b7e71f2be6 --- /dev/null +++ b/.buildkite/agents.json @@ -0,0 +1,79 @@ +{ + "gcp": { + "project": "elastic-kibana-ci", + "zones": ["us-central1-a", "us-central1-b", "us-central1-c", "us-central1-f"], + "serviceAccount": "elastic-buildkite-agent@elastic-kibana-ci.iam.gserviceaccount.com", + "imageFamily": "kb-ubuntu", + "subnetwork": "buildkite", + "disableExternalIp": true, + "diskType": "pd-ssd", + "diskSizeGb": 75, + "overprovision": 0, + "minimumAgents": 0, + "maximumAgents": 50, + "gracefulStopAfterMins": 360, + "hardStopAfterMins": 540, + "idleTimeoutMins": 10, + "exitAfterOneJob": false, + + "agents": [ + { + "queue": "default", + "name": "kb-default", + "minimumAgents": 1, + "maximumAgents": 100, + "idleTimeoutMins": 60, + "machineType": "e2-small" + }, + { + "queue": "c2-8", + "name": "kb-c2-8", + "machineType": "c2-standard-8", + "localSsds": 1 + }, + { + "queue": "c2-4", + "name": "kb-c2-4", + "machineType": "c2-standard-4", + "localSsds": 1 + }, + { + "queue": "jest", + "name": "kb-jest", + "machineType": "n2-standard-2", + "diskSizeGb": 128 + }, + { + "queue": "ci-group", + "name": "kb-cigroup", + "machineType": "n2-standard-8", + "diskSizeGb": 256 + }, + { + "queue": "ci-group-4", + "name": "kb-cigroup-4", + "machineType": "n2-standard-4", + "diskSizeGb": 128 + }, + { + "queue": "ci-group-4d", + "name": "kb-cigroup-4d", + "machineType": "n2d-standard-4", + "diskSizeGb": 128 + }, + { + "queue": "ci-group-6", + "name": "kb-cigroup-6", + "machineType": "n2-custom-6-16384", + "diskSizeGb": 128 + }, + { + "queue": "packer", + "name": "kb-packer", + "serviceAccount": "buildkite-packer-agent@elastic-kibana-ci.iam.gserviceaccount.com", + "maximumAgents": 10, + "machineType": "e2-small" + } + ] + } +} diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command new file mode 100644 index 0000000000000..21a4326498fc9 --- /dev/null +++ b/.buildkite/hooks/post-command @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +source .buildkite/scripts/lifecycle/post_command.sh diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command new file mode 100644 index 0000000000000..58a2c5f0b499d --- /dev/null +++ b/.buildkite/hooks/pre-command @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +source .buildkite/scripts/lifecycle/pre_command.sh diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml new file mode 100644 index 0000000000000..bceb1796479a2 --- /dev/null +++ b/.buildkite/pipelines/on_merge.yml @@ -0,0 +1,24 @@ +env: + GITHUB_COMMIT_STATUS_ENABLED: 'true' + GITHUB_COMMIT_STATUS_CONTEXT: 'buildkite/on-merge' +steps: + - command: .buildkite/scripts/lifecycle/pre_build.sh + label: Pre-Build + + - wait + + - command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh + label: Default Build and Metrics + agents: + queue: c2-8 + + - command: .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh + label: Build TS Refs and Check Public API Docs + agents: + queue: c2-4 + + - wait: ~ + continue_on_failure: true + + - command: .buildkite/scripts/lifecycle/post_build.sh + label: Post-Build diff --git a/.buildkite/scripts/bootstrap.sh b/.buildkite/scripts/bootstrap.sh new file mode 100755 index 0000000000000..7ae925b262b9f --- /dev/null +++ b/.buildkite/scripts/bootstrap.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo "--- yarn install and bootstrap" +yarn kbn bootstrap --verbose + +### +### upload ts-refs-cache artifacts as quickly as possible so they are available for download +### +if [[ "${BUILD_TS_REFS_CACHE_CAPTURE:-}" == "true" ]]; then + echo "--- Upload ts-refs-cache" + cd "$KIBANA_DIR/target/ts_refs_cache" + gsutil cp "*.zip" 'gs://kibana-ci-ts-refs-cache/' + cd "$KIBANA_DIR" +fi + +if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then + verify_no_git_changes 'yarn kbn bootstrap' +fi diff --git a/.buildkite/scripts/build_kibana.sh b/.buildkite/scripts/build_kibana.sh new file mode 100755 index 0000000000000..19dbbcb025fb9 --- /dev/null +++ b/.buildkite/scripts/build_kibana.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export KBN_NP_PLUGINS_BUILT=true + +echo "--- Build Kibana Distribution" +node scripts/build --debug --no-oss + +echo "--- Archive Kibana Distribution" +linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')" +installDir="$KIBANA_DIR/install/kibana" +mkdir -p "$installDir" +tar -xzf "$linuxBuild" -C "$installDir" --strip=1 +mkdir -p "$KIBANA_BUILD_LOCATION" +cp -pR install/kibana/. "$KIBANA_BUILD_LOCATION/" diff --git a/.buildkite/scripts/build_kibana_plugins.sh b/.buildkite/scripts/build_kibana_plugins.sh new file mode 100644 index 0000000000000..f4d82699ef92d --- /dev/null +++ b/.buildkite/scripts/build_kibana_plugins.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "--- Build Platform Plugins" +node scripts/build_kibana_platform_plugins \ + --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \ + --scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \ + --scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \ + --scan-dir "$KIBANA_DIR/examples" \ + --scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \ + --scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \ + --scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \ + --scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \ + --scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \ + --scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \ + --scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \ + --scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \ + --scan-dir "$XPACK_DIR/test/usage_collection/plugins" \ + --scan-dir "$XPACK_DIR/test/security_functional/fixtures/common" \ + --scan-dir "$XPACK_DIR/examples" \ + --verbose + +echo "--- Archive built plugins" +shopt -s globstar +tar -zcf \ + target/kibana-default-plugins.tar.gz \ + x-pack/plugins/**/target/public \ + x-pack/test/**/target/public \ + examples/**/target/public \ + x-pack/examples/**/target/public \ + test/**/target/public diff --git a/.buildkite/scripts/common/env.sh b/.buildkite/scripts/common/env.sh new file mode 100755 index 0000000000000..ff09126f60b08 --- /dev/null +++ b/.buildkite/scripts/common/env.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +export CI=true + +KIBANA_DIR=$(pwd) +export KIBANA_DIR +export XPACK_DIR="$KIBANA_DIR/x-pack" + +export CACHE_DIR="$HOME/.kibana" +PARENT_DIR="$(cd "$KIBANA_DIR/.."; pwd)" +export PARENT_DIR +export WORKSPACE="${WORKSPACE:-$PARENT_DIR}" + +KIBANA_PKG_BRANCH="$(jq -r .branch "$KIBANA_DIR/package.json")" +export KIBANA_PKG_BRANCH +export KIBANA_BASE_BRANCH="$KIBANA_PKG_BRANCH" + +export GECKODRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache" +export CHROMEDRIVER_CDNURL="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache" +export RE2_DOWNLOAD_MIRROR="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache" +export CYPRESS_DOWNLOAD_MIRROR="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/cypress" + +export NODE_OPTIONS="--max-old-space-size=4096" + +export FORCE_COLOR=1 +export TEST_BROWSER_HEADLESS=1 + +export ELASTIC_APM_ENVIRONMENT=ci +export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1 + +CI_REPORTING_ENABLED=false # TODO enable when ready, only controls checks reporter and APM + +if is_pr; then + export ELASTIC_APM_ACTIVE=false + export CHECKS_REPORTER_ACTIVE="${CI_REPORTING_ENABLED-}" + + # These can be removed once we're not supporting Jenkins and Buildkite at the same time + # These are primarily used by github checks reporter and can be configured via /github_checks_api.json + export ghprbGhRepository="elastic/kibana" + export ghprbActualCommit="$BUILDKITE_COMMIT" + export BUILD_URL="$BUILDKITE_BUILD_URL" + + # set_git_merge_base # TODO for PRs +else + export ELASTIC_APM_ACTIVE="${CI_REPORTING_ENABLED-}" + export CHECKS_REPORTER_ACTIVE=false +fi + +export FLEET_PACKAGE_REGISTRY_PORT=6104 +export TEST_CORS_SERVER_PORT=6105 + +export DETECT_CHROMEDRIVER_VERSION=true +export CHROMEDRIVER_FORCE_DOWNLOAD=true + +export GCS_UPLOAD_PREFIX=FAKE_UPLOAD_PREFIX # TODO remove the need for this + +export KIBANA_BUILD_LOCATION="$WORKSPACE/kibana-build-xpack" + +if [[ "${BUILD_TS_REFS_CACHE_ENABLE:-}" != "true" ]]; then + export BUILD_TS_REFS_CACHE_ENABLE=false +fi + +export BUILD_TS_REFS_DISABLE=true +export DISABLE_BOOTSTRAP_VALIDATION=true + +export TEST_KIBANA_HOST=localhost +export TEST_KIBANA_PORT=6101 +export TEST_KIBANA_URL="http://elastic:changeme@localhost:6101" +export TEST_ES_URL="http://elastic:changeme@localhost:6102" +export TEST_ES_TRANSPORT_PORT=6103 +export TEST_CORS_SERVER_PORT=6106 +export ALERTING_PROXY_PORT=6105 diff --git a/.buildkite/scripts/common/setup_bazel.sh b/.buildkite/scripts/common/setup_bazel.sh new file mode 100644 index 0000000000000..16ea9a3900353 --- /dev/null +++ b/.buildkite/scripts/common/setup_bazel.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +KIBANA_BUILDBUDDY_CI_API_KEY=$(vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key) +export KIBANA_BUILDBUDDY_CI_API_KEY + +cp "$KIBANA_DIR/src/dev/ci_setup/.bazelrc-ci" "$HOME/.bazelrc" + +### +### append auth token to buildbuddy into "$HOME/.bazelrc"; +### +echo "# Appended by .buildkite/scripts/setup_bazel.sh" >> "$HOME/.bazelrc" +echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$HOME/.bazelrc" + +### +### remove write permissions on buildbuddy remote cache for prs +### +if [[ "${BUILDKITE_PULL_REQUEST:-}" && "$BUILDKITE_PULL_REQUEST" != "false" ]] ; then + { + echo "# Uploads logs & artifacts without writing to cache" + echo "build --noremote_upload_local_results" + } >> "$HOME/.bazelrc" +fi diff --git a/.buildkite/scripts/common/setup_node.sh b/.buildkite/scripts/common/setup_node.sh new file mode 100755 index 0000000000000..6a81862f2b097 --- /dev/null +++ b/.buildkite/scripts/common/setup_node.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +echo "--- Setup Node" + +NODE_VERSION="$(cat "$KIBANA_DIR/.node-version")" +export NODE_VERSION +export NODE_DIR="$CACHE_DIR/node/$NODE_VERSION" +export NODE_BIN_DIR="$NODE_DIR/bin" +export YARN_OFFLINE_CACHE="$CACHE_DIR/yarn-offline-cache" + +if [[ ! -d "$NODE_DIR" ]]; then + hostArch="$(command uname -m)" + case "${hostArch}" in + x86_64 | amd64) nodeArch="x64" ;; + aarch64) nodeArch="arm64" ;; + *) nodeArch="${hostArch}" ;; + esac + + nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$nodeArch.tar.gz" + + echo "node.js v$NODE_VERSION not found at $NODE_DIR, downloading from $nodeUrl" + + mkdir -p "$NODE_DIR" + curl --silent -L "$nodeUrl" | tar -xz -C "$NODE_DIR" --strip-components=1 +else + echo "node.js v$NODE_VERSION already installed to $NODE_DIR, re-using" + ls -alh "$NODE_BIN_DIR" +fi + +export PATH="$NODE_BIN_DIR:$PATH" + + +echo "--- Setup Yarn" + +YARN_VERSION=$(node -e "console.log(String(require('./package.json').engines.yarn || '').replace(/^[^\d]+/,''))") +export YARN_VERSION + +if [[ ! $(which yarn) || $(yarn --version) != "$YARN_VERSION" ]]; then + npm install -g "yarn@^${YARN_VERSION}" +fi + +yarn config set yarn-offline-mirror "$YARN_OFFLINE_CACHE" + +YARN_GLOBAL_BIN=$(yarn global bin) +export YARN_GLOBAL_BIN +export PATH="$PATH:$YARN_GLOBAL_BIN" diff --git a/.buildkite/scripts/common/util.sh b/.buildkite/scripts/common/util.sh new file mode 100755 index 0000000000000..653b0c4e9cdbb --- /dev/null +++ b/.buildkite/scripts/common/util.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +checks-reporter-with-killswitch() { + if [ "$CHECKS_REPORTER_ACTIVE" == "true" ] ; then + yarn run github-checks-reporter "$@" + else + arguments=("$@"); + "${arguments[@]:1}"; + fi +} + +is_pr() { + [[ "${GITHUB_PR_NUMBER-}" ]] && return + false +} + +verify_no_git_changes() { + RED='\033[0;31m' + C_RESET='\033[0m' # Reset color + + GIT_CHANGES="$(git ls-files --modified)" + if [ "$GIT_CHANGES" ]; then + echo -e "\n${RED}ERROR: '$1' caused changes to the following files:${C_RESET}\n" + echo -e "$GIT_CHANGES\n" + exit 1 + fi +} + +# docker_run can be used in place of `docker run` +# it automatically passes along all of Buildkite's tracked environment variables, and mounts the buildkite-agent in the running container +docker_run() { + args=() + + if [[ -n "${BUILDKITE_ENV_FILE:-}" ]] ; then + # Read in the env file and convert to --env params for docker + # This is because --env-file doesn't support newlines or quotes per https://docs.docker.com/compose/env-file/#syntax-rules + while read -r var; do + args+=( --env "${var%%=*}" ) + done < "$BUILDKITE_ENV_FILE" + fi + + BUILDKITE_AGENT_BINARY_PATH=$(command -v buildkite-agent) + args+=( + "--env" "BUILDKITE_JOB_ID" + "--env" "BUILDKITE_BUILD_ID" + "--env" "BUILDKITE_AGENT_ACCESS_TOKEN" + "--volume" "$BUILDKITE_AGENT_BINARY_PATH:/usr/bin/buildkite-agent" + ) + + docker run "${args[@]}" "$@" +} diff --git a/.buildkite/scripts/download_build_artifacts.sh b/.buildkite/scripts/download_build_artifacts.sh new file mode 100755 index 0000000000000..6a6b7246753f6 --- /dev/null +++ b/.buildkite/scripts/download_build_artifacts.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ ! -d "$KIBANA_BUILD_LOCATION/bin" ]]; then + echo '--- Downloading Distribution and Plugin artifacts' + + cd "$WORKSPACE" + + buildkite-agent artifact download kibana-default.tar.gz . + buildkite-agent artifact download kibana-default-plugins.tar.gz . + + mkdir -p "$KIBANA_BUILD_LOCATION" + tar -xzf kibana-default.tar.gz -C "$KIBANA_BUILD_LOCATION" --strip=1 + + cd "$KIBANA_DIR" + + tar -xzf ../kibana-default-plugins.tar.gz +fi diff --git a/.buildkite/scripts/lifecycle/ci_stats.js b/.buildkite/scripts/lifecycle/ci_stats.js new file mode 100644 index 0000000000000..1e7aec3079ee3 --- /dev/null +++ b/.buildkite/scripts/lifecycle/ci_stats.js @@ -0,0 +1,59 @@ +const https = require('https'); +const token = process.env.CI_STATS_TOKEN; +const host = process.env.CI_STATS_HOST; + +const request = (url, options, data = null) => { + const httpOptions = { + ...options, + headers: { + ...(options.headers || {}), + Authorization: `token ${token}`, + }, + }; + + return new Promise((resolve, reject) => { + console.log(`Calling https://${host}${url}`); + + const req = https.request(`https://${host}${url}`, httpOptions, (res) => { + if (res.statusCode < 200 || res.statusCode >= 300) { + return reject(new Error(`Status Code: ${res.statusCode}`)); + } + + const data = []; + res.on('data', (d) => { + data.push(d); + }); + + res.on('end', () => { + try { + let resp = Buffer.concat(data).toString(); + + try { + if (resp.trim()) { + resp = JSON.parse(resp); + } + } catch (ex) { + console.error(ex); + } + + resolve(resp); + } catch (ex) { + reject(ex); + } + }); + }); + + req.on('error', reject); + + if (data) { + req.write(JSON.stringify(data)); + } + + req.end(); + }); +}; + +module.exports = { + get: (url) => request(url, { method: 'GET' }), + post: (url, data) => request(url, { method: 'POST' }, data), +}; diff --git a/.buildkite/scripts/lifecycle/ci_stats_complete.js b/.buildkite/scripts/lifecycle/ci_stats_complete.js new file mode 100644 index 0000000000000..46aa72aed2024 --- /dev/null +++ b/.buildkite/scripts/lifecycle/ci_stats_complete.js @@ -0,0 +1,17 @@ +const ciStats = require('./ci_stats'); + +// TODO - this is okay for now but should really be replaced with an API call, especially once retries are enabled +const BUILD_STATUS = process.env.BUILD_FAILED === 'true' ? 'FAILURE' : 'SUCCESS'; + +(async () => { + try { + if (process.env.CI_STATS_BUILD_ID) { + await ciStats.post(`/v1/build/_complete?id=${process.env.CI_STATS_BUILD_ID}`, { + result: BUILD_STATUS, + }); + } + } catch (ex) { + console.error(ex); + process.exit(1); + } +})(); diff --git a/.buildkite/scripts/lifecycle/ci_stats_start.js b/.buildkite/scripts/lifecycle/ci_stats_start.js new file mode 100644 index 0000000000000..35a1e7030af5f --- /dev/null +++ b/.buildkite/scripts/lifecycle/ci_stats_start.js @@ -0,0 +1,30 @@ +const { execSync } = require('child_process'); +const ciStats = require('./ci_stats'); + +(async () => { + try { + const build = await ciStats.post('/v1/build', { + jenkinsJobName: process.env.BUILDKITE_PIPELINE_NAME, + jenkinsJobId: process.env.BUILDKITE_BUILD_ID, + jenkinsUrl: process.env.BUILDKITE_BUILD_URL, + prId: process.env.GITHUB_PR_NUMBER || null, + }); + + execSync(`buildkite-agent meta-data set ci_stats_build_id "${build.id}"`); + + // TODO Will need to set MERGE_BASE for PRs + + await ciStats.post(`/v1/git_info?buildId=${build.id}`, { + branch: process.env.BUILDKITE_BRANCH.replace(/^(refs\/heads\/|origin\/)/, ''), + commit: process.env.BUILDKITE_COMMIT, + targetBranch: + process.env.GITHUB_PR_TARGET_BRANCH || + process.env.BUILDKITE_PULL_REQUEST_BASE_BRANCH || + null, + mergeBase: process.env.GITHUB_PR_MERGE_BASE || null, // TODO confirm GITHUB_PR_MERGE_BASE or switch to final var + }); + } catch (ex) { + console.error(ex); + process.exit(1); + } +})(); diff --git a/.buildkite/scripts/lifecycle/commit_status_complete.sh b/.buildkite/scripts/lifecycle/commit_status_complete.sh new file mode 100755 index 0000000000000..1766404719632 --- /dev/null +++ b/.buildkite/scripts/lifecycle/commit_status_complete.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ "${GITHUB_COMMIT_STATUS_ENABLED:-}" == "true" ]]; then + COMMIT_STATUS=success + if [[ "${BUILD_FAILED:-}" == "true" ]]; then + COMMIT_STATUS=failure + fi + + GITHUB_COMMIT_STATUS_CONTEXT=${GITHUB_COMMIT_STATUS_CONTEXT:-"buildkite/$BUILDKITE_PIPELINE_NAME"} + + gh api "repos/elastic/kibana/statuses/$BUILDKITE_COMMIT" -f state="$COMMIT_STATUS" -f target_url="$BUILDKITE_BUILD_URL" -f context="$GITHUB_COMMIT_STATUS_CONTEXT" --silent +fi diff --git a/.buildkite/scripts/lifecycle/commit_status_start.sh b/.buildkite/scripts/lifecycle/commit_status_start.sh new file mode 100755 index 0000000000000..d7e91dd7e0de5 --- /dev/null +++ b/.buildkite/scripts/lifecycle/commit_status_start.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ "${GITHUB_COMMIT_STATUS_ENABLED:-}" == "true" ]]; then + GITHUB_COMMIT_STATUS_CONTEXT=${GITHUB_COMMIT_STATUS_CONTEXT:-"buildkite/$BUILDKITE_PIPELINE_NAME"} + + gh api "repos/elastic/kibana/statuses/$BUILDKITE_COMMIT" -f state=pending -f target_url="$BUILDKITE_BUILD_URL" -f context="$GITHUB_COMMIT_STATUS_CONTEXT" --silent +fi diff --git a/.buildkite/scripts/lifecycle/post_build.sh b/.buildkite/scripts/lifecycle/post_build.sh new file mode 100755 index 0000000000000..06b51d78a836a --- /dev/null +++ b/.buildkite/scripts/lifecycle/post_build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +BUILD_FAILED=$(buildkite-agent meta-data get build_failed --default "false") +export BUILD_FAILED + +"$(dirname "${0}")/commit_status_complete.sh" + +node "$(dirname "${0}")/ci_stats_complete.js" diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh new file mode 100755 index 0000000000000..89630a874bbd7 --- /dev/null +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ "$BUILDKITE_COMMAND_EXIT_STATUS" != "0" ]]; then + buildkite-agent meta-data set build_failed true +fi diff --git a/.buildkite/scripts/lifecycle/pre_build.sh b/.buildkite/scripts/lifecycle/pre_build.sh new file mode 100755 index 0000000000000..2ddf9a73d0622 --- /dev/null +++ b/.buildkite/scripts/lifecycle/pre_build.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +set -euo pipefail + +"$(dirname "${0}")/commit_status_start.sh" + +export CI_STATS_TOKEN="$(vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)" +export CI_STATS_HOST="$(vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)" + +node "$(dirname "${0}")/ci_stats_start.js" diff --git a/.buildkite/scripts/lifecycle/pre_command.sh b/.buildkite/scripts/lifecycle/pre_command.sh new file mode 100755 index 0000000000000..d9e79d2d3252b --- /dev/null +++ b/.buildkite/scripts/lifecycle/pre_command.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Set up a custom ES Snapshot Manifest if one has been specified for this build +{ + ES_SNAPSHOT_MANIFEST=${ES_SNAPSHOT_MANIFEST:-$(buildkite-agent meta-data get ES_SNAPSHOT_MANIFEST --default '')} + export ES_SNAPSHOT_MANIFEST + + if [[ "${ES_SNAPSHOT_MANIFEST:-}" ]]; then + cat << EOF | buildkite-agent annotate --style "info" --context es-snapshot-manifest + This build is running using a custom Elasticsearch snapshot. + + ES Snapshot Manifest: $ES_SNAPSHOT_MANIFEST + + To use this locally, simply prefix your commands with: + + \`\`\` + ES_SNAPSHOT_MANIFEST="$ES_SNAPSHOT_MANIFEST" + \`\`\` + + e.g. + + \`\`\` + ES_SNAPSHOT_MANIFEST="$ES_SNAPSHOT_MANIFEST" node scripts/functional_tests_server.js + \`\`\` +EOF + fi +} + +# Setup CI Stats +{ + CI_STATS_BUILD_ID="$(buildkite-agent meta-data get ci_stats_build_id --default '')" + export CI_STATS_BUILD_ID + + if [[ "$CI_STATS_BUILD_ID" ]]; then + echo "CI Stats Build ID: $CI_STATS_BUILD_ID" + + CI_STATS_TOKEN="$(vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)" + export CI_STATS_TOKEN + + CI_STATS_HOST="$(vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)" + export CI_STATS_HOST + + KIBANA_CI_STATS_CONFIG=$(jq -n \ + --arg buildId "$CI_STATS_BUILD_ID" \ + --arg apiUrl "https://$CI_STATS_HOST" \ + --arg apiToken "$CI_STATS_TOKEN" \ + '{buildId: $buildId, apiUrl: $apiUrl, apiToken: $apiToken}' \ + ) + export KIBANA_CI_STATS_CONFIG + fi +} + +GITHUB_TOKEN=$(vault read -field=github_token secret/kibana-issues/dev/kibanamachine) +export GITHUB_TOKEN + +# By default, all steps should set up these things to get a full environment before running +# It can be skipped for pipeline upload steps though, to make job start time a little faster +if [[ "${SKIP_CI_SETUP:-}" != "true" ]]; then + if [[ -d .buildkite/scripts && "${BUILDKITE_COMMAND:-}" != "buildkite-agent pipeline upload"* ]]; then + source .buildkite/scripts/common/util.sh + source .buildkite/scripts/common/env.sh + source .buildkite/scripts/common/setup_node.sh + source .buildkite/scripts/common/setup_bazel.sh + fi +fi diff --git a/.buildkite/scripts/packer_cache.sh b/.buildkite/scripts/packer_cache.sh new file mode 100755 index 0000000000000..45d3dc439ff4d --- /dev/null +++ b/.buildkite/scripts/packer_cache.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/env.sh +source .buildkite/scripts/common/setup_node.sh + +yarn kbn bootstrap diff --git a/.buildkite/scripts/post_build_kibana.sh b/.buildkite/scripts/post_build_kibana.sh new file mode 100755 index 0000000000000..a4f8d71b77105 --- /dev/null +++ b/.buildkite/scripts/post_build_kibana.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ ! "${DISABLE_CI_STATS_SHIPPING:-}" ]]; then + echo "--- Ship Kibana Distribution Metrics to CI Stats" + node scripts/ship_ci_stats \ + --metrics target/optimizer_bundle_metrics.json \ + --metrics packages/kbn-ui-shared-deps/target/metrics.json +fi + +echo "--- Upload Build Artifacts" +# Moving to `target/` first will keep `buildkite-agent` from including directories in the artifact name +cd "$KIBANA_DIR/target" +mv kibana-*-linux-x86_64.tar.gz kibana-default.tar.gz +buildkite-agent artifact upload kibana-default.tar.gz +buildkite-agent artifact upload kibana-default-plugins.tar.gz +cd - diff --git a/.buildkite/scripts/saved_object_field_metrics.sh b/.buildkite/scripts/saved_object_field_metrics.sh new file mode 100755 index 0000000000000..3b6c63eeff3b0 --- /dev/null +++ b/.buildkite/scripts/saved_object_field_metrics.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/common/util.sh + +echo '--- Default Saved Object Field Metrics' +cd "$XPACK_DIR" +checks-reporter-with-killswitch "Capture Kibana Saved Objects field count metrics" \ + node scripts/functional_tests \ + --debug --bail \ + --kibana-install-dir "$KIBANA_BUILD_LOCATION" \ + --config test/saved_objects_field_count/config.ts diff --git a/.buildkite/scripts/steps/on_merge_build_and_metrics.sh b/.buildkite/scripts/steps/on_merge_build_and_metrics.sh new file mode 100755 index 0000000000000..fdf06981ab568 --- /dev/null +++ b/.buildkite/scripts/steps/on_merge_build_and_metrics.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export DISABLE_BOOTSTRAP_VALIDATION=true +export BUILD_TS_REFS_DISABLE=true + +.buildkite/scripts/bootstrap.sh +.buildkite/scripts/build_kibana.sh +.buildkite/scripts/post_build_kibana.sh +.buildkite/scripts/saved_object_field_metrics.sh diff --git a/.buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh b/.buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh new file mode 100755 index 0000000000000..35bc137ee4a02 --- /dev/null +++ b/.buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export BUILD_TS_REFS_CACHE_ENABLE=true +export BUILD_TS_REFS_CACHE_CAPTURE=true +export DISABLE_BOOTSTRAP_VALIDATION=true +export BUILD_TS_REFS_DISABLE=false + +.buildkite/scripts/bootstrap.sh + +echo "--- Build API Docs" +node scripts/build_api_docs diff --git a/.ci/Jenkinsfile_baseline_capture b/.ci/Jenkinsfile_baseline_capture index d074da1cb1926..9d662f4b39fb9 100644 --- a/.ci/Jenkinsfile_baseline_capture +++ b/.ci/Jenkinsfile_baseline_capture @@ -37,7 +37,7 @@ kibanaPipeline(timeoutMinutes: 210) { tasks([ kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh'), kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh'), - kibanaPipeline.scriptTask('Check Public API Docs', 'test/scripts/checks/plugin_public_api_docs.sh'), + kibanaPipeline.scriptTask('Check Public API Docs', 'test/scripts/checks/baseline_plugin_public_api_docs.sh'), ]) } } diff --git a/.eslintrc.js b/.eslintrc.js index a4ce657d523d9..22d0270a5b066 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1370,7 +1370,7 @@ module.exports = { { // Source files only - allow `any` in test/mock files files: ['x-pack/plugins/enterprise_search/**/*.{ts,tsx}'], - excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock}.{ts,tsx}'], + excludedFiles: ['x-pack/plugins/enterprise_search/**/*.{test,mock,test_helper}.{ts,tsx}'], rules: { '@typescript-eslint/no-explicit-any': 'error', }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9c9200ce33e7a..a017c79309a56 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -24,6 +24,7 @@ /src/plugins/vis_type_vega/ @elastic/kibana-app /src/plugins/vis_type_vislib/ @elastic/kibana-app /src/plugins/vis_type_xy/ @elastic/kibana-app +/src/plugins/vis_type_pie/ @elastic/kibana-app /src/plugins/visualize/ @elastic/kibana-app /src/plugins/visualizations/ @elastic/kibana-app /packages/kbn-tinymath/ @elastic/kibana-app @@ -54,6 +55,7 @@ /src/plugins/share/ @elastic/kibana-app-services /src/plugins/ui_actions/ @elastic/kibana-app-services /src/plugins/index_pattern_field_editor @elastic/kibana-app-services +/src/plugins/screenshot_mode @elastic/kibana-app-services /x-pack/examples/ui_actions_enhanced_examples/ @elastic/kibana-app-services /x-pack/plugins/data_enhanced/ @elastic/kibana-app-services /x-pack/plugins/embeddable_enhanced/ @elastic/kibana-app-services @@ -87,7 +89,7 @@ # Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime) /x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm @elastic/uptime /x-pack/plugins/apm/e2e/cypress/integration/csm_dashboard.feature @elastic/uptime -/x-pack/plugins/apm/public/application/csmApp.tsx @elastic/uptime +/x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime /x-pack/plugins/apm/public/components/app/RumDashboard @elastic/uptime /x-pack/plugins/apm/server/lib/rum_client @elastic/uptime /x-pack/plugins/apm/server/routes/rum_client.ts @elastic/uptime @@ -126,8 +128,10 @@ /x-pack/test/functional_basic/apps/ml/ @elastic/ml-ui /x-pack/test/functional_with_es_ssl/apps/ml/ @elastic/ml-ui -# ML team owns and maintains the transform plugin despite it living in the Elasticsearch management section. +# ML team owns and maintains the transform plugin despite it living in the Data management section. /x-pack/plugins/transform/ @elastic/ml-ui +/x-pack/plugins/data_visualizer/ @elastic/ml-ui +/x-pack/plugins/file_upload/ @elastic/ml-ui /x-pack/test/accessibility/apps/transform.ts @elastic/ml-ui /x-pack/test/api_integration/apis/transform/ @elastic/ml-ui /x-pack/test/api_integration_basic/apis/transform/ @elastic/ml-ui @@ -174,6 +178,7 @@ /.bazelversion @elastic/kibana-operations /WORKSPACE.bazel @elastic/kibana-operations #CC# /packages/kbn-expect/ @elastic/kibana-operations +/.buildkite/ @elastic/kibana-operations # Quality Assurance /src/dev/code_coverage @elastic/kibana-qa @@ -302,29 +307,29 @@ /x-pack/plugins/enterprise_search/server/collectors/workplace_search/ @elastic/workplace-search-frontend /x-pack/plugins/enterprise_search/server/saved_objects/workplace_search/ @elastic/workplace-search-frontend -# Elasticsearch UI -/src/plugins/dev_tools/ @elastic/es-ui -/src/plugins/console/ @elastic/es-ui -/src/plugins/es_ui_shared/ @elastic/es-ui -/x-pack/plugins/cross_cluster_replication/ @elastic/es-ui -/x-pack/plugins/index_lifecycle_management/ @elastic/es-ui -/x-pack/plugins/console_extensions/ @elastic/es-ui -/x-pack/plugins/grokdebugger/ @elastic/es-ui -/x-pack/plugins/index_management/ @elastic/es-ui -/x-pack/plugins/license_api_guard/ @elastic/es-ui -/x-pack/plugins/license_management/ @elastic/es-ui -/x-pack/plugins/painless_lab/ @elastic/es-ui -/x-pack/plugins/remote_clusters/ @elastic/es-ui -/x-pack/plugins/rollup/ @elastic/es-ui -/x-pack/plugins/searchprofiler/ @elastic/es-ui -/x-pack/plugins/snapshot_restore/ @elastic/es-ui -/x-pack/plugins/upgrade_assistant/ @elastic/es-ui -/x-pack/plugins/watcher/ @elastic/es-ui -/x-pack/plugins/ingest_pipelines/ @elastic/es-ui -/packages/kbn-ace/ @elastic/es-ui -/packages/kbn-monaco/ @elastic/es-ui -#CC# /x-pack/plugins/console_extensions/ @elastic/es-ui -#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/es-ui +# Stack Management +/src/plugins/dev_tools/ @elastic/kibana-stack-management +/src/plugins/console/ @elastic/kibana-stack-management +/src/plugins/es_ui_shared/ @elastic/kibana-stack-management +/x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management +/x-pack/plugins/index_lifecycle_management/ @elastic/kibana-stack-management +/x-pack/plugins/console_extensions/ @elastic/kibana-stack-management +/x-pack/plugins/grokdebugger/ @elastic/kibana-stack-management +/x-pack/plugins/index_management/ @elastic/kibana-stack-management +/x-pack/plugins/license_api_guard/ @elastic/kibana-stack-management +/x-pack/plugins/license_management/ @elastic/kibana-stack-management +/x-pack/plugins/painless_lab/ @elastic/kibana-stack-management +/x-pack/plugins/remote_clusters/ @elastic/kibana-stack-management +/x-pack/plugins/rollup/ @elastic/kibana-stack-management +/x-pack/plugins/searchprofiler/ @elastic/kibana-stack-management +/x-pack/plugins/snapshot_restore/ @elastic/kibana-stack-management +/x-pack/plugins/upgrade_assistant/ @elastic/kibana-stack-management +/x-pack/plugins/watcher/ @elastic/kibana-stack-management +/x-pack/plugins/ingest_pipelines/ @elastic/kibana-stack-management +/packages/kbn-ace/ @elastic/kibana-stack-management +/packages/kbn-monaco/ @elastic/kibana-stack-management +#CC# /x-pack/plugins/console_extensions/ @elastic/kibana-stack-management +#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-stack-management # Security Solution /x-pack/test/endpoint_api_integration_no_ingest/ @elastic/security-solution @@ -339,7 +344,7 @@ #CC# /x-pack/plugins/security_solution/ @elastic/security-solution # Security Solution sub teams -/x-pack/plugins/case @elastic/security-threat-hunting +/x-pack/plugins/cases @elastic/security-threat-hunting /x-pack/plugins/timelines @elastic/security-threat-hunting /x-pack/test/case_api_integration @elastic/security-threat-hunting /x-pack/plugins/lists @elastic/security-detections-response diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2a5fc914662b6..726e4257a5aac 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,6 +2,7 @@ Summarize your PR. If it involves visual changes include a screenshot or gif. + ### Checklist Delete any items that are not applicable to this PR. @@ -15,6 +16,23 @@ Delete any items that are not applicable to this PR. - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) + +### Risk Matrix + +Delete this section if it is not applicable to this PR. + +Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. + +When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: + +| Risk | Probability | Severity | Mitigation/Notes | +|---------------------------|-------------|----------|-------------------------| +| Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | +| Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | +| Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | +| [See more potential risk examples](https://github.com/elastic/kibana/blob/master/RISK_MATRIX.mdx) | + + ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) diff --git a/.gitignore b/.gitignore index f9855520cb110..d5a5104954078 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,7 @@ npm-debug.log* .vagrant ## @cypress/snapshot from apm plugin -snapshots.js +/snapshots.js # release notes script output report.csv diff --git a/.i18nrc.json b/.i18nrc.json index dc01a10b6a686..ad91042a2172d 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -3,6 +3,7 @@ "console": "src/plugins/console", "core": "src/core", "discover": "src/plugins/discover", + "bfetch": "src/plugins/bfetch", "dashboard": "src/plugins/dashboard", "data": "src/plugins/data", "embeddableApi": "src/plugins/embeddable", @@ -55,6 +56,7 @@ "visTypeVega": "src/plugins/vis_type_vega", "visTypeVislib": "src/plugins/vis_type_vislib", "visTypeXy": "src/plugins/vis_type_xy", + "visTypePie": "src/plugins/vis_type_pie", "visualizations": "src/plugins/visualizations", "visualize": "src/plugins/visualize", "apmOss": "src/plugins/apm_oss", diff --git a/RISK_MATRIX.mdx b/RISK_MATRIX.mdx new file mode 100644 index 0000000000000..71b0198489934 --- /dev/null +++ b/RISK_MATRIX.mdx @@ -0,0 +1,63 @@ +# Risk consideration + +When merging a new feature of considerable size or modifying an existing one, +consider adding a *Risk Matrix* section to your PR in collaboration with other +developers on your team and the QA team. + +Below are some general themes to consider for the *Risk Matrix*. (Feel free to +add to this list.) + + +## General risks + +- What happens when your feature is used in a non-default space or a custom + space? +- What happens when there are multiple Kibana nodes using the same Elasticsearch + cluster? +- What happens when a plugin you depend on is disabled? +- What happens when a feature you depend on is disabled? +- Is your change working correctly regardless of `kibana.yml` configuration or + UI Setting configuration? (For example, does it support both + `state:storeInSessionStorage` UI setting states?) +- What happens when a third party integration you depend on is not responding? +- How is authentication handled with third party services? +- Does the feature work in Elastic Cloud? +- Does the feature create a setting that needs to be exposed, or configured + differently than the default, on the Elastic Cloud? +- Is there a significant performance impact that may affect Cloud Kibana + instances? +- Does your feature need to be aware of running in a container? +- Does the feature Work with security disabled, or fails gracefully? +- Are there performance risks associated with your feature? Does it potentially + access or create: (1) many fields; (2) many indices; (3) lots of data; + (4) lots of saved objects; (5) large saved objects. +- Could this cause memory to leak in either the browser or server? +- Will your feature still work if Kibana is run behind a reverse proxy? +- Does your feature affect other plugins? +- If you write to the file system, what happens if Kibana node goes down? What + happens if there are multiple Kibana nodes? +- Are migrations handled gracefully? Does the feature affect old indices or + saved objects? +- Are you using any technologies, protocols, techniques, conventions, libraries, + NPM modules, etc. that may be new or unprecedented in Kibana? + + +## Security risks + +Check to ensure that best practices are used to mitigate common vulnerabilities: + +- Cross-site scripting (XSS) +- Cross-site request forgery (CSRF) +- Remote-code execution (RCE) +- Server-side request forgery (SSRF) +- Prototype pollution +- Information disclosure +- Tabnabbing + +In addition to these risks, in general, server-side input validation should be +implemented as strictly as possible. Extra care should be taken when user input +is used to construct URLs or data structures; this is a common source of +injection attacks and other vulnerabilities. For more information on all of +these topics, see [Security best practices][security-best-practices]. + +[security-best-practices]: https://www.elastic.co/guide/en/kibana/master/security-best-practices.html diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index d80ad948cbb55..acb62043a15ca 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -10,15 +10,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Fetch Node.js rules http_archive( name = "build_bazel_rules_nodejs", - sha256 = "10f534e1c80f795cffe1f2822becd4897754d18564612510c59b3c73544ae7c6", - urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.0/rules_nodejs-3.5.0.tar.gz"], + sha256 = "4a5d654a4ccd4a4c24eca5d319d85a88a650edf119601550c95bf400c8cc897e", + urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.5.1/rules_nodejs-3.5.1.tar.gz"], ) # Now that we have the rules let's import from them to complete the work load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install") # Assure we have at least a given rules_nodejs version -check_rules_nodejs_version(minimum_version_string = "3.5.0") +check_rules_nodejs_version(minimum_version_string = "3.5.1") # Setup the Node.js toolchain for the architectures we want to support # diff --git a/api_docs/actions.json b/api_docs/actions.json index 8bd644be376d7..d7c5e63434c07 100644 --- a/api_docs/actions.json +++ b/api_docs/actions.json @@ -1054,7 +1054,7 @@ ], "source": { "path": "x-pack/plugins/actions/server/builtin_action_types/pagerduty.ts", - "lineNumber": 121 + "lineNumber": 129 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/apm.json b/api_docs/apm.json index 7eee0349fa349..84f5a87f404ae 100644 --- a/api_docs/apm.json +++ b/api_docs/apm.json @@ -78,7 +78,7 @@ ], "source": { "path": "x-pack/plugins/apm/public/plugin.ts", - "lineNumber": 45 + "lineNumber": 47 }, "deprecated": false, "lifecycle": "setup", @@ -96,7 +96,7 @@ ], "source": { "path": "x-pack/plugins/apm/public/plugin.ts", - "lineNumber": 47 + "lineNumber": 49 }, "deprecated": false, "lifecycle": "start", @@ -144,7 +144,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 55 + "lineNumber": 54 }, "deprecated": false, "children": [ @@ -160,7 +160,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 65 + "lineNumber": 64 }, "deprecated": false, "children": [ @@ -183,7 +183,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 65 + "lineNumber": 64 }, "deprecated": false, "isRequired": true @@ -237,7 +237,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 69 + "lineNumber": 68 }, "deprecated": false, "children": [ @@ -262,7 +262,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 70 + "lineNumber": 69 }, "deprecated": false, "isRequired": true @@ -281,7 +281,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 71 + "lineNumber": 70 }, "deprecated": false, "isRequired": true @@ -309,7 +309,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 269 + "lineNumber": 260 }, "deprecated": false, "children": [ @@ -331,7 +331,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 269 + "lineNumber": 260 }, "deprecated": false, "isRequired": true @@ -351,7 +351,7 @@ ], "source": { "path": "x-pack/plugins/apm/server/plugin.ts", - "lineNumber": 288 + "lineNumber": 279 }, "deprecated": false, "children": [], diff --git a/api_docs/apm_oss.json b/api_docs/apm_oss.json index 75cb60610335b..c09f772ea0a55 100644 --- a/api_docs/apm_oss.json +++ b/api_docs/apm_oss.json @@ -5,606 +5,15 @@ "functions": [], "interfaces": [], "enums": [], - "misc": [ - { - "parentPluginId": "apmOss", - "id": "def-public.APM_STATIC_INDEX_PATTERN_ID", - "type": "string", - "tags": [], - "label": "APM_STATIC_INDEX_PATTERN_ID", - "description": [], - "signature": [ - "\"apm_static_index_pattern_id\"" - ], - "source": { - "path": "src/plugins/apm_oss/common/index_pattern_constants.ts", - "lineNumber": 9 - }, - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [], - "setup": { - "parentPluginId": "apmOss", - "id": "def-public.ApmOssPluginSetup", - "type": "Interface", - "tags": [], - "label": "ApmOssPluginSetup", - "description": [], - "source": { - "path": "src/plugins/apm_oss/public/types.ts", - "lineNumber": 10 - }, - "deprecated": false, - "children": [], - "lifecycle": "setup", - "initialIsOpen": true - }, - "start": { - "parentPluginId": "apmOss", - "id": "def-public.ApmOssPluginStart", - "type": "Interface", - "tags": [], - "label": "ApmOssPluginStart", - "description": [], - "source": { - "path": "src/plugins/apm_oss/public/types.ts", - "lineNumber": 13 - }, - "deprecated": false, - "children": [], - "lifecycle": "start", - "initialIsOpen": true - } + "misc": [], + "objects": [] }, "server": { "classes": [], - "functions": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createDjangoAgentInstructions", - "type": "Function", - "tags": [], - "label": "createDjangoAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 88 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createDjangoAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 88 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createDjangoAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 88 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createDotNetAgentInstructions", - "type": "Function", - "tags": [], - "label": "createDotNetAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; } | { title: string; commands: string[]; textPost: string; textPre?: undefined; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 631 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createDotNetAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 631 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createDotNetAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 631 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createFlaskAgentInstructions", - "type": "Function", - "tags": [], - "label": "createFlaskAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 173 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createFlaskAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 173 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createFlaskAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 173 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createGoAgentInstructions", - "type": "Function", - "tags": [], - "label": "createGoAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 492 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createGoAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 492 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createGoAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 492 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createJavaAgentInstructions", - "type": "Function", - "tags": [], - "label": "createJavaAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 585 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createJavaAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 585 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createJavaAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 585 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createJsAgentInstructions", - "type": "Function", - "tags": [], - "label": "createJsAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; } | { title: string; textPre: string; commands: string[]; textPost?: undefined; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 393 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createJsAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 393 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createNodeAgentInstructions", - "type": "Function", - "tags": [], - "label": "createNodeAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 11 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createNodeAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 11 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createNodeAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 11 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createPhpAgentInstructions", - "type": "Function", - "tags": [], - "label": "createPhpAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands?: undefined; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 705 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createPhpAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 705 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createPhpAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 705 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRackAgentInstructions", - "type": "Function", - "tags": [], - "label": "createRackAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 298 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createRackAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 298 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRackAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 298 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRailsAgentInstructions", - "type": "Function", - "tags": [], - "label": "createRailsAgentInstructions", - "description": [], - "signature": [ - "(apmServerUrl?: string, secretToken?: string) => ({ title: string; textPre: string; commands: string[]; textPost?: undefined; } | { title: string; textPre: string; commands: string[]; textPost: string; })[]" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 255 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "apmOss", - "id": "def-server.createRailsAgentInstructions.$1", - "type": "string", - "tags": [], - "label": "apmServerUrl", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 255 - }, - "deprecated": false, - "isRequired": true - }, - { - "parentPluginId": "apmOss", - "id": "def-server.createRailsAgentInstructions.$2", - "type": "string", - "tags": [], - "label": "secretToken", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/apm_oss/server/tutorial/instructions/apm_agent_instructions.ts", - "lineNumber": 255 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - } - ], + "functions": [], "interfaces": [], "enums": [], "misc": [ - { - "parentPluginId": "apmOss", - "id": "def-server.APM_STATIC_INDEX_PATTERN_ID", - "type": "string", - "tags": [], - "label": "APM_STATIC_INDEX_PATTERN_ID", - "description": [], - "signature": [ - "\"apm_static_index_pattern_id\"" - ], - "source": { - "path": "src/plugins/apm_oss/common/index_pattern_constants.ts", - "lineNumber": 9 - }, - "deprecated": false, - "initialIsOpen": false - }, { "parentPluginId": "apmOss", "id": "def-server.APMOSSConfig", @@ -617,7 +26,7 @@ ], "source": { "path": "src/plugins/apm_oss/server/index.ts", - "lineNumber": 32 + "lineNumber": 31 }, "deprecated": false, "initialIsOpen": false @@ -633,7 +42,7 @@ "description": [], "source": { "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 47 + "lineNumber": 27 }, "deprecated": false, "children": [ @@ -649,7 +58,7 @@ ], "source": { "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 48 + "lineNumber": 28 }, "deprecated": false }, @@ -666,34 +75,9 @@ ], "source": { "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 49 + "lineNumber": 29 }, "deprecated": false - }, - { - "parentPluginId": "apmOss", - "id": "def-server.APMOSSPluginSetup.getRegisteredTutorialProvider", - "type": "Function", - "tags": [], - "label": "getRegisteredTutorialProvider", - "description": [], - "signature": [ - "() => ", - { - "pluginId": "home", - "scope": "server", - "docId": "kibHomePluginApi", - "section": "def-server.TutorialProvider", - "text": "TutorialProvider" - } - ], - "source": { - "path": "src/plugins/apm_oss/server/plugin.ts", - "lineNumber": 50 - }, - "deprecated": false, - "children": [], - "returnComment": [] } ], "lifecycle": "setup", diff --git a/api_docs/apm_oss.mdx b/api_docs/apm_oss.mdx index c4facc4e390b6..7370704001378 100644 --- a/api_docs/apm_oss.mdx +++ b/api_docs/apm_oss.mdx @@ -11,25 +11,11 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import apmOssObj from './apm_oss.json'; -## Client - -### Setup - - -### Start - - -### Consts, variables and types - - ## Server ### Setup -### Functions - - ### Consts, variables and types diff --git a/api_docs/bfetch.json b/api_docs/bfetch.json index 76b2118282b2e..ce294077f9499 100644 --- a/api_docs/bfetch.json +++ b/api_docs/bfetch.json @@ -78,7 +78,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 24 + "lineNumber": 23 }, "deprecated": false, "children": [ @@ -98,7 +98,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 25 + "lineNumber": 24 }, "deprecated": false, "returnComment": [], @@ -115,7 +115,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 25 + "lineNumber": 24 }, "deprecated": false } @@ -143,7 +143,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 26 + "lineNumber": 25 }, "deprecated": false, "returnComment": [], @@ -161,7 +161,7 @@ ], "source": { "path": "src/plugins/bfetch/public/plugin.ts", - "lineNumber": 27 + "lineNumber": 26 }, "deprecated": false } @@ -195,7 +195,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 39 + "lineNumber": 41 }, "deprecated": false, "children": [ @@ -211,7 +211,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 40 + "lineNumber": 42 }, "deprecated": false, "returnComment": [], @@ -228,7 +228,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 40 + "lineNumber": 42 }, "deprecated": false } @@ -290,7 +290,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 44 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -322,7 +322,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 45 + "lineNumber": 47 }, "deprecated": false, "returnComment": [], @@ -336,7 +336,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 46 + "lineNumber": 48 }, "deprecated": false }, @@ -368,7 +368,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 47 + "lineNumber": 49 }, "deprecated": false } @@ -402,7 +402,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 49 + "lineNumber": 51 }, "deprecated": false, "returnComment": [], @@ -416,7 +416,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 50 + "lineNumber": 52 }, "deprecated": false }, @@ -448,7 +448,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 51 + "lineNumber": 53 }, "deprecated": false } @@ -682,7 +682,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 81 + "lineNumber": 83 }, "deprecated": false, "returnComment": [], @@ -719,7 +719,7 @@ ], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 89 + "lineNumber": 91 }, "deprecated": false } @@ -738,7 +738,7 @@ "description": [], "source": { "path": "src/plugins/bfetch/server/plugin.ts", - "lineNumber": 94 + "lineNumber": 96 }, "deprecated": false, "children": [], @@ -1343,6 +1343,48 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "bfetch", + "id": "def-common.BatchItemWrapper", + "type": "Interface", + "tags": [], + "label": "BatchItemWrapper", + "description": [], + "source": { + "path": "src/plugins/bfetch/common/batch.ts", + "lineNumber": 23 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "bfetch", + "id": "def-common.BatchItemWrapper.compressed", + "type": "boolean", + "tags": [], + "label": "compressed", + "description": [], + "source": { + "path": "src/plugins/bfetch/common/batch.ts", + "lineNumber": 24 + }, + "deprecated": false + }, + { + "parentPluginId": "bfetch", + "id": "def-common.BatchItemWrapper.payload", + "type": "string", + "tags": [], + "label": "payload", + "description": [], + "source": { + "path": "src/plugins/bfetch/common/batch.ts", + "lineNumber": 25 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "bfetch", "id": "def-common.BatchRequestData", @@ -1684,7 +1726,25 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "bfetch", + "id": "def-common.DISABLE_BFETCH_COMPRESSION", + "type": "string", + "tags": [], + "label": "DISABLE_BFETCH_COMPRESSION", + "description": [], + "signature": [ + "\"bfetch:disableCompression\"" + ], + "source": { + "path": "src/plugins/bfetch/common/constants.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + } + ], "objects": [] } } \ No newline at end of file diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 0e9a9e79dbea6..faf3d7eefc7f9 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -47,3 +47,6 @@ import bfetchObj from './bfetch.json'; ### Interfaces +### Consts, variables and types + + diff --git a/api_docs/cases.json b/api_docs/cases.json index 3d77ada0c336b..bc92995dff6e9 100644 --- a/api_docs/cases.json +++ b/api_docs/cases.json @@ -294,6 +294,38 @@ ], "functions": [], "interfaces": [ + { + "parentPluginId": "cases", + "id": "def-public.Owner", + "type": "Interface", + "tags": [], + "label": "Owner", + "description": [], + "source": { + "path": "x-pack/plugins/cases/public/types.ts", + "lineNumber": 42 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-public.Owner.owner", + "type": "Array", + "tags": [], + "label": "owner", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/cases/public/types.ts", + "lineNumber": 43 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-public.SetupPlugins", @@ -315,17 +347,13 @@ "label": "security", "description": [], "signature": [ - "{ authc: ", - "AuthenticationServiceSetup", - "; sessionTimeout: ", - "SessionTimeout", - "; license: Readonly<{ isLicenseAvailable: () => boolean; isEnabled: () => boolean; getType: () => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; getFeatures: () => ", - "SecurityLicenseFeatures", - "; features$: ", - "Observable", - "<", - "SecurityLicenseFeatures", - ">; }>; __legacyCompat: { logoutUrl: string; tenant: string; }; }" + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.SecurityPluginSetup", + "text": "SecurityPluginSetup" + } ], "source": { "path": "x-pack/plugins/cases/public/types.ts", @@ -424,17 +452,15 @@ "section": "def-public.StartPlugins", "text": "StartPlugins" }, - " & { security: { authc: ", - "AuthenticationServiceSetup", - "; sessionTimeout: ", - "SessionTimeout", - "; license: Readonly<{ isLicenseAvailable: () => boolean; isEnabled: () => boolean; getType: () => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; getFeatures: () => ", - "SecurityLicenseFeatures", - "; features$: ", - "Observable", - "<", - "SecurityLicenseFeatures", - ">; }>; __legacyCompat: { logoutUrl: string; tenant: string; }; }; }" + " & { security: ", + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.SecurityPluginSetup", + "text": "SecurityPluginSetup" + }, + "; }" ], "source": { "path": "x-pack/plugins/cases/public/types.ts", @@ -454,7 +480,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 42 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -474,7 +500,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 43 + "lineNumber": 47 }, "deprecated": false, "returnComment": [], @@ -491,7 +517,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 43 + "lineNumber": 47 }, "deprecated": false } @@ -513,7 +539,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 44 + "lineNumber": 48 }, "deprecated": false, "returnComment": [], @@ -530,7 +556,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 45 + "lineNumber": 49 }, "deprecated": false } @@ -552,7 +578,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 47 + "lineNumber": 51 }, "deprecated": false, "returnComment": [], @@ -569,7 +595,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 47 + "lineNumber": 51 }, "deprecated": false } @@ -591,7 +617,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 48 + "lineNumber": 52 }, "deprecated": false, "returnComment": [], @@ -608,7 +634,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 48 + "lineNumber": 52 }, "deprecated": false } @@ -630,7 +656,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 49 + "lineNumber": 53 }, "deprecated": false, "returnComment": [], @@ -647,7 +673,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 49 + "lineNumber": 53 }, "deprecated": false } @@ -669,7 +695,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false, "returnComment": [], @@ -686,7 +712,7 @@ ], "source": { "path": "x-pack/plugins/cases/public/types.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false } @@ -698,7 +724,170 @@ } }, "server": { - "classes": [], + "classes": [ + { + "parentPluginId": "cases", + "id": "def-server.CasesClient", + "type": "Class", + "tags": [], + "label": "CasesClient", + "description": [ + "\nClient wrapper that contains accessor methods for individual entities within the cases system." + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 21 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 30 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "CasesClientArgs" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 30 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nRetrieves an interface for interacting with cases entities." + ], + "signature": [ + "CasesSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 43 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.attachments", + "type": "Object", + "tags": [], + "label": "attachments", + "description": [ + "\nRetrieves an interface for interacting with attachments (comments) entities." + ], + "signature": [ + "AttachmentsSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 50 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.userActions", + "type": "Object", + "tags": [], + "label": "userActions", + "description": [ + "\nRetrieves an interface for interacting with the user actions associated with the plugin entities." + ], + "signature": [ + "UserActionsSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 57 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.subCases", + "type": "Object", + "tags": [], + "label": "subCases", + "description": [ + "\nRetrieves an interface for interacting with the case as a connector entities.\n\nCurrently this functionality is disabled and will throw an error if this function is called." + ], + "signature": [ + "SubCasesClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 66 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.configure", + "type": "Object", + "tags": [], + "label": "configure", + "description": [ + "\nRetrieves an interface for interacting with the configuration of external connectors for the plugin entities." + ], + "signature": [ + "ConfigureSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 76 + }, + "deprecated": false + }, + { + "parentPluginId": "cases", + "id": "def-server.CasesClient.stats", + "type": "Object", + "tags": [], + "label": "stats", + "description": [ + "\nRetrieves an interface for retrieving statistics related to the cases entities." + ], + "signature": [ + "StatsSubClient" + ], + "source": { + "path": "x-pack/plugins/cases/server/client/client.ts", + "lineNumber": 83 + }, + "deprecated": false + } + ], + "initialIsOpen": false + } + ], "functions": [], "interfaces": [ { @@ -710,7 +899,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/server/types.ts", - "lineNumber": 12 + "lineNumber": 18 }, "deprecated": false, "children": [ @@ -722,18 +911,19 @@ "label": "getCasesClient", "description": [], "signature": [ - "() => ", + "() => Promise<", { "pluginId": "cases", "scope": "server", "docId": "kibCasesPluginApi", "section": "def-server.CasesClient", "text": "CasesClient" - } + }, + ">" ], "source": { "path": "x-pack/plugins/cases/server/types.ts", - "lineNumber": 13 + "lineNumber": 19 }, "deprecated": false, "returnComment": [], @@ -744,1448 +934,62 @@ }, { "parentPluginId": "cases", - "id": "def-server.CasesClient", + "id": "def-server.PluginStartContract", "type": "Interface", "tags": [], - "label": "CasesClient", + "label": "PluginStartContract", "description": [ - "\nThis represents the interface that other plugins can access." + "\nCases server exposed contract for interacting with cases entities." ], "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 102 + "path": "x-pack/plugins/cases/server/plugin.ts", + "lineNumber": 55 }, "deprecated": false, "children": [ { "parentPluginId": "cases", - "id": "def-server.CasesClient.addComment", + "id": "def-server.PluginStartContract.getCasesClientWithRequest", "type": "Function", "tags": [], - "label": "addComment", - "description": [], + "label": "getCasesClientWithRequest", + "description": [ + "\nReturns a client which can be used to interact with the cases backend entities.\n" + ], "signature": [ - "(args: ", - "CasesClientAddComment", - ") => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + "(request: ", { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + ") => Promise<", { "pluginId": "cases", - "scope": "common", + "scope": "server", "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 103 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.addComment.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientAddComment" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 103 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.create", - "type": "Function", - "tags": [], - "label": "create", - "description": [], - "signature": [ - "(theCase: { type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; } & { description: string; tags: string[]; title: string; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }) => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 104 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.create.$1", - "type": "CompoundType", - "tags": [], - "label": "theCase", - "description": [], - "signature": [ - "{ type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; } & { description: string; tags: string[]; title: string; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 104 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.get", - "type": "Function", - "tags": [], - "label": "get", - "description": [], - "signature": [ - "(args: ", - "CasesClientGet", - ") => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 105 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.get.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGet" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 105 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getAlerts", - "type": "Function", - "tags": [], - "label": "getAlerts", - "description": [], - "signature": [ - "(args: ", - "CasesClientGetAlerts", - ") => Promise<", - "CasesClientGetAlertsResponse", - ">" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 106 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getAlerts.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGetAlerts" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 106 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getFields", - "type": "Function", - "tags": [], - "label": "getFields", - "description": [], - "signature": [ - "(args: ", - "ConfigureFields", - ") => Promise<{ defaultMappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; fields: { id: string; name: string; required: boolean; type: \"text\" | \"textarea\"; }[]; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 107 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getFields.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "ConfigureFields" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 107 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getMappings", - "type": "Function", - "tags": [], - "label": "getMappings", - "description": [], - "signature": [ - "(args: ", - "MappingsClient", - ") => Promise<{ action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 108 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getMappings.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "MappingsClient" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 108 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getUserActions", - "type": "Function", - "tags": [], - "label": "getUserActions", - "description": [], - "signature": [ - "(args: ", - "CasesClientGetUserActions", - ") => Promise<({ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; })[]>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 109 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getUserActions.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGetUserActions" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 109 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.push", - "type": "Function", - "tags": [], - "label": "push", - "description": [], - "signature": [ - "(args: ", - "CasesClientPush", - ") => Promise<{ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 110 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.push.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientPush" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 110 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.update", - "type": "Function", - "tags": [], - "label": "update", - "description": [], - "signature": [ - "(args: { cases: ({ description?: string | undefined; status?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - " | undefined; tags?: string[] | undefined; title?: string | undefined; type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; connector?: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; })[]; }) => Promise<({ description: string; status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; tags: string[]; title: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - "; connector: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".user; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert | ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]>" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 111 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.update.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "{ cases: ({ description?: string | undefined; status?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - " | undefined; tags?: string[] | undefined; title?: string | undefined; type?: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - " | undefined; connector?: ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.ConnectorTypes", - "text": "ConnectorTypes" - }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; })[]; }" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 111 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.updateAlertsStatus", - "type": "Function", - "tags": [], - "label": "updateAlertsStatus", - "description": [], - "signature": [ - "(args: ", - "CasesClientUpdateAlertsStatus", - ") => Promise" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 112 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.updateAlertsStatus.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientUpdateAlertsStatus" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 112 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getCaseIdsByAlertId", - "type": "Function", - "tags": [], - "label": "getCaseIdsByAlertId", - "description": [], - "signature": [ - "(args: ", - "CasesClientGetCasesByAlert", - ") => Promise" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 113 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.CasesClient.getCaseIdsByAlertId.$1", - "type": "Object", - "tags": [], - "label": "args", - "description": [], - "signature": [ - "CasesClientGetCasesByAlert" - ], - "source": { - "path": "x-pack/plugins/cases/server/client/types.ts", - "lineNumber": 113 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "cases", - "id": "def-server.PluginStartContract", - "type": "Interface", - "tags": [], - "label": "PluginStartContract", - "description": [], - "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 29 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.PluginStartContract.getCasesClientWithRequestAndContext", - "type": "Function", - "tags": [], - "label": "getCasesClientWithRequestAndContext", - "description": [], - "signature": [ - "(context: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.RequestHandlerContext", - "text": "RequestHandlerContext" - }, - ", request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - { - "pluginId": "cases", - "scope": "server", - "docId": "kibCasesPluginApi", - "section": "def-server.CasesClient", - "text": "CasesClient" - } - ], - "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 30 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "cases", - "id": "def-server.PluginStartContract.getCasesClientWithRequestAndContext.$1", - "type": "Object", - "tags": [], - "label": "context", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCorePluginApi", - "section": "def-server.RequestHandlerContext", - "text": "RequestHandlerContext" - } - ], - "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 31 - }, - "deprecated": false, - "isRequired": true + "section": "def-server.CasesClient", + "text": "CasesClient" }, + ">" + ], + "source": { + "path": "x-pack/plugins/cases/server/plugin.ts", + "lineNumber": 62 + }, + "deprecated": false, + "children": [ { "parentPluginId": "cases", - "id": "def-server.PluginStartContract.getCasesClientWithRequestAndContext.$2", + "id": "def-server.PluginStartContract.getCasesClientWithRequest.$1", "type": "Object", "tags": [], "label": "request", - "description": [], + "description": [ + "a KibanaRequest" + ], "signature": [ { "pluginId": "core", @@ -2197,14 +1001,16 @@ "" ], "source": { - "path": "x-pack/plugins/cases/server/index.ts", - "lineNumber": 32 + "path": "x-pack/plugins/cases/server/plugin.ts", + "lineNumber": 62 }, "deprecated": false, "isRequired": true } ], - "returnComment": [] + "returnComment": [ + "a {@link CasesClient}" + ] } ], "initialIsOpen": false @@ -2339,7 +1145,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/runtime_types.ts", - "lineNumber": 71 + "lineNumber": 72 }, "deprecated": false, "isRequired": true @@ -2402,7 +1208,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "children": [ @@ -2418,7 +1224,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "isRequired": true @@ -2435,7 +1241,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "isRequired": true @@ -2456,7 +1262,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 32 + "lineNumber": 33 }, "deprecated": false, "children": [ @@ -2472,7 +1278,44 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 32 + "lineNumber": 33 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.getCaseConfigurationDetailsUrl", + "type": "Function", + "tags": [], + "label": "getCaseConfigurationDetailsUrl", + "description": [], + "signature": [ + "(configureID: string) => string" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/helpers.ts", + "lineNumber": 53 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "cases", + "id": "def-common.getCaseConfigurationDetailsUrl.$1", + "type": "string", + "tags": [], + "label": "configureID", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/helpers.ts", + "lineNumber": 53 }, "deprecated": false, "isRequired": true @@ -2493,7 +1336,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false, "children": [ @@ -2509,7 +1352,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false, "isRequired": true @@ -2530,7 +1373,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "children": [ @@ -2546,7 +1389,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "isRequired": true @@ -2563,7 +1406,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "isRequired": true @@ -2584,7 +1427,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 52 + "lineNumber": 57 }, "deprecated": false, "children": [ @@ -2600,7 +1443,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 52 + "lineNumber": 57 }, "deprecated": false, "isRequired": true @@ -2621,7 +1464,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 40 + "lineNumber": 41 }, "deprecated": false, "children": [ @@ -2637,7 +1480,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 40 + "lineNumber": 41 }, "deprecated": false, "isRequired": true @@ -2658,7 +1501,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false, "children": [ @@ -2674,7 +1517,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false, "isRequired": true @@ -2691,7 +1534,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false, "isRequired": true @@ -2712,7 +1555,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false, "children": [ @@ -2728,7 +1571,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false, "isRequired": true @@ -2749,7 +1592,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false, "children": [ @@ -2765,7 +1608,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false, "isRequired": true @@ -2782,7 +1625,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/helpers.ts", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false, "isRequired": true @@ -2841,7 +1684,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 144 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -2854,7 +1697,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 145 + "lineNumber": 146 }, "deprecated": false }, @@ -2867,7 +1710,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 146 + "lineNumber": 147 }, "deprecated": false }, @@ -2880,7 +1723,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 147 + "lineNumber": 148 }, "deprecated": false }, @@ -2893,7 +1736,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 148 + "lineNumber": 149 }, "deprecated": false }, @@ -2906,7 +1749,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 149 + "lineNumber": 150 }, "deprecated": false } @@ -2939,7 +1782,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 112 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -2962,7 +1805,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 113 + "lineNumber": 114 }, "deprecated": false }, @@ -2975,7 +1818,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 114 + "lineNumber": 115 }, "deprecated": false }, @@ -2988,7 +1831,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 115 + "lineNumber": 116 }, "deprecated": false }, @@ -3001,7 +1844,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 116 + "lineNumber": 117 }, "deprecated": false } @@ -3017,7 +1860,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 135 + "lineNumber": 136 }, "deprecated": false, "children": [ @@ -3033,7 +1876,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 136 + "lineNumber": 137 }, "deprecated": false } @@ -3049,7 +1892,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 139 + "lineNumber": 140 }, "deprecated": false, "children": [ @@ -3062,7 +1905,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 140 + "lineNumber": 141 }, "deprecated": false }, @@ -3075,7 +1918,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 141 + "lineNumber": 142 }, "deprecated": false }, @@ -3088,7 +1931,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 142 + "lineNumber": 143 }, "deprecated": false } @@ -3114,7 +1957,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 80 + "lineNumber": 81 }, "deprecated": false, "children": [ @@ -3170,7 +2013,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 81 + "lineNumber": 82 }, "deprecated": false }, @@ -3183,7 +2026,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 82 + "lineNumber": 83 }, "deprecated": false }, @@ -3206,7 +2049,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 83 + "lineNumber": 84 }, "deprecated": false }, @@ -3229,7 +2072,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 84 + "lineNumber": 85 }, "deprecated": false }, @@ -3245,7 +2088,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 85 + "lineNumber": 86 }, "deprecated": false }, @@ -3261,7 +2104,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 86 + "lineNumber": 87 }, "deprecated": false }, @@ -3277,7 +2120,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 87 + "lineNumber": 88 }, "deprecated": false }, @@ -3299,7 +2142,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 88 + "lineNumber": 89 }, "deprecated": false } @@ -3431,7 +2274,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 106 + "lineNumber": 107 }, "deprecated": false, "children": [ @@ -3447,7 +2290,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 107 + "lineNumber": 108 }, "deprecated": false }, @@ -3463,7 +2306,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 108 + "lineNumber": 109 }, "deprecated": false }, @@ -3479,7 +2322,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 109 + "lineNumber": 110 }, "deprecated": false } @@ -3520,7 +2363,7 @@ "label": "actionField", "description": [], "signature": [ - "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]" + "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]" ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", @@ -3652,7 +2495,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 152 + "lineNumber": 153 }, "deprecated": false, "children": [ @@ -3665,7 +2508,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 153 + "lineNumber": 154 }, "deprecated": false }, @@ -3688,7 +2531,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 154 + "lineNumber": 155 }, "deprecated": false }, @@ -3704,7 +2547,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 155 + "lineNumber": 156 }, "deprecated": false } @@ -3720,7 +2563,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false, "children": [ @@ -3733,7 +2576,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -3749,7 +2592,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -3772,7 +2615,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false } @@ -3788,7 +2631,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 124 + "lineNumber": 125 }, "deprecated": false, "children": [ @@ -3804,7 +2647,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 125 + "lineNumber": 126 }, "deprecated": false }, @@ -3820,7 +2663,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 126 + "lineNumber": 127 }, "deprecated": false }, @@ -3836,7 +2679,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 127 + "lineNumber": 128 }, "deprecated": false } @@ -3956,7 +2799,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 130 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -3979,18 +2822,19 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 131 + "lineNumber": 132 }, "deprecated": false }, { "parentPluginId": "cases", "id": "def-common.FetchCasesProps.filterOptions", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "filterOptions", "description": [], "signature": [ + "(", { "pluginId": "cases", "scope": "common", @@ -3998,11 +2842,11 @@ "section": "def-common.FilterOptions", "text": "FilterOptions" }, - " | undefined" + " & { owner: string[]; }) | undefined" ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 132 + "lineNumber": 133 }, "deprecated": false } @@ -4018,7 +2862,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 158 + "lineNumber": 159 }, "deprecated": false, "children": [ @@ -4031,7 +2875,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 159 + "lineNumber": 160 }, "deprecated": false }, @@ -4047,7 +2891,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 160 + "lineNumber": 161 }, "deprecated": false } @@ -4063,7 +2907,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 98 + "lineNumber": 99 }, "deprecated": false, "children": [ @@ -4076,7 +2920,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 99 + "lineNumber": 100 }, "deprecated": false }, @@ -4099,7 +2943,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 100 + "lineNumber": 101 }, "deprecated": false }, @@ -4115,7 +2959,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false }, @@ -4131,7 +2975,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false }, @@ -4147,7 +2991,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 103 + "lineNumber": 104 }, "deprecated": false } @@ -4163,7 +3007,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 91 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -4176,7 +3020,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false }, @@ -4189,7 +3033,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 93 + "lineNumber": 94 }, "deprecated": false }, @@ -4211,7 +3055,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 94 + "lineNumber": 95 }, "deprecated": false }, @@ -4227,7 +3071,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 95 + "lineNumber": 96 }, "deprecated": false } @@ -4243,7 +3087,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 178 + "lineNumber": 179 }, "deprecated": false, "children": [ @@ -4259,7 +3103,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 179 + "lineNumber": 180 }, "deprecated": false }, @@ -4275,7 +3119,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 180 + "lineNumber": 181 }, "deprecated": false }, @@ -4291,7 +3135,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 181 + "lineNumber": 182 }, "deprecated": false }, @@ -4307,7 +3151,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 182 + "lineNumber": 183 }, "deprecated": false }, @@ -4323,7 +3167,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 183 + "lineNumber": 184 }, "deprecated": false }, @@ -4339,7 +3183,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 184 + "lineNumber": 185 }, "deprecated": false }, @@ -4355,7 +3199,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 185 + "lineNumber": 186 }, "deprecated": false }, @@ -4371,7 +3215,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 186 + "lineNumber": 187 }, "deprecated": false }, @@ -4387,7 +3231,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 187 + "lineNumber": 188 }, "deprecated": false }, @@ -4403,7 +3247,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 188 + "lineNumber": 189 }, "deprecated": false }, @@ -4419,7 +3263,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 189 + "lineNumber": 190 }, "deprecated": false }, @@ -4435,7 +3279,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 190 + "lineNumber": 191 }, "deprecated": false }, @@ -4451,7 +3295,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 191 + "lineNumber": 192 }, "deprecated": false }, @@ -4467,7 +3311,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 192 + "lineNumber": 193 }, "deprecated": false }, @@ -4483,7 +3327,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 193 + "lineNumber": 194 }, "deprecated": false }, @@ -4499,7 +3343,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 194 + "lineNumber": 195 }, "deprecated": false }, @@ -4515,7 +3359,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false }, @@ -4531,7 +3375,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -4547,7 +3391,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -4563,7 +3407,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -4579,7 +3423,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -4595,7 +3439,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -4611,7 +3455,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -4627,7 +3471,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -4643,7 +3487,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -4659,7 +3503,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -4675,7 +3519,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -4691,7 +3535,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -4707,7 +3551,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -4723,7 +3567,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -4739,7 +3583,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -4755,7 +3599,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -4771,7 +3615,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -4787,7 +3631,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false } @@ -4803,7 +3647,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false, "children": [ @@ -4826,7 +3670,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -4842,7 +3686,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -4858,7 +3702,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -4874,7 +3718,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -4890,7 +3734,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false } @@ -4916,7 +3760,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 75 + "lineNumber": 76 }, "deprecated": false, "children": [ @@ -4938,7 +3782,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 76 + "lineNumber": 77 }, "deprecated": false }, @@ -4951,7 +3795,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 77 + "lineNumber": 78 }, "deprecated": false } @@ -4967,7 +3811,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 168 + "lineNumber": 169 }, "deprecated": false, "children": [ @@ -4983,7 +3827,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 169 + "lineNumber": 170 }, "deprecated": false }, @@ -5039,7 +3883,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 170 + "lineNumber": 171 }, "deprecated": false }, @@ -5055,7 +3899,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 171 + "lineNumber": 172 }, "deprecated": false }, @@ -5079,7 +3923,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 172 + "lineNumber": 173 }, "deprecated": false }, @@ -5101,7 +3945,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 173 + "lineNumber": 174 }, "deprecated": false }, @@ -5117,7 +3961,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 174 + "lineNumber": 175 }, "deprecated": false }, @@ -5133,7 +3977,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 175 + "lineNumber": 176 }, "deprecated": false } @@ -5153,7 +3997,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false, "initialIsOpen": false @@ -5195,7 +4039,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 51 + "lineNumber": 53 }, "deprecated": false, "initialIsOpen": false @@ -5223,7 +4067,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 119 + "lineNumber": 120 }, "deprecated": false, "initialIsOpen": false @@ -5242,7 +4086,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 41 + "lineNumber": 60 }, "deprecated": false, "initialIsOpen": false @@ -5261,7 +4105,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 40 + "lineNumber": 59 }, "deprecated": false, "initialIsOpen": false @@ -5345,7 +4189,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5353,7 +4197,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -5369,7 +4213,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5377,11 +4221,45 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 135 + "lineNumber": 149 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllReportersFindRequest", + "type": "Type", + "tags": [], + "label": "AllReportersFindRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 313 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllTagsFindRequest", + "type": "Type", + "tags": [], + "label": "AllTagsFindRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 312 }, "deprecated": false, "initialIsOpen": false @@ -5427,7 +4305,40 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 143 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AttributesTypeUser", + "type": "Type", + "tags": [], + "label": "AttributesTypeUser", + "description": [], + "signature": [ + "{ comment: string; type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5435,39 +4346,56 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 130 + "lineNumber": 144 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_ALERTS_URL", + "type": "string", + "tags": [], + "label": "CASE_ALERTS_URL", + "description": [], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 53 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.CASE_ALERTS_URL", + "id": "def-common.CASE_COMMENT_DETAILS_URL", "type": "string", "tags": [], - "label": "CASE_ALERTS_URL", + "label": "CASE_COMMENT_DETAILS_URL", "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 34 + "lineNumber": 46 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.CASE_COMMENT_DETAILS_URL", + "id": "def-common.CASE_COMMENT_SAVED_OBJECT", "type": "string", "tags": [], - "label": "CASE_COMMENT_DETAILS_URL", + "label": "CASE_COMMENT_SAVED_OBJECT", "description": [], + "signature": [ + "\"cases-comments\"" + ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 27 + "lineNumber": 16 }, "deprecated": false, "initialIsOpen": false @@ -5481,7 +4409,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 26 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -5495,7 +4423,38 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 19 + "lineNumber": 38 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_CONFIGURE_DETAILS_URL", + "type": "string", + "tags": [], + "label": "CASE_CONFIGURE_DETAILS_URL", + "description": [], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 37 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_CONFIGURE_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_CONFIGURE_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-configure\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 17 }, "deprecated": false, "initialIsOpen": false @@ -5509,7 +4468,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 18 + "lineNumber": 36 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_CONNECTOR_MAPPINGS_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_CONNECTOR_MAPPINGS_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-connector-mappings\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 13 }, "deprecated": false, "initialIsOpen": false @@ -5523,7 +4499,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 17 + "lineNumber": 35 }, "deprecated": false, "initialIsOpen": false @@ -5537,7 +4513,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 28 + "lineNumber": 47 }, "deprecated": false, "initialIsOpen": false @@ -5551,7 +4527,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 29 + "lineNumber": 48 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 12 }, "deprecated": false, "initialIsOpen": false @@ -5565,7 +4558,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 30 + "lineNumber": 49 }, "deprecated": false, "initialIsOpen": false @@ -5579,7 +4572,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 31 + "lineNumber": 50 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CASE_USER_ACTION_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "CASE_USER_ACTION_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-user-actions\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 15 }, "deprecated": false, "initialIsOpen": false @@ -5593,7 +4603,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 32 + "lineNumber": 51 }, "deprecated": false, "initialIsOpen": false @@ -5662,11 +4672,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 175 + "lineNumber": 288 }, "deprecated": false, "initialIsOpen": false @@ -5757,7 +4767,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 189 + "lineNumber": 303 }, "deprecated": false, "initialIsOpen": false @@ -5826,11 +4836,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; }" + ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; owner?: string | undefined; } & { id: string; version: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 187 + "lineNumber": 301 }, "deprecated": false, "initialIsOpen": false @@ -5891,11 +4901,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }" + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 182 + "lineNumber": 295 }, "deprecated": false, "initialIsOpen": false @@ -5964,7 +4974,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", { "pluginId": "cases", "scope": "common", @@ -5972,7 +4982,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -5980,7 +4990,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -5988,7 +4998,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6004,7 +5014,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6012,7 +5022,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6020,7 +5030,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6028,7 +5038,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6044,7 +5054,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6052,11 +5062,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 183 + "lineNumber": 296 }, "deprecated": false, "initialIsOpen": false @@ -6075,7 +5085,24 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 16 + "lineNumber": 34 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesByAlertIDRequest", + "type": "Type", + "tags": [], + "label": "CasesByAlertIDRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 299 }, "deprecated": false, "initialIsOpen": false @@ -6138,11 +5165,68 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; }" + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 181 + "lineNumber": 294 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesConfigurationsResponse", + "type": "Type", + "tags": [], + "label": "CasesConfigurationsResponse", + "description": [], + "signature": [ + "({ connector: ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".jira; fields: { issueType: string | null; priority: string | null; parent: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".resilient; fields: { incidentTypes: string[] | null; severityCode: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".serviceNowITSM; fields: { impact: string | null; severity: string | null; urgency: string | null; category: string | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".serviceNowSIR; fields: { category: string | null; destIp: boolean | null; malwareHash: boolean | null; malwareUrl: boolean | null; priority: string | null; sourceIp: boolean | null; subcategory: string | null; } | null; }) | ({ id: string; name: string; } & { type: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; } & { id: string; version: string; error: string | null; owner: string; })[]" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 84 }, "deprecated": false, "initialIsOpen": false @@ -6195,11 +5279,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 47 + "lineNumber": 79 }, "deprecated": false, "initialIsOpen": false @@ -6252,11 +5336,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 50 + "lineNumber": 82 }, "deprecated": false, "initialIsOpen": false @@ -6313,7 +5397,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 49 + "lineNumber": 81 }, "deprecated": false, "initialIsOpen": false @@ -6366,11 +5450,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 48 + "lineNumber": 80 }, "deprecated": false, "initialIsOpen": false @@ -6423,11 +5507,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; } & { version: string; error: string | null; }" + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; } & { id: string; version: string; error: string | null; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 51 + "lineNumber": 83 }, "deprecated": false, "initialIsOpen": false @@ -6444,7 +5528,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 190 + "lineNumber": 304 }, "deprecated": false, "initialIsOpen": false @@ -6473,11 +5557,11 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - " | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; }" + " | undefined; reporters?: string | string[] | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string | string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; owner?: string | string[] | undefined; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 185 + "lineNumber": 298 }, "deprecated": false, "initialIsOpen": false @@ -6546,7 +5630,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", { "pluginId": "cases", "scope": "common", @@ -6554,7 +5638,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6562,7 +5646,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6570,7 +5654,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6586,7 +5670,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6594,7 +5678,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6602,7 +5686,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6610,7 +5694,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6626,7 +5710,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6634,11 +5718,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 186 + "lineNumber": 300 }, "deprecated": false, "initialIsOpen": false @@ -6707,11 +5791,11 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; })[]; }" + ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; owner?: string | undefined; } & { id: string; version: string; })[]; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 188 + "lineNumber": 302 }, "deprecated": false, "initialIsOpen": false @@ -6780,7 +5864,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { subCaseIds?: string[] | undefined; subCases?: ({ status: ", { "pluginId": "cases", "scope": "common", @@ -6788,7 +5872,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6796,7 +5880,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6804,7 +5888,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6820,7 +5904,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6828,7 +5912,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[] | undefined; comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -6836,7 +5920,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6844,7 +5928,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -6860,7 +5944,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -6868,11 +5952,28 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 184 + "lineNumber": 297 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesStatusRequest", + "type": "Type", + "tags": [], + "label": "CasesStatusRequest", + "description": [], + "signature": [ + "{ owner?: string | string[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/status.ts", + "lineNumber": 39 }, "deprecated": false, "initialIsOpen": false @@ -6889,7 +5990,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/status.ts", - "lineNumber": 30 + "lineNumber": 38 }, "deprecated": false, "initialIsOpen": false @@ -6969,11 +6070,28 @@ "label": "CaseUserActionAttributes", "description": [], "signature": [ - "{ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; }" + "{ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 59 + "lineNumber": 62 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseUserActionResponse", + "type": "Type", + "tags": [], + "label": "CaseUserActionResponse", + "description": [], + "signature": [ + "{ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -6986,11 +6104,11 @@ "label": "CaseUserActionsResponse", "description": [], "signature": [ - "({ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; })[]" + "({ action_field: (\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]; action: \"add\" | \"delete\" | \"create\" | \"update\" | \"push-to-service\"; action_at: string; action_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; new_value: string | null; old_value: string | null; owner: string; } & { action_id: string; case_id: string; comment_id: string | null; } & { sub_case_id?: string | undefined; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 60 + "lineNumber": 63 }, "deprecated": false, "initialIsOpen": false @@ -7007,7 +6125,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 46 + "lineNumber": 78 }, "deprecated": false, "initialIsOpen": false @@ -7028,7 +6146,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7068,7 +6186,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7117,7 +6235,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7125,7 +6243,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7141,7 +6259,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7149,11 +6267,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; })" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 131 + "lineNumber": 145 }, "deprecated": false, "initialIsOpen": false @@ -7174,7 +6292,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; } | ({ type?: ", + " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; owner?: string | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; } | ({ type?: ", { "pluginId": "cases", "scope": "common", @@ -7190,7 +6308,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert | undefined; alertId?: string | string[] | undefined; index?: string | string[] | undefined; rule?: { id: string | null; name: string | null; } | undefined; } & { associationType?: ", + ".generatedAlert | undefined; alertId?: string | string[] | undefined; index?: string | string[] | undefined; rule?: { id: string | null; name: string | null; } | undefined; owner?: string | undefined; } & { associationType?: ", { "pluginId": "cases", "scope": "common", @@ -7198,11 +6316,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; })" + " | undefined; created_at?: string | undefined; created_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | undefined; owner?: string | undefined; pushed_at?: string | null | undefined; pushed_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; updated_at?: string | null | undefined; updated_by?: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null | undefined; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 138 + "lineNumber": 152 }, "deprecated": false, "initialIsOpen": false @@ -7223,7 +6341,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { id: string; version: string; }) | ({ type: ", + ".user; owner: string; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7239,11 +6357,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { id: string; version: string; })" + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { id: string; version: string; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 137 + "lineNumber": 151 }, "deprecated": false, "initialIsOpen": false @@ -7264,7 +6382,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } | { type: ", + ".user; owner: string; } | { type: ", { "pluginId": "cases", "scope": "common", @@ -7280,11 +6398,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; }" + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 132 + "lineNumber": 146 }, "deprecated": false, "initialIsOpen": false @@ -7313,11 +6431,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; }" + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 140 + "lineNumber": 154 }, "deprecated": false, "initialIsOpen": false @@ -7338,11 +6456,11 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; }" + ".user; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 139 + "lineNumber": 153 }, "deprecated": false, "initialIsOpen": false @@ -7363,7 +6481,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7371,7 +6489,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7387,7 +6505,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7395,11 +6513,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; })" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; })" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 133 + "lineNumber": 147 }, "deprecated": false, "initialIsOpen": false @@ -7428,7 +6546,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7436,11 +6554,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 134 + "lineNumber": 148 }, "deprecated": false, "initialIsOpen": false @@ -7461,7 +6579,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7469,7 +6587,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -7485,7 +6603,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -7493,11 +6611,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]; page: number; per_page: number; total: number; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[]; page: number; per_page: number; total: number; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 136 + "lineNumber": 150 }, "deprecated": false, "initialIsOpen": false @@ -7514,7 +6632,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "initialIsOpen": false @@ -7569,11 +6687,11 @@ "label": "ConnectorMappings", "description": [], "signature": [ - "{ mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; }" + "{ mappings: { action_type: \"append\" | \"overwrite\" | \"nothing\"; source: \"description\" | \"title\" | \"comments\"; target: string; }[]; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 37 + "lineNumber": 38 }, "deprecated": false, "initialIsOpen": false @@ -7590,7 +6708,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "initialIsOpen": false @@ -7775,7 +6893,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 63 + "lineNumber": 90 }, "deprecated": false, "initialIsOpen": false @@ -7844,7 +6962,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); settings: { syncAlerts: boolean; }; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"type\" | \"status\" | \"description\" | \"title\" | \"updated_at\" | \"tags\" | \"settings\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closed_at\" | \"closed_by\" | \"external_service\"> & { connector: ", + ".none; fields: null; }); settings: { syncAlerts: boolean; }; owner: string; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; external_service: ({ connector_id: string; connector_name: string; external_id: string; external_title: string; external_url: string; } & { pushed_at: string; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; }) | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"type\" | \"status\" | \"description\" | \"title\" | \"updated_at\" | \"tags\" | \"settings\" | \"owner\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closed_at\" | \"closed_by\" | \"external_service\"> & { connector: ", { "pluginId": "cases", "scope": "common", @@ -7856,7 +6974,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 193 + "lineNumber": 307 }, "deprecated": false, "initialIsOpen": false @@ -7948,7 +7066,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; } & { id: string; version: string; }, \"type\" | \"status\" | \"description\" | \"title\" | \"id\" | \"version\" | \"tags\" | \"settings\"> & { connector?: ", + ".none; fields: null; }) | undefined; settings?: { syncAlerts: boolean; } | undefined; owner?: string | undefined; } & { id: string; version: string; }, \"type\" | \"status\" | \"description\" | \"title\" | \"id\" | \"version\" | \"tags\" | \"settings\" | \"owner\"> & { connector?: ", { "pluginId": "cases", "scope": "common", @@ -7960,7 +7078,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 194 + "lineNumber": 308 }, "deprecated": false, "initialIsOpen": false @@ -8013,7 +7131,7 @@ "section": "def-common.ConnectorTypes", "text": "ConnectorTypes" }, - ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"updated_at\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closure_type\"> & { connector: ", + ".none; fields: null; }); closure_type: \"close-by-user\" | \"close-by-pushing\"; } & { owner: string; } & { created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }, \"updated_at\" | \"owner\" | \"created_at\" | \"created_by\" | \"updated_by\" | \"closure_type\"> & { connector: ", { "pluginId": "cases", "scope": "common", @@ -8024,59 +7142,93 @@ "; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 53 + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 86 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.ESConnectorFields", + "type": "Type", + "tags": [], + "label": "ESConnectorFields", + "description": [], + "signature": [ + "{ key: string; value: unknown; }[]" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/connectors/index.ts", + "lineNumber": 94 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.ExternalServiceResponse", + "type": "Type", + "tags": [], + "label": "ExternalServiceResponse", + "description": [], + "signature": [ + "{ title: string; id: string; pushedDate: string; url: string; } & { comments?: ({ commentId: string; pushedDate: string; } & { externalCommentId?: string | undefined; })[] | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 305 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.ESConnectorFields", + "id": "def-common.FindQueryParams", "type": "Type", "tags": [], - "label": "ESConnectorFields", + "label": "FindQueryParams", "description": [], "signature": [ - "{ key: string; value: unknown; }[]" + "{ subCaseId?: string | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; hasReferenceOperator?: \"AND\" | \"OR\" | undefined; hasReference?: { id: string; type: string; } | { id: string; type: string; }[] | undefined; fields?: string[] | undefined; filter?: string | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/connectors/index.ts", - "lineNumber": 94 + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 142 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.ExternalServiceResponse", + "id": "def-common.GetCaseIdsByAlertIdAggs", "type": "Type", "tags": [], - "label": "ExternalServiceResponse", + "label": "GetCaseIdsByAlertIdAggs", "description": [], "signature": [ - "{ title: string; id: string; pushedDate: string; url: string; } & { comments?: ({ commentId: string; pushedDate: string; } & { externalCommentId?: string | undefined; })[] | undefined; }" + "{ references: { doc_count: number; caseIds: { buckets: { key: string; }[]; }; }; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 191 + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 155 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.GetCaseIdsByAlertIdAggs", + "id": "def-common.GetConfigureFindRequest", "type": "Type", "tags": [], - "label": "GetCaseIdsByAlertIdAggs", + "label": "GetConfigureFindRequest", "description": [], "signature": [ - "{ references: { doc_count: number; caseIds: { buckets: { key: string; }[]; }; }; }" + "{ owner?: string | string[] | undefined; }" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 141 + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 90 }, "deprecated": false, "initialIsOpen": false @@ -8093,7 +7245,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", - "lineNumber": 55 + "lineNumber": 56 }, "deprecated": false, "initialIsOpen": false @@ -8110,7 +7262,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 44 + "lineNumber": 63 }, "deprecated": false, "initialIsOpen": false @@ -8146,7 +7298,41 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 57 + "lineNumber": 76 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.MAX_CONCURRENT_SEARCHES", + "type": "number", + "tags": [], + "label": "MAX_CONCURRENT_SEARCHES", + "description": [], + "signature": [ + "10" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 97 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.MAX_DOCS_PER_PAGE", + "type": "number", + "tags": [], + "label": "MAX_DOCS_PER_PAGE", + "description": [], + "signature": [ + "10000" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 96 }, "deprecated": false, "initialIsOpen": false @@ -8163,7 +7349,26 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 58 + "lineNumber": 77 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.OWNER_FIELD", + "type": "string", + "tags": [], + "label": "OWNER_FIELD", + "description": [ + "\nThis field is used for authorization of the entities within the cases plugin. Each entity within Cases will have the owner field\nset to a string that represents the plugin that \"owns\" (i.e. the plugin that originally issued the POST request to\ncreate the entity) the entity.\n\nThe Authorization class constructs a string composed of the operation being performed (createCase, getComment, etc),\nand the owner of the entity being acted upon or created. This string is then given to the Security plugin which\nchecks to see if the user making the request has that particular string stored within it's privileges. If it does,\nthen the operation succeeds, otherwise the operation fails.\n\nAPIs that create/update an entity require that the owner field be passed in the body of the request.\nAPIs that search for entities typically require that the owner be passed as a query parameter.\nAPIs that specify an ID of an entity directly generally don't need to specify the owner field.\n\nFor APIs that create/update an entity, the RBAC implementation checks to see if the user making the request has the\ncorrect privileges for performing that action (a create/update) for the specified owner.\nThis check is done through the Security plugin's API.\n\nFor APIs that search for entities, the RBAC implementation creates a filter for the saved objects query that limits\nthe search to only owners that the user has access to. We also check that the objects returned by the saved objects\nAPI have the limited owner scope. If we find one that the user does not have permissions for, we throw a 403 error.\nThe owner field that is passed in as a query parameter can be used to further limit the results. If a user attempts\nto pass an owner that they do not have access to, the owner is ignored.\n\nFor APIs that retrieve/delete entities directly using their ID, the RBAC implementation requests the object first,\nand then checks to see if the user making the request has access to that operation and owner. If the user does, the\noperation continues, otherwise we throw a 403." + ], + "signature": [ + "\"owner\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/constants.ts", + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -8180,7 +7385,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 45 + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -8202,6 +7407,25 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "cases", + "id": "def-common.SAVED_OBJECT_TYPES", + "type": "Array", + "tags": [], + "label": "SAVED_OBJECT_TYPES", + "description": [ + "\nIf more values are added here please also add them here: x-pack/test/case_api_integration/common/fixtures/plugins" + ], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 22 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "cases", "id": "def-common.SavedObjectFindOptions", @@ -8214,7 +7438,26 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/saved_object.ts", - "lineNumber": 39 + "lineNumber": 72 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.SECURITY_SOLUTION_OWNER", + "type": "string", + "tags": [], + "label": "SECURITY_SOLUTION_OWNER", + "description": [ + "\nThis must be the same value that the security solution plugin uses to define the case kind when it registers the\nfeature for the 7.13 migration only.\n\nThis variable is being also used by test files and mocks." + ], + "signature": [ + "\"securitySolution\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 85 }, "deprecated": false, "initialIsOpen": false @@ -8231,7 +7474,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 42 + "lineNumber": 61 }, "deprecated": false, "initialIsOpen": false @@ -8248,7 +7491,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 43 + "lineNumber": 62 }, "deprecated": false, "initialIsOpen": false @@ -8330,7 +7573,24 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 23 + "lineNumber": 42 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.SUB_CASE_SAVED_OBJECT", + "type": "string", + "tags": [], + "label": "SUB_CASE_SAVED_OBJECT", + "description": [], + "signature": [ + "\"cases-sub-case\"" + ], + "source": { + "path": "x-pack/plugins/cases/common/constants.ts", + "lineNumber": 14 }, "deprecated": false, "initialIsOpen": false @@ -8344,7 +7604,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 24 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false @@ -8358,7 +7618,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 21 + "lineNumber": 40 }, "deprecated": false, "initialIsOpen": false @@ -8372,7 +7632,7 @@ "description": [], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 22 + "lineNumber": 41 }, "deprecated": false, "initialIsOpen": false @@ -8393,11 +7653,11 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; }" + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 75 + "lineNumber": 107 }, "deprecated": false, "initialIsOpen": false @@ -8422,7 +7682,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 79 + "lineNumber": 111 }, "deprecated": false, "initialIsOpen": false @@ -8443,7 +7703,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -8451,7 +7711,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8459,7 +7719,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -8475,7 +7735,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8483,11 +7743,36 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 76 + "lineNumber": 108 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.SubCasesFindRequest", + "type": "Type", + "tags": [], + "label": "SubCasesFindRequest", + "description": [], + "signature": [ + "{ status?: ", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatuses", + "text": "CaseStatuses" + }, + " | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; fields?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; search?: string | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; owner?: string | undefined; }" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", + "lineNumber": 113 }, "deprecated": false, "initialIsOpen": false @@ -8508,7 +7793,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -8516,7 +7801,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8524,7 +7809,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -8540,7 +7825,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8548,11 +7833,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]; page: number; per_page: number; total: number; } & { count_open_cases: number; count_in_progress_cases: number; count_closed_cases: number; }" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 78 + "lineNumber": 110 }, "deprecated": false, "initialIsOpen": false @@ -8577,7 +7862,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 80 + "lineNumber": 112 }, "deprecated": false, "initialIsOpen": false @@ -8598,7 +7883,7 @@ "section": "def-common.CaseStatuses", "text": "CaseStatuses" }, - "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", + "; } & { closed_at: string | null; closed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; owner: string; } & { id: string; totalComment: number; totalAlerts: number; version: string; } & { comments?: (({ comment: string; type: ", { "pluginId": "cases", "scope": "common", @@ -8606,7 +7891,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user; } & { associationType: ", + ".user; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8614,7 +7899,7 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }) | ({ type: ", { "pluginId": "cases", "scope": "common", @@ -8630,7 +7915,7 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; } & { associationType: ", + ".generatedAlert; alertId: string | string[]; index: string | string[]; rule: { id: string | null; name: string | null; }; owner: string; } & { associationType: ", { "pluginId": "cases", "scope": "common", @@ -8638,11 +7923,11 @@ "section": "def-common.AssociationType", "text": "AssociationType" }, - "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" + "; created_at: string; created_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; }; owner: string; pushed_at: string | null; pushed_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; updated_at: string | null; updated_by: { email: string | null | undefined; full_name: string | null | undefined; username: string | null | undefined; } | null; } & { id: string; version: string; }))[] | undefined; })[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 77 + "lineNumber": 109 }, "deprecated": false, "initialIsOpen": false @@ -8659,7 +7944,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/constants.ts", - "lineNumber": 47 + "lineNumber": 66 }, "deprecated": false, "initialIsOpen": false @@ -8693,7 +7978,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/ui/types.ts", - "lineNumber": 163 + "lineNumber": 164 }, "deprecated": false, "initialIsOpen": false @@ -8727,7 +8012,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 62 + "lineNumber": 66 }, "deprecated": false, "initialIsOpen": false @@ -8740,11 +8025,11 @@ "label": "UserActionField", "description": [], "signature": [ - "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\")[]" + "(\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\")[]" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 63 + "lineNumber": 67 }, "deprecated": false, "initialIsOpen": false @@ -8757,11 +8042,11 @@ "label": "UserActionFieldType", "description": [], "signature": [ - "\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"connector\" | \"pushed\" | \"sub_case\"" + "\"status\" | \"description\" | \"title\" | \"comment\" | \"tags\" | \"settings\" | \"owner\" | \"connector\" | \"pushed\" | \"sub_case\"" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 64 + "lineNumber": 68 }, "deprecated": false, "initialIsOpen": false @@ -8822,30 +8107,388 @@ "<{ id: ", "UnionC", "<[", - "StringC", + "StringC", + ", ", + "NullC", + "]>; name: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>; owner: ", + "StringC", + "; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 70 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllCommentsResponseRt", + "type": "Object", + "tags": [], + "label": "AllCommentsResponseRt", + "description": [], + "signature": [ + "ArrayC", + "<", + "IntersectionC", + "<[", + "UnionC", + "<[", + "IntersectionC", + "<[", + "TypeC", + "<{ comment: ", + "StringC", + "; type: ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".user>; owner: ", + "StringC", + "; }>, ", + "TypeC", + "<{ associationType: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".case>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".subCase>]>; created_at: ", + "StringC", + "; created_by: ", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; pushed_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>, ", + "NullC", + "]>; updated_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; updated_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>, ", + "NullC", + "]>; }>]>, ", + "IntersectionC", + "<[", + "TypeC", + "<{ type: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".generatedAlert>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CommentType", + "text": "CommentType" + }, + ".alert>]>; alertId: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; index: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; rule: ", + "TypeC", + "<{ id: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; name: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>; owner: ", + "StringC", + "; }>, ", + "TypeC", + "<{ associationType: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".case>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.AssociationType", + "text": "AssociationType" + }, + ".subCase>]>; created_at: ", + "StringC", + "; created_by: ", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; pushed_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; }>, ", + "NullC", + "]>; updated_at: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; updated_by: ", + "UnionC", + "<[", + "TypeC", + "<{ email: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; full_name: ", + "UnionC", + "<[", + "UndefinedC", + ", ", + "NullC", + ", ", + "StringC", + "]>; username: ", + "UnionC", + "<[", + "UndefinedC", ", ", "NullC", - "]>; name: ", - "UnionC", - "<[", - "StringC", ", ", + "StringC", + "]>; }>, ", "NullC", - "]>; }>; }>" + "]>; }>]>]>, ", + "TypeC", + "<{ id: ", + "StringC", + "; version: ", + "StringC", + "; }>]>>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 67 + "lineNumber": 132 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.AllCommentsResponseRt", + "id": "def-common.AllCommentsResponseRT", "type": "Object", "tags": [], - "label": "AllCommentsResponseRt", + "label": "AllCommentsResponseRT", "description": [], "signature": [ "ArrayC", @@ -8869,7 +8512,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -8921,7 +8566,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -9049,7 +8696,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -9101,7 +8750,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -9183,135 +8834,351 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 128 + "lineNumber": 103 }, "deprecated": false, "initialIsOpen": false }, { "parentPluginId": "cases", - "id": "def-common.AllCommentsResponseRT", + "id": "def-common.AllReportersFindRequestRt", "type": "Object", "tags": [], - "label": "AllCommentsResponseRT", + "label": "AllReportersFindRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 286 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.AllTagsFindRequestRt", + "type": "Object", + "tags": [], + "label": "AllTagsFindRequestRt", "description": [], "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", "ArrayC", "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 278 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseAttributesRt", + "type": "Object", + "tags": [], + "label": "CaseAttributesRt", + "description": [], + "signature": [ "IntersectionC", "<[", + "TypeC", + "<{ description: ", + "StringC", + "; status: ", + "UnionC", + "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatuses", + "text": "CaseStatuses" + }, + ".open>, ", + "LiteralC", + ", ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseStatuses", + "text": "CaseStatuses" + }, + ".closed>]>; tags: ", + "ArrayC", + "<", + "StringC", + ">; title: ", + "StringC", + "; type: ", "UnionC", "<[", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseType", + "text": "CaseType" + }, + ".collection>, ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.CaseType", + "text": "CaseType" + }, + ".individual>]>; connector: ", "IntersectionC", "<[", "TypeC", - "<{ comment: ", + "<{ id: ", "StringC", - "; type: ", + "; name: ", + "StringC", + "; }>, ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", "LiteralC", "<", { "pluginId": "cases", "scope": "common", "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" }, - ".user>; }>, ", + ".jira>; fields: ", + "UnionC", + "<[", "TypeC", - "<{ associationType: ", + "<{ issueType: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; priority: ", "UnionC", "<[", + "StringC", + ", ", + "NullC", + "]>; parent: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>, ", + "NullC", + "]>; }>, ", + "TypeC", + "<{ type: ", "LiteralC", "<", { "pluginId": "cases", "scope": "common", "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" }, - ".case>, ", + ".resilient>; fields: ", + "UnionC", + "<[", + "TypeC", + "<{ incidentTypes: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "NullC", + "]>; severityCode: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>, ", + "NullC", + "]>; }>, ", + "TypeC", + "<{ type: ", "LiteralC", "<", { "pluginId": "cases", "scope": "common", "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" }, - ".subCase>]>; created_at: ", + ".serviceNowITSM>; fields: ", + "UnionC", + "<[", + "TypeC", + "<{ impact: ", + "UnionC", + "<[", "StringC", - "; created_by: ", + ", ", + "NullC", + "]>; severity: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; urgency: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; category: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; subcategory: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>, ", + "NullC", + "]>; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".serviceNowSIR>; fields: ", + "UnionC", + "<[", "TypeC", - "<{ email: ", + "<{ category: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", - "StringC", - "]>; full_name: ", + "]>; destIp: ", "UnionC", "<[", - "UndefinedC", + "BooleanC", ", ", "NullC", - ", ", - "StringC", - "]>; username: ", + "]>; malwareHash: ", "UnionC", "<[", - "UndefinedC", + "BooleanC", ", ", "NullC", - ", ", - "StringC", - "]>; }>; pushed_at: ", + "]>; malwareUrl: ", "UnionC", "<[", - "StringC", + "BooleanC", ", ", "NullC", - "]>; pushed_by: ", - "UnionC", - "<[", - "TypeC", - "<{ email: ", + "]>; priority: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", - "StringC", - "]>; full_name: ", + "]>; sourceIp: ", "UnionC", "<[", - "UndefinedC", + "BooleanC", ", ", "NullC", - ", ", - "StringC", - "]>; username: ", + "]>; subcategory: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", - "StringC", "]>; }>, ", "NullC", - "]>; updated_at: ", + "]>; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<", + { + "pluginId": "cases", + "scope": "common", + "docId": "kibCasesPluginApi", + "section": "def-common.ConnectorTypes", + "text": "ConnectorTypes" + }, + ".none>; fields: ", + "NullC", + "; }>]>]>; settings: ", + "TypeC", + "<{ syncAlerts: ", + "BooleanC", + "; }>; owner: ", + "StringC", + "; }>, ", + "TypeC", + "<{ closed_at: ", "UnionC", "<[", "StringC", ", ", "NullC", - "]>; updated_by: ", + "]>; closed_by: ", "UnionC", "<[", "TypeC", @@ -9341,87 +9208,7 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", - "IntersectionC", - "<[", - "TypeC", - "<{ type: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".generatedAlert>, ", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CommentType", - "text": "CommentType" - }, - ".alert>]>; alertId: ", - "UnionC", - "<[", - "ArrayC", - "<", - "StringC", - ">, ", - "StringC", - "]>; index: ", - "UnionC", - "<[", - "ArrayC", - "<", - "StringC", - ">, ", - "StringC", - "]>; rule: ", - "TypeC", - "<{ id: ", - "UnionC", - "<[", - "StringC", - ", ", - "NullC", - "]>; name: ", - "UnionC", - "<[", - "StringC", - ", ", - "NullC", - "]>; }>; }>, ", - "TypeC", - "<{ associationType: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - ".case>, ", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.AssociationType", - "text": "AssociationType" - }, - ".subCase>]>; created_at: ", + "]>; created_at: ", "StringC", "; created_by: ", "TypeC", @@ -9449,16 +9236,28 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; external_service: ", "UnionC", "<[", - "StringC", - ", ", - "NullC", - "]>; pushed_by: ", - "UnionC", + "IntersectionC", "<[", "TypeC", + "<{ connector_id: ", + "StringC", + "; connector_name: ", + "StringC", + "; external_id: ", + "StringC", + "; external_title: ", + "StringC", + "; external_url: ", + "StringC", + "; }>, ", + "TypeC", + "<{ pushed_at: ", + "StringC", + "; pushed_by: ", + "TypeC", "<{ email: ", "UnionC", "<[", @@ -9483,7 +9282,7 @@ "NullC", ", ", "StringC", - "]>; }>, ", + "]>; }>; }>]>, ", "NullC", "]>; updated_at: ", "UnionC", @@ -9521,95 +9320,33 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>]>, ", - "TypeC", - "<{ id: ", - "StringC", - "; version: ", - "StringC", - "; }>]>>" + "]>; }>]>" ], - "source": { - "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 99 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "cases", - "id": "def-common.CaseAttributesRt", - "type": "Object", - "tags": [], - "label": "CaseAttributesRt", - "description": [], - "signature": [ - "IntersectionC", - "<[", - "TypeC", - "<{ description: ", - "StringC", - "; status: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - ".open>, ", - "LiteralC", - ", ", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseStatuses", - "text": "CaseStatuses" - }, - ".closed>]>; tags: ", - "ArrayC", - "<", - "StringC", - ">; title: ", - "StringC", - "; type: ", - "UnionC", - "<[", - "LiteralC", - "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - ".collection>, ", - "LiteralC", + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 87 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseConfigurationsResponseRt", + "type": "Object", + "tags": [], + "label": "CaseConfigurationsResponseRt", + "description": [], + "signature": [ + "ArrayC", "<", - { - "pluginId": "cases", - "scope": "common", - "docId": "kibCasesPluginApi", - "section": "def-common.CaseType", - "text": "CaseType" - }, - ".individual>]>; connector: ", + "IntersectionC", + "<[", + "IntersectionC", + "<[", + "IntersectionC", + "<[", + "TypeC", + "<{ connector: ", "IntersectionC", "<[", "TypeC", @@ -9809,21 +9546,21 @@ }, ".none>; fields: ", "NullC", - "; }>]>]>; settings: ", - "TypeC", - "<{ syncAlerts: ", - "BooleanC", - "; }>; }>, ", - "TypeC", - "<{ closed_at: ", + "; }>]>]>; closure_type: ", "UnionC", "<[", + "LiteralC", + "<\"close-by-user\">, ", + "LiteralC", + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", "StringC", - ", ", - "NullC", - "]>; closed_by: ", - "UnionC", - "<[", + "; }>]>, ", + "TypeC", + "<{ created_at: ", + "StringC", + "; created_by: ", "TypeC", "<{ email: ", "UnionC", @@ -9849,57 +9586,15 @@ "NullC", ", ", "StringC", - "]>; }>, ", - "NullC", - "]>; created_at: ", - "StringC", - "; created_by: ", - "TypeC", - "<{ email: ", - "UnionC", - "<[", - "UndefinedC", - ", ", - "NullC", - ", ", - "StringC", - "]>; full_name: ", + "]>; }>; updated_at: ", "UnionC", "<[", - "UndefinedC", - ", ", - "NullC", - ", ", "StringC", - "]>; username: ", - "UnionC", - "<[", - "UndefinedC", ", ", "NullC", - ", ", - "StringC", - "]>; }>; external_service: ", + "]>; updated_by: ", "UnionC", "<[", - "IntersectionC", - "<[", - "TypeC", - "<{ connector_id: ", - "StringC", - "; connector_name: ", - "StringC", - "; external_id: ", - "StringC", - "; external_title: ", - "StringC", - "; external_url: ", - "StringC", - "; }>, ", - "TypeC", - "<{ pushed_at: ", - "StringC", - "; pushed_by: ", "TypeC", "<{ email: ", "UnionC", @@ -9925,49 +9620,57 @@ "NullC", ", ", "StringC", - "]>; }>; }>]>, ", + "]>; }>, ", "NullC", - "]>; updated_at: ", + "]>; }>]>, ", + "TypeC", + "<{ mappings: ", + "ArrayC", + "<", + "TypeC", + "<{ action_type: ", "UnionC", "<[", - "StringC", - ", ", - "NullC", - "]>; updated_by: ", + "LiteralC", + "<\"append\">, ", + "LiteralC", + "<\"nothing\">, ", + "LiteralC", + "<\"overwrite\">]>; source: ", "UnionC", "<[", - "TypeC", - "<{ email: ", + "LiteralC", + "<\"title\">, ", + "LiteralC", + "<\"description\">, ", + "LiteralC", + "<\"comments\">]>; target: ", "UnionC", "<[", - "UndefinedC", - ", ", - "NullC", - ", ", "StringC", - "]>; full_name: ", - "UnionC", - "<[", - "UndefinedC", - ", ", - "NullC", ", ", + "LiteralC", + "<\"not_mapped\">]>; }>>; owner: ", "StringC", - "]>; username: ", + "; }>, ", + "TypeC", + "<{ id: ", + "StringC", + "; version: ", + "StringC", + "; error: ", "UnionC", "<[", - "UndefinedC", + "StringC", ", ", "NullC", - ", ", + "]>; owner: ", "StringC", - "]>; }>, ", - "NullC", - "]>; }>]>" + "; }>]>>" ], "source": { - "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 62 + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 76 }, "deprecated": false, "initialIsOpen": false @@ -9980,6 +9683,8 @@ "label": "CaseConfigureAttributesRt", "description": [], "signature": [ + "IntersectionC", + "<[", "IntersectionC", "<[", "TypeC", @@ -10191,6 +9896,10 @@ "LiteralC", "<\"close-by-pushing\">]>; }>, ", "TypeC", + "<{ owner: ", + "StringC", + "; }>]>, ", + "TypeC", "<{ created_at: ", "StringC", "; created_by: ", @@ -10259,7 +9968,27 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 27 + "lineNumber": 43 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CaseConfigureRequestParamsRt", + "type": "Object", + "tags": [], + "label": "CaseConfigureRequestParamsRt", + "description": [], + "signature": [ + "TypeC", + "<{ configuration_id: ", + "StringC", + "; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 72 }, "deprecated": false, "initialIsOpen": false @@ -10276,6 +10005,8 @@ "<[", "IntersectionC", "<[", + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -10485,6 +10216,10 @@ "LiteralC", "<\"close-by-pushing\">]>; }>, ", "TypeC", + "<{ owner: ", + "StringC", + "; }>]>, ", + "TypeC", "<{ created_at: ", "StringC", "; created_by: ", @@ -10577,9 +10312,13 @@ "StringC", ", ", "LiteralC", - "<\"not_mapped\">]>; }>>; }>, ", + "<\"not_mapped\">]>; }>>; owner: ", + "StringC", + "; }>, ", "TypeC", - "<{ version: ", + "<{ id: ", + "StringC", + "; version: ", "StringC", "; error: ", "UnionC", @@ -10587,11 +10326,13 @@ "StringC", ", ", "NullC", - "]>; }>]>" + "]>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 37 + "lineNumber": 53 }, "deprecated": false, "initialIsOpen": false @@ -11089,7 +10830,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ id: ", "StringC", @@ -11099,7 +10842,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 142 + "lineNumber": 242 }, "deprecated": false, "initialIsOpen": false @@ -11353,11 +11096,13 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>]>" + "; }>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 97 + "lineNumber": 142 }, "deprecated": false, "initialIsOpen": false @@ -11379,7 +11124,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 150 + "lineNumber": 253 }, "deprecated": false, "initialIsOpen": false @@ -11663,7 +11408,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ closed_at: ", "UnionC", @@ -11975,7 +11722,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -12009,7 +11758,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12061,7 +11812,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12189,7 +11942,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12241,7 +11996,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12341,7 +12098,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12393,7 +12152,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12521,7 +12282,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -12573,7 +12336,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -12655,7 +12420,33 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 117 + "lineNumber": 217 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesByAlertIDRequestRt", + "type": "Object", + "tags": [], + "label": "CasesByAlertIDRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/case.ts", + "lineNumber": 209 }, "deprecated": false, "initialIsOpen": false @@ -12905,11 +12696,13 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>" + "; }>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 86 + "lineNumber": 131 }, "deprecated": false, "initialIsOpen": false @@ -13139,7 +12932,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 22 + "lineNumber": 38 }, "deprecated": false, "initialIsOpen": false @@ -13152,6 +12945,8 @@ "label": "CasesConfigureRequestRt", "description": [], "signature": [ + "IntersectionC", + "<[", "TypeC", "<{ connector: ", "IntersectionC", @@ -13359,11 +13154,15 @@ "LiteralC", "<\"close-by-user\">, ", "LiteralC", - "<\"close-by-pushing\">]>; }>" + "<\"close-by-pushing\">]>; }>, ", + "TypeC", + "<{ owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/configure.ts", - "lineNumber": 21 + "lineNumber": 37 }, "deprecated": false, "initialIsOpen": false @@ -13464,10 +13263,14 @@ "; search: ", "StringC", "; searchFields: ", + "UnionC", + "<[", "ArrayC", "<", "StringC", - ">; sortField: ", + ">, ", + "StringC", + "]>; sortField: ", "StringC", "; sortOrder: ", "UnionC", @@ -13475,11 +13278,19 @@ "LiteralC", "<\"desc\">, ", "LiteralC", - "<\"asc\">]>; }>" + "<\"asc\">]>; owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 102 + "lineNumber": 150 }, "deprecated": false, "initialIsOpen": false @@ -13769,7 +13580,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ closed_at: ", "UnionC", @@ -14081,7 +13894,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -14115,7 +13930,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14167,7 +13984,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14295,7 +14114,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14347,7 +14168,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14447,7 +14270,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14499,7 +14324,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14627,7 +14454,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -14679,7 +14508,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -14775,7 +14606,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 132 + "lineNumber": 232 }, "deprecated": false, "initialIsOpen": false @@ -15061,7 +14892,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ id: ", "StringC", @@ -15071,7 +14904,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 147 + "lineNumber": 250 }, "deprecated": false, "initialIsOpen": false @@ -15357,7 +15190,9 @@ "TypeC", "<{ syncAlerts: ", "BooleanC", - "; }>; }>, ", + "; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ closed_at: ", "UnionC", @@ -15669,7 +15504,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -15703,7 +15540,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -15755,7 +15594,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -15883,7 +15724,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -15935,7 +15778,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16035,7 +15880,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -16087,7 +15934,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16215,7 +16064,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -16267,7 +16118,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16349,7 +16202,33 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 148 + "lineNumber": 251 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.CasesStatusRequestRt", + "type": "Object", + "tags": [], + "label": "CasesStatusRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/status.ts", + "lineNumber": 30 }, "deprecated": false, "initialIsOpen": false @@ -16457,7 +16336,9 @@ "LiteralC", "<\"settings\">, ", "LiteralC", - "<\"sub_case\">]>>; action: ", + "<\"sub_case\">, ", + "LiteralC", + "<\"owner\">]>>; action: ", "UnionC", "<[", "LiteralC", @@ -16509,11 +16390,13 @@ "StringC", ", ", "NullC", - "]>; }>" + "]>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 55 + "lineNumber": 58 }, "deprecated": false, "initialIsOpen": false @@ -16553,7 +16436,9 @@ "LiteralC", "<\"settings\">, ", "LiteralC", - "<\"sub_case\">]>>; action: ", + "<\"sub_case\">, ", + "LiteralC", + "<\"owner\">]>>; action: ", "UnionC", "<[", "LiteralC", @@ -16605,7 +16490,9 @@ "StringC", ", ", "NullC", - "]>; }>, ", + "]>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ action_id: ", "StringC", @@ -16625,7 +16512,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/user_actions.ts", - "lineNumber": 57 + "lineNumber": 60 }, "deprecated": false, "initialIsOpen": false @@ -16689,7 +16576,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16765,7 +16654,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 38 + "lineNumber": 39 }, "deprecated": false, "initialIsOpen": false @@ -16835,7 +16724,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -16961,7 +16852,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>]>, ", + "]>; }>; owner: ", + "StringC", + "; }>]>, ", "PartialC", "<{ associationType: ", "UnionC", @@ -17013,7 +16906,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17089,7 +16984,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 116 + "lineNumber": 120 }, "deprecated": false, "initialIsOpen": false @@ -17119,7 +17014,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ type: ", "UnionC", @@ -17173,7 +17070,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>]>, ", + "]>; }>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -17183,7 +17082,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 101 + "lineNumber": 105 }, "deprecated": false, "initialIsOpen": false @@ -17211,7 +17110,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ type: ", "UnionC", @@ -17265,11 +17166,13 @@ "StringC", ", ", "NullC", - "]>; }>; }>]>" + "]>; }>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 81 + "lineNumber": 85 }, "deprecated": false, "initialIsOpen": false @@ -17301,7 +17204,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17353,7 +17258,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17481,7 +17388,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17533,7 +17442,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17615,7 +17526,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 83 + "lineNumber": 87 }, "deprecated": false, "initialIsOpen": false @@ -17685,7 +17596,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17737,7 +17650,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -17819,7 +17734,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 91 + "lineNumber": 95 }, "deprecated": false, "initialIsOpen": false @@ -17855,7 +17770,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -17907,7 +17824,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -18035,7 +17954,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -18087,7 +18008,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -18175,7 +18098,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 121 + "lineNumber": 125 }, "deprecated": false, "initialIsOpen": false @@ -18387,7 +18310,9 @@ "StringC", ", ", "LiteralC", - "<\"not_mapped\">]>; }>>; }>" + "<\"not_mapped\">]>; }>>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/connectors/mappings.ts", @@ -18625,11 +18550,13 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>" + ".user>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 57 + "lineNumber": 59 }, "deprecated": false, "initialIsOpen": false @@ -18673,7 +18600,79 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/case.ts", - "lineNumber": 155 + "lineNumber": 258 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.FindQueryParamsRt", + "type": "Object", + "tags": [], + "label": "FindQueryParamsRt", + "description": [], + "signature": [ + "PartialC", + "<{ subCaseId: ", + "StringC", + "; defaultSearchOperator: ", + "UnionC", + "<[", + "LiteralC", + "<\"AND\">, ", + "LiteralC", + "<\"OR\">]>; hasReferenceOperator: ", + "UnionC", + "<[", + "LiteralC", + "<\"AND\">, ", + "LiteralC", + "<\"OR\">]>; hasReference: ", + "UnionC", + "<[", + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; type: ", + "StringC", + "; }>>, ", + "TypeC", + "<{ id: ", + "StringC", + "; type: ", + "StringC", + "; }>]>; fields: ", + "ArrayC", + "<", + "StringC", + ">; filter: ", + "StringC", + "; page: ", + "Type", + "; perPage: ", + "Type", + "; search: ", + "StringC", + "; searchFields: ", + "ArrayC", + "<", + "StringC", + ">; sortField: ", + "StringC", + "; sortOrder: ", + "UnionC", + "<[", + "LiteralC", + "<\"desc\">, ", + "LiteralC", + "<\"asc\">]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/comment.ts", + "lineNumber": 134 }, "deprecated": false, "initialIsOpen": false @@ -18703,7 +18702,33 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/comment.ts", - "lineNumber": 18 + "lineNumber": 19 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "cases", + "id": "def-common.GetConfigureFindRequestRt", + "type": "Object", + "tags": [], + "label": "GetConfigureFindRequestRt", + "description": [], + "signature": [ + "PartialC", + "<{ owner: ", + "UnionC", + "<[", + "ArrayC", + "<", + "StringC", + ">, ", + "StringC", + "]>; }>" + ], + "source": { + "path": "x-pack/plugins/cases/common/api/cases/configure.ts", + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -19121,11 +19146,13 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>" + "]>; owner: ", + "StringC", + "; }>]>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 20 + "lineNumber": 23 }, "deprecated": false, "initialIsOpen": false @@ -19183,7 +19210,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 67 + "lineNumber": 99 }, "deprecated": false, "initialIsOpen": false @@ -19339,7 +19366,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -19373,7 +19402,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -19425,7 +19456,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -19553,7 +19586,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -19605,7 +19640,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -19687,7 +19724,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 44 + "lineNumber": 76 }, "deprecated": false, "initialIsOpen": false @@ -19761,11 +19798,13 @@ "LiteralC", "<\"desc\">, ", "LiteralC", - "<\"asc\">]>; }>" + "<\"asc\">]>; owner: ", + "StringC", + "; }>" ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 32 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -19927,7 +19966,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -19961,7 +20002,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20013,7 +20056,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20141,7 +20186,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20193,7 +20240,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20289,7 +20338,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 57 + "lineNumber": 89 }, "deprecated": false, "initialIsOpen": false @@ -20351,7 +20400,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 72 + "lineNumber": 104 }, "deprecated": false, "initialIsOpen": false @@ -20509,7 +20558,9 @@ "StringC", "]>; }>, ", "NullC", - "]>; }>]>, ", + "]>; owner: ", + "StringC", + "; }>]>, ", "TypeC", "<{ id: ", "StringC", @@ -20543,7 +20594,9 @@ "section": "def-common.CommentType", "text": "CommentType" }, - ".user>; }>, ", + ".user>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20595,7 +20648,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20723,7 +20778,9 @@ "StringC", ", ", "NullC", - "]>; }>; }>, ", + "]>; }>; owner: ", + "StringC", + "; }>, ", "TypeC", "<{ associationType: ", "UnionC", @@ -20775,7 +20832,9 @@ "NullC", ", ", "StringC", - "]>; }>; pushed_at: ", + "]>; }>; owner: ", + "StringC", + "; pushed_at: ", "UnionC", "<[", "StringC", @@ -20857,7 +20916,7 @@ ], "source": { "path": "x-pack/plugins/cases/common/api/cases/sub_case.ts", - "lineNumber": 73 + "lineNumber": 105 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 892e3e02e7522..20d371cbcdc6e 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -27,6 +27,9 @@ import casesObj from './cases.json'; ## Server +### Classes + + ### Interfaces diff --git a/api_docs/charts.json b/api_docs/charts.json index 29c1c163d19a0..f42832e5d1e95 100644 --- a/api_docs/charts.json +++ b/api_docs/charts.json @@ -11,11 +11,11 @@ "label": "ColorPicker", "description": [], "signature": [ - "({ onChange, color: selectedColor, label, useLegacyColors, colorIsOverwritten, onKeyDown, }: ColorPickerProps) => JSX.Element" + "({ onChange, color: selectedColor, label, useLegacyColors, colorIsOverwritten, onKeyDown, maxDepth, layerIndex, }: ColorPickerProps) => JSX.Element" ], "source": { "path": "src/plugins/charts/public/static/components/color_picker.tsx", - "lineNumber": 111 + "lineNumber": 119 }, "deprecated": false, "children": [ @@ -24,14 +24,14 @@ "id": "def-public.ColorPicker.$1", "type": "Object", "tags": [], - "label": "{\n onChange,\n color: selectedColor,\n label,\n useLegacyColors = true,\n colorIsOverwritten = true,\n onKeyDown,\n}", + "label": "{\n onChange,\n color: selectedColor,\n label,\n useLegacyColors = true,\n colorIsOverwritten = true,\n onKeyDown,\n maxDepth,\n layerIndex,\n}", "description": [], "signature": [ "ColorPickerProps" ], "source": { "path": "src/plugins/charts/public/static/components/color_picker.tsx", - "lineNumber": 111 + "lineNumber": 119 }, "deprecated": false, "isRequired": true @@ -630,6 +630,77 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "charts", + "id": "def-public.lightenColor", + "type": "Function", + "tags": [], + "label": "lightenColor", + "description": [], + "signature": [ + "(baseColor: string, step: number, totalSteps: number) => string" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "charts", + "id": "def-public.lightenColor.$1", + "type": "string", + "tags": [], + "label": "baseColor", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "charts", + "id": "def-public.lightenColor.$2", + "type": "number", + "tags": [], + "label": "step", + "description": [], + "signature": [ + "number" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "charts", + "id": "def-public.lightenColor.$3", + "type": "number", + "tags": [], + "label": "totalSteps", + "description": [], + "signature": [ + "number" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/lighten_color.ts", + "lineNumber": 14 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "charts", "id": "def-public.renderEndzoneTooltip", @@ -1132,6 +1203,86 @@ "lineNumber": 16 }, "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.stop", + "type": "Array", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "number[] | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 18 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 19 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteArguments.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 21 + }, + "deprecated": false } ], "initialIsOpen": false @@ -1145,7 +1296,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 19 + "lineNumber": 24 }, "deprecated": false, "children": [ @@ -1161,7 +1312,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 20 + "lineNumber": 25 }, "deprecated": false }, @@ -1174,7 +1325,81 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 21 + "lineNumber": 26 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.stops", + "type": "Array", + "tags": [], + "label": "stops", + "description": [], + "signature": [ + "number[]" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 27 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\"" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 28 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 29 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 30 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.CustomPaletteState.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 31 }, "deprecated": false } @@ -1408,28 +1633,10 @@ }, { "parentPluginId": "charts", - "id": "def-public.PaletteDefinition.renderEditor", + "id": "def-public.PaletteDefinition.getCategoricalColor", "type": "Function", "tags": [], - "label": "renderEditor", - "description": [ - "\nRenders the UI for editing the internal state of the palette.\nNot each palette has to feature an internal state, so this is an optional property." - ], - "signature": [ - "((domElement: Element, props: { state?: T | undefined; setState: (updater: (oldState: T) => T) => void; }) => void) | undefined" - ], - "source": { - "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 88 - }, - "deprecated": false - }, - { - "parentPluginId": "charts", - "id": "def-public.PaletteDefinition.getColor", - "type": "Function", - "tags": [], - "label": "getColor", + "label": "getCategoricalColor", "description": [ "\nColor a series according to the internal rules of the palette." ], @@ -1454,7 +1661,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 97 + "lineNumber": 87 }, "deprecated": false, "returnComment": [], @@ -1480,7 +1687,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 98 + "lineNumber": 88 }, "deprecated": false }, @@ -1503,7 +1710,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 99 + "lineNumber": 89 }, "deprecated": false }, @@ -1521,7 +1728,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 100 + "lineNumber": 90 }, "deprecated": false } @@ -1529,10 +1736,10 @@ }, { "parentPluginId": "charts", - "id": "def-public.PaletteDefinition.getColors", + "id": "def-public.PaletteDefinition.getCategoricalColors", "type": "Function", "tags": [], - "label": "getColors", + "label": "getCategoricalColors", "description": [ "\nGet a spectrum of colors of the current palette.\nThis can be used if the chart wants to control color assignment locally." ], @@ -1541,7 +1748,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 106 + "lineNumber": 96 }, "deprecated": false, "returnComment": [], @@ -1555,7 +1762,7 @@ "description": [], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 106 + "lineNumber": 96 }, "deprecated": false }, @@ -1571,11 +1778,47 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 106 + "lineNumber": 96 }, "deprecated": false } ] + }, + { + "parentPluginId": "charts", + "id": "def-public.PaletteDefinition.canDynamicColoring", + "type": "CompoundType", + "tags": [], + "label": "canDynamicColoring", + "description": [ + "\nDefine whether a palette supports dynamic coloring (i.e. gradient colors mapped to number values)" + ], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/types.ts", + "lineNumber": 100 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-public.PaletteDefinition.getColorForValue", + "type": "Function", + "tags": [], + "label": "getColorForValue", + "description": [ + "\nGet the assigned color for the given value based on its data domain and state settings.\nThis can be used for dynamic coloring based on uniform color distribution or custom stops." + ], + "signature": [ + "((value: number | undefined, state: T, { min, max }: { min: number; max: number; }) => string | undefined) | undefined" + ], + "source": { + "path": "src/plugins/charts/public/services/palettes/types.ts", + "lineNumber": 105 + }, + "deprecated": false } ], "initialIsOpen": false @@ -1599,7 +1842,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 28 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -1615,7 +1858,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 29 + "lineNumber": 39 }, "deprecated": false }, @@ -1628,7 +1871,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 30 + "lineNumber": 40 }, "deprecated": false }, @@ -1644,7 +1887,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 31 + "lineNumber": 41 }, "deprecated": false } @@ -1660,7 +1903,7 @@ "description": [], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 109 + "lineNumber": 112 }, "deprecated": false, "children": [ @@ -1684,7 +1927,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 110 + "lineNumber": 113 }, "deprecated": false, "returnComment": [], @@ -1698,7 +1941,7 @@ "description": [], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 110 + "lineNumber": 113 }, "deprecated": false } @@ -1724,7 +1967,7 @@ ], "source": { "path": "src/plugins/charts/public/services/palettes/types.ts", - "lineNumber": 111 + "lineNumber": 114 }, "deprecated": false, "returnComment": [], @@ -1953,7 +2196,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 24 + "lineNumber": 34 }, "deprecated": false, "children": [ @@ -1966,7 +2209,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 25 + "lineNumber": 35 }, "deprecated": false } @@ -2693,7 +2936,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 53 + "lineNumber": 63 }, "deprecated": false, "children": [], @@ -2754,7 +2997,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 119 + "lineNumber": 175 }, "deprecated": false, "children": [], @@ -2820,6 +3063,86 @@ "lineNumber": 16 }, "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.stop", + "type": "Array", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "number[] | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 18 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 19 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteArguments.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 21 + }, + "deprecated": false } ], "initialIsOpen": false @@ -2833,7 +3156,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 19 + "lineNumber": 24 }, "deprecated": false, "children": [ @@ -2849,7 +3172,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 20 + "lineNumber": 25 }, "deprecated": false }, @@ -2862,7 +3185,81 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 21 + "lineNumber": 26 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.stops", + "type": "Array", + "tags": [], + "label": "stops", + "description": [], + "signature": [ + "number[]" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 27 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.range", + "type": "CompoundType", + "tags": [], + "label": "range", + "description": [], + "signature": [ + "\"number\" | \"percent\"" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 28 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.rangeMin", + "type": "number", + "tags": [], + "label": "rangeMin", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 29 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.rangeMax", + "type": "number", + "tags": [], + "label": "rangeMax", + "description": [], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 30 + }, + "deprecated": false + }, + { + "parentPluginId": "charts", + "id": "def-common.CustomPaletteState.continuity", + "type": "CompoundType", + "tags": [], + "label": "continuity", + "description": [], + "signature": [ + "\"above\" | \"below\" | \"all\" | \"none\" | undefined" + ], + "source": { + "path": "src/plugins/charts/common/palette.ts", + "lineNumber": 31 }, "deprecated": false } @@ -2888,7 +3285,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 28 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -2904,7 +3301,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 29 + "lineNumber": 39 }, "deprecated": false }, @@ -2917,7 +3314,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 30 + "lineNumber": 40 }, "deprecated": false }, @@ -2933,7 +3330,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 31 + "lineNumber": 41 }, "deprecated": false } @@ -2949,7 +3346,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 24 + "lineNumber": 34 }, "deprecated": false, "children": [ @@ -2962,7 +3359,7 @@ "description": [], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 25 + "lineNumber": 35 }, "deprecated": false } @@ -3001,7 +3398,7 @@ ], "source": { "path": "src/plugins/charts/common/palette.ts", - "lineNumber": 33 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core.json b/api_docs/core.json index 4fedef842a1c4..a5466960dbd36 100644 --- a/api_docs/core.json +++ b/api_docs/core.json @@ -1112,7 +1112,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false, "children": [ @@ -1136,7 +1136,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -1160,7 +1160,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -1184,7 +1184,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -1208,7 +1208,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -1232,7 +1232,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -1252,7 +1252,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": true, "references": [] @@ -1279,7 +1279,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false, "returnComment": [], @@ -1299,7 +1299,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 248 + "lineNumber": 249 }, "deprecated": false, "children": [ @@ -1323,7 +1323,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 250 + "lineNumber": 251 }, "deprecated": false }, @@ -1347,7 +1347,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 252 + "lineNumber": 253 }, "deprecated": false }, @@ -1371,7 +1371,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 254 + "lineNumber": 255 }, "deprecated": false }, @@ -1395,7 +1395,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 256 + "lineNumber": 257 }, "deprecated": false }, @@ -1419,7 +1419,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 258 + "lineNumber": 259 }, "deprecated": false }, @@ -1443,7 +1443,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 260 + "lineNumber": 261 }, "deprecated": false }, @@ -1467,7 +1467,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 262 + "lineNumber": 263 }, "deprecated": false }, @@ -1491,7 +1491,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 264 + "lineNumber": 265 }, "deprecated": false }, @@ -1515,7 +1515,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 266 + "lineNumber": 267 }, "deprecated": false }, @@ -1539,7 +1539,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 268 + "lineNumber": 269 }, "deprecated": false }, @@ -1563,7 +1563,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 270 + "lineNumber": 271 }, "deprecated": false }, @@ -1583,7 +1583,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 277 + "lineNumber": 278 }, "deprecated": true, "references": [ @@ -5501,7 +5501,7 @@ ], "signature": [ "Record | undefined" ], "source": { @@ -7427,7 +7427,7 @@ ], "source": { "path": "src/core/public/index.ts", - "lineNumber": 234 + "lineNumber": 235 }, "deprecated": false, "initialIsOpen": false @@ -8058,7 +8058,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 188 + "lineNumber": 210 }, "deprecated": false, "children": [ @@ -8076,7 +8076,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 192 + "lineNumber": 214 }, "deprecated": false }, @@ -8091,7 +8091,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 197 + "lineNumber": 219 }, "deprecated": false }, @@ -8106,7 +8106,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 202 + "lineNumber": 224 }, "deprecated": false }, @@ -8124,7 +8124,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 208 + "lineNumber": 230 }, "deprecated": false }, @@ -8142,7 +8142,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 215 + "lineNumber": 237 }, "deprecated": false }, @@ -8160,7 +8160,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 220 + "lineNumber": 242 }, "deprecated": false }, @@ -8178,7 +8178,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 225 + "lineNumber": 247 }, "deprecated": false }, @@ -8196,7 +8196,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 230 + "lineNumber": 252 }, "deprecated": false }, @@ -8211,7 +8211,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 236 + "lineNumber": 258 }, "deprecated": false }, @@ -8229,7 +8229,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 242 + "lineNumber": 264 }, "deprecated": false }, @@ -8244,7 +8244,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 248 + "lineNumber": 270 }, "deprecated": false }, @@ -8262,7 +8262,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 254 + "lineNumber": 276 }, "deprecated": false }, @@ -8280,7 +8280,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 260 + "lineNumber": 282 }, "deprecated": false }, @@ -8298,7 +8298,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 267 + "lineNumber": 289 }, "deprecated": false }, @@ -8316,7 +8316,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 277 + "lineNumber": 299 }, "deprecated": false }, @@ -8332,7 +8332,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 279 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -8348,7 +8348,7 @@ ], "source": { "path": "src/core/server/elasticsearch/elasticsearch_config.ts", - "lineNumber": 279 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -9095,7 +9095,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/types.ts", - "lineNumber": 40 + "lineNumber": 39 } }, { @@ -9109,7 +9109,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/target/types/server/types.d.ts", - "lineNumber": 25 + "lineNumber": 24 } } ], @@ -9383,7 +9383,7 @@ "plugin": "data", "link": { "path": "src/plugins/data/server/autocomplete/value_suggestions_route.ts", - "lineNumber": 67 + "lineNumber": 65 } }, { @@ -9439,7 +9439,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/indices/register_list_route.ts", - "lineNumber": 18 + "lineNumber": 16 } }, { @@ -9460,7 +9460,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/indices/register_reload_route.ts", - "lineNumber": 33 + "lineNumber": 28 } }, { @@ -9488,14 +9488,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts", - "lineNumber": 24 + "lineNumber": 22 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/templates/register_get_routes.ts", - "lineNumber": 65 + "lineNumber": 62 } }, { @@ -9572,14 +9572,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/component_templates/create.ts", - "lineNumber": 28 + "lineNumber": 24 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/routes/api/component_templates/update.ts", - "lineNumber": 32 + "lineNumber": 28 } }, { @@ -9596,181 +9596,6 @@ "lineNumber": 48 } }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_create_route.ts", - "lineNumber": 45 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_create_route.ts", - "lineNumber": 64 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_delete_route.ts", - "lineNumber": 50 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_fetch_route.ts", - "lineNumber": 27 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_get_route.ts", - "lineNumber": 37 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_pause_route.ts", - "lineNumber": 49 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_resume_route.ts", - "lineNumber": 49 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/auto_follow_pattern/register_update_route.ts", - "lineNumber": 47 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_create_route.ts", - "lineNumber": 52 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_fetch_route.ts", - "lineNumber": 29 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_fetch_route.ts", - "lineNumber": 35 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_get_route.ts", - "lineNumber": 38 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_get_route.ts", - "lineNumber": 58 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_pause_route.ts", - "lineNumber": 47 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_resume_route.ts", - "lineNumber": 47 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 50 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 59 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 64 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_unfollow_route.ts", - "lineNumber": 72 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_update_route.ts", - "lineNumber": 53 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_update_route.ts", - "lineNumber": 66 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/follower_index/register_update_route.ts", - "lineNumber": 80 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_permissions_route.ts", - "lineNumber": 40 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/routes/api/cross_cluster_replication/register_stats_route.ts", - "lineNumber": 29 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 420 - } - }, { "plugin": "lists", "link": { @@ -9803,7 +9628,7 @@ "plugin": "monitoring", "link": { "path": "x-pack/plugins/monitoring/server/plugin.ts", - "lineNumber": 356 + "lineNumber": 361 } }, { @@ -9817,7 +9642,7 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/query_signals_route.ts", - "lineNumber": 52 + "lineNumber": 60 } }, { @@ -10303,7 +10128,7 @@ "plugin": "fleet", "link": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 189 + "lineNumber": 190 } }, { @@ -11156,7 +10981,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 472 + "lineNumber": 470 }, "deprecated": false, "children": [ @@ -11180,7 +11005,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 474 + "lineNumber": 472 }, "deprecated": false }, @@ -11204,7 +11029,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 476 + "lineNumber": 474 }, "deprecated": false }, @@ -11228,7 +11053,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 478 + "lineNumber": 476 }, "deprecated": false }, @@ -11261,7 +11086,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 480 + "lineNumber": 478 }, "deprecated": false }, @@ -11285,7 +11110,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 485 + "lineNumber": 483 }, "deprecated": false }, @@ -11309,7 +11134,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 487 + "lineNumber": 485 }, "deprecated": false }, @@ -11333,7 +11158,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 489 + "lineNumber": 487 }, "deprecated": false }, @@ -11357,7 +11182,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 491 + "lineNumber": 489 }, "deprecated": false }, @@ -11381,7 +11206,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 493 + "lineNumber": 491 }, "deprecated": false }, @@ -11405,7 +11230,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 495 + "lineNumber": 493 }, "deprecated": false }, @@ -11429,7 +11254,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 497 + "lineNumber": 495 }, "deprecated": false }, @@ -11455,7 +11280,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 499 + "lineNumber": 497 }, "deprecated": false, "returnComment": [], @@ -11475,7 +11300,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 520 + "lineNumber": 518 }, "deprecated": false, "children": [ @@ -11499,7 +11324,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 522 + "lineNumber": 520 }, "deprecated": false }, @@ -11523,7 +11348,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 524 + "lineNumber": 522 }, "deprecated": false }, @@ -11547,7 +11372,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 526 + "lineNumber": 524 }, "deprecated": false }, @@ -11571,7 +11396,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 528 + "lineNumber": 526 }, "deprecated": false }, @@ -11595,7 +11420,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 530 + "lineNumber": 528 }, "deprecated": false }, @@ -11619,7 +11444,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 532 + "lineNumber": 530 }, "deprecated": false } @@ -12169,6 +11994,24 @@ }, "deprecated": false }, + { + "parentPluginId": "core", + "id": "def-server.DeprecationsDetails.deprecationType", + "type": "CompoundType", + "tags": [], + "label": "deprecationType", + "description": [ + "\n(optional) Used to identify between different deprecation types.\nExample use case: in Upgrade Assistant, we may want to allow the user to sort by\ndeprecation type or show each type in a separate tab.\n\nFeel free to add new types if necessary.\nPredefined types are necessary to reduce having similar definitions with different keywords\nacross kibana deprecations." + ], + "signature": [ + "\"config\" | \"feature\" | undefined" + ], + "source": { + "path": "src/core/server/deprecations/types.ts", + "lineNumber": 37 + }, + "deprecated": false + }, { "parentPluginId": "core", "id": "def-server.DeprecationsDetails.documentationUrl", @@ -12181,7 +12024,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 29 + "lineNumber": 39 }, "deprecated": false }, @@ -12193,11 +12036,11 @@ "label": "correctiveActions", "description": [], "signature": [ - "{ api?: { path: string; method: \"PUT\" | \"POST\"; body?: { [key: string]: any; } | undefined; } | undefined; manualSteps?: string[] | undefined; }" + "{ api?: { path: string; method: \"PUT\" | \"POST\"; body?: { [key: string]: any; } | undefined; } | undefined; manualSteps: string[]; }" ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 31 + "lineNumber": 41 }, "deprecated": false } @@ -12265,7 +12108,7 @@ ], "source": { "path": "src/core/server/deprecations/deprecations_service.ts", - "lineNumber": 103 + "lineNumber": 101 }, "deprecated": false, "children": [ @@ -12289,7 +12132,7 @@ ], "source": { "path": "src/core/server/deprecations/deprecations_service.ts", - "lineNumber": 104 + "lineNumber": 102 }, "deprecated": false, "returnComment": [], @@ -12312,7 +12155,7 @@ ], "source": { "path": "src/core/server/deprecations/deprecations_service.ts", - "lineNumber": 104 + "lineNumber": 102 }, "deprecated": false } @@ -12708,14 +12551,7 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 34 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 33 + "lineNumber": 32 } }, { @@ -12949,7 +12785,7 @@ "description": [], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 60 + "lineNumber": 70 }, "deprecated": false, "children": [ @@ -12971,7 +12807,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 61 + "lineNumber": 71 }, "deprecated": false }, @@ -13287,7 +13123,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 62 + "lineNumber": 72 }, "deprecated": false } @@ -14316,7 +14152,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -15520,7 +15356,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -15548,7 +15384,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -15957,14 +15793,14 @@ "plugin": "crossClusterReplication", "link": { "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 17 + "lineNumber": 16 } }, { "plugin": "crossClusterReplication", "link": { "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 36 + "lineNumber": 27 } }, { @@ -16223,14 +16059,14 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/lib/telemetry/sender.ts", - "lineNumber": 447 + "lineNumber": 457 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/lib/telemetry/sender.ts", - "lineNumber": 466 + "lineNumber": 476 } }, { @@ -20314,13 +20150,13 @@ "signature": [ "{ legacy: { globalConfig$: ", "Observable", - " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", ") => boolean; isEqualTo: (other: ", "ByteSizeValue", - ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: \"b\" | \"kb\" | \"mb\" | \"gb\" | undefined) => string; }>; }>; }>>; get: () => Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: \"b\" | \"kb\" | \"mb\" | \"gb\" | undefined) => string; }>; }>; }>>; get: () => Readonly<{ kibana: Readonly<{ readonly index: string; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -20552,7 +20388,7 @@ "description": [], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 56 + "lineNumber": 66 }, "deprecated": false, "children": [ @@ -20584,7 +20420,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 57 + "lineNumber": 67 }, "deprecated": false, "returnComment": [], @@ -20607,7 +20443,7 @@ ], "source": { "path": "src/core/server/deprecations/types.ts", - "lineNumber": 57 + "lineNumber": 67 }, "deprecated": false } @@ -20627,7 +20463,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 439 + "lineNumber": 437 }, "deprecated": false, "children": [ @@ -20731,7 +20567,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 440 + "lineNumber": 438 }, "deprecated": false } @@ -22507,7 +22343,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -23394,28 +23230,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 14 + "lineNumber": 12 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 42 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 13 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/plugin.ts", - "lineNumber": 69 + "lineNumber": 38 } }, { @@ -23499,7 +23321,7 @@ "plugin": "monitoring", "link": { "path": "x-pack/plugins/monitoring/server/plugin.ts", - "lineNumber": 279 + "lineNumber": 284 } }, { @@ -23672,28 +23494,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/types.ts", - "lineNumber": 43 + "lineNumber": 42 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/server/types.ts", - "lineNumber": 50 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/types.ts", - "lineNumber": 8 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/server/types.ts", - "lineNumber": 41 + "lineNumber": 49 } }, { @@ -23710,41 +23518,6 @@ "lineNumber": 73 } }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 9 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 139 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts", - "lineNumber": 405 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts", - "lineNumber": 1 - } - }, - { - "plugin": "crossClusterReplication", - "link": { - "path": "x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts", - "lineNumber": 30 - } - }, { "plugin": "globalSearch", "link": { @@ -23770,28 +23543,14 @@ "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/target/types/server/types.d.ts", - "lineNumber": 27 + "lineNumber": 26 } }, { "plugin": "indexManagement", "link": { "path": "x-pack/plugins/index_management/target/types/server/types.d.ts", - "lineNumber": 33 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts", - "lineNumber": 1 - } - }, - { - "plugin": "infra", - "link": { - "path": "x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts", - "lineNumber": 58 + "lineNumber": 32 } } ], @@ -24260,7 +24019,7 @@ "label": "SharedGlobalConfig", "description": [], "signature": [ - "{ readonly kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; readonly elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; readonly path: Readonly<{ readonly data: string; }>; readonly savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "{ readonly kibana: Readonly<{ readonly index: string; }>; readonly elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; readonly path: Readonly<{ readonly data: string; }>; readonly savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -24297,7 +24056,7 @@ ], "source": { "path": "src/core/server/index.ts", - "lineNumber": 510 + "lineNumber": 508 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core_application.json b/api_docs/core_application.json index e890b6f92a2ad..ab5fbe560172b 100644 --- a/api_docs/core_application.json +++ b/api_docs/core_application.json @@ -572,11 +572,18 @@ "section": "def-public.App", "text": "App" }, - "" + " extends ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreApplicationPluginApi", + "section": "def-public.AppNavOptions", + "text": "AppNavOptions" + } ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 79 + "lineNumber": 107 }, "deprecated": false, "children": [ @@ -591,7 +598,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 83 + "lineNumber": 111 }, "deprecated": false }, @@ -606,7 +613,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 88 + "lineNumber": 116 }, "deprecated": false }, @@ -625,7 +632,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 95 + "lineNumber": 123 }, "deprecated": false }, @@ -650,7 +657,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 101 + "lineNumber": 129 }, "deprecated": false }, @@ -675,7 +682,25 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 108 + "lineNumber": 136 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.App.searchable", + "type": "CompoundType", + "tags": [], + "label": "searchable", + "description": [ + "\nThe initial flag to determine if the application is searchable in the global search.\nDefaulting to `true` if `navLinkStatus` is `visible` or omitted." + ], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 142 }, "deprecated": false }, @@ -693,7 +718,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 115 + "lineNumber": 149 }, "deprecated": false }, @@ -720,79 +745,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 149 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.order", - "type": "number", - "tags": [], - "label": "order", - "description": [ - "\nAn ordinal used to sort nav links relative to one another for display." - ], - "signature": [ - "number | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 154 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.tooltip", - "type": "string", - "tags": [], - "label": "tooltip", - "description": [ - "\nA tooltip shown when hovering over app link." - ], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 159 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.euiIconType", - "type": "string", - "tags": [], - "label": "euiIconType", - "description": [ - "\nA EUI iconType that will be used for the app's icon. This icon\ntakes precendence over the `icon` property." - ], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 165 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-public.App.icon", - "type": "string", - "tags": [], - "label": "icon", - "description": [ - "\nA URL to an image file used as an icon. Used as a fallback\nif `euiIconType` is not provided." - ], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/public/application/types.ts", - "lineNumber": 171 + "lineNumber": 183 }, "deprecated": false }, @@ -812,7 +765,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 176 + "lineNumber": 188 }, "deprecated": false }, @@ -830,7 +783,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 182 + "lineNumber": 194 }, "deprecated": false }, @@ -872,7 +825,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 187 + "lineNumber": 199 }, "deprecated": false, "returnComment": [], @@ -896,7 +849,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 326 + "lineNumber": 346 }, "deprecated": false } @@ -916,7 +869,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 194 + "lineNumber": 206 }, "deprecated": false }, @@ -934,7 +887,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 212 + "lineNumber": 224 }, "deprecated": false }, @@ -952,7 +905,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 215 + "lineNumber": 227 }, "deprecated": false }, @@ -977,7 +930,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 254 + "lineNumber": 266 }, "deprecated": false } @@ -995,7 +948,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 552 + "lineNumber": 572 }, "deprecated": false, "children": [ @@ -1018,7 +971,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 553 + "lineNumber": 573 }, "deprecated": false }, @@ -1031,7 +984,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 554 + "lineNumber": 574 }, "deprecated": false }, @@ -1047,7 +1000,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 555 + "lineNumber": 575 }, "deprecated": false }, @@ -1063,7 +1016,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 556 + "lineNumber": 576 }, "deprecated": false } @@ -1081,7 +1034,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 540 + "lineNumber": 560 }, "deprecated": false, "children": [ @@ -1104,7 +1057,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 541 + "lineNumber": 561 }, "deprecated": false } @@ -1120,7 +1073,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 607 + "lineNumber": 628 }, "deprecated": false, "children": [ @@ -1146,7 +1099,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 613 + "lineNumber": 634 }, "deprecated": false, "children": [ @@ -1171,7 +1124,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 613 + "lineNumber": 634 }, "deprecated": false, "isRequired": true @@ -1203,7 +1156,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 642 + "lineNumber": 663 }, "deprecated": false, "children": [ @@ -1228,7 +1181,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 642 + "lineNumber": 663 }, "deprecated": false, "isRequired": true @@ -1248,7 +1201,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 683 + "lineNumber": 710 }, "deprecated": false, "children": [ @@ -1266,7 +1219,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 687 + "lineNumber": 714 }, "deprecated": false }, @@ -1293,7 +1246,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 696 + "lineNumber": 723 }, "deprecated": false }, @@ -1319,7 +1272,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false, "children": [ @@ -1335,7 +1288,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false, "isRequired": true @@ -1361,7 +1314,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false, "isRequired": false @@ -1383,7 +1336,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 742 + "lineNumber": 769 }, "deprecated": false, "children": [ @@ -1401,7 +1354,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 742 + "lineNumber": 769 }, "deprecated": false, "isRequired": true @@ -1423,7 +1376,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false, "children": [ @@ -1439,7 +1392,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false, "isRequired": true @@ -1453,7 +1406,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false, "children": [ @@ -1469,7 +1422,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false }, @@ -1485,7 +1438,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 756 + "lineNumber": 783 }, "deprecated": false } @@ -1509,7 +1462,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 761 + "lineNumber": 788 }, "deprecated": false } @@ -1535,7 +1488,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 336 + "lineNumber": 356 }, "deprecated": false, "children": [ @@ -1553,7 +1506,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 340 + "lineNumber": 360 }, "deprecated": false }, @@ -1578,7 +1531,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 386 + "lineNumber": 406 }, "deprecated": false }, @@ -1595,7 +1548,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 436 + "lineNumber": 456 }, "deprecated": true, "references": [ @@ -1606,6 +1559,13 @@ "lineNumber": 16 } }, + { + "plugin": "fleet", + "link": { + "path": "x-pack/plugins/fleet/public/applications/integrations/index.tsx", + "lineNumber": 67 + } + }, { "plugin": "fleet", "link": { @@ -1661,6 +1621,13 @@ "path": "x-pack/plugins/fleet/target/types/public/applications/fleet/index.d.ts", "lineNumber": 11 } + }, + { + "plugin": "fleet", + "link": { + "path": "x-pack/plugins/fleet/target/types/public/applications/integrations/index.d.ts", + "lineNumber": 11 + } } ] }, @@ -1688,29 +1655,29 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 471 + "lineNumber": 491 }, "deprecated": true, "references": [ { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/types.ts", - "lineNumber": 82 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 194 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/dashboard_router.tsx", - "lineNumber": 56 + "lineNumber": 57 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 298 + "lineNumber": 299 } }, { @@ -1724,7 +1691,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/public/routes/map_page/map_app/map_app.tsx", - "lineNumber": 59 + "lineNumber": 67 } }, { @@ -1738,14 +1705,21 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/public/app_plugin/types.ts", - "lineNumber": 71 + "lineNumber": 44 + } + }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/app_plugin/types.ts", + "lineNumber": 72 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/public/app_plugin/mounter.tsx", - "lineNumber": 171 + "lineNumber": 219 } }, { @@ -1822,7 +1796,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/target/types/public/routes/map_page/map_app/map_app.d.ts", - "lineNumber": 13 + "lineNumber": 17 } } ], @@ -1849,7 +1823,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 471 + "lineNumber": 491 }, "deprecated": false } @@ -1877,7 +1851,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 502 + "lineNumber": 522 }, "deprecated": false, "returnComment": [], @@ -1901,7 +1875,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 502 + "lineNumber": 522 }, "deprecated": false } @@ -1910,6 +1884,96 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions", + "type": "Interface", + "tags": [], + "label": "AppNavOptions", + "description": [ + "\nApp navigation menu options" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 73 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.order", + "type": "number", + "tags": [], + "label": "order", + "description": [ + "\nAn ordinal used to sort nav links relative to one another for display." + ], + "signature": [ + "number | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 77 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.tooltip", + "type": "string", + "tags": [], + "label": "tooltip", + "description": [ + "\nA tooltip shown when hovering over app link." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 82 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.euiIconType", + "type": "string", + "tags": [], + "label": "euiIconType", + "description": [ + "\nA EUI iconType that will be used for the app's icon. This icon\ntakes precendence over the `icon` property." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 88 + }, + "deprecated": false + }, + { + "parentPluginId": "core", + "id": "def-public.AppNavOptions.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [ + "\nA URL to an image file used as an icon. Used as a fallback\nif `euiIconType` is not provided." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 94 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "core", "id": "def-public.NavigateToAppOptions", @@ -1921,10 +1985,28 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 661 + "lineNumber": 683 }, "deprecated": false, "children": [ + { + "parentPluginId": "core", + "id": "def-public.NavigateToAppOptions.deepLinkId", + "type": "string", + "tags": [], + "label": "deepLinkId", + "description": [ + "\noptional {@link App.deepLinks | deep link} id inside the application to navigate to.\nIf an additional {@link NavigateToAppOptions.path | path} is defined it will be appended to the deep link path." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "src/core/public/application/types.ts", + "lineNumber": 688 + }, + "deprecated": false + }, { "parentPluginId": "core", "id": "def-public.NavigateToAppOptions.path", @@ -1932,14 +2014,14 @@ "tags": [], "label": "path", "description": [ - "\noptional path inside application to deep link to.\nIf undefined, will use {@link App.defaultPath | the app's default path}` as default." + "\noptional path inside application to deep link to.\nIf undefined, will use {@link App.defaultPath | the app's default path} as default." ], "signature": [ "string | undefined" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 666 + "lineNumber": 693 }, "deprecated": false }, @@ -1957,7 +2039,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 670 + "lineNumber": 697 }, "deprecated": false }, @@ -1975,7 +2057,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 674 + "lineNumber": 701 }, "deprecated": false }, @@ -1993,7 +2075,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 679 + "lineNumber": 706 }, "deprecated": false } @@ -2013,7 +2095,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 527 + "lineNumber": 547 }, "deprecated": false, "initialIsOpen": false @@ -2070,7 +2152,15 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - " | undefined; } & { path: string; deepLinks?: ", + " | undefined; searchable?: boolean | undefined; } & ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreApplicationPluginApi", + "section": "def-public.AppNavOptions", + "text": "AppNavOptions" + }, + " & { path: string; deepLinks?: ", { "pluginId": "core", "scope": "public", @@ -2086,7 +2176,15 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - " | undefined; } & { path?: string | undefined; deepLinks: ", + " | undefined; searchable?: boolean | undefined; } & ", + { + "pluginId": "core", + "scope": "public", + "docId": "kibCoreApplicationPluginApi", + "section": "def-public.AppNavOptions", + "text": "AppNavOptions" + }, + " & { path?: string | undefined; deepLinks: ", { "pluginId": "core", "scope": "public", @@ -2098,7 +2196,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 279 + "lineNumber": 292 }, "deprecated": false, "initialIsOpen": false @@ -2131,7 +2229,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 566 + "lineNumber": 586 }, "deprecated": false, "initialIsOpen": false @@ -2161,7 +2259,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 517 + "lineNumber": 537 }, "deprecated": true, "references": [ @@ -2269,7 +2367,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 325 + "lineNumber": 345 }, "deprecated": false, "initialIsOpen": false @@ -2288,7 +2386,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 333 + "lineNumber": 353 }, "deprecated": false, "initialIsOpen": false @@ -2319,7 +2417,7 @@ "section": "def-public.AppDeepLink", "text": "AppDeepLink" }, - "[] | undefined; navLinkStatus?: ", + "[] | undefined; searchable?: boolean | undefined; navLinkStatus?: ", { "pluginId": "core", "scope": "public", @@ -2362,11 +2460,11 @@ "section": "def-public.App", "text": "App" }, - ", \"status\" | \"deepLinks\" | \"navLinkStatus\" | \"defaultPath\" | \"tooltip\">> | undefined" + ", \"status\" | \"deepLinks\" | \"searchable\" | \"navLinkStatus\" | \"defaultPath\" | \"tooltip\">> | undefined" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 74 + "lineNumber": 102 }, "deprecated": false, "initialIsOpen": false @@ -2389,7 +2487,7 @@ "section": "def-public.AppDeepLink", "text": "AppDeepLink" }, - ", \"title\" | \"id\" | \"path\"> & { deepLinks: ", + ", \"title\" | \"id\" | \"order\" | \"path\" | \"tooltip\" | \"euiIconType\" | \"icon\"> & { deepLinks: ", { "pluginId": "core", "scope": "public", @@ -2405,11 +2503,11 @@ "section": "def-public.AppNavLinkStatus", "text": "AppNavLinkStatus" }, - "; }" + "; searchable: boolean; }" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 262 + "lineNumber": 274 }, "deprecated": false, "initialIsOpen": false @@ -2432,7 +2530,7 @@ "section": "def-public.App", "text": "App" }, - ", \"status\" | \"title\" | \"id\" | \"order\" | \"category\" | \"navLinkStatus\" | \"defaultPath\" | \"tooltip\" | \"euiIconType\" | \"icon\" | \"capabilities\" | \"chromeless\" | \"appRoute\" | \"exactRoute\"> & { status: ", + ", \"status\" | \"title\" | \"id\" | \"order\" | \"category\" | \"navLinkStatus\" | \"defaultPath\" | \"capabilities\" | \"chromeless\" | \"appRoute\" | \"exactRoute\" | \"tooltip\" | \"euiIconType\" | \"icon\"> & { status: ", { "pluginId": "core", "scope": "public", @@ -2456,11 +2554,11 @@ "section": "def-public.PublicAppDeepLinkInfo", "text": "PublicAppDeepLinkInfo" }, - "[]; }" + "[]; searchable: boolean; }" ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 308 + "lineNumber": 324 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/core_chrome.json b/api_docs/core_chrome.json index fae65ff62c971..c84b06c235b48 100644 --- a/api_docs/core_chrome.json +++ b/api_docs/core_chrome.json @@ -965,14 +965,11 @@ "tags": [], "label": "url", "description": [ - "\nThe route used to open the {@link AppBase.defaultPath | default path } of an application.\nIf unset, `baseUrl` will be used instead." - ], - "signature": [ - "string | undefined" + "\nThe route used to open the default path and the deep links of an application." ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 39 + "lineNumber": 38 }, "deprecated": false }, @@ -990,7 +987,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 44 + "lineNumber": 43 }, "deprecated": false }, @@ -1008,7 +1005,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 49 + "lineNumber": 48 }, "deprecated": false }, @@ -1026,7 +1023,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 55 + "lineNumber": 54 }, "deprecated": false }, @@ -1044,7 +1041,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 61 + "lineNumber": 60 }, "deprecated": false }, @@ -1059,7 +1056,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 66 + "lineNumber": 65 }, "deprecated": false }, @@ -1077,7 +1074,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 75 + "lineNumber": 74 }, "deprecated": false }, @@ -1095,7 +1092,7 @@ ], "source": { "path": "src/core/public/chrome/nav_links/nav_link.ts", - "lineNumber": 80 + "lineNumber": 79 }, "deprecated": false } diff --git a/api_docs/core_saved_objects.json b/api_docs/core_saved_objects.json index adf0612a28faf..bd7a9cb1ccb08 100644 --- a/api_docs/core_saved_objects.json +++ b/api_docs/core_saved_objects.json @@ -4759,7 +4759,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 36 + "lineNumber": 35 }, "deprecated": false, "children": [ @@ -5075,7 +5075,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 37 + "lineNumber": 36 }, "deprecated": false }, @@ -5099,7 +5099,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 38 + "lineNumber": 37 }, "deprecated": false }, @@ -5112,7 +5112,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 39 + "lineNumber": 38 }, "deprecated": false }, @@ -5128,7 +5128,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 40 + "lineNumber": 39 }, "deprecated": false }, @@ -5144,7 +5144,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 42 + "lineNumber": 41 }, "deprecated": false, "children": [ @@ -5157,7 +5157,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 47 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -5473,7 +5473,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 48 + "lineNumber": 47 }, "deprecated": false }, @@ -5521,7 +5521,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 49 + "lineNumber": 48 }, "deprecated": false }, @@ -5534,7 +5534,7 @@ "description": [], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 50 + "lineNumber": 49 }, "deprecated": false }, @@ -5550,7 +5550,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 51 + "lineNumber": 50 }, "deprecated": false } @@ -5585,7 +5585,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 74 + "lineNumber": 73 }, "deprecated": false, "children": [ @@ -5607,7 +5607,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 74 + "lineNumber": 73 }, "deprecated": false, "isRequired": true @@ -5641,7 +5641,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 93 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -5663,7 +5663,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 93 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -7575,7 +7575,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 697 + "lineNumber": 696 }, "deprecated": false, "children": [ @@ -7591,7 +7591,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 698 + "lineNumber": 697 }, "deprecated": false, "isRequired": true @@ -7614,7 +7614,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 699 + "lineNumber": 698 }, "deprecated": false, "isRequired": true @@ -7667,7 +7667,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 759 + "lineNumber": 758 }, "deprecated": false, "children": [ @@ -7689,7 +7689,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 760 + "lineNumber": 759 }, "deprecated": false, "isRequired": true @@ -7739,7 +7739,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 926 + "lineNumber": 925 }, "deprecated": false, "children": [ @@ -7764,7 +7764,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 927 + "lineNumber": 926 }, "deprecated": false, "isRequired": true @@ -7787,7 +7787,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 928 + "lineNumber": 927 }, "deprecated": false, "isRequired": true @@ -7823,7 +7823,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1013 + "lineNumber": 1012 }, "deprecated": false, "children": [ @@ -7839,7 +7839,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1014 + "lineNumber": 1013 }, "deprecated": false, "isRequired": true @@ -7856,7 +7856,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1015 + "lineNumber": 1014 }, "deprecated": false, "isRequired": true @@ -7879,7 +7879,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1016 + "lineNumber": 1015 }, "deprecated": false, "isRequired": true @@ -7921,7 +7921,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1055 + "lineNumber": 1054 }, "deprecated": false, "children": [ @@ -7937,7 +7937,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1056 + "lineNumber": 1055 }, "deprecated": false, "isRequired": true @@ -7954,7 +7954,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1057 + "lineNumber": 1056 }, "deprecated": false, "isRequired": true @@ -7977,7 +7977,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1058 + "lineNumber": 1057 }, "deprecated": false, "isRequired": true @@ -8021,7 +8021,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1185 + "lineNumber": 1184 }, "deprecated": false, "children": [ @@ -8037,7 +8037,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1186 + "lineNumber": 1185 }, "deprecated": false, "isRequired": true @@ -8054,7 +8054,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1187 + "lineNumber": 1186 }, "deprecated": false, "isRequired": true @@ -8071,7 +8071,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1188 + "lineNumber": 1187 }, "deprecated": false, "isRequired": true @@ -8095,7 +8095,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1189 + "lineNumber": 1188 }, "deprecated": false, "isRequired": true @@ -8141,7 +8141,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1283 + "lineNumber": 1282 }, "deprecated": false, "children": [ @@ -8166,7 +8166,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1284 + "lineNumber": 1283 }, "deprecated": false, "isRequired": true @@ -8190,7 +8190,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1285 + "lineNumber": 1284 }, "deprecated": false, "isRequired": false @@ -8236,7 +8236,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1307 + "lineNumber": 1306 }, "deprecated": false, "children": [ @@ -8259,7 +8259,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1308 + "lineNumber": 1307 }, "deprecated": false, "isRequired": true @@ -8276,7 +8276,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1309 + "lineNumber": 1308 }, "deprecated": false, "isRequired": true @@ -8293,7 +8293,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1310 + "lineNumber": 1309 }, "deprecated": false, "isRequired": true @@ -8317,7 +8317,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1311 + "lineNumber": 1310 }, "deprecated": false, "isRequired": false @@ -8366,7 +8366,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1334 + "lineNumber": 1333 }, "deprecated": false, "children": [ @@ -8391,7 +8391,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1335 + "lineNumber": 1334 }, "deprecated": false, "isRequired": true @@ -8414,7 +8414,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1336 + "lineNumber": 1335 }, "deprecated": false, "isRequired": true @@ -8454,7 +8454,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1551 + "lineNumber": 1550 }, "deprecated": false, "children": [ @@ -8470,7 +8470,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1552 + "lineNumber": 1551 }, "deprecated": false, "isRequired": true @@ -8487,7 +8487,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1553 + "lineNumber": 1552 }, "deprecated": false, "isRequired": true @@ -8510,7 +8510,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1554 + "lineNumber": 1553 }, "deprecated": false, "isRequired": true @@ -8550,7 +8550,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1662 + "lineNumber": 1661 }, "deprecated": false, "children": [ @@ -8568,7 +8568,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1663 + "lineNumber": 1662 }, "deprecated": false, "isRequired": true @@ -8587,7 +8587,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1664 + "lineNumber": 1663 }, "deprecated": false, "isRequired": true @@ -8614,7 +8614,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1665 + "lineNumber": 1664 }, "deprecated": false, "isRequired": true @@ -8640,7 +8640,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1666 + "lineNumber": 1665 }, "deprecated": false, "isRequired": true @@ -8683,7 +8683,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1822 + "lineNumber": 1821 }, "deprecated": false, "children": [ @@ -8699,7 +8699,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1823 + "lineNumber": 1822 }, "deprecated": false, "isRequired": true @@ -8722,7 +8722,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1824 + "lineNumber": 1823 }, "deprecated": false, "isRequired": true @@ -8762,7 +8762,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1895 + "lineNumber": 1890 }, "deprecated": false, "children": [ @@ -8778,7 +8778,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1896 + "lineNumber": 1891 }, "deprecated": false, "isRequired": true @@ -8804,7 +8804,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1897 + "lineNumber": 1892 }, "deprecated": false, "isRequired": false @@ -8852,7 +8852,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1951 + "lineNumber": 1946 }, "deprecated": false, "children": [ @@ -8876,7 +8876,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1952 + "lineNumber": 1947 }, "deprecated": false, "isRequired": true @@ -8900,7 +8900,7 @@ ], "source": { "path": "src/core/server/saved_objects/service/lib/repository.ts", - "lineNumber": 1953 + "lineNumber": 1948 }, "deprecated": false, "isRequired": false @@ -11724,207 +11724,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping", - "type": "Interface", - "tags": [], - "label": "SavedObjectsComplexFieldMapping", - "description": [ - "\nSee {@link SavedObjectsFieldMapping} for documentation.\n" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 141 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.dynamic", - "type": "CompoundType", - "tags": [], - "label": "dynamic", - "description": [ - "\nThe dynamic property of the mapping, either `false` or `'strict'`. If\nunspecified `dynamic: 'strict'` will be inherited from the top-level\nindex mappings.\n\nNote: To limit the number of mapping fields Saved Object types should\n*never* use `dynamic: true`." - ], - "signature": [ - "false | \"strict\" | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 150 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.enabled", - "type": "CompoundType", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 151 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.doc_values", - "type": "CompoundType", - "tags": [], - "label": "doc_values", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 152 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "string | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 153 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsComplexFieldMapping.properties", - "type": "Object", - "tags": [], - "label": "properties", - "description": [], - "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsMappingProperties", - "text": "SavedObjectsMappingProperties" - } - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 154 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping", - "type": "Interface", - "tags": [], - "label": "SavedObjectsCoreFieldMapping", - "description": [ - "\nSee {@link SavedObjectsFieldMapping} for documentation.\n" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 123 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 124 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.null_value", - "type": "CompoundType", - "tags": [], - "label": "null_value", - "description": [], - "signature": [ - "string | number | boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 125 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.index", - "type": "CompoundType", - "tags": [], - "label": "index", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 126 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.doc_values", - "type": "CompoundType", - "tags": [], - "label": "doc_values", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 127 - }, - "deprecated": false - }, - { - "parentPluginId": "core", - "id": "def-server.SavedObjectsCoreFieldMapping.fields", - "type": "Object", - "tags": [], - "label": "fields", - "description": [], - "signature": [ - "{ [subfield: string]: { type: string; ignore_above?: number | undefined; }; } | undefined" - ], - "source": { - "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 128 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "core", "id": "def-server.SavedObjectsCreateOptions", @@ -12867,7 +12666,7 @@ ], "signature": [ "Record | undefined" ], "source": { @@ -14372,7 +14171,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 87 + "lineNumber": 88 }, "deprecated": false, "children": [ @@ -14388,7 +14187,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 88 + "lineNumber": 89 }, "deprecated": false } @@ -14507,15 +14306,15 @@ { "plugin": "lens", "link": { - "path": "x-pack/plugins/lens/server/migrations.ts", - "lineNumber": 245 + "path": "x-pack/plugins/lens/server/migrations/saved_object_migrations.ts", + "lineNumber": 167 } }, { "plugin": "lens", "link": { - "path": "x-pack/plugins/lens/server/migrations.ts", - "lineNumber": 312 + "path": "x-pack/plugins/lens/server/migrations/saved_object_migrations.ts", + "lineNumber": 234 } } ], @@ -16944,7 +16743,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 36 + "lineNumber": 37 }, "deprecated": false, "children": [ @@ -16962,7 +16761,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 40 + "lineNumber": 41 }, "deprecated": false }, @@ -16986,7 +16785,7 @@ ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 42 + "lineNumber": 43 }, "deprecated": false } @@ -17426,7 +17225,7 @@ ], "source": { "path": "src/core/server/saved_objects/export/saved_objects_exporter.ts", - "lineNumber": 31 + "lineNumber": 30 }, "deprecated": false, "initialIsOpen": false @@ -18404,7 +18203,7 @@ "description": [], "signature": [ "{ type: string | string[]; filter?: any; aggs?: Record | undefined; fields?: string[] | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | \"_doc\" | undefined; search?: string | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ", { "pluginId": "core", @@ -18473,25 +18272,81 @@ "\nDescribe a {@link SavedObjectsTypeMappingDefinition | saved object type mapping} field.\n\nPlease refer to {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html | elasticsearch documentation}\nFor the mapping documentation\n" ], "signature": [ - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsComplexFieldMapping", - "text": "SavedObjectsComplexFieldMapping" - }, - " | ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreSavedObjectsPluginApi", - "section": "def-server.SavedObjectsCoreFieldMapping", - "text": "SavedObjectsCoreFieldMapping" - } + "(", + "MappingFlattenedProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingJoinProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingPercolatorProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingRankFeatureProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingRankFeaturesProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingConstantKeywordProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingFieldAliasProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingHistogramProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingObjectProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingNestedProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingSearchAsYouTypeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingTextProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingBinaryProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingBooleanProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDateProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDateNanosProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingKeywordProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingNumberProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingLongRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingIpRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingIntegerRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingFloatRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDoubleRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingDateRangeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingGeoPointProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingGeoShapeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingCompletionProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingGenericProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingIpProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingMurmur3HashProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingShapeProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingTokenCountProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingVersionProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingWildcardProperty", + " & { dynamic?: false | \"strict\" | undefined; }) | (", + "MappingPointProperty", + " & { dynamic?: false | \"strict\" | undefined; })" ], "source": { "path": "src/core/server/saved_objects/mappings/types.ts", - "lineNumber": 99 + "lineNumber": 100 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/dashboard.json b/api_docs/dashboard.json index 9c3dccb95bc07..821d298ea1309 100644 --- a/api_docs/dashboard.json +++ b/api_docs/dashboard.json @@ -47,7 +47,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 105 + "lineNumber": 87 }, "deprecated": false, "children": [ @@ -63,31 +63,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 106 - }, - "deprecated": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.DashboardContainer.switchViewMode", - "type": "Function", - "tags": [], - "label": "switchViewMode", - "description": [], - "signature": [ - "((newViewMode: ", - { - "pluginId": "embeddable", - "scope": "common", - "docId": "kibEmbeddablePluginApi", - "section": "def-common.ViewMode", - "text": "ViewMode" - }, - ") => void) | undefined" - ], - "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 107 + "lineNumber": 88 }, "deprecated": false }, @@ -103,7 +79,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 109 + "lineNumber": 90 }, "deprecated": false, "children": [], @@ -121,7 +97,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 113 + "lineNumber": 94 }, "deprecated": false, "children": [ @@ -143,7 +119,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 114 + "lineNumber": 95 }, "deprecated": false, "isRequired": true @@ -160,7 +136,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 115 + "lineNumber": 96 }, "deprecated": false, "isRequired": true @@ -200,7 +176,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 116 + "lineNumber": 97 }, "deprecated": false, "isRequired": false @@ -248,7 +224,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 129 + "lineNumber": 110 }, "deprecated": false, "children": [ @@ -273,7 +249,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 133 + "lineNumber": 114 }, "deprecated": false, "isRequired": true @@ -290,7 +266,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 134 + "lineNumber": 115 }, "deprecated": false, "isRequired": true @@ -322,7 +298,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 140 + "lineNumber": 122 }, "deprecated": false, "children": [ @@ -346,7 +322,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 141 + "lineNumber": 123 }, "deprecated": false, "isRequired": true @@ -364,7 +340,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 142 + "lineNumber": 124 }, "deprecated": false, "isRequired": false @@ -381,7 +357,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 143 + "lineNumber": 125 }, "deprecated": false, "isRequired": false @@ -419,7 +395,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 181 + "lineNumber": 164 }, "deprecated": false, "children": [ @@ -444,7 +420,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 182 + "lineNumber": 165 }, "deprecated": false, "isRequired": true @@ -469,7 +445,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 183 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -486,7 +462,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 184 + "lineNumber": 167 }, "deprecated": false, "isRequired": false @@ -562,7 +538,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 228 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -578,7 +554,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 232 + "lineNumber": 215 }, "deprecated": false, "isRequired": true @@ -595,7 +571,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 232 + "lineNumber": 215 }, "deprecated": false, "isRequired": true @@ -612,7 +588,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 232 + "lineNumber": 215 }, "deprecated": false, "isRequired": false @@ -632,7 +608,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 246 + "lineNumber": 229 }, "deprecated": false, "children": [ @@ -648,7 +624,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 246 + "lineNumber": 229 }, "deprecated": false, "isRequired": true @@ -669,7 +645,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 259 + "lineNumber": 242 }, "deprecated": false, "children": [ @@ -685,7 +661,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 259 + "lineNumber": 242 }, "deprecated": false, "isRequired": true @@ -749,7 +725,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 34 + "lineNumber": 32 }, "deprecated": false, "children": [ @@ -765,7 +741,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 37 + "lineNumber": 35 }, "deprecated": false }, @@ -781,7 +757,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 38 + "lineNumber": 36 }, "deprecated": false }, @@ -797,7 +773,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 40 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -815,7 +791,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 41 + "lineNumber": 39 }, "deprecated": false, "isRequired": true @@ -838,7 +814,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 42 + "lineNumber": 40 }, "deprecated": false, "isRequired": true @@ -858,7 +834,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 45 + "lineNumber": 43 }, "deprecated": false, "children": [], @@ -876,7 +852,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 50 + "lineNumber": 48 }, "deprecated": false, "children": [], @@ -902,7 +878,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 56 + "lineNumber": 54 }, "deprecated": false, "children": [], @@ -968,7 +944,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 66 + "lineNumber": 64 }, "deprecated": false, "children": [ @@ -990,7 +966,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 67 + "lineNumber": 65 }, "deprecated": false, "isRequired": true @@ -1030,7 +1006,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 68 + "lineNumber": 66 }, "deprecated": false, "isRequired": false @@ -1067,7 +1043,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 74 + "lineNumber": 72 }, "deprecated": false, "returnComment": [], @@ -1137,7 +1113,7 @@ ], "source": { "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx", - "lineNumber": 76 + "lineNumber": 74 }, "deprecated": false, "returnComment": [], @@ -1177,7 +1153,7 @@ ], "source": { "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false, "children": [ @@ -1193,7 +1169,7 @@ ], "source": { "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false, "isRequired": false @@ -1210,7 +1186,7 @@ ], "source": { "path": "src/plugins/dashboard/public/dashboard_constants.ts", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false, "isRequired": false @@ -1308,8 +1284,8 @@ "<{}>" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 43 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 72 }, "deprecated": false, "children": [ @@ -1321,12 +1297,12 @@ "label": "dashboardCapabilities", "description": [], "signature": [ - "DashboardCapabilities", + "DashboardAppCapabilities", " | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 44 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 73 }, "deprecated": false }, @@ -1348,8 +1324,8 @@ " | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 45 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 74 }, "deprecated": false }, @@ -1364,8 +1340,8 @@ "boolean | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 46 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 75 }, "deprecated": false }, @@ -1377,8 +1353,8 @@ "label": "isFullScreenMode", "description": [], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 47 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 76 }, "deprecated": false }, @@ -1393,8 +1369,8 @@ "string | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 48 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 77 }, "deprecated": false }, @@ -1409,8 +1385,8 @@ "{ from: string; to: string; mode?: \"absolute\" | \"relative\" | undefined; }" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 49 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 78 }, "deprecated": false }, @@ -1425,8 +1401,8 @@ "string | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 50 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 79 }, "deprecated": false }, @@ -1438,8 +1414,8 @@ "label": "useMargins", "description": [], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 51 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 80 }, "deprecated": false }, @@ -1454,8 +1430,8 @@ "boolean | undefined" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 52 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 81 }, "deprecated": false }, @@ -1476,8 +1452,8 @@ } ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 53 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 82 }, "deprecated": false }, @@ -1499,8 +1475,8 @@ "[]" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 54 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 83 }, "deprecated": false }, @@ -1512,8 +1488,8 @@ "label": "title", "description": [], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 55 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 84 }, "deprecated": false }, @@ -1528,8 +1504,8 @@ "{ query: string | { [key: string]: any; }; language: string; }" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 56 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 85 }, "deprecated": false }, @@ -1554,8 +1530,8 @@ " & { [k: string]: unknown; }>; }" ], "source": { - "path": "src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx", - "lineNumber": 57 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 86 }, "deprecated": false } @@ -1571,7 +1547,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 91 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -1584,7 +1560,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false } @@ -1617,7 +1593,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 18 + "lineNumber": 19 }, "deprecated": false, "children": [ @@ -1633,7 +1609,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 19 + "lineNumber": 20 }, "deprecated": false }, @@ -1646,7 +1622,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false }, @@ -1662,7 +1638,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false }, @@ -1678,7 +1654,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 22 + "lineNumber": 23 }, "deprecated": false }, @@ -1694,7 +1670,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 23 + "lineNumber": 24 }, "deprecated": false }, @@ -1707,7 +1683,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false }, @@ -1723,7 +1699,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 25 + "lineNumber": 26 }, "deprecated": false }, @@ -1739,7 +1715,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 27 + "lineNumber": 28 }, "deprecated": false }, @@ -1752,7 +1728,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 28 + "lineNumber": 29 }, "deprecated": false }, @@ -1775,7 +1751,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 29 + "lineNumber": 30 }, "deprecated": false }, @@ -1967,7 +1943,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 30 + "lineNumber": 31 }, "deprecated": false }, @@ -1990,7 +1966,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 31 + "lineNumber": 32 }, "deprecated": false, "children": [], @@ -2016,7 +1992,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 32 + "lineNumber": 33 }, "deprecated": false, "children": [], @@ -2034,7 +2010,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false, "returnComment": [], @@ -2051,7 +2027,7 @@ ], "source": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false } @@ -2372,7 +2348,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 89 + "lineNumber": 90 }, "deprecated": false, "initialIsOpen": false @@ -2399,7 +2375,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 38 + "lineNumber": 46 }, "deprecated": false, "initialIsOpen": false @@ -2522,6 +2498,32 @@ "lineNumber": 19 }, "deprecated": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardConstants.CHANGE_CHECK_DEBOUNCE", + "type": "number", + "tags": [], + "label": "CHANGE_CHECK_DEBOUNCE", + "description": [], + "source": { + "path": "src/plugins/dashboard/public/dashboard_constants.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardConstants.CHANGE_APPLY_DEBOUNCE", + "type": "number", + "tags": [], + "label": "CHANGE_APPLY_DEBOUNCE", + "description": [], + "source": { + "path": "src/plugins/dashboard/public/dashboard_constants.ts", + "lineNumber": 21 + }, + "deprecated": false } ], "initialIsOpen": false @@ -2539,7 +2541,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 123 + "lineNumber": 124 }, "deprecated": false, "lifecycle": "setup", @@ -2554,7 +2556,7 @@ "description": [], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 125 + "lineNumber": 126 }, "deprecated": false, "children": [ @@ -2577,7 +2579,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 126 + "lineNumber": 127 }, "deprecated": false, "returnComment": [], @@ -2595,7 +2597,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 127 + "lineNumber": 128 }, "deprecated": false, "returnComment": [], @@ -2620,7 +2622,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 130 + "lineNumber": 131 }, "deprecated": false }, @@ -2642,7 +2644,7 @@ ], "source": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 131 + "lineNumber": 132 }, "deprecated": false } @@ -2983,7 +2985,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 91 + "lineNumber": 99 }, "deprecated": false, "children": [ @@ -3009,7 +3011,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 92 + "lineNumber": 100 }, "deprecated": false } @@ -3184,7 +3186,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 64 + "lineNumber": 72 }, "deprecated": false, "initialIsOpen": false @@ -3203,7 +3205,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 56 + "lineNumber": 64 }, "deprecated": false, "initialIsOpen": false @@ -3222,7 +3224,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 48 + "lineNumber": 56 }, "deprecated": false, "initialIsOpen": false @@ -3241,7 +3243,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 40 + "lineNumber": 48 }, "deprecated": false, "initialIsOpen": false @@ -3266,7 +3268,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 81 + "lineNumber": 89 }, "deprecated": false, "initialIsOpen": false @@ -3285,7 +3287,7 @@ ], "source": { "path": "src/plugins/dashboard/common/types.ts", - "lineNumber": 72 + "lineNumber": 80 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/dashboard_enhanced.json b/api_docs/dashboard_enhanced.json index 30daac1b26395..b1ce19250a597 100644 --- a/api_docs/dashboard_enhanced.json +++ b/api_docs/dashboard_enhanced.json @@ -684,6 +684,8 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsSetup", + "; url: ", + "UrlService", "; }" ], "source": { @@ -792,6 +794,8 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsStart", + "; url: ", + "UrlService", "; }" ], "source": { diff --git a/api_docs/data.json b/api_docs/data.json index 1ba62ea994654..2f9e74584603f 100644 --- a/api_docs/data.json +++ b/api_docs/data.json @@ -11,7 +11,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 55 + "lineNumber": 57 }, "deprecated": false, "children": [ @@ -31,7 +31,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "children": [ @@ -49,7 +49,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "isRequired": true @@ -83,7 +83,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "children": [ @@ -106,7 +106,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "isRequired": true @@ -134,7 +134,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 92 + "lineNumber": 94 }, "deprecated": false }, @@ -147,7 +147,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 93 + "lineNumber": 95 }, "deprecated": false }, @@ -160,7 +160,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 94 + "lineNumber": 96 }, "deprecated": false }, @@ -176,7 +176,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 95 + "lineNumber": 97 }, "deprecated": false }, @@ -199,7 +199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 96 + "lineNumber": 98 }, "deprecated": false }, @@ -215,7 +215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 97 + "lineNumber": 99 }, "deprecated": false }, @@ -231,7 +231,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 98 + "lineNumber": 100 }, "deprecated": false }, @@ -247,7 +247,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "children": [ @@ -269,7 +269,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -304,7 +304,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -328,7 +328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "children": [ @@ -346,7 +346,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "isRequired": true @@ -366,7 +366,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "children": [ @@ -382,7 +382,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "isRequired": true @@ -390,6 +390,42 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-public.AggConfig.hasTimeShift", + "type": "Function", + "tags": [], + "label": "hasTimeShift", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 177 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfig.getTimeShift", + "type": "Function", + "tags": [], + "label": "getTimeShift", + "description": [], + "signature": [ + "() => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 181 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-public.AggConfig.write", @@ -410,7 +446,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "children": [ @@ -433,7 +469,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "isRequired": false @@ -453,7 +489,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 179 + "lineNumber": 206 }, "deprecated": false, "children": [], @@ -471,7 +507,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "children": [ @@ -487,7 +523,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -504,7 +540,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -544,7 +580,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "children": [ @@ -568,7 +604,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": true @@ -592,7 +628,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": false @@ -624,7 +660,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "children": [ @@ -649,7 +685,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "isRequired": false @@ -673,7 +709,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 265 + "lineNumber": 292 }, "deprecated": false, "children": [], @@ -697,7 +733,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 296 + "lineNumber": 323 }, "deprecated": true, "references": [ @@ -726,7 +762,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 307 + "lineNumber": 334 }, "deprecated": false, "children": [], @@ -752,7 +788,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 316 + "lineNumber": 343 }, "deprecated": false, "children": [], @@ -788,7 +824,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 371 + "lineNumber": 398 }, "deprecated": false, "children": [], @@ -814,7 +850,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 375 + "lineNumber": 402 }, "deprecated": false, "children": [], @@ -840,7 +876,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 379 + "lineNumber": 406 }, "deprecated": false, "children": [], @@ -858,7 +894,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "children": [ @@ -874,7 +910,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "isRequired": true @@ -894,7 +930,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "children": [ @@ -910,7 +946,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": true @@ -927,7 +963,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": false @@ -947,7 +983,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 395 + "lineNumber": 422 }, "deprecated": false, "children": [], @@ -965,7 +1001,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 401 + "lineNumber": 428 }, "deprecated": false, "children": [], @@ -985,7 +1021,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 410 + "lineNumber": 437 }, "deprecated": false, "children": [], @@ -1003,7 +1039,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -1019,7 +1055,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -1046,7 +1082,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 428 + "lineNumber": 455 }, "deprecated": false, "children": [], @@ -1072,7 +1108,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 432 + "lineNumber": 459 }, "deprecated": false, "children": [], @@ -1090,7 +1126,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 436 + "lineNumber": 463 }, "deprecated": false, "children": [], @@ -1108,7 +1144,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 441 + "lineNumber": 468 }, "deprecated": false, "children": [], @@ -1157,7 +1193,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 452 + "lineNumber": 479 }, "deprecated": false }, @@ -1204,7 +1240,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 456 + "lineNumber": 483 }, "deprecated": false }, @@ -1228,7 +1264,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "children": [ @@ -1250,7 +1286,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "isRequired": true @@ -1270,7 +1306,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 65 + "lineNumber": 78 }, "deprecated": false, "children": [ @@ -1292,7 +1328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 66 + "lineNumber": 79 }, "deprecated": false }, @@ -1315,7 +1351,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 67 + "lineNumber": 80 }, "deprecated": false }, @@ -1331,7 +1367,23 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 68 + "lineNumber": 81 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.forceNow", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 82 }, "deprecated": false }, @@ -1347,7 +1399,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 69 + "lineNumber": 83 }, "deprecated": false }, @@ -1370,7 +1422,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 73 + "lineNumber": 87 }, "deprecated": false }, @@ -1386,7 +1438,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 75 + "lineNumber": 89 }, "deprecated": false, "children": [ @@ -1408,7 +1460,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 76 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -1443,7 +1495,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 77 + "lineNumber": 91 }, "deprecated": false, "isRequired": true @@ -1466,7 +1518,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 78 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -1486,7 +1538,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 }, "deprecated": false, "children": [ @@ -1502,7 +1554,43 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 + }, + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.setForceNow", + "type": "Function", + "tags": [], + "label": "setForceNow", + "description": [], + "signature": [ + "(now: Date | undefined) => void" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.setForceNow.$1", + "type": "Object", + "tags": [], + "label": "now", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 }, "deprecated": false, "isRequired": false @@ -1530,7 +1618,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -1552,7 +1640,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "isRequired": true @@ -1579,7 +1667,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -1595,7 +1683,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "isRequired": true @@ -1649,7 +1737,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 126 + "lineNumber": 144 }, "deprecated": false, "children": [ @@ -1683,7 +1771,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 127 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -1700,7 +1788,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 128 + "lineNumber": 146 }, "deprecated": false, "isRequired": true @@ -1730,7 +1818,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -1755,7 +1843,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "isRequired": true @@ -1775,7 +1863,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 181 + "lineNumber": 199 }, "deprecated": false, "children": [], @@ -1801,7 +1889,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 250 + "lineNumber": 289 }, "deprecated": false, "children": [], @@ -1826,7 +1914,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "children": [ @@ -1842,7 +1930,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "isRequired": true @@ -1870,7 +1958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "children": [ @@ -1886,7 +1974,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "isRequired": true @@ -1914,7 +2002,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -1930,7 +2018,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -1958,7 +2046,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "children": [ @@ -1974,7 +2062,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "isRequired": true @@ -2002,7 +2090,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -2018,7 +2106,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -2046,7 +2134,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "children": [ @@ -2062,7 +2150,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "isRequired": true @@ -2090,12 +2178,169 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 278 + "lineNumber": 317 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getTimeShifts", + "type": "Function", + "tags": [], + "label": "getTimeShifts", + "description": [], + "signature": [ + "() => Record" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 331 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getTimeShiftInterval", + "type": "Function", + "tags": [], + "label": "getTimeShiftInterval", + "description": [], + "signature": [ + "() => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 346 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.hasTimeShifts", + "type": "Function", + "tags": [], + "label": "hasTimeShifts", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 353 }, "deprecated": false, "children": [], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getSearchSourceTimeFilter", + "type": "Function", + "tags": [], + "label": "getSearchSourceTimeFilter", + "description": [], + "signature": [ + "(forceNow?: Date | undefined) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataPluginApi", + "section": "def-common.RangeFilter", + "text": "RangeFilter" + }, + "[] | { meta: { index: string | undefined; params: {}; alias: string; disabled: boolean; negate: boolean; }; query: { bool: { should: { bool: { filter: { range: { [x: string]: { gte: string; lte: string; }; }; }[]; }; }[]; minimum_should_match: number; }; }; }[]" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 357 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.getSearchSourceTimeFilter.$1", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 357 + }, + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.postFlightTransform", + "type": "Function", + "tags": [], + "label": "postFlightTransform", + "description": [], + "signature": [ + "(response: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + ") => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-public.AggConfigs.postFlightTransform.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-public.AggConfigs.getRequestAggById", @@ -2116,7 +2361,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 + "lineNumber": 429 }, "deprecated": false, "children": [ @@ -2132,7 +2377,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 + "lineNumber": 429 }, "deprecated": false, "isRequired": true @@ -2164,7 +2409,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 444 }, "deprecated": false, "children": [], @@ -2194,7 +2439,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -2212,7 +2457,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -2248,7 +2493,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "children": [ @@ -2272,7 +2517,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": true @@ -2296,7 +2541,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": false @@ -2530,7 +2775,7 @@ "section": "def-public.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; }>; }>; }>>" + "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; timeout: moment.Duration; terminateAfter: moment.Duration; }>; }>; }>>" ], "source": { "path": "src/plugins/data/public/plugin.ts", @@ -4008,7 +4253,9 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.addScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "addScriptedField", "description": [ "\nAdd scripted field to field list\n" @@ -4018,9 +4265,10 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, - "deprecated": false, + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "data", @@ -4036,7 +4284,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -4055,7 +4303,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -4072,7 +4320,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -4084,7 +4332,9 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.removeScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "removeScriptedField", "description": [ "\nRemove scripted field from field list" @@ -4094,9 +4344,25 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 117 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", + "lineNumber": 778 + } + } + ], "children": [ { "parentPluginId": "data", @@ -4110,7 +4376,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, "deprecated": false, "isRequired": true @@ -4122,9 +4388,13 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.getNonScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getNonScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -4138,9 +4408,74 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 277 + "lineNumber": 283 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx", + "lineNumber": 152 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 66 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 74 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 204 + } + }, + { + "plugin": "visTypeTimeseries", + "link": { + "path": "src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts", + "lineNumber": 65 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts", + "lineNumber": 106 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts", + "lineNumber": 29 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 122 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 244 + } + } + ], "children": [], "returnComment": [] }, @@ -4148,9 +4483,13 @@ "parentPluginId": "data", "id": "def-public.IndexPattern.getScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -4164,9 +4503,18 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 281 + "lineNumber": 291 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 61 + } + } + ], "children": [], "returnComment": [] }, @@ -4182,7 +4530,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 285 + "lineNumber": 295 }, "deprecated": false, "children": [], @@ -4200,7 +4548,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 289 + "lineNumber": 299 }, "deprecated": false, "children": [], @@ -4226,7 +4574,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 294 + "lineNumber": 304 }, "deprecated": false, "children": [], @@ -4252,7 +4600,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -4268,7 +4616,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -4288,7 +4636,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 304 + "lineNumber": 314 }, "deprecated": false, "children": [], @@ -4304,11 +4652,18 @@ "\nReturns index pattern as saved object body for saving" ], "signature": [ - "() => { fieldAttrs: string | undefined; title: string; timeFieldName: string | undefined; intervalName: string | undefined; sourceFilters: string | undefined; fields: string | undefined; fieldFormatMap: string | undefined; type: string | undefined; typeMeta: string | undefined; allowNoIndex: true | undefined; runtimeFieldMap: string | undefined; }" + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPatternAttributes", + "text": "IndexPatternAttributes" + } ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 311 + "lineNumber": 321 }, "deprecated": false, "children": [], @@ -4359,7 +4714,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 339 + "lineNumber": 347 }, "deprecated": false, "children": [ @@ -4397,7 +4752,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 340 + "lineNumber": 348 }, "deprecated": false, "isRequired": true @@ -4427,7 +4782,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "children": [ @@ -4445,7 +4800,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -4470,7 +4825,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -4492,7 +4847,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "children": [ @@ -4510,7 +4865,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "isRequired": true @@ -4540,7 +4895,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "children": [ @@ -4556,7 +4911,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "isRequired": true @@ -4584,7 +4939,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 411 + "lineNumber": 419 }, "deprecated": false, "children": [ @@ -4600,7 +4955,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 412 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -4617,7 +4972,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 413 + "lineNumber": 421 }, "deprecated": false, "isRequired": true @@ -4641,7 +4996,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 414 + "lineNumber": 422 }, "deprecated": false, "isRequired": true @@ -4661,7 +5016,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "children": [ @@ -4677,7 +5032,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": true @@ -4694,7 +5049,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": false @@ -4714,7 +5069,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -4730,7 +5085,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -4747,7 +5102,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": false @@ -4775,7 +5130,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "children": [ @@ -4791,7 +5146,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -4815,7 +5170,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -4835,7 +5190,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -4851,7 +5206,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -5067,14 +5422,14 @@ { "parentPluginId": "data", "id": "def-public.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [ "\nScript field language" ], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -5085,12 +5440,12 @@ { "parentPluginId": "data", "id": "def-public.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -5377,7 +5732,7 @@ "label": "toJSON", "description": [], "signature": [ - "() => { count: number; script: string | undefined; lang: string | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", + "() => { count: number; script: string | undefined; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", { "pluginId": "data", "scope": "common", @@ -6331,7 +6686,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -6347,7 +6702,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -6385,7 +6740,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -6407,7 +6762,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -6424,7 +6779,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -6464,7 +6819,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -6486,7 +6841,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -6505,7 +6860,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -6524,7 +6879,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -6562,7 +6917,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -6584,7 +6939,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -6603,7 +6958,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -6633,7 +6988,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -6655,7 +7010,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -6672,7 +7027,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -6689,7 +7044,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -6711,7 +7066,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -6729,7 +7084,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -6850,7 +7205,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 121 + "lineNumber": 127 }, "deprecated": false, "children": [ @@ -6866,7 +7221,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 129 + "lineNumber": 135 }, "deprecated": false }, @@ -6882,7 +7237,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "children": [ @@ -6904,7 +7259,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -6927,7 +7282,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -6949,7 +7304,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "children": [ @@ -6965,7 +7320,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "isRequired": true @@ -6995,7 +7350,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "children": [ @@ -7013,7 +7368,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -7039,7 +7394,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -7061,7 +7416,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "children": [ @@ -7079,7 +7434,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "isRequired": true @@ -7111,7 +7466,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "children": [ @@ -7135,7 +7490,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "isRequired": true @@ -7157,7 +7512,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 191 + "lineNumber": 197 }, "deprecated": false, "children": [], @@ -7184,7 +7539,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 198 + "lineNumber": 204 }, "deprecated": false, "children": [], @@ -7212,7 +7567,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -7228,7 +7583,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -7245,7 +7600,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -7275,7 +7630,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "children": [ @@ -7291,7 +7646,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "isRequired": true @@ -7320,7 +7675,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 223 + "lineNumber": 229 }, "deprecated": true, "references": [ @@ -7328,14 +7683,14 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 206 + "lineNumber": 207 } }, { "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 212 + "lineNumber": 213 } } ], @@ -7363,7 +7718,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 230 + "lineNumber": 236 }, "deprecated": false, "children": [], @@ -7390,7 +7745,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "children": [ @@ -7406,7 +7761,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "isRequired": true @@ -7446,7 +7801,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "children": [ @@ -7472,7 +7827,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": false @@ -7497,7 +7852,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": true @@ -7531,7 +7886,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 266 + "lineNumber": 272 }, "deprecated": false, "children": [], @@ -7571,7 +7926,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 274 + "lineNumber": 280 }, "deprecated": false, "children": [ @@ -7593,7 +7948,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 275 + "lineNumber": 281 }, "deprecated": false, "isRequired": true @@ -7627,7 +7982,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": true, "references": [ @@ -7638,13 +7993,6 @@ "lineNumber": 77 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/angular/context/api/anchor.ts", - "lineNumber": 57 - } - }, { "plugin": "maps", "link": { @@ -7686,7 +8034,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": false, "isRequired": true @@ -7726,7 +8074,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 325 + "lineNumber": 331 }, "deprecated": false, "children": [ @@ -7758,7 +8106,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 326 + "lineNumber": 332 }, "deprecated": false, "isRequired": true @@ -7780,7 +8128,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 334 + "lineNumber": 340 }, "deprecated": false, "children": [], @@ -7802,7 +8150,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 342 + "lineNumber": 348 }, "deprecated": false, "children": [], @@ -7829,7 +8177,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "children": [ @@ -7845,7 +8193,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "isRequired": true @@ -7869,7 +8217,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 860 + "lineNumber": 877 }, "deprecated": false, "children": [], @@ -8816,7 +9164,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false, "children": [ @@ -8845,7 +9193,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\">, ", + ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -8869,7 +9217,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -8898,7 +9246,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\">, ", + ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -8922,7 +9270,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -8975,7 +9323,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -9004,7 +9352,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -9028,7 +9376,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -9057,7 +9405,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -9081,7 +9429,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -9110,7 +9458,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\">, ", + ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -9134,7 +9482,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -9187,7 +9535,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -9216,7 +9564,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -9240,7 +9588,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -9269,7 +9617,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -9293,7 +9641,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -9322,7 +9670,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -9346,7 +9694,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -9375,11 +9723,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -9403,7 +9751,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -9456,7 +9804,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -9485,7 +9833,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9493,7 +9841,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9517,7 +9865,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -9546,7 +9894,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9554,7 +9902,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9578,7 +9926,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -9607,7 +9955,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9615,7 +9963,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9639,7 +9987,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -9668,7 +10016,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9676,7 +10024,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9700,7 +10048,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -9729,7 +10077,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -9737,7 +10085,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -9761,7 +10109,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false }, @@ -9814,7 +10162,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -9867,7 +10215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 214 + "lineNumber": 215 }, "deprecated": false }, @@ -9896,11 +10244,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -9924,7 +10272,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false }, @@ -9953,11 +10301,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -9981,7 +10329,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -10034,7 +10382,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -10087,7 +10435,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -10140,7 +10488,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -10193,7 +10541,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": false }, @@ -10246,7 +10594,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 221 + "lineNumber": 222 }, "deprecated": false }, @@ -10299,7 +10647,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false }, @@ -10328,11 +10676,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -10356,7 +10704,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 223 + "lineNumber": 224 }, "deprecated": false }, @@ -10409,7 +10757,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false }, @@ -10462,7 +10810,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false }, @@ -10491,11 +10839,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -10519,7 +10867,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -10572,7 +10920,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -10625,7 +10973,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false }, @@ -10678,7 +11026,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 229 + "lineNumber": 230 }, "deprecated": false } @@ -11531,7 +11879,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 58 + "lineNumber": 59 } }, { @@ -12882,28 +13230,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 139 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 248 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 287 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 329 + "lineNumber": 332 } }, { @@ -13807,12 +14155,12 @@ { "parentPluginId": "data", "id": "def-public.IFieldType.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/types.ts", @@ -14340,6 +14688,20 @@ "lineNumber": 85 } }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 25 + } + }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 102 + } + }, { "plugin": "lens", "link": { @@ -14445,20 +14807,6 @@ "lineNumber": 30 } }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 14 - } - }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 31 - } - }, { "plugin": "infra", "link": { @@ -14627,6 +14975,20 @@ "lineNumber": 23 } }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 14 + } + }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 31 + } + }, { "plugin": "lists", "link": { @@ -14659,21 +15021,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 21 + "lineNumber": 22 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 66 + "lineNumber": 72 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts", - "lineNumber": 19 + "lineNumber": 20 } }, { @@ -14932,21 +15294,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 44 + "lineNumber": 48 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 60 + "lineNumber": 64 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 65 + "lineNumber": 69 } }, { @@ -15733,6 +16095,20 @@ "lineNumber": 30 } }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 13 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 52 + } + }, { "plugin": "stackAlerts", "link": { @@ -15936,20 +16312,6 @@ "lineNumber": 1352 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 17 - } - }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 26 - } - }, { "plugin": "maps", "link": { @@ -15961,7 +16323,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 45 + "lineNumber": 44 } }, { @@ -16066,14 +16428,14 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 18 + "lineNumber": 19 } }, { "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 95 + "lineNumber": 104 } }, { @@ -16115,7 +16477,7 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts", - "lineNumber": 24 + "lineNumber": 25 } }, { @@ -16283,14 +16645,14 @@ "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 62 + "lineNumber": 63 } }, { "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 404 + "lineNumber": 405 } }, { @@ -19028,7 +19390,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 43 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -19041,7 +19403,7 @@ "label": "AggGroupName", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_groups.ts", @@ -19773,7 +20135,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 53 + "lineNumber": 55 }, "deprecated": false, "initialIsOpen": false @@ -20132,7 +20494,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 35 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -20359,7 +20721,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 650 + "lineNumber": 662 }, "deprecated": false, "initialIsOpen": false @@ -20716,7 +21078,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -20805,7 +21167,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/range_filter.ts", @@ -22149,7 +22513,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -22207,7 +22571,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -22887,7 +23251,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/public/query/timefilter/lib/change_time_filter.ts", @@ -22960,7 +23326,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/public/query/timefilter/lib/change_time_filter.ts", @@ -23530,7 +23898,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 33 + "lineNumber": 39 }, "deprecated": false }, @@ -23561,7 +23929,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 34 + "lineNumber": 40 }, "deprecated": false }, @@ -23592,7 +23960,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 35 + "lineNumber": 41 }, "deprecated": false }, @@ -23614,7 +23982,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 36 + "lineNumber": 42 }, "deprecated": false } @@ -25922,7 +26290,7 @@ "section": "def-public.QuerySuggestionGetFn", "text": "QuerySuggestionGetFn" }, - "; }" + "; getAutocompleteSettings: () => { terminateAfter: number; timeout: number; }; }" ], "source": { "path": "src/plugins/data/public/types.ts", @@ -26699,7 +27067,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; }>; }>; }>>" + "; }>; }>; autocomplete: Readonly<{} & { querySuggestions: Readonly<{} & { enabled: boolean; }>; valueSuggestions: Readonly<{} & { enabled: boolean; timeout: moment.Duration; terminateAfter: moment.Duration; }>; }>; }>>" ], "source": { "path": "src/plugins/data/server/plugin.ts", @@ -27533,7 +27901,9 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.addScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "addScriptedField", "description": [ "\nAdd scripted field to field list\n" @@ -27543,9 +27913,10 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, - "deprecated": false, + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "data", @@ -27561,7 +27932,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -27580,7 +27951,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -27597,7 +27968,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -27609,7 +27980,9 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.removeScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "removeScriptedField", "description": [ "\nRemove scripted field from field list" @@ -27619,9 +27992,25 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 117 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", + "lineNumber": 778 + } + } + ], "children": [ { "parentPluginId": "data", @@ -27635,7 +28024,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, "deprecated": false, "isRequired": true @@ -27647,9 +28036,13 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.getNonScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getNonScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -27663,9 +28056,74 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 277 + "lineNumber": 283 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx", + "lineNumber": 152 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 66 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 74 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 204 + } + }, + { + "plugin": "visTypeTimeseries", + "link": { + "path": "src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts", + "lineNumber": 65 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts", + "lineNumber": 106 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts", + "lineNumber": 29 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 122 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 244 + } + } + ], "children": [], "returnComment": [] }, @@ -27673,9 +28131,13 @@ "parentPluginId": "data", "id": "def-server.IndexPattern.getScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -27689,9 +28151,18 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 281 + "lineNumber": 291 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 61 + } + } + ], "children": [], "returnComment": [] }, @@ -27707,7 +28178,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 285 + "lineNumber": 295 }, "deprecated": false, "children": [], @@ -27725,7 +28196,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 289 + "lineNumber": 299 }, "deprecated": false, "children": [], @@ -27751,7 +28222,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 294 + "lineNumber": 304 }, "deprecated": false, "children": [], @@ -27777,7 +28248,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -27793,7 +28264,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -27813,7 +28284,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 304 + "lineNumber": 314 }, "deprecated": false, "children": [], @@ -27829,11 +28300,18 @@ "\nReturns index pattern as saved object body for saving" ], "signature": [ - "() => { fieldAttrs: string | undefined; title: string; timeFieldName: string | undefined; intervalName: string | undefined; sourceFilters: string | undefined; fields: string | undefined; fieldFormatMap: string | undefined; type: string | undefined; typeMeta: string | undefined; allowNoIndex: true | undefined; runtimeFieldMap: string | undefined; }" + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPatternAttributes", + "text": "IndexPatternAttributes" + } ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 311 + "lineNumber": 321 }, "deprecated": false, "children": [], @@ -27884,7 +28362,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 339 + "lineNumber": 347 }, "deprecated": false, "children": [ @@ -27922,7 +28400,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 340 + "lineNumber": 348 }, "deprecated": false, "isRequired": true @@ -27952,7 +28430,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "children": [ @@ -27970,7 +28448,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -27995,7 +28473,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -28017,7 +28495,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "children": [ @@ -28035,7 +28513,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "isRequired": true @@ -28065,7 +28543,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "children": [ @@ -28081,7 +28559,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "isRequired": true @@ -28109,7 +28587,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 411 + "lineNumber": 419 }, "deprecated": false, "children": [ @@ -28125,7 +28603,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 412 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -28142,7 +28620,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 413 + "lineNumber": 421 }, "deprecated": false, "isRequired": true @@ -28166,7 +28644,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 414 + "lineNumber": 422 }, "deprecated": false, "isRequired": true @@ -28186,7 +28664,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "children": [ @@ -28202,7 +28680,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": true @@ -28219,7 +28697,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": false @@ -28239,7 +28717,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -28255,7 +28733,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -28272,7 +28750,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": false @@ -28300,7 +28778,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "children": [ @@ -28316,7 +28794,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -28340,7 +28818,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -28360,7 +28838,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -28376,7 +28854,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -29199,7 +29677,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -29215,7 +29693,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -29253,7 +29731,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -29275,7 +29753,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -29292,7 +29770,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -29332,7 +29810,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -29354,7 +29832,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -29373,7 +29851,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -29392,7 +29870,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -29430,7 +29908,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -29452,7 +29930,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -29471,7 +29949,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -29501,7 +29979,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -29523,7 +30001,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -29540,7 +30018,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -29557,7 +30035,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -29579,7 +30057,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -29597,7 +30075,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -30420,7 +30898,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -30436,7 +30914,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -30474,7 +30952,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -30496,7 +30974,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -30513,7 +30991,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -30553,7 +31031,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -30575,7 +31053,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -30594,7 +31072,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -30613,7 +31091,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -30651,7 +31129,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -30673,7 +31151,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -30692,7 +31170,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -30722,7 +31200,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -30744,7 +31222,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -30761,7 +31239,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -30778,7 +31256,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -30800,7 +31278,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -30818,7 +31296,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -31168,7 +31646,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false, "children": [ @@ -31197,7 +31675,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\">, ", + ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -31221,7 +31699,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -31250,7 +31728,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\">, ", + ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -31274,7 +31752,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -31327,7 +31805,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -31356,7 +31834,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -31380,7 +31858,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -31409,7 +31887,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -31433,7 +31911,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -31462,7 +31940,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\">, ", + ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -31486,7 +31964,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -31539,7 +32017,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -31568,7 +32046,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -31592,7 +32070,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -31621,7 +32099,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -31645,7 +32123,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -31674,7 +32152,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -31698,7 +32176,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -31727,11 +32205,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -31755,7 +32233,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -31808,7 +32286,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -31837,7 +32315,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -31845,7 +32323,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -31869,7 +32347,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -31898,7 +32376,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -31906,7 +32384,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -31930,7 +32408,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -31959,7 +32437,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -31967,7 +32445,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -31991,7 +32469,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -32020,7 +32498,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -32028,7 +32506,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -32052,7 +32530,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -32081,7 +32559,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -32089,7 +32567,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -32113,7 +32591,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false }, @@ -32166,7 +32644,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -32219,7 +32697,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 214 + "lineNumber": 215 }, "deprecated": false }, @@ -32248,11 +32726,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -32276,7 +32754,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false }, @@ -32305,11 +32783,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -32333,7 +32811,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -32386,7 +32864,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -32439,7 +32917,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -32492,7 +32970,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -32545,7 +33023,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": false }, @@ -32598,7 +33076,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 221 + "lineNumber": 222 }, "deprecated": false }, @@ -32651,7 +33129,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false }, @@ -32680,11 +33158,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -32708,7 +33186,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 223 + "lineNumber": 224 }, "deprecated": false }, @@ -32761,7 +33239,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false }, @@ -32814,7 +33292,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false }, @@ -32843,11 +33321,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -32871,7 +33349,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -32924,7 +33402,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -32977,7 +33455,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false }, @@ -33030,7 +33508,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 229 + "lineNumber": 230 }, "deprecated": false } @@ -33403,7 +33881,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 58 + "lineNumber": 59 } }, { @@ -34754,28 +35232,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 139 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 248 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 287 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 329 + "lineNumber": 332 } }, { @@ -35679,12 +36157,12 @@ { "parentPluginId": "data", "id": "def-server.IFieldType.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/types.ts", @@ -36603,7 +37081,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 43 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -36616,7 +37094,7 @@ "label": "AggGroupName", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_groups.ts", @@ -36988,7 +37466,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 53 + "lineNumber": 55 }, "deprecated": false, "initialIsOpen": false @@ -37324,7 +37802,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 35 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -38964,7 +39442,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 33 + "lineNumber": 39 }, "deprecated": false }, @@ -38995,7 +39473,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 34 + "lineNumber": 40 }, "deprecated": false }, @@ -39026,7 +39504,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 35 + "lineNumber": 41 }, "deprecated": false }, @@ -39048,7 +39526,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 36 + "lineNumber": 42 }, "deprecated": false } @@ -39658,7 +40136,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 243 + "lineNumber": 244 }, "deprecated": false, "children": [ @@ -39671,7 +40149,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "children": [ @@ -39694,7 +40172,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 245 + "lineNumber": 246 }, "deprecated": false }, @@ -39710,7 +40188,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 246 + "lineNumber": 247 }, "deprecated": false, "returnComment": [], @@ -39750,7 +40228,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 247 + "lineNumber": 248 }, "deprecated": false }, @@ -39773,7 +40251,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 248 + "lineNumber": 249 }, "deprecated": false }, @@ -39796,7 +40274,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 249 + "lineNumber": 250 }, "deprecated": false }, @@ -39819,7 +40297,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 250 + "lineNumber": 251 }, "deprecated": false }, @@ -39843,7 +40321,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 251 + "lineNumber": 252 }, "deprecated": false, "returnComment": [], @@ -39892,7 +40370,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 252 + "lineNumber": 253 }, "deprecated": false, "returnComment": [], @@ -39941,7 +40419,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 253 + "lineNumber": 254 }, "deprecated": false, "returnComment": [], @@ -39976,7 +40454,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 254 + "lineNumber": 255 }, "deprecated": false, "returnComment": [], @@ -40008,7 +40486,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 255 + "lineNumber": 256 }, "deprecated": false, "returnComment": [], @@ -40053,7 +40531,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 256 + "lineNumber": 257 }, "deprecated": false }, @@ -40071,7 +40549,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 257 + "lineNumber": 258 }, "deprecated": false, "returnComment": [], @@ -40103,7 +40581,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 258 + "lineNumber": 259 }, "deprecated": false, "returnComment": [], @@ -40135,7 +40613,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 259 + "lineNumber": 260 }, "deprecated": false, "returnComment": [], @@ -40167,7 +40645,7 @@ "description": [], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 260 + "lineNumber": 261 }, "deprecated": false }, @@ -40183,7 +40661,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 261 + "lineNumber": 262 }, "deprecated": false }, @@ -40207,7 +40685,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 262 + "lineNumber": 263 }, "deprecated": false, "returnComment": [], @@ -40242,7 +40720,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 263 + "lineNumber": 264 }, "deprecated": false, "returnComment": [], @@ -40306,7 +40784,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 265 + "lineNumber": 266 }, "deprecated": false, "returnComment": [], @@ -40391,7 +40869,7 @@ ], "source": { "path": "src/plugins/data/server/index.ts", - "lineNumber": 266 + "lineNumber": 267 }, "deprecated": false, "returnComment": [], @@ -41124,7 +41602,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 32 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -41147,7 +41625,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 33 + "lineNumber": 39 }, "deprecated": false, "isRequired": false @@ -41181,7 +41659,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 34 + "lineNumber": 40 }, "deprecated": false, "isRequired": true @@ -41215,7 +41693,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 35 + "lineNumber": 41 }, "deprecated": false, "isRequired": true @@ -41240,7 +41718,7 @@ ], "source": { "path": "src/plugins/data/common/es_query/es_query/build_es_query.ts", - "lineNumber": 36 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -43386,7 +43864,7 @@ "section": "def-common.IFieldType", "text": "IFieldType" }, - ", value: string) => { script: { source: string; lang: string | undefined; params: { value: any; }; }; }" + ", value: string) => { script: { source: string; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: { value: any; }; }; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -43564,7 +44042,7 @@ "section": "def-common.RangeFilterParams", "text": "RangeFilterParams" }, - ") => { script: { source: string; params: { from?: string | number | undefined; to?: string | number | undefined; gt?: string | number | undefined; lt?: string | number | undefined; gte?: string | number | undefined; lte?: string | number | undefined; format?: string | number | undefined; }; lang: string | undefined; }; }" + ") => { script: { source: string; params: { from?: string | number | undefined; to?: string | number | undefined; gt?: string | number | undefined; lt?: string | number | undefined; gte?: string | number | undefined; lte?: string | number | undefined; format?: string | number | undefined; }; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; }; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/range_filter.ts", @@ -46324,7 +46802,7 @@ "section": "def-common.PhraseFilterMeta", "text": "PhraseFilterMeta" }, - "; script?: { script: { source?: any; lang?: string | undefined; params: any; }; } | undefined; }" + "; script?: { script: { source?: any; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; params: any; }; } | undefined; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/phrase_filter.ts", @@ -46493,7 +46971,9 @@ "section": "def-common.RangeFilterMeta", "text": "RangeFilterMeta" }, - "; script?: { script: { params: any; lang: string; source: any; }; } | undefined; match_all?: any; }" + "; script?: { script: { params: any; lang: ", + "ScriptLanguage", + "; source: any; }; } | undefined; match_all?: any; }" ], "source": { "path": "src/plugins/data/common/es_query/filters/range_filter.ts", diff --git a/api_docs/data_autocomplete.json b/api_docs/data_autocomplete.json index 38e27d4df6e2d..25bda08157358 100644 --- a/api_docs/data_autocomplete.json +++ b/api_docs/data_autocomplete.json @@ -370,7 +370,7 @@ ], "source": { "path": "src/plugins/data/public/autocomplete/autocomplete_service.ts", - "lineNumber": 96 + "lineNumber": 103 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/data_field_formats.json b/api_docs/data_field_formats.json index 1807c32a18389..a5fba87c20169 100644 --- a/api_docs/data_field_formats.json +++ b/api_docs/data_field_formats.json @@ -513,7 +513,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 157 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -535,7 +535,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 158 + "lineNumber": 212 }, "deprecated": false }, @@ -548,7 +548,7 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 159 + "lineNumber": 213 }, "deprecated": false }, @@ -570,7 +570,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 162 + "lineNumber": 216 }, "deprecated": false }, @@ -586,7 +586,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 163 + "lineNumber": 217 }, "deprecated": false }, @@ -598,11 +598,11 @@ "label": "outputFormats", "description": [], "signature": [ - "{ text: string; method: string; }[]" + "({ text: string; method: string; shortText?: undefined; } | { text: string; shortText: string; method: string; })[]" ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 164 + "lineNumber": 218 }, "deprecated": false }, @@ -615,7 +615,7 @@ "description": [], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 165 + "lineNumber": 219 }, "deprecated": false }, @@ -631,7 +631,25 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 167 + "lineNumber": 221 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.DurationFormat.isHumanPrecise", + "type": "Function", + "tags": [], + "label": "isHumanPrecise", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/field_formats/converters/duration.ts", + "lineNumber": 225 }, "deprecated": false, "children": [], @@ -645,11 +663,11 @@ "label": "getParamDefaults", "description": [], "signature": [ - "() => { inputFormat: string; outputFormat: string; outputPrecision: number; }" + "() => { inputFormat: string; outputFormat: string; outputPrecision: number; includeSpaceWithSuffix: boolean; }" ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 170 + "lineNumber": 229 }, "deprecated": false, "children": [], @@ -663,11 +681,11 @@ "label": "textConvert", "description": [], "signature": [ - "(val: any) => string" + "(val: any) => any" ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 178 + "lineNumber": 238 }, "deprecated": false, "children": [ @@ -683,7 +701,7 @@ ], "source": { "path": "src/plugins/data/common/field_formats/converters/duration.ts", - "lineNumber": 178 + "lineNumber": 238 }, "deprecated": false, "isRequired": true diff --git a/api_docs/data_index_patterns.json b/api_docs/data_index_patterns.json index 676ded76cb331..af5ddec480976 100644 --- a/api_docs/data_index_patterns.json +++ b/api_docs/data_index_patterns.json @@ -1689,7 +1689,9 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.addScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "addScriptedField", "description": [ "\nAdd scripted field to field list\n" @@ -1699,9 +1701,10 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, - "deprecated": false, + "deprecated": true, + "references": [], "children": [ { "parentPluginId": "data", @@ -1717,7 +1720,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -1736,7 +1739,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -1753,7 +1756,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 244 + "lineNumber": 245 }, "deprecated": false, "isRequired": true @@ -1765,7 +1768,9 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.removeScriptedField", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "removeScriptedField", "description": [ "\nRemove scripted field from field list" @@ -1775,9 +1780,25 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 117 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/field_editor/field_editor.tsx", + "lineNumber": 778 + } + } + ], "children": [ { "parentPluginId": "data", @@ -1791,7 +1812,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 270 + "lineNumber": 272 }, "deprecated": false, "isRequired": true @@ -1803,9 +1824,13 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.getNonScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getNonScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -1819,9 +1844,74 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 277 + "lineNumber": 283 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/source_filters_table/components/table/table.tsx", + "lineNumber": 152 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 66 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 74 + } + }, + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/edit_index_pattern.tsx", + "lineNumber": 204 + } + }, + { + "plugin": "visTypeTimeseries", + "link": { + "path": "src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts", + "lineNumber": 65 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.ts", + "lineNumber": 106 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/state_management/datasource.test.ts", + "lineNumber": 29 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 122 + } + }, + { + "plugin": "graph", + "link": { + "path": "x-pack/plugins/graph/public/services/persistence/deserialize.test.ts", + "lineNumber": 244 + } + } + ], "children": [], "returnComment": [] }, @@ -1829,9 +1919,13 @@ "parentPluginId": "data", "id": "def-common.IndexPattern.getScriptedFields", "type": "Function", - "tags": [], + "tags": [ + "deprecated" + ], "label": "getScriptedFields", - "description": [], + "description": [ + "\n" + ], "signature": [ "() => ", { @@ -1845,9 +1939,18 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 281 + "lineNumber": 291 }, - "deprecated": false, + "deprecated": true, + "references": [ + { + "plugin": "indexPatternManagement", + "link": { + "path": "src/plugins/index_pattern_management/public/components/edit_index_pattern/scripted_fields_table/scripted_fields_table.tsx", + "lineNumber": 61 + } + } + ], "children": [], "returnComment": [] }, @@ -1863,7 +1966,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 285 + "lineNumber": 295 }, "deprecated": false, "children": [], @@ -1881,7 +1984,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 289 + "lineNumber": 299 }, "deprecated": false, "children": [], @@ -1907,7 +2010,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 294 + "lineNumber": 304 }, "deprecated": false, "children": [], @@ -1933,7 +2036,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -1949,7 +2052,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 299 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -1969,7 +2072,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 304 + "lineNumber": 314 }, "deprecated": false, "children": [], @@ -1985,11 +2088,18 @@ "\nReturns index pattern as saved object body for saving" ], "signature": [ - "() => { fieldAttrs: string | undefined; title: string; timeFieldName: string | undefined; intervalName: string | undefined; sourceFilters: string | undefined; fields: string | undefined; fieldFormatMap: string | undefined; type: string | undefined; typeMeta: string | undefined; allowNoIndex: true | undefined; runtimeFieldMap: string | undefined; }" + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataIndexPatternsPluginApi", + "section": "def-common.IndexPatternAttributes", + "text": "IndexPatternAttributes" + } ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 311 + "lineNumber": 321 }, "deprecated": false, "children": [], @@ -2040,7 +2150,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 339 + "lineNumber": 347 }, "deprecated": false, "children": [ @@ -2078,7 +2188,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 340 + "lineNumber": 348 }, "deprecated": false, "isRequired": true @@ -2108,7 +2218,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "children": [ @@ -2126,7 +2236,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -2151,7 +2261,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 360 + "lineNumber": 368 }, "deprecated": false, "isRequired": true @@ -2173,7 +2283,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "children": [ @@ -2191,7 +2301,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 384 + "lineNumber": 392 }, "deprecated": false, "isRequired": true @@ -2221,7 +2331,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "children": [ @@ -2237,7 +2347,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 404 + "lineNumber": 412 }, "deprecated": false, "isRequired": true @@ -2265,7 +2375,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 411 + "lineNumber": 419 }, "deprecated": false, "children": [ @@ -2281,7 +2391,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 412 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -2298,7 +2408,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 413 + "lineNumber": 421 }, "deprecated": false, "isRequired": true @@ -2322,7 +2432,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 414 + "lineNumber": 422 }, "deprecated": false, "isRequired": true @@ -2342,7 +2452,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "children": [ @@ -2358,7 +2468,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": true @@ -2375,7 +2485,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 422 + "lineNumber": 430 }, "deprecated": false, "isRequired": false @@ -2395,7 +2505,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -2411,7 +2521,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -2428,7 +2538,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 433 + "lineNumber": 441 }, "deprecated": false, "isRequired": false @@ -2456,7 +2566,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "children": [ @@ -2472,7 +2582,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -2496,7 +2606,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 446 + "lineNumber": 454 }, "deprecated": false, "isRequired": true @@ -2516,7 +2626,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "children": [ @@ -2532,7 +2642,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts", - "lineNumber": 450 + "lineNumber": 458 }, "deprecated": false, "isRequired": true @@ -2748,14 +2858,14 @@ { "parentPluginId": "data", "id": "def-common.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [ "\nScript field language" ], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -2766,12 +2876,12 @@ { "parentPluginId": "data", "id": "def-common.IndexPatternField.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/index_pattern_field.ts", @@ -3058,7 +3168,7 @@ "label": "toJSON", "description": [], "signature": [ - "() => { count: number; script: string | undefined; lang: string | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", + "() => { count: number; script: string | undefined; lang: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; esTypes: string[] | undefined; scripted: boolean; searchable: boolean; aggregatable: boolean; readFromDocValues: boolean; subType: ", { "pluginId": "data", "scope": "common", @@ -4012,7 +4122,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "children": [ @@ -4028,7 +4138,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 473 + "lineNumber": 480 }, "deprecated": false, "isRequired": true @@ -4066,7 +4176,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "children": [ @@ -4088,7 +4198,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -4105,7 +4215,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 492 + "lineNumber": 499 }, "deprecated": false, "isRequired": true @@ -4145,7 +4255,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "children": [ @@ -4167,7 +4277,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -4186,7 +4296,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -4205,7 +4315,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 517 + "lineNumber": 524 }, "deprecated": false, "isRequired": true @@ -4243,7 +4353,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "children": [ @@ -4265,7 +4375,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -4284,7 +4394,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 530 + "lineNumber": 537 }, "deprecated": false, "isRequired": true @@ -4314,7 +4424,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 558 + "lineNumber": 570 }, "deprecated": false, "children": [ @@ -4336,7 +4446,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 559 + "lineNumber": 571 }, "deprecated": false, "isRequired": true @@ -4353,7 +4463,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 560 + "lineNumber": 572 }, "deprecated": false, "isRequired": true @@ -4370,7 +4480,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 561 + "lineNumber": 573 }, "deprecated": false, "isRequired": true @@ -4392,7 +4502,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "children": [ @@ -4410,7 +4520,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 644 + "lineNumber": 656 }, "deprecated": false, "isRequired": true @@ -4766,14 +4876,14 @@ { "parentPluginId": "data", "id": "def-common.FieldSpec.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [ "\nScripted field langauge\nPainless is the only valid scripted field language" ], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/types.ts", @@ -5081,12 +5191,12 @@ { "parentPluginId": "data", "id": "def-common.FieldSpecExportFmt.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/types.ts", @@ -5542,7 +5652,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 58 + "lineNumber": 59 } }, { @@ -6893,28 +7003,28 @@ "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 139 + "lineNumber": 141 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 248 + "lineNumber": 250 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 287 + "lineNumber": 290 } }, { "plugin": "lens", "link": { "path": "x-pack/plugins/lens/server/routes/field_stats.ts", - "lineNumber": 329 + "lineNumber": 332 } }, { @@ -7818,12 +7928,12 @@ { "parentPluginId": "data", "id": "def-common.IFieldType.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/common/index_patterns/fields/types.ts", @@ -8351,6 +8461,20 @@ "lineNumber": 85 } }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 25 + } + }, + { + "plugin": "lens", + "link": { + "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", + "lineNumber": 102 + } + }, { "plugin": "lens", "link": { @@ -8456,20 +8580,6 @@ "lineNumber": 30 } }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 14 - } - }, - { - "plugin": "apm", - "link": { - "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", - "lineNumber": 31 - } - }, { "plugin": "infra", "link": { @@ -8638,6 +8748,20 @@ "lineNumber": 23 } }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 14 + } + }, + { + "plugin": "apm", + "link": { + "path": "x-pack/plugins/apm/public/components/shared/KueryBar/index.tsx", + "lineNumber": 31 + } + }, { "plugin": "lists", "link": { @@ -8670,21 +8794,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 21 + "lineNumber": 22 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts", - "lineNumber": 66 + "lineNumber": 72 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts", - "lineNumber": 19 + "lineNumber": 20 } }, { @@ -8943,21 +9067,21 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 44 + "lineNumber": 48 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 60 + "lineNumber": 64 } }, { "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts", - "lineNumber": 65 + "lineNumber": 69 } }, { @@ -9744,6 +9868,20 @@ "lineNumber": 30 } }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 13 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts", + "lineNumber": 52 + } + }, { "plugin": "stackAlerts", "link": { @@ -9947,20 +10085,6 @@ "lineNumber": 1352 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 17 - } - }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx", - "lineNumber": 26 - } - }, { "plugin": "maps", "link": { @@ -9972,7 +10096,7 @@ "plugin": "maps", "link": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 45 + "lineNumber": 44 } }, { @@ -10077,14 +10201,14 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 18 + "lineNumber": 19 } }, { "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 95 + "lineNumber": 104 } }, { @@ -10126,7 +10250,7 @@ "plugin": "observability", "link": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts", - "lineNumber": 24 + "lineNumber": 25 } }, { @@ -10294,14 +10418,14 @@ "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 62 + "lineNumber": 63 } }, { "plugin": "transform", "link": { "path": "x-pack/plugins/transform/server/routes/api/transforms.ts", - "lineNumber": 404 + "lineNumber": 405 } }, { @@ -12657,7 +12781,7 @@ ], "source": { "path": "src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts", - "lineNumber": 650 + "lineNumber": 662 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/data_search.json b/api_docs/data_search.json index d72ae79e79bd8..99c04298c27cb 100644 --- a/api_docs/data_search.json +++ b/api_docs/data_search.json @@ -1447,12 +1447,12 @@ { "parentPluginId": "data", "id": "def-public.Reason.lang", - "type": "string", + "type": "CompoundType", "tags": [], "label": "lang", "description": [], "signature": [ - "string | undefined" + "\"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined" ], "source": { "path": "src/plugins/data/public/search/errors/types.ts", @@ -2272,7 +2272,7 @@ "label": "getShardTimeout", "description": [], "signature": [ - "(config: Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "(config: Readonly<{ kibana: Readonly<{ readonly index: string; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -2298,7 +2298,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ kibana: Readonly<{ readonly index: string; readonly autocompleteTerminateAfter: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly autocompleteTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "Readonly<{ kibana: Readonly<{ readonly index: string; }>; elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: \"year\" | \"years\" | \"y\" | \"month\" | \"months\" | \"M\" | \"week\" | \"weeks\" | \"w\" | \"day\" | \"days\" | \"d\" | \"hour\" | \"hours\" | \"h\" | \"minute\" | \"minutes\" | \"m\" | \"second\" | \"seconds\" | \"s\" | \"millisecond\" | \"milliseconds\" | \"ms\" | \"quarter\" | \"quarters\" | \"Q\" | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", "ByteSizeValue", ") => boolean; isLessThan: (other: ", "ByteSizeValue", @@ -2820,7 +2820,7 @@ "description": [], "signature": [ "{ filter?: any; aggs?: Record | undefined; fields?: string[] | undefined; searchAfter?: string[] | undefined; page?: number | undefined; perPage?: number | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | \"_doc\" | undefined; search?: string | undefined; searchFields?: string[] | undefined; rootSearchFields?: string[] | undefined; hasReference?: ", { "pluginId": "core", @@ -4164,7 +4164,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 55 + "lineNumber": 57 }, "deprecated": false, "children": [ @@ -4184,7 +4184,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "children": [ @@ -4202,7 +4202,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 63 + "lineNumber": 65 }, "deprecated": false, "isRequired": true @@ -4236,7 +4236,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "children": [ @@ -4259,7 +4259,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 83 + "lineNumber": 85 }, "deprecated": false, "isRequired": true @@ -4287,7 +4287,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 92 + "lineNumber": 94 }, "deprecated": false }, @@ -4300,7 +4300,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 93 + "lineNumber": 95 }, "deprecated": false }, @@ -4313,7 +4313,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 94 + "lineNumber": 96 }, "deprecated": false }, @@ -4329,7 +4329,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 95 + "lineNumber": 97 }, "deprecated": false }, @@ -4352,7 +4352,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 96 + "lineNumber": 98 }, "deprecated": false }, @@ -4368,7 +4368,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 97 + "lineNumber": 99 }, "deprecated": false }, @@ -4384,7 +4384,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 98 + "lineNumber": 100 }, "deprecated": false }, @@ -4400,7 +4400,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "children": [ @@ -4422,7 +4422,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -4457,7 +4457,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 104 + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -4481,7 +4481,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "children": [ @@ -4499,7 +4499,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 134 + "lineNumber": 136 }, "deprecated": false, "isRequired": true @@ -4519,7 +4519,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "children": [ @@ -4535,7 +4535,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 171 + "lineNumber": 173 }, "deprecated": false, "isRequired": true @@ -4543,6 +4543,42 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-common.AggConfig.hasTimeShift", + "type": "Function", + "tags": [], + "label": "hasTimeShift", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 177 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfig.getTimeShift", + "type": "Function", + "tags": [], + "label": "getTimeShift", + "description": [], + "signature": [ + "() => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_config.ts", + "lineNumber": 181 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-common.AggConfig.write", @@ -4563,7 +4599,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "children": [ @@ -4586,7 +4622,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 175 + "lineNumber": 202 }, "deprecated": false, "isRequired": false @@ -4606,7 +4642,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 179 + "lineNumber": 206 }, "deprecated": false, "children": [], @@ -4624,7 +4660,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "children": [ @@ -4640,7 +4676,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -4657,7 +4693,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 183 + "lineNumber": 210 }, "deprecated": false, "isRequired": true @@ -4697,7 +4733,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "children": [ @@ -4721,7 +4757,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": true @@ -4745,7 +4781,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 209 + "lineNumber": 236 }, "deprecated": false, "isRequired": false @@ -4777,7 +4813,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "children": [ @@ -4802,7 +4838,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 230 + "lineNumber": 257 }, "deprecated": false, "isRequired": false @@ -4826,7 +4862,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 265 + "lineNumber": 292 }, "deprecated": false, "children": [], @@ -4850,7 +4886,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 296 + "lineNumber": 323 }, "deprecated": true, "references": [ @@ -4879,7 +4915,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 307 + "lineNumber": 334 }, "deprecated": false, "children": [], @@ -4905,7 +4941,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 316 + "lineNumber": 343 }, "deprecated": false, "children": [], @@ -4941,7 +4977,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 371 + "lineNumber": 398 }, "deprecated": false, "children": [], @@ -4967,7 +5003,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 375 + "lineNumber": 402 }, "deprecated": false, "children": [], @@ -4993,7 +5029,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 379 + "lineNumber": 406 }, "deprecated": false, "children": [], @@ -5011,7 +5047,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "children": [ @@ -5027,7 +5063,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 383 + "lineNumber": 410 }, "deprecated": false, "isRequired": true @@ -5047,7 +5083,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "children": [ @@ -5063,7 +5099,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": true @@ -5080,7 +5116,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 387 + "lineNumber": 414 }, "deprecated": false, "isRequired": false @@ -5100,7 +5136,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 395 + "lineNumber": 422 }, "deprecated": false, "children": [], @@ -5118,7 +5154,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 401 + "lineNumber": 428 }, "deprecated": false, "children": [], @@ -5138,7 +5174,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 410 + "lineNumber": 437 }, "deprecated": false, "children": [], @@ -5156,7 +5192,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "children": [ @@ -5172,7 +5208,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 414 + "lineNumber": 441 }, "deprecated": false, "isRequired": true @@ -5199,7 +5235,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 428 + "lineNumber": 455 }, "deprecated": false, "children": [], @@ -5225,7 +5261,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 432 + "lineNumber": 459 }, "deprecated": false, "children": [], @@ -5243,7 +5279,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 436 + "lineNumber": 463 }, "deprecated": false, "children": [], @@ -5261,7 +5297,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 441 + "lineNumber": 468 }, "deprecated": false, "children": [], @@ -5310,7 +5346,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 452 + "lineNumber": 479 }, "deprecated": false }, @@ -5357,7 +5393,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 456 + "lineNumber": 483 }, "deprecated": false }, @@ -5381,7 +5417,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "children": [ @@ -5403,7 +5439,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 486 + "lineNumber": 513 }, "deprecated": false, "isRequired": true @@ -5423,7 +5459,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 65 + "lineNumber": 78 }, "deprecated": false, "children": [ @@ -5445,7 +5481,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 66 + "lineNumber": 79 }, "deprecated": false }, @@ -5468,7 +5504,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 67 + "lineNumber": 80 }, "deprecated": false }, @@ -5484,7 +5520,23 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 68 + "lineNumber": 81 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.forceNow", + "type": "Object", + "tags": [], + "label": "forceNow", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 82 }, "deprecated": false }, @@ -5500,7 +5552,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 69 + "lineNumber": 83 }, "deprecated": false }, @@ -5523,7 +5575,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 73 + "lineNumber": 87 }, "deprecated": false }, @@ -5539,7 +5591,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 75 + "lineNumber": 89 }, "deprecated": false, "children": [ @@ -5561,7 +5613,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 76 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -5596,7 +5648,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 77 + "lineNumber": 91 }, "deprecated": false, "isRequired": true @@ -5619,7 +5671,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 78 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -5639,7 +5691,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 }, "deprecated": false, "children": [ @@ -5655,7 +5707,43 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 91 + "lineNumber": 105 + }, + "deprecated": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.setForceNow", + "type": "Function", + "tags": [], + "label": "setForceNow", + "description": [], + "signature": [ + "(now: Date | undefined) => void" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.setForceNow.$1", + "type": "Object", + "tags": [], + "label": "now", + "description": [], + "signature": [ + "Date | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 109 }, "deprecated": false, "isRequired": false @@ -5683,7 +5771,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "children": [ @@ -5705,7 +5793,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 95 + "lineNumber": 113 }, "deprecated": false, "isRequired": true @@ -5732,7 +5820,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "children": [ @@ -5748,7 +5836,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 113 + "lineNumber": 131 }, "deprecated": false, "isRequired": true @@ -5802,7 +5890,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 126 + "lineNumber": 144 }, "deprecated": false, "children": [ @@ -5836,7 +5924,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 127 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -5853,7 +5941,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 128 + "lineNumber": 146 }, "deprecated": false, "isRequired": true @@ -5883,7 +5971,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -5908,7 +5996,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 169 + "lineNumber": 187 }, "deprecated": false, "isRequired": true @@ -5928,7 +6016,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 181 + "lineNumber": 199 }, "deprecated": false, "children": [], @@ -5954,7 +6042,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 250 + "lineNumber": 289 }, "deprecated": false, "children": [], @@ -5979,7 +6067,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "children": [ @@ -5995,7 +6083,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 254 + "lineNumber": 293 }, "deprecated": false, "isRequired": true @@ -6023,7 +6111,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "children": [ @@ -6039,7 +6127,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 258 + "lineNumber": 297 }, "deprecated": false, "isRequired": true @@ -6067,7 +6155,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "children": [ @@ -6083,7 +6171,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 262 + "lineNumber": 301 }, "deprecated": false, "isRequired": true @@ -6111,7 +6199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "children": [ @@ -6127,7 +6215,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 266 + "lineNumber": 305 }, "deprecated": false, "isRequired": true @@ -6155,7 +6243,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "children": [ @@ -6171,7 +6259,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 270 + "lineNumber": 309 }, "deprecated": false, "isRequired": true @@ -6199,7 +6287,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "children": [ @@ -6215,7 +6303,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 274 + "lineNumber": 313 }, "deprecated": false, "isRequired": true @@ -6243,7 +6331,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 278 + "lineNumber": 317 }, "deprecated": false, "children": [], @@ -6251,73 +6339,35 @@ }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.getRequestAggById", + "id": "def-common.AggConfigs.getTimeShifts", "type": "Function", "tags": [], - "label": "getRequestAggById", + "label": "getTimeShifts", "description": [], "signature": [ - "(id: string) => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" - }, - " | undefined" + "() => Record" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 + "lineNumber": 331 }, "deprecated": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.AggConfigs.getRequestAggById.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "signature": [ - "string" - ], - "source": { - "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 292 - }, - "deprecated": false, - "isRequired": true - } - ], + "children": [], "returnComment": [] }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.getResponseAggs", + "id": "def-common.AggConfigs.getTimeShiftInterval", "type": "Function", - "tags": [ - "return" - ], - "label": "getResponseAggs", - "description": [ - "\nGets the AggConfigs (and possibly ResponseAggConfigs) that\nrepresent the values that will be produced when all aggs\nare run.\n\nWith multi-value metric aggs it is possible for a single agg\nrequest to result in multiple agg values, which is why the length\nof a vis' responseValuesAggs may be different than the vis' aggs\n" - ], + "tags": [], + "label": "getTimeShiftInterval", + "description": [], "signature": [ - "() => ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" - }, - "[]" + "() => moment.Duration | undefined" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 307 + "lineNumber": 346 }, "deprecated": false, "children": [], @@ -6325,83 +6375,278 @@ }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.getResponseAggById", + "id": "def-common.AggConfigs.hasTimeShifts", "type": "Function", - "tags": [ - "return" - ], - "label": "getResponseAggById", - "description": [ - "\nFind a response agg by it's id. This may be an agg in the aggConfigs, or one\ncreated specifically for a response value\n" + "tags": [], + "label": "hasTimeShifts", + "description": [], + "signature": [ + "() => boolean" ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 353 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getSearchSourceTimeFilter", + "type": "Function", + "tags": [], + "label": "getSearchSourceTimeFilter", + "description": [], "signature": [ - "(id: string) => ", + "(forceNow?: Date | undefined) => ", { "pluginId": "data", "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.AggConfig", - "text": "AggConfig" + "docId": "kibDataPluginApi", + "section": "def-common.RangeFilter", + "text": "RangeFilter" }, - " | undefined" + "[] | { meta: { index: string | undefined; params: {}; alias: string; disabled: boolean; negate: boolean; }; query: { bool: { should: { bool: { filter: { range: { [x: string]: { gte: string; lte: string; }; }; }[]; }; }[]; minimum_should_match: number; }; }; }[]" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 357 }, "deprecated": false, "children": [ { "parentPluginId": "data", - "id": "def-common.AggConfigs.getResponseAggById.$1", - "type": "string", + "id": "def-common.AggConfigs.getSearchSourceTimeFilter.$1", + "type": "Object", "tags": [], - "label": "id", - "description": [ - "- the id of the agg to find" - ], + "label": "forceNow", + "description": [], "signature": [ - "string" + "Date | undefined" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 321 + "lineNumber": 357 }, "deprecated": false, - "isRequired": true + "isRequired": false } ], "returnComment": [] }, { "parentPluginId": "data", - "id": "def-common.AggConfigs.onSearchRequestStart", + "id": "def-common.AggConfigs.postFlightTransform", "type": "Function", "tags": [], - "label": "onSearchRequestStart", + "label": "postFlightTransform", "description": [], "signature": [ - "(searchSource: Pick<", + "(response: ", { "pluginId": "data", "scope": "common", "docId": "kibDataSearchPluginApi", - "section": "def-common.SearchSource", - "text": "SearchSource" + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" }, - ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\">, options?: ", + ") => ", { "pluginId": "data", "scope": "common", "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" }, - " | undefined) => Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>" + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.postFlightTransform.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + "" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 410 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getRequestAggById", + "type": "Function", + "tags": [], + "label": "getRequestAggById", + "description": [], + "signature": [ + "(id: string) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + " | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 429 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getRequestAggById.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 429 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getResponseAggs", + "type": "Function", + "tags": [ + "return" + ], + "label": "getResponseAggs", + "description": [ + "\nGets the AggConfigs (and possibly ResponseAggConfigs) that\nrepresent the values that will be produced when all aggs\nare run.\n\nWith multi-value metric aggs it is possible for a single agg\nrequest to result in multiple agg values, which is why the length\nof a vis' responseValuesAggs may be different than the vis' aggs\n" + ], + "signature": [ + "() => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + "[]" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 444 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getResponseAggById", + "type": "Function", + "tags": [ + "return" + ], + "label": "getResponseAggById", + "description": [ + "\nFind a response agg by it's id. This may be an agg in the aggConfigs, or one\ncreated specifically for a response value\n" + ], + "signature": [ + "(id: string) => ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfig", + "text": "AggConfig" + }, + " | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 458 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.getResponseAggById.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "- the id of the agg to find" + ], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 458 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.AggConfigs.onSearchRequestStart", + "type": "Function", + "tags": [], + "label": "onSearchRequestStart", + "description": [], + "signature": [ + "(searchSource: Pick<", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.SearchSource", + "text": "SearchSource" + }, + ", \"create\" | \"history\" | \"setPreferredSearchStrategyId\" | \"setField\" | \"removeField\" | \"setFields\" | \"getId\" | \"getFields\" | \"getField\" | \"getOwnField\" | \"createCopy\" | \"createChild\" | \"setParent\" | \"getParent\" | \"fetch$\" | \"fetch\" | \"onRequestStart\" | \"getSearchRequestBody\" | \"destroy\" | \"getSerializedFields\" | \"serialize\">, options?: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "children": [ @@ -6425,7 +6670,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": true @@ -6449,7 +6694,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 330 + "lineNumber": 467 }, "deprecated": false, "isRequired": false @@ -7629,6 +7874,73 @@ ], "returnComment": [] }, + { + "parentPluginId": "data", + "id": "def-common.AggType.splitForTimeShift", + "type": "Function", + "tags": [], + "label": "splitForTimeShift", + "description": [], + "signature": [ + "(agg: TAggConfig, aggs: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfigs", + "text": "AggConfigs" + }, + ") => boolean" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_type.ts", + "lineNumber": 218 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.AggType.splitForTimeShift.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_type.ts", + "lineNumber": 218 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.AggType.splitForTimeShift.$2", + "type": "Object", + "tags": [], + "label": "aggs", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.AggConfigs", + "text": "AggConfigs" + } + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_type.ts", + "lineNumber": 218 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "data", "id": "def-common.AggType.Unnamed", @@ -7646,7 +7958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_type.ts", - "lineNumber": 227 + "lineNumber": 231 }, "deprecated": false, "children": [ @@ -7679,7 +7991,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_type.ts", - "lineNumber": 227 + "lineNumber": 231 }, "deprecated": false, "isRequired": true @@ -8296,7 +8608,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 31 + "lineNumber": 40 }, "deprecated": false, "children": [ @@ -8312,7 +8624,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 44 }, "deprecated": false, "returnComment": [], @@ -8329,7 +8641,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 44 }, "deprecated": false }, @@ -8345,40 +8657,244 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 44 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.agg", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 44 }, "deprecated": false + } + ] + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.type", + "type": "string", + "tags": [], + "label": "type", + "description": [], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 45 + }, + "deprecated": false + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey", + "type": "Function", + "tags": [], + "label": "getShiftedKey", + "description": [], + "signature": [ + "(agg: TBucketAggConfig, key: React.ReactText, timeShift: moment.Duration) => React.ReactText" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 47 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 48 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey.$2", + "type": "CompoundType", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "React.ReactText" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 49 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getShiftedKey.$3", + "type": "Object", + "tags": [], + "label": "timeShift", + "description": [], + "signature": [ + "moment.Duration" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 50 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getTimeShiftInterval", + "type": "Function", + "tags": [], + "label": "getTimeShiftInterval", + "description": [], + "signature": [ + "(agg: TBucketAggConfig) => moment.Duration | undefined" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 55 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.getTimeShiftInterval.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 55 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.orderBuckets", + "type": "Function", + "tags": [], + "label": "orderBuckets", + "description": [], + "signature": [ + "(agg: TBucketAggConfig, a: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + }, + ", b: ", + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + }, + ") => number" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 59 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.orderBuckets.$1", + "type": "Uncategorized", + "tags": [], + "label": "agg", + "description": [], + "signature": [ + "TBucketAggConfig" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 59 + }, + "deprecated": false, + "isRequired": true + }, + { + "parentPluginId": "data", + "id": "def-common.BucketAggType.orderBuckets.$2", + "type": "CompoundType", + "tags": [], + "label": "a", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + } + ], + "source": { + "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", + "lineNumber": 59 + }, + "deprecated": false, + "isRequired": true }, { "parentPluginId": "data", - "id": "def-common.agg", - "type": "Uncategorized", + "id": "def-common.BucketAggType.orderBuckets.$3", + "type": "CompoundType", "tags": [], - "label": "agg", + "label": "b", "description": [], "signature": [ - "TBucketAggConfig" + { + "pluginId": "data", + "scope": "common", + "docId": "kibDataSearchPluginApi", + "section": "def-common.GenericBucket", + "text": "GenericBucket" + } ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 35 + "lineNumber": 59 }, - "deprecated": false + "deprecated": false, + "isRequired": true } - ] - }, - { - "parentPluginId": "data", - "id": "def-common.BucketAggType.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "source": { - "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 36 - }, - "deprecated": false + ], + "returnComment": [] }, { "parentPluginId": "data", @@ -8392,7 +8908,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 38 + "lineNumber": 63 }, "deprecated": false, "children": [ @@ -8408,7 +8924,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 38 + "lineNumber": 63 }, "deprecated": false, "isRequired": true @@ -9091,7 +9607,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 37 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -9104,7 +9620,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 41 + "lineNumber": 42 }, "deprecated": false }, @@ -9120,7 +9636,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 42 + "lineNumber": 43 }, "deprecated": false, "returnComment": [], @@ -9135,7 +9651,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 43 + "lineNumber": 44 }, "deprecated": false }, @@ -9151,7 +9667,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 45 + "lineNumber": 46 }, "deprecated": false, "children": [], @@ -9169,7 +9685,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 47 + "lineNumber": 48 }, "deprecated": false, "children": [ @@ -9185,7 +9701,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 47 + "lineNumber": 48 }, "deprecated": false, "isRequired": true @@ -9431,7 +9947,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 121 + "lineNumber": 127 }, "deprecated": false, "children": [ @@ -9447,7 +9963,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 129 + "lineNumber": 135 }, "deprecated": false }, @@ -9463,7 +9979,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "children": [ @@ -9485,7 +10001,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -9508,7 +10024,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 133 + "lineNumber": 139 }, "deprecated": false, "isRequired": true @@ -9530,7 +10046,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "children": [ @@ -9546,7 +10062,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false, "isRequired": true @@ -9576,7 +10092,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "children": [ @@ -9594,7 +10110,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -9620,7 +10136,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 160 + "lineNumber": 166 }, "deprecated": false, "isRequired": true @@ -9642,7 +10158,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "children": [ @@ -9660,7 +10176,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 172 + "lineNumber": 178 }, "deprecated": false, "isRequired": true @@ -9692,7 +10208,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "children": [ @@ -9716,7 +10232,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 183 + "lineNumber": 189 }, "deprecated": false, "isRequired": true @@ -9738,7 +10254,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 191 + "lineNumber": 197 }, "deprecated": false, "children": [], @@ -9765,7 +10281,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 198 + "lineNumber": 204 }, "deprecated": false, "children": [], @@ -9793,7 +10309,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "children": [ @@ -9809,7 +10325,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -9826,7 +10342,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 205 + "lineNumber": 211 }, "deprecated": false, "isRequired": true @@ -9856,7 +10372,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "children": [ @@ -9872,7 +10388,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 216 + "lineNumber": 222 }, "deprecated": false, "isRequired": true @@ -9901,7 +10417,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 223 + "lineNumber": 229 }, "deprecated": true, "references": [ @@ -9909,14 +10425,14 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 206 + "lineNumber": 207 } }, { "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 212 + "lineNumber": 213 } } ], @@ -9944,7 +10460,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 230 + "lineNumber": 236 }, "deprecated": false, "children": [], @@ -9971,7 +10487,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "children": [ @@ -9987,7 +10503,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 244 + "lineNumber": 250 }, "deprecated": false, "isRequired": true @@ -10027,7 +10543,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "children": [ @@ -10053,7 +10569,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": false @@ -10078,7 +10594,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 256 + "lineNumber": 262 }, "deprecated": false, "isRequired": true @@ -10112,7 +10628,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 266 + "lineNumber": 272 }, "deprecated": false, "children": [], @@ -10152,7 +10668,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 274 + "lineNumber": 280 }, "deprecated": false, "children": [ @@ -10174,7 +10690,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 275 + "lineNumber": 281 }, "deprecated": false, "isRequired": true @@ -10208,7 +10724,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": true, "references": [ @@ -10219,13 +10735,6 @@ "lineNumber": 77 } }, - { - "plugin": "discover", - "link": { - "path": "src/plugins/discover/public/application/angular/context/api/anchor.ts", - "lineNumber": 57 - } - }, { "plugin": "maps", "link": { @@ -10267,7 +10776,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 312 + "lineNumber": 318 }, "deprecated": false, "isRequired": true @@ -10307,7 +10816,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 325 + "lineNumber": 331 }, "deprecated": false, "children": [ @@ -10339,7 +10848,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 326 + "lineNumber": 332 }, "deprecated": false, "isRequired": true @@ -10361,7 +10870,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 334 + "lineNumber": 340 }, "deprecated": false, "children": [], @@ -10383,7 +10892,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 342 + "lineNumber": 348 }, "deprecated": false, "children": [], @@ -10410,7 +10919,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "children": [ @@ -10426,7 +10935,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 831 + "lineNumber": 848 }, "deprecated": false, "isRequired": true @@ -10450,7 +10959,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 860 + "lineNumber": 877 }, "deprecated": false, "children": [], @@ -13926,7 +14435,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 63 + "lineNumber": 64 }, "deprecated": false, "children": [], @@ -13982,7 +14491,7 @@ ], "source": { "path": "src/plugins/data/common/search/expressions/esaggs/request_handler.ts", - "lineNumber": 43 + "lineNumber": 35 }, "deprecated": false, "children": [ @@ -13998,7 +14507,7 @@ ], "source": { "path": "src/plugins/data/common/search/expressions/esaggs/request_handler.ts", - "lineNumber": 43 + "lineNumber": 35 }, "deprecated": false, "isRequired": true @@ -14251,7 +14760,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 49 + "lineNumber": 90 }, "deprecated": false, "children": [ @@ -14267,7 +14776,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 49 + "lineNumber": 90 }, "deprecated": false, "isRequired": true @@ -14433,7 +14942,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 75 + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -14449,7 +14958,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 75 + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -14926,6 +15435,45 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.parseTimeShift", + "type": "Function", + "tags": [], + "label": "parseTimeShift", + "description": [ + "\nThis method parses a string into a time shift duration.\nIf parsing fails, 'invalid' is returned.\nAllowed values are the string 'previous' and an integer followed by the units s,m,h,d,w,M,y" + ], + "signature": [ + "(val: string) => moment.Duration | \"previous\" | \"invalid\"" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/utils/parse_time_shift.ts", + "lineNumber": 18 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "data", + "id": "def-common.parseTimeShift.$1", + "type": "string", + "tags": [], + "label": "val", + "description": [], + "signature": [ + "string" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/utils/parse_time_shift.ts", + "lineNumber": 18 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.pollSearch", @@ -15561,7 +16109,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 44 + "lineNumber": 53 }, "deprecated": false, "children": [ @@ -15577,7 +16125,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 45 + "lineNumber": 54 }, "deprecated": false }, @@ -15593,7 +16141,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 46 + "lineNumber": 55 }, "deprecated": false } @@ -15611,7 +16159,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 195 + "lineNumber": 196 }, "deprecated": false, "children": [ @@ -15640,7 +16188,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\">, ", + ".FILTER>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"geo_bounding_box\"> & Pick<{ geo_bounding_box?: string | undefined; filter?: string | undefined; }, \"filter\">, \"enabled\" | \"id\" | \"filter\" | \"customLabel\" | \"schema\" | \"geo_bounding_box\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -15664,7 +16212,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 196 + "lineNumber": 197 }, "deprecated": false }, @@ -15693,7 +16241,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\">, ", + ".FILTERS>, \"enabled\" | \"id\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ filters?: string | undefined; }, \"filters\"> & Pick<{ filters?: string | undefined; }, never>, \"enabled\" | \"filters\" | \"id\" | \"schema\" | \"json\" | \"timeShift\">, ", "AggExpressionType", ", ", { @@ -15717,7 +16265,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 197 + "lineNumber": 198 }, "deprecated": false }, @@ -15770,7 +16318,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 198 + "lineNumber": 199 }, "deprecated": false }, @@ -15799,7 +16347,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", + ".IP_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, \"ipRangeType\" | \"ranges\"> & Pick<{ ranges?: string | undefined; ipRangeType?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ipRangeType\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -15823,7 +16371,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 199 + "lineNumber": 200 }, "deprecated": false }, @@ -15852,7 +16400,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\" | \"time_zone\">, ", + ".DATE_RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\" | \"time_zone\">, ", "AggExpressionType", ", ", { @@ -15876,7 +16424,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 200 + "lineNumber": 201 }, "deprecated": false }, @@ -15905,7 +16453,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"ranges\">, ", + ".RANGE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\"> & Pick<{ ranges?: string | undefined; }, \"ranges\"> & Pick<{ ranges?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"ranges\">, ", "AggExpressionType", ", ", { @@ -15929,7 +16477,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 201 + "lineNumber": 202 }, "deprecated": false }, @@ -15982,7 +16530,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 202 + "lineNumber": 203 }, "deprecated": false }, @@ -16011,7 +16559,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", + ".GEOHASH_GRID>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\"> & Pick<{ boundingBox?: string | undefined; }, \"boundingBox\"> & Pick<{ boundingBox?: string | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"autoPrecision\" | \"precision\" | \"useGeocentroid\" | \"isFilteredByCollar\" | \"boundingBox\">, ", "AggExpressionType", ", ", { @@ -16035,7 +16583,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 203 + "lineNumber": 204 }, "deprecated": false }, @@ -16064,7 +16612,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", + ".HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, \"extended_bounds\"> & Pick<{ extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"used_interval\" | \"maxBars\" | \"intervalBase\" | \"min_doc_count\" | \"has_extended_bounds\" | \"extended_bounds\">, ", "AggExpressionType", ", ", { @@ -16088,7 +16636,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 204 + "lineNumber": 205 }, "deprecated": false }, @@ -16117,7 +16665,7 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", + ".DATE_HISTOGRAM>, \"enabled\" | \"interval\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, \"timeRange\" | \"extended_bounds\"> & Pick<{ timeRange?: string | undefined; extended_bounds?: string | undefined; }, never>, \"enabled\" | \"interval\" | \"timeRange\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"time_zone\" | \"used_interval\" | \"min_doc_count\" | \"extended_bounds\" | \"useNormalizedEsInterval\" | \"scaleMetricValues\" | \"used_time_zone\" | \"drop_partials\" | \"format\">, ", "AggExpressionType", ", ", { @@ -16141,7 +16689,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 205 + "lineNumber": 206 }, "deprecated": false }, @@ -16170,11 +16718,11 @@ "section": "def-common.BUCKET_TYPES", "text": "BUCKET_TYPES" }, - ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", + ".TERMS>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\"> & Pick<{ orderAgg?: ", "AggExpressionType", " | undefined; }, \"orderAgg\"> & Pick<{ orderAgg?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"size\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"field\" | \"orderBy\" | \"orderAgg\" | \"order\" | \"missingBucket\" | \"missingBucketLabel\" | \"otherBucket\" | \"otherBucketLabel\" | \"exclude\" | \"include\">, ", "AggExpressionType", ", ", { @@ -16198,7 +16746,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 206 + "lineNumber": 207 }, "deprecated": false }, @@ -16251,7 +16799,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 207 + "lineNumber": 208 }, "deprecated": false }, @@ -16280,7 +16828,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".AVG_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16288,7 +16836,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16312,7 +16860,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 208 + "lineNumber": 209 }, "deprecated": false }, @@ -16341,7 +16889,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MAX_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16349,7 +16897,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16373,7 +16921,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 209 + "lineNumber": 210 }, "deprecated": false }, @@ -16402,7 +16950,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".MIN_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16410,7 +16958,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16434,7 +16982,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 210 + "lineNumber": 211 }, "deprecated": false }, @@ -16463,7 +17011,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".SUM_BUCKET>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16471,7 +17019,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16495,7 +17043,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 211 + "lineNumber": 212 }, "deprecated": false }, @@ -16524,7 +17072,7 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\"> & Pick<{ customBucket?: ", + ".FILTERED_METRIC>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\"> & Pick<{ customBucket?: ", "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", @@ -16532,7 +17080,7 @@ "AggExpressionType", " | undefined; customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"customBucket\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"customBucket\">, ", "AggExpressionType", ", ", { @@ -16556,7 +17104,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 212 + "lineNumber": 213 }, "deprecated": false }, @@ -16609,7 +17157,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 213 + "lineNumber": 214 }, "deprecated": false }, @@ -16662,7 +17210,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 214 + "lineNumber": 215 }, "deprecated": false }, @@ -16691,11 +17239,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".CUMULATIVE_SUM>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -16719,7 +17267,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 215 + "lineNumber": 216 }, "deprecated": false }, @@ -16748,11 +17296,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".DERIVATIVE>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -16776,7 +17324,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 216 + "lineNumber": 217 }, "deprecated": false }, @@ -16829,7 +17377,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 217 + "lineNumber": 218 }, "deprecated": false }, @@ -16882,7 +17430,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 218 + "lineNumber": 219 }, "deprecated": false }, @@ -16935,7 +17483,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 219 + "lineNumber": 220 }, "deprecated": false }, @@ -16988,7 +17536,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 220 + "lineNumber": 221 }, "deprecated": false }, @@ -17041,7 +17589,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 221 + "lineNumber": 222 }, "deprecated": false }, @@ -17094,7 +17642,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 222 + "lineNumber": 223 }, "deprecated": false }, @@ -17123,11 +17671,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", + ".MOVING_FN>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\" | \"window\" | \"script\">, ", "AggExpressionType", ", ", { @@ -17151,7 +17699,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 223 + "lineNumber": 224 }, "deprecated": false }, @@ -17204,7 +17752,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 224 + "lineNumber": 225 }, "deprecated": false }, @@ -17257,7 +17805,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 225 + "lineNumber": 226 }, "deprecated": false }, @@ -17286,11 +17834,11 @@ "section": "def-common.METRIC_TYPES", "text": "METRIC_TYPES" }, - ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", + ".SERIAL_DIFF>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"buckets_path\" | \"metricAgg\"> & Pick<{ customMetric?: ", "AggExpressionType", " | undefined; }, \"customMetric\"> & Pick<{ customMetric?: ", "AggExpressionType", - " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", + " | undefined; }, never>, \"enabled\" | \"id\" | \"customLabel\" | \"schema\" | \"json\" | \"timeShift\" | \"customMetric\" | \"buckets_path\" | \"metricAgg\">, ", "AggExpressionType", ", ", { @@ -17314,7 +17862,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 226 + "lineNumber": 227 }, "deprecated": false }, @@ -17367,7 +17915,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 227 + "lineNumber": 228 }, "deprecated": false }, @@ -17420,7 +17968,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 228 + "lineNumber": 229 }, "deprecated": false }, @@ -17473,7 +18021,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/types.ts", - "lineNumber": 229 + "lineNumber": 230 }, "deprecated": false } @@ -18498,7 +19046,7 @@ }, " extends Pick<", "BaseAggParams", - ", \"json\">" + ", \"json\" | \"timeShift\">" ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/filters.ts", @@ -19768,7 +20316,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 48 + "lineNumber": 49 }, "deprecated": false, "children": [ @@ -19781,7 +20329,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 49 + "lineNumber": 50 }, "deprecated": false }, @@ -19794,7 +20342,7 @@ "description": [], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 50 + "lineNumber": 51 }, "deprecated": false }, @@ -19812,7 +20360,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 51 + "lineNumber": 52 }, "deprecated": false }, @@ -19828,7 +20376,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 52 + "lineNumber": 53 }, "deprecated": false }, @@ -19844,7 +20392,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 53 + "lineNumber": 54 }, "deprecated": false }, @@ -19860,7 +20408,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 54 + "lineNumber": 55 }, "deprecated": false }, @@ -19876,7 +20424,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 55 + "lineNumber": 56 }, "deprecated": false }, @@ -19892,7 +20440,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 56 + "lineNumber": 57 }, "deprecated": false }, @@ -19908,7 +20456,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 57 + "lineNumber": 58 }, "deprecated": false }, @@ -19924,7 +20472,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 59 + "lineNumber": 60 }, "deprecated": false }, @@ -19940,7 +20488,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 60 + "lineNumber": 61 }, "deprecated": false } @@ -20497,7 +21045,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 18 + "lineNumber": 19 }, "deprecated": false, "children": [ @@ -20513,7 +21061,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false }, @@ -20544,7 +21092,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false } @@ -21283,7 +21831,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 14 + "lineNumber": 15 }, "deprecated": false, "children": [ @@ -21314,7 +21862,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts", - "lineNumber": 15 + "lineNumber": 16 }, "deprecated": false } @@ -21839,7 +22387,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 16 + "lineNumber": 17 }, "deprecated": false, "children": [ @@ -21870,7 +22418,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 17 + "lineNumber": 18 }, "deprecated": false } @@ -22536,7 +23084,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 20 + "lineNumber": 21 }, "deprecated": false, "children": [ @@ -22567,7 +23115,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 22 + "lineNumber": 23 }, "deprecated": false }, @@ -22583,7 +23131,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 23 + "lineNumber": 24 }, "deprecated": false } @@ -23650,7 +24198,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 116 + "lineNumber": 122 }, "deprecated": false, "children": [ @@ -23708,7 +24256,7 @@ ], "source": { "path": "src/plugins/data/common/search/search_source/search_source.ts", - "lineNumber": 117 + "lineNumber": 123 }, "deprecated": false, "returnComment": [], @@ -24312,7 +24860,7 @@ "label": "reason", "description": [], "signature": [ - "{ caused_by: { reason: string; type: string; }; reason: string; lang?: string | undefined; script?: string | undefined; script_stack?: string[] | undefined; type: string; }" + "{ caused_by: { reason: string; type: string; }; reason: string; lang?: \"painless\" | \"expression\" | \"mustache\" | \"java\" | undefined; script?: string | undefined; script_stack?: string[] | undefined; type: string; }" ], "source": { "path": "src/plugins/data/common/search/search_source/types.ts", @@ -24786,7 +25334,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 43 + "lineNumber": 45 }, "deprecated": false, "initialIsOpen": false @@ -25003,7 +25551,7 @@ "label": "AggGroupName", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/data/common/search/aggs/agg_groups.ts", @@ -25512,7 +26060,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_configs.ts", - "lineNumber": 49 + "lineNumber": 58 }, "deprecated": false, "initialIsOpen": false @@ -26549,6 +27097,87 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "data", + "id": "def-common.GenericBucket", + "type": "Type", + "tags": [], + "label": "GenericBucket", + "description": [], + "signature": [ + "(", + "AggregationsCompositeBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsDateHistogramBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsFiltersBucketItemKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsIpRangeBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsRangeBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsRareTermsBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsSignificantTermsBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; }) | ({ [property: string]: ", + "AggregationsAggregate", + "; } & { [property: string]: ", + "AggregationsAggregate", + "; }) | (", + "AggregationsKeyedBucketKeys", + " & { [property: string]: ", + "AggregationsAggregate", + "; })" + ], + "source": { + "path": "src/plugins/data/common/search/aggs/agg_configs.ts", + "lineNumber": 60 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "data", "id": "def-common.IAggConfig", @@ -26570,7 +27199,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/agg_config.ts", - "lineNumber": 53 + "lineNumber": 55 }, "deprecated": false, "initialIsOpen": false @@ -26699,7 +27328,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts", - "lineNumber": 35 + "lineNumber": 36 }, "deprecated": false, "initialIsOpen": false @@ -27399,7 +28028,7 @@ ], "source": { "path": "src/plugins/data/common/search/aggs/buckets/terms.ts", - "lineNumber": 30 + "lineNumber": 31 }, "deprecated": false, "initialIsOpen": false @@ -30613,7 +31242,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", @@ -30657,7 +31286,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", @@ -30701,7 +31330,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", @@ -30745,7 +31374,7 @@ "label": "types", "description": [], "signature": [ - "(\"string\" | \"number\")[]" + "(\"number\" | \"string\")[]" ], "source": { "path": "src/plugins/data/common/search/expressions/range.ts", diff --git a/api_docs/data_ui.json b/api_docs/data_ui.json index 5b4f11ee0cd9f..4a532af99a115 100644 --- a/api_docs/data_ui.json +++ b/api_docs/data_ui.json @@ -510,9 +510,9 @@ "signature": [ "Pick, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\"> & Required, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"autoFocus\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"autoFocus\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\"> & Required, \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"placeholder\">> & { onChange: (indexPatternId?: string | undefined) => void; indexPatternId: string; onNoIndexPatterns?: (() => void) | undefined; }" + ", \"children\" | \"onClick\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"isClearable\" | \"async\" | \"compressed\" | \"fullWidth\" | \"singleSelection\" | \"prepend\" | \"append\" | \"sortMatchesBy\" | \"autoFocus\" | \"customOptionText\" | \"onCreateOption\" | \"renderOption\" | \"inputRef\" | \"isDisabled\" | \"isInvalid\" | \"noSuggestions\" | \"rowHeight\" | \"delimiter\">, \"placeholder\">> & { onChange: (indexPatternId?: string | undefined) => void; indexPatternId: string; onNoIndexPatterns?: (() => void) | undefined; }" ], "source": { "path": "src/plugins/data/public/ui/index_pattern_select/index_pattern_select.tsx", diff --git a/api_docs/data_visualizer.json b/api_docs/data_visualizer.json new file mode 100644 index 0000000000000..b4544a0381790 --- /dev/null +++ b/api_docs/data_visualizer.json @@ -0,0 +1,328 @@ +{ + "id": "dataVisualizer", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "start": { + "parentPluginId": "dataVisualizer", + "id": "def-public.DataVisualizerPluginStart", + "type": "Type", + "tags": [], + "label": "DataVisualizerPluginStart", + "description": [], + "signature": [ + "{ getFileDataVisualizerComponent: () => Promise>; getMaxBytesFormatted: () => string; }" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/public/plugin.ts", + "lineNumber": 33 + }, + "deprecated": false, + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState", + "type": "Interface", + "tags": [], + "label": "DataVisualizerTableState", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 14 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.pageSize", + "type": "number", + "tags": [], + "label": "pageSize", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 15 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.pageIndex", + "type": "number", + "tags": [], + "label": "pageIndex", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 16 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.sortField", + "type": "string", + "tags": [], + "label": "sortField", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 17 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.sortDirection", + "type": "string", + "tags": [], + "label": "sortDirection", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 18 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.visibleFieldTypes", + "type": "Array", + "tags": [], + "label": "visibleFieldTypes", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 19 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.visibleFieldNames", + "type": "Array", + "tags": [], + "label": "visibleFieldNames", + "description": [], + "signature": [ + "string[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 20 + }, + "deprecated": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.DataVisualizerTableState.showDistributions", + "type": "boolean", + "tags": [], + "label": "showDistributions", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 21 + }, + "deprecated": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.ABSOLUTE_MAX_FILE_SIZE_BYTES", + "type": "number", + "tags": [], + "label": "ABSOLUTE_MAX_FILE_SIZE_BYTES", + "description": [], + "signature": [ + "1073741274" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 14 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.FILE_SIZE_DISPLAY_FORMAT", + "type": "string", + "tags": [], + "label": "FILE_SIZE_DISPLAY_FORMAT", + "description": [], + "signature": [ + "\"0,0.[0] b\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 15 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.INDEX_META_DATA_CREATED_BY", + "type": "string", + "tags": [], + "label": "INDEX_META_DATA_CREATED_BY", + "description": [], + "signature": [ + "\"file-data-visualizer\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 19 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.InputData", + "type": "Type", + "tags": [], + "label": "InputData", + "description": [], + "signature": [ + "any[]" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 10 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.JobFieldType", + "type": "Type", + "tags": [], + "label": "JobFieldType", + "description": [], + "signature": [ + "\"number\" | \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"unknown\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/types.ts", + "lineNumber": 12 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.MAX_FILE_SIZE", + "type": "string", + "tags": [], + "label": "MAX_FILE_SIZE", + "description": [], + "signature": [ + "\"100MB\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 11 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.MAX_FILE_SIZE_BYTES", + "type": "number", + "tags": [], + "label": "MAX_FILE_SIZE_BYTES", + "description": [], + "signature": [ + "104857600" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 12 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.MB", + "type": "number", + "tags": [], + "label": "MB", + "description": [], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 10 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "dataVisualizer", + "id": "def-common.UI_SETTING_MAX_FILE_SIZE", + "type": "string", + "tags": [], + "label": "UI_SETTING_MAX_FILE_SIZE", + "description": [], + "signature": [ + "\"fileUpload:maxFileSize\"" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 8 + }, + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "dataVisualizer", + "id": "def-common.JOB_FIELD_TYPES", + "type": "Object", + "tags": [], + "label": "JOB_FIELD_TYPES", + "description": [], + "signature": [ + "{ readonly BOOLEAN: \"boolean\"; readonly DATE: \"date\"; readonly GEO_POINT: \"geo_point\"; readonly GEO_SHAPE: \"geo_shape\"; readonly IP: \"ip\"; readonly KEYWORD: \"keyword\"; readonly NUMBER: \"number\"; readonly TEXT: \"text\"; readonly UNKNOWN: \"unknown\"; }" + ], + "source": { + "path": "x-pack/plugins/data_visualizer/common/constants.ts", + "lineNumber": 21 + }, + "deprecated": false, + "initialIsOpen": false + } + ] + } +} diff --git a/api_docs/file_data_visualizer.mdx b/api_docs/data_visualizer.mdx similarity index 100% rename from api_docs/file_data_visualizer.mdx rename to api_docs/data_visualizer.mdx diff --git a/api_docs/deprecations.mdx b/api_docs/deprecations.mdx index 99edad62075bc..b5fe8d1e31da0 100644 --- a/api_docs/deprecations.mdx +++ b/api_docs/deprecations.mdx @@ -82,14 +82,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts#L13](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L13) | 7.16 | -| | [plugin.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L69) | 7.16 | -| | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/types.ts#L8) | 7.16 | -| | [types.ts#L41](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/types.ts#L41) | 7.16 | -| | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts#L1) | 7.16 | -| | [types.d.ts#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/target/types/server/types.d.ts#L30) | 7.16 | -| | [plugin.ts#L17](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L17) | 7.16 | -| | [plugin.ts#L36](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L36) | 7.16 | +| | [plugin.ts#L16](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L16) | 7.16 | +| | [plugin.ts#L27](https://github.com/elastic/kibana/tree/master/x-pack/plugins/cross_cluster_replication/server/plugin.ts#L27) | 7.16 | @@ -103,20 +97,20 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [saved_objects.ts#L13](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#L13) | - | | | [saved_dashboards.ts#L12](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts#L12) | - | | | [saved_dashboards.ts#L31](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboards.ts#L31) | - | -| | [types.ts#L25](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/types.ts#L25) | - | -| | [types.ts#L74](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/types.ts#L74) | - | +| | [types.ts#L33](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#L33) | - | +| | [types.ts#L186](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/types.ts#L186) | - | | | [plugin.tsx#L42](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#L42) | - | -| | [plugin.tsx#L126](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#L126) | - | +| | [plugin.tsx#L127](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/plugin.tsx#L127) | - | | | [url_generator.ts#L19](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/url_generator.ts#L19) | - | | | [url_generator.ts#L95](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/url_generator.ts#L95) | - | | | [saved_objects.ts#L11](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/services/saved_objects.ts#L11) | - | | | [saved_dashboard.ts#L10](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#L10) | - | -| | [saved_dashboard.ts#L18](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#L18) | - | +| | [saved_dashboard.ts#L19](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts#L19) | - | +| | [dashboard_tagging.ts#L10](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#L10) | - | +| | [dashboard_tagging.ts#L15](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts#L15) | - | | | [clone_panel_action.tsx#L14](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#L14) | - | | | [clone_panel_action.tsx#L98](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#L98) | - | | | [clone_panel_action.tsx#L126](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/actions/clone_panel_action.tsx#L126) | - | -| | [use_dashboard_state_manager.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts#L23) | - | -| | [use_dashboard_state_manager.ts#L35](https://github.com/elastic/kibana/tree/master/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts#L35) | - | @@ -129,26 +123,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [create_doc_table_react.tsx#L25](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx#L25) | - | | | [types.ts#L16](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L16) | - | | | [types.ts#L30](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L30) | - | -| | [context_app_legacy.tsx#L17](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L17) | - | -| | [context_app_legacy.tsx#L26](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L26) | - | | | [kibana_services.ts#L104](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L104) | - | | | [search_embeddable.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L23) | - | -| | [search_embeddable.ts#L58](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L58) | - | +| | [search_embeddable.ts#L59](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L59) | - | | | [kibana_services.ts#L104](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L104) | - | | | [search_embeddable.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L23) | - | -| | [search_embeddable.ts#L58](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L58) | - | +| | [search_embeddable.ts#L59](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L59) | - | | | [kibana_services.ts#L101](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L101) | - | | | [create_doc_table_react.tsx#L15](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx#L15) | - | | | [create_doc_table_react.tsx#L25](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx#L25) | - | | | [types.ts#L16](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L16) | - | | | [types.ts#L30](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/types.ts#L30) | - | -| | [context_app_legacy.tsx#L17](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L17) | - | -| | [context_app_legacy.tsx#L26](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/context_app/context_app_legacy.tsx#L26) | - | | | [kibana_services.ts#L104](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/kibana_services.ts#L104) | - | | | [search_embeddable.ts#L23](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L23) | - | -| | [search_embeddable.ts#L58](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L58) | - | -| | [on_save_search.tsx#L11](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/top_nav/on_save_search.tsx#L11) | - | -| | [on_save_search.tsx#L133](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/components/top_nav/on_save_search.tsx#L133) | - | +| | [search_embeddable.ts#L59](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/embeddable/search_embeddable.ts#L59) | - | +| | [on_save_search.tsx#L11](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx#L11) | - | +| | [on_save_search.tsx#L133](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx#L133) | - | | | [saved_searches.ts#L10](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/saved_searches.ts#L10) | - | | | [saved_searches.ts#L20](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/saved_searches/saved_searches.ts#L20) | - | | | [plugin.tsx#L33](https://github.com/elastic/kibana/tree/master/src/plugins/discover/public/plugin.tsx#L33) | - | @@ -163,7 +153,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| | | [attribute_service.tsx#L13](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L13) | - | -| | [attribute_service.tsx#L167](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L167) | - | +| | [attribute_service.tsx#L165](https://github.com/elastic/kibana/tree/master/src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx#L165) | - | @@ -199,7 +189,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [query_bar.tsx#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#L30) | - | | | [query_bar.tsx#L38](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/agent_logs/query_bar.tsx#L38) | - | | | [plugin.ts#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L14) | - | -| | [plugin.ts#L189](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L189) | - | +| | [plugin.ts#L190](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/server/plugin.ts#L190) | - | | | [plugin.d.ts#L2](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/server/plugin.d.ts#L2) | - | | | [plugin.d.ts#L84](https://github.com/elastic/kibana/tree/master/x-pack/plugins/fleet/target/types/server/plugin.d.ts#L84) | - | @@ -238,18 +228,18 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [plugin.ts#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L14) | 7.16 | -| | [plugin.ts#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L42) | 7.16 | +| | [plugin.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L12) | 7.16 | +| | [plugin.ts#L38](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/plugin.ts#L38) | 7.16 | | | [types.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L9) | 7.16 | -| | [types.ts#L40](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L40) | 7.16 | +| | [types.ts#L39](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L39) | 7.16 | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L1) | 7.16 | -| | [types.d.ts#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L25) | 7.16 | +| | [types.d.ts#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L24) | 7.16 | | | [types.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L10) | 7.16 | -| | [types.ts#L43](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L43) | 7.16 | -| | [types.ts#L50](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L50) | 7.16 | +| | [types.ts#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L42) | 7.16 | +| | [types.ts#L49](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/server/types.ts#L49) | 7.16 | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L1) | 7.16 | -| | [types.d.ts#L27](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L27) | 7.16 | -| | [types.d.ts#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L33) | 7.16 | +| | [types.d.ts#L26](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L26) | 7.16 | +| | [types.d.ts#L32](https://github.com/elastic/kibana/tree/master/x-pack/plugins/index_management/target/types/server/types.d.ts#L32) | 7.16 | @@ -588,11 +578,6 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [custom_metric_form.d.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.d.ts#L8) | - | | | [index.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/public/pages/metrics/inventory_view/components/waffle/metric_control/index.d.ts#L1) | - | | | [index.d.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/public/pages/metrics/inventory_view/components/waffle/metric_control/index.d.ts#L9) | - | -| | [log_entry_categories_analysis.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts#L9) | 7.16 | -| | [log_entry_categories_analysis.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts#L139) | 7.16 | -| | [log_entry_categories_analysis.ts#L405](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts#L405) | 7.16 | -| | [log_entry_categories_analysis.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts#L1) | 7.16 | -| | [log_entry_categories_analysis.d.ts#L58](https://github.com/elastic/kibana/tree/master/x-pack/plugins/infra/target/types/server/lib/log_analysis/log_entry_categories_analysis.d.ts#L58) | 7.16 | @@ -602,6 +587,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | ---------------|-----------|-----------| | | [embeddable.tsx#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L14) | - | | | [embeddable.tsx#L85](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L85) | - | +| | [index.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L25) | - | +| | [index.tsx#L102](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L102) | - | | | [field_item.tsx#L47](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L47) | - | | | [field_item.tsx#L172](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L172) | - | | | [datapanel.tsx#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#L42) | - | @@ -616,10 +603,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L8) | - | | | [types.ts#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L57) | - | | | [field_stats.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L11) | - | -| | [field_stats.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L139) | - | -| | [field_stats.ts#L248](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L248) | - | -| | [field_stats.ts#L287](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L287) | - | -| | [field_stats.ts#L329](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L329) | - | +| | [field_stats.ts#L141](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L141) | - | +| | [field_stats.ts#L250](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L250) | - | +| | [field_stats.ts#L290](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L290) | - | +| | [field_stats.ts#L332](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L332) | - | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L1) | - | | | [types.d.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L22) | - | | | [field_stats.d.ts#L3](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L3) | - | @@ -631,10 +618,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L8) | - | | | [types.ts#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L57) | - | | | [field_stats.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L11) | - | -| | [field_stats.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L139) | - | -| | [field_stats.ts#L248](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L248) | - | -| | [field_stats.ts#L287](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L287) | - | -| | [field_stats.ts#L329](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L329) | - | +| | [field_stats.ts#L141](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L141) | - | +| | [field_stats.ts#L250](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L250) | - | +| | [field_stats.ts#L290](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L290) | - | +| | [field_stats.ts#L332](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L332) | - | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L1) | - | | | [types.d.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L22) | - | | | [field_stats.d.ts#L3](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L3) | - | @@ -643,6 +630,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [field_stats.d.ts#L9](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L9) | - | | | [embeddable.tsx#L14](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L14) | - | | | [embeddable.tsx#L85](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/editor_frame_service/embeddable/embeddable.tsx#L85) | - | +| | [index.tsx#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L25) | - | +| | [index.tsx#L102](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx#L102) | - | | | [field_item.tsx#L47](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L47) | - | | | [field_item.tsx#L172](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/field_item.tsx#L172) | - | | | [datapanel.tsx#L42](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/datapanel.tsx#L42) | - | @@ -657,10 +646,10 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L8) | - | | | [types.ts#L57](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/public/indexpattern_datasource/types.ts#L57) | - | | | [field_stats.ts#L11](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L11) | - | -| | [field_stats.ts#L139](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L139) | - | -| | [field_stats.ts#L248](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L248) | - | -| | [field_stats.ts#L287](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L287) | - | -| | [field_stats.ts#L329](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L329) | - | +| | [field_stats.ts#L141](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L141) | - | +| | [field_stats.ts#L250](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L250) | - | +| | [field_stats.ts#L290](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L290) | - | +| | [field_stats.ts#L332](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/server/routes/field_stats.ts#L332) | - | | | [types.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L1) | - | | | [types.d.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/public/indexpattern_datasource/types.d.ts#L22) | - | | | [field_stats.d.ts#L3](https://github.com/elastic/kibana/tree/master/x-pack/plugins/lens/target/types/server/routes/field_stats.d.ts#L3) | - | @@ -946,7 +935,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L8) | - | -| | [types.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L45) | - | +| | [types.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L44) | - | | | [es_doc_field.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L12) | - | | | [es_doc_field.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L45) | - | | | [es_source.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#L10) | - | @@ -1136,7 +1125,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [get_docvalue_source_fields.test.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/get_docvalue_source_fields.test.ts#L10) | - | | | [get_docvalue_source_fields.test.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_search_source/get_docvalue_source_fields.test.ts#L12) | - | | | [types.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L8) | - | -| | [types.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L45) | - | +| | [types.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/embeddable/types.ts#L44) | - | | | [es_doc_field.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L12) | - | | | [es_doc_field.ts#L45](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/fields/es_doc_field.ts#L45) | - | | | [es_source.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/maps/public/classes/sources/es_source/es_source.ts#L10) | - | @@ -1393,7 +1382,7 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [static_globals.ts#L43](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/static_globals.ts#L43) | 7.16 | | | [plugin.ts#L18](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L18) | 7.16 | | | [plugin.ts#L74](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L74) | 7.16 | -| | [plugin.ts#L279](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L279) | 7.16 | +| | [plugin.ts#L284](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/server/plugin.ts#L284) | 7.16 | | | [types.d.ts#L2](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/server/types.d.ts#L2) | 7.16 | | | [types.d.ts#L47](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/server/types.d.ts#L47) | 7.16 | | | [plugin.d.ts#L1](https://github.com/elastic/kibana/tree/master/x-pack/plugins/monitoring/target/types/server/plugin.d.ts#L1) | 7.16 | @@ -1482,22 +1471,22 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [types.ts#L18](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L18) | - | -| | [types.ts#L95](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L95) | - | +| | [types.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L19) | - | +| | [types.ts#L104](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L104) | - | | | [utils.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L10) | - | | | [utils.ts#L53](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L53) | - | | | [utils.ts#L61](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L61) | - | | | [utils.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L69) | - | | | [default_configs.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L19) | - | -| | [default_configs.ts#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L24) | - | -| | [types.ts#L18](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L18) | - | -| | [types.ts#L95](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L95) | - | +| | [default_configs.ts#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L25) | - | +| | [types.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L19) | - | +| | [types.ts#L104](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts#L104) | - | | | [utils.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L10) | - | | | [utils.ts#L53](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L53) | - | | | [utils.ts#L61](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L61) | - | | | [utils.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/utils.ts#L69) | - | | | [default_configs.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L19) | - | -| | [default_configs.ts#L24](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L24) | - | +| | [default_configs.ts#L25](https://github.com/elastic/kibana/tree/master/x-pack/plugins/observability/public/components/shared/exploratory_view/configurations/default_configs.ts#L25) | - | @@ -1573,9 +1562,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | Deprecated API | Reference location | Remove By | | ---------------|-----------|-----------| -| | [types.ts#L21](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L21) | - | -| | [types.ts#L66](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L66) | - | -| | [action.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L19) | - | +| | [types.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L22) | - | +| | [types.ts#L72](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L72) | - | +| | [action.ts#L20](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L20) | - | | | [action.ts#L100](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L100) | - | | | [index.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L8) | - | | | [index.ts#L86](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L86) | - | @@ -1612,9 +1601,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L41](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/pages/details/types.ts#L41) | - | | | [index.tsx#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L12) | - | | | [index.tsx#L34](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L34) | - | -| | [middleware.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L44) | - | -| | [middleware.ts#L60](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L60) | - | -| | [middleware.ts#L65](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L65) | - | +| | [middleware.ts#L48](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L48) | - | +| | [middleware.ts#L64](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L64) | - | +| | [middleware.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L69) | - | | | [types.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L12) | - | | | [types.ts#L28](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L28) | - | | | [index.tsx#L15](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx#L15) | - | @@ -1669,6 +1658,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [use_field_value_autocomplete.ts#L31](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/hooks/use_field_value_autocomplete.ts#L31) | - | | | [field_value_match.tsx#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L19) | - | | | [field_value_match.tsx#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L30) | - | +| | [query.ts#L13](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L13) | - | +| | [query.ts#L52](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L52) | - | | | [model.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L8) | - | | | [model.ts#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L30) | - | | | [index.tsx#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx#L33) | - | @@ -1785,9 +1776,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [index.tsx#L242](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/risk_score_mapping/index.tsx#L242) | - | | | [index.tsx#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx#L12) | - | | | [index.tsx#L35](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/autocomplete_field/index.tsx#L35) | - | -| | [types.ts#L21](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L21) | - | -| | [types.ts#L66](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L66) | - | -| | [action.ts#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L19) | - | +| | [types.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L22) | - | +| | [types.ts#L72](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/types.ts#L72) | - | +| | [action.ts#L20](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L20) | - | | | [action.ts#L100](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/action.ts#L100) | - | | | [index.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L8) | - | | | [index.ts#L86](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#L86) | - | @@ -1824,9 +1815,9 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [types.ts#L41](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/pages/details/types.ts#L41) | - | | | [index.tsx#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L12) | - | | | [index.tsx#L34](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/network/components/network_top_countries_table/index.tsx#L34) | - | -| | [middleware.ts#L44](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L44) | - | -| | [middleware.ts#L60](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L60) | - | -| | [middleware.ts#L65](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L65) | - | +| | [middleware.ts#L48](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L48) | - | +| | [middleware.ts#L64](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L64) | - | +| | [middleware.ts#L69](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#L69) | - | | | [types.ts#L12](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L12) | - | | | [types.ts#L28](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/types.ts#L28) | - | | | [index.tsx#L15](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/description_step/index.tsx#L15) | - | @@ -1881,6 +1872,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [use_field_value_autocomplete.ts#L31](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/hooks/use_field_value_autocomplete.ts#L31) | - | | | [field_value_match.tsx#L19](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L19) | - | | | [field_value_match.tsx#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/components/autocomplete/field_value_match.tsx#L30) | - | +| | [query.ts#L13](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L13) | - | +| | [query.ts#L52](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/reference_rules/query.ts#L52) | - | | | [model.ts#L8](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L8) | - | | | [model.ts#L30](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/common/store/sourcerer/model.ts#L30) | - | | | [index.tsx#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/detections/components/rules/severity_mapping/index.tsx#L33) | - | @@ -1955,8 +1948,8 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | | [app.tsx#L33](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/app.tsx#L33) | - | | | [app.tsx#L73](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/public/app/app.tsx#L73) | - | | | [sender.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L10) | 7.16 | -| | [sender.ts#L447](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L447) | 7.16 | -| | [sender.ts#L466](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L466) | 7.16 | +| | [sender.ts#L457](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L457) | 7.16 | +| | [sender.ts#L476](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/telemetry/sender.ts#L476) | 7.16 | | | [types.ts#L55](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts#L55) | 7.16 | | | [types.ts#L111](https://github.com/elastic/kibana/tree/master/x-pack/plugins/security_solution/server/lib/detection_engine/types.ts#L111) | 7.16 | @@ -2076,12 +2069,12 @@ warning: This document is auto-generated and is meant to be viewed inside our ex | ---------------|-----------|-----------| | | [es_index_service.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L10) | - | | | [es_index_service.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L22) | - | -| | [transforms.ts#L62](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L62) | - | -| | [transforms.ts#L404](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L404) | - | +| | [transforms.ts#L63](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L63) | - | +| | [transforms.ts#L405](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L405) | - | | | [es_index_service.ts#L10](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L10) | - | | | [es_index_service.ts#L22](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/public/app/services/es_index_service.ts#L22) | - | -| | [transforms.ts#L62](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L62) | - | -| | [transforms.ts#L404](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L404) | - | +| | [transforms.ts#L63](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L63) | - | +| | [transforms.ts#L405](https://github.com/elastic/kibana/tree/master/x-pack/plugins/transform/server/routes/api/transforms.ts#L405) | - | diff --git a/api_docs/discover.json b/api_docs/discover.json index 1824b5a3e3d5d..48ed4d51abc67 100644 --- a/api_docs/discover.json +++ b/api_docs/discover.json @@ -56,7 +56,7 @@ "description": [], "signature": [ "() => Promise" ], "source": { @@ -79,7 +79,7 @@ "description": [], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 22 + "lineNumber": 16 }, "deprecated": false, "children": [ @@ -97,7 +97,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 26 + "lineNumber": 20 }, "deprecated": false }, @@ -115,7 +115,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 31 + "lineNumber": 25 }, "deprecated": false }, @@ -140,7 +140,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 36 + "lineNumber": 30 }, "deprecated": false }, @@ -165,7 +165,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 41 + "lineNumber": 35 }, "deprecated": false }, @@ -190,7 +190,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 46 + "lineNumber": 40 }, "deprecated": false }, @@ -215,7 +215,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 52 + "lineNumber": 46 }, "deprecated": false }, @@ -233,7 +233,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 58 + "lineNumber": 52 }, "deprecated": false }, @@ -251,7 +251,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 63 + "lineNumber": 57 }, "deprecated": false }, @@ -269,7 +269,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 68 + "lineNumber": 62 }, "deprecated": false }, @@ -287,7 +287,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 73 + "lineNumber": 67 }, "deprecated": false }, @@ -305,7 +305,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 77 + "lineNumber": 72 }, "deprecated": false }, @@ -323,7 +323,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 81 + "lineNumber": 77 }, "deprecated": false } @@ -890,7 +890,7 @@ ], "source": { "path": "src/plugins/discover/public/url_generator.ts", - "lineNumber": 20 + "lineNumber": 14 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/enterprise_search.json b/api_docs/enterprise_search.json index 6ea7bfe1c50f1..e2b6184c9d36f 100644 --- a/api_docs/enterprise_search.json +++ b/api_docs/enterprise_search.json @@ -22,11 +22,11 @@ "label": "ConfigType", "description": [], "signature": [ - "{ readonly host?: string | undefined; readonly enabled: boolean; readonly accessCheckTimeout: number; readonly accessCheckTimeoutWarning: number; }" + "{ readonly host?: string | undefined; readonly enabled: boolean; readonly ssl: Readonly<{ certificateAuthorities?: string | string[] | undefined; } & { verificationMode: \"none\" | \"certificate\" | \"full\"; }>; readonly accessCheckTimeout: number; readonly accessCheckTimeoutWarning: number; }" ], "source": { "path": "x-pack/plugins/enterprise_search/server/index.ts", - "lineNumber": 24 + "lineNumber": 33 }, "deprecated": false, "initialIsOpen": false @@ -50,7 +50,13 @@ "Type", "; accessCheckTimeoutWarning: ", "Type", - "; }>" + "; ssl: ", + "ObjectType", + "<{ certificateAuthorities: ", + "Type", + "; verificationMode: ", + "Type", + "<\"none\" | \"certificate\" | \"full\">; }>; }>" ], "source": { "path": "x-pack/plugins/enterprise_search/server/index.ts", diff --git a/api_docs/event_log.json b/api_docs/event_log.json index 1eb19bf6310de..1d5605105c7c1 100644 --- a/api_docs/event_log.json +++ b/api_docs/event_log.json @@ -687,7 +687,7 @@ "label": "logEvent", "description": [], "signature": [ - "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -703,7 +703,7 @@ "label": "properties", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -723,7 +723,7 @@ "label": "startTiming", "description": [], "signature": [ - "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -739,7 +739,7 @@ "label": "event", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -759,7 +759,7 @@ "label": "stopTiming", "description": [], "signature": [ - "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" + "(event: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => void" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -775,7 +775,7 @@ "label": "event", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", @@ -850,7 +850,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ '@timestamp'?: string | undefined; kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" + "(Readonly<{ kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" ], "source": { "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", @@ -872,7 +872,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/generated/schemas.ts", @@ -889,7 +889,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ '@timestamp'?: string | undefined; kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined" + "Readonly<{ kibana?: Readonly<{ saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; rel?: string | undefined; namespace?: string | undefined; type_id?: string | undefined; } & {}>[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}> | undefined" ], "source": { "path": "x-pack/plugins/event_log/generated/schemas.ts", @@ -1171,7 +1171,7 @@ "label": "getLogger", "description": [], "signature": [ - "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => ", + "(properties: DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined) => ", { "pluginId": "eventLog", "scope": "server", @@ -1194,7 +1194,7 @@ "label": "properties", "description": [], "signature": [ - "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial[] | undefined; alerting?: Readonly<{ status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; server_uuid?: string | undefined; } & {}> | undefined; user?: Readonly<{ name?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; message?: string | undefined; tags?: string[] | undefined; event?: Readonly<{ start?: string | undefined; type?: string[] | undefined; id?: string | undefined; url?: string | undefined; end?: string | undefined; category?: string[] | undefined; code?: string | undefined; action?: string | undefined; kind?: string | undefined; original?: string | undefined; severity?: number | undefined; created?: string | undefined; dataset?: string | undefined; duration?: number | undefined; hash?: string | undefined; ingested?: string | undefined; module?: string | undefined; outcome?: string | undefined; provider?: string | undefined; reason?: string | undefined; reference?: string | undefined; risk_score?: number | undefined; risk_score_norm?: number | undefined; sequence?: number | undefined; timezone?: string | undefined; } & {}> | undefined; rule?: Readonly<{ description?: string | undefined; id?: string | undefined; name?: string | undefined; version?: string | undefined; license?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; uuid?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "source": { "path": "x-pack/plugins/event_log/server/types.ts", diff --git a/api_docs/expressions.json b/api_docs/expressions.json index e981414fe7bda..79a9d016df071 100644 --- a/api_docs/expressions.json +++ b/api_docs/expressions.json @@ -39151,7 +39151,7 @@ "label": "types", "description": [], "signature": [ - "(\"boolean\" | \"string\" | \"number\" | \"null\")[]" + "(\"number\" | \"boolean\" | \"string\" | \"null\")[]" ], "source": { "path": "src/plugins/expressions/common/expression_functions/specs/map_column.ts", diff --git a/api_docs/features.json b/api_docs/features.json index 63c3ebe3a92de..7392fcf6a17f7 100644 --- a/api_docs/features.json +++ b/api_docs/features.json @@ -11,7 +11,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 137 + "lineNumber": 142 }, "deprecated": false, "children": [ @@ -34,7 +34,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 138 + "lineNumber": 143 }, "deprecated": false }, @@ -50,7 +50,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -62,7 +62,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -70,11 +70,11 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -91,7 +91,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 146 + "lineNumber": 151 }, "deprecated": false }, @@ -104,7 +104,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 150 + "lineNumber": 155 }, "deprecated": false }, @@ -120,7 +120,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 154 + "lineNumber": 159 }, "deprecated": false }, @@ -136,7 +136,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false }, @@ -152,7 +152,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 162 + "lineNumber": 167 }, "deprecated": false }, @@ -168,7 +168,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 166 + "lineNumber": 171 }, "deprecated": false }, @@ -184,7 +184,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 170 + "lineNumber": 175 }, "deprecated": false }, @@ -200,7 +200,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 174 + "lineNumber": 179 }, "deprecated": false }, @@ -212,11 +212,11 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 178 + "lineNumber": 183 }, "deprecated": false }, @@ -232,7 +232,23 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 182 + "lineNumber": 187 + }, + "deprecated": false + }, + { + "parentPluginId": "features", + "id": "def-public.KibanaFeature.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 191 }, "deprecated": false }, @@ -245,7 +261,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 186 + "lineNumber": 195 }, "deprecated": false }, @@ -257,11 +273,11 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 190 + "lineNumber": 199 }, "deprecated": false }, @@ -284,7 +300,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 194 + "lineNumber": 203 }, "deprecated": false, "children": [], @@ -411,7 +427,7 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", @@ -419,6 +435,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-public.FeatureKibanaPrivileges.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should\nbe unique identifiers for the owners of cases you want access to." + ], + "signature": [ + "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", + "lineNumber": 135 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-public.FeatureKibanaPrivileges.savedObject", @@ -433,7 +467,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 110 + "lineNumber": 161 }, "deprecated": false }, @@ -453,7 +487,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 153 + "lineNumber": 204 }, "deprecated": false } @@ -651,6 +685,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-public.KibanaFeatureConfig.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature grants access to specific case types, you can specify them here to control visibility based on the current space." + ], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 104 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-public.KibanaFeatureConfig.privileges", @@ -683,7 +735,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 113 + "lineNumber": 118 }, "deprecated": false }, @@ -709,7 +761,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 121 + "lineNumber": 126 }, "deprecated": false }, @@ -727,7 +779,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 126 + "lineNumber": 131 }, "deprecated": false }, @@ -747,7 +799,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 131 + "lineNumber": 136 }, "deprecated": false } @@ -838,7 +890,7 @@ "section": "def-common.FeatureKibanaPrivileges", "text": "FeatureKibanaPrivileges" }, - ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"app\" | \"api\" | \"savedObject\">" + ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"cases\" | \"app\" | \"api\" | \"savedObject\">" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -886,7 +938,7 @@ "\nDenotes which Primary Feature Privilege this sub-feature privilege should be included in.\n`read` is also included in `all` automatically." ], "signature": [ - "\"none\" | \"all\" | \"read\"" + "\"all\" | \"none\" | \"read\"" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -1139,7 +1191,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 137 + "lineNumber": 142 }, "deprecated": false, "children": [ @@ -1162,7 +1214,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 138 + "lineNumber": 143 }, "deprecated": false }, @@ -1178,7 +1230,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -1190,7 +1242,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -1198,11 +1250,11 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -1219,7 +1271,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 146 + "lineNumber": 151 }, "deprecated": false }, @@ -1232,7 +1284,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 150 + "lineNumber": 155 }, "deprecated": false }, @@ -1248,7 +1300,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 154 + "lineNumber": 159 }, "deprecated": false }, @@ -1264,7 +1316,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false }, @@ -1280,7 +1332,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 162 + "lineNumber": 167 }, "deprecated": false }, @@ -1296,7 +1348,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 166 + "lineNumber": 171 }, "deprecated": false }, @@ -1312,7 +1364,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 170 + "lineNumber": 175 }, "deprecated": false }, @@ -1328,7 +1380,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 174 + "lineNumber": 179 }, "deprecated": false }, @@ -1340,11 +1392,11 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 178 + "lineNumber": 183 }, "deprecated": false }, @@ -1360,7 +1412,23 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 182 + "lineNumber": 187 + }, + "deprecated": false + }, + { + "parentPluginId": "features", + "id": "def-server.KibanaFeature.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 191 }, "deprecated": false }, @@ -1373,7 +1441,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 186 + "lineNumber": 195 }, "deprecated": false }, @@ -1385,11 +1453,11 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 190 + "lineNumber": 199 }, "deprecated": false }, @@ -1412,7 +1480,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 194 + "lineNumber": 203 }, "deprecated": false, "children": [], @@ -1740,7 +1808,7 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", @@ -1748,6 +1816,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-server.FeatureKibanaPrivileges.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should\nbe unique identifiers for the owners of cases you want access to." + ], + "signature": [ + "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", + "lineNumber": 135 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-server.FeatureKibanaPrivileges.savedObject", @@ -1762,7 +1848,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 110 + "lineNumber": 161 }, "deprecated": false }, @@ -1782,7 +1868,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 153 + "lineNumber": 204 }, "deprecated": false } @@ -1980,6 +2066,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-server.KibanaFeatureConfig.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature grants access to specific case types, you can specify them here to control visibility based on the current space." + ], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 104 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-server.KibanaFeatureConfig.privileges", @@ -2012,7 +2116,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 113 + "lineNumber": 118 }, "deprecated": false }, @@ -2038,7 +2142,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 121 + "lineNumber": 126 }, "deprecated": false }, @@ -2056,7 +2160,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 126 + "lineNumber": 131 }, "deprecated": false }, @@ -2076,7 +2180,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 131 + "lineNumber": 136 }, "deprecated": false } @@ -2708,7 +2812,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 137 + "lineNumber": 142 }, "deprecated": false, "children": [ @@ -2731,7 +2835,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 138 + "lineNumber": 143 }, "deprecated": false }, @@ -2747,7 +2851,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "children": [ @@ -2759,7 +2863,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -2767,11 +2871,11 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined; }>" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 140 + "lineNumber": 145 }, "deprecated": false, "isRequired": true @@ -2788,7 +2892,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 146 + "lineNumber": 151 }, "deprecated": false }, @@ -2801,7 +2905,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 150 + "lineNumber": 155 }, "deprecated": false }, @@ -2817,7 +2921,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 154 + "lineNumber": 159 }, "deprecated": false }, @@ -2833,7 +2937,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false }, @@ -2849,7 +2953,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 162 + "lineNumber": 167 }, "deprecated": false }, @@ -2865,7 +2969,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 166 + "lineNumber": 171 }, "deprecated": false }, @@ -2881,7 +2985,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 170 + "lineNumber": 175 }, "deprecated": false }, @@ -2897,7 +3001,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 174 + "lineNumber": 179 }, "deprecated": false }, @@ -2909,11 +3013,11 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }> | null" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 178 + "lineNumber": 183 }, "deprecated": false }, @@ -2929,7 +3033,23 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 182 + "lineNumber": 187 + }, + "deprecated": false + }, + { + "parentPluginId": "features", + "id": "def-common.KibanaFeature.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 191 }, "deprecated": false }, @@ -2942,7 +3062,7 @@ "description": [], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 186 + "lineNumber": 195 }, "deprecated": false }, @@ -2954,11 +3074,11 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; }>; }>[]; }> | undefined" ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 190 + "lineNumber": 199 }, "deprecated": false }, @@ -2981,7 +3101,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 194 + "lineNumber": 203 }, "deprecated": false, "children": [], @@ -3035,7 +3155,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }>" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3076,7 +3196,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3100,7 +3220,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"all\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; ui: readonly string[]; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"all\" | \"none\" | \"read\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; ui: readonly string[]; cases?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; app?: readonly string[] | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; }" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3432,7 +3552,7 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", @@ -3440,6 +3560,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-common.FeatureKibanaPrivileges.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature requires access to specific owners of cases (aka plugins that have created cases), then specify your access needs here. The values here should\nbe unique identifiers for the owners of cases you want access to." + ], + "signature": [ + "{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", + "lineNumber": 135 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-common.FeatureKibanaPrivileges.savedObject", @@ -3454,7 +3592,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 110 + "lineNumber": 161 }, "deprecated": false }, @@ -3474,7 +3612,7 @@ ], "source": { "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", - "lineNumber": 153 + "lineNumber": 204 }, "deprecated": false } @@ -3672,6 +3810,24 @@ }, "deprecated": false }, + { + "parentPluginId": "features", + "id": "def-common.KibanaFeatureConfig.cases", + "type": "Object", + "tags": [], + "label": "cases", + "description": [ + "\nIf your feature grants access to specific case types, you can specify them here to control visibility based on the current space." + ], + "signature": [ + "readonly string[] | undefined" + ], + "source": { + "path": "x-pack/plugins/features/common/kibana_feature.ts", + "lineNumber": 104 + }, + "deprecated": false + }, { "parentPluginId": "features", "id": "def-common.KibanaFeatureConfig.privileges", @@ -3704,7 +3860,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 113 + "lineNumber": 118 }, "deprecated": false }, @@ -3730,7 +3886,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 121 + "lineNumber": 126 }, "deprecated": false }, @@ -3748,7 +3904,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 126 + "lineNumber": 131 }, "deprecated": false }, @@ -3768,7 +3924,7 @@ ], "source": { "path": "x-pack/plugins/features/common/kibana_feature.ts", - "lineNumber": 131 + "lineNumber": 136 }, "deprecated": false } @@ -3859,7 +4015,7 @@ "section": "def-common.FeatureKibanaPrivileges", "text": "FeatureKibanaPrivileges" }, - ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"app\" | \"api\" | \"savedObject\">" + ", \"management\" | \"catalogue\" | \"alerting\" | \"ui\" | \"cases\" | \"app\" | \"api\" | \"savedObject\">" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", @@ -3907,7 +4063,7 @@ "\nDenotes which Primary Feature Privilege this sub-feature privilege should be included in.\n`read` is also included in `all` automatically." ], "signature": [ - "\"none\" | \"all\" | \"read\"" + "\"all\" | \"none\" | \"read\"" ], "source": { "path": "x-pack/plugins/features/common/sub_feature.ts", diff --git a/api_docs/file_data_visualizer.json b/api_docs/file_data_visualizer.json deleted file mode 100644 index c536acd5f4997..0000000000000 --- a/api_docs/file_data_visualizer.json +++ /dev/null @@ -1,328 +0,0 @@ -{ - "id": "fileDataVisualizer", - "client": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [], - "start": { - "parentPluginId": "fileDataVisualizer", - "id": "def-public.FileDataVisualizerPluginStart", - "type": "Type", - "tags": [], - "label": "FileDataVisualizerPluginStart", - "description": [], - "signature": [ - "{ getFileDataVisualizerComponent: () => Promise>; getMaxBytesFormatted: () => string; }" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/public/plugin.ts", - "lineNumber": 33 - }, - "deprecated": false, - "lifecycle": "start", - "initialIsOpen": true - } - }, - "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState", - "type": "Interface", - "tags": [], - "label": "DataVisualizerTableState", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 14 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.pageSize", - "type": "number", - "tags": [], - "label": "pageSize", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 15 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.pageIndex", - "type": "number", - "tags": [], - "label": "pageIndex", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 16 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.sortField", - "type": "string", - "tags": [], - "label": "sortField", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 17 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.sortDirection", - "type": "string", - "tags": [], - "label": "sortDirection", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 18 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.visibleFieldTypes", - "type": "Array", - "tags": [], - "label": "visibleFieldTypes", - "description": [], - "signature": [ - "string[]" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 19 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.visibleFieldNames", - "type": "Array", - "tags": [], - "label": "visibleFieldNames", - "description": [], - "signature": [ - "string[]" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 20 - }, - "deprecated": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.DataVisualizerTableState.showDistributions", - "type": "boolean", - "tags": [], - "label": "showDistributions", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 21 - }, - "deprecated": false - } - ], - "initialIsOpen": false - } - ], - "enums": [], - "misc": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.ABSOLUTE_MAX_FILE_SIZE_BYTES", - "type": "number", - "tags": [], - "label": "ABSOLUTE_MAX_FILE_SIZE_BYTES", - "description": [], - "signature": [ - "1073741274" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 14 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.FILE_SIZE_DISPLAY_FORMAT", - "type": "string", - "tags": [], - "label": "FILE_SIZE_DISPLAY_FORMAT", - "description": [], - "signature": [ - "\"0,0.[0] b\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 15 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.INDEX_META_DATA_CREATED_BY", - "type": "string", - "tags": [], - "label": "INDEX_META_DATA_CREATED_BY", - "description": [], - "signature": [ - "\"file-data-visualizer\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 19 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.InputData", - "type": "Type", - "tags": [], - "label": "InputData", - "description": [], - "signature": [ - "any[]" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 10 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.JobFieldType", - "type": "Type", - "tags": [], - "label": "JobFieldType", - "description": [], - "signature": [ - "\"number\" | \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"ip\" | \"geo_point\" | \"geo_shape\" | \"unknown\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/types.ts", - "lineNumber": 12 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.MAX_FILE_SIZE", - "type": "string", - "tags": [], - "label": "MAX_FILE_SIZE", - "description": [], - "signature": [ - "\"100MB\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 11 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.MAX_FILE_SIZE_BYTES", - "type": "number", - "tags": [], - "label": "MAX_FILE_SIZE_BYTES", - "description": [], - "signature": [ - "104857600" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 12 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.MB", - "type": "number", - "tags": [], - "label": "MB", - "description": [], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 10 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.UI_SETTING_MAX_FILE_SIZE", - "type": "string", - "tags": [], - "label": "UI_SETTING_MAX_FILE_SIZE", - "description": [], - "signature": [ - "\"fileUpload:maxFileSize\"" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 8 - }, - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [ - { - "parentPluginId": "fileDataVisualizer", - "id": "def-common.JOB_FIELD_TYPES", - "type": "Object", - "tags": [], - "label": "JOB_FIELD_TYPES", - "description": [], - "signature": [ - "{ readonly BOOLEAN: \"boolean\"; readonly DATE: \"date\"; readonly GEO_POINT: \"geo_point\"; readonly GEO_SHAPE: \"geo_shape\"; readonly IP: \"ip\"; readonly KEYWORD: \"keyword\"; readonly NUMBER: \"number\"; readonly TEXT: \"text\"; readonly UNKNOWN: \"unknown\"; }" - ], - "source": { - "path": "x-pack/plugins/file_data_visualizer/common/constants.ts", - "lineNumber": 21 - }, - "deprecated": false, - "initialIsOpen": false - } - ] - } -} \ No newline at end of file diff --git a/api_docs/fleet.json b/api_docs/fleet.json index 043dfcd16c2a7..bb7e899062640 100644 --- a/api_docs/fleet.json +++ b/api_docs/fleet.json @@ -14,7 +14,7 @@ "(packageInfo: T) => string" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/services/pkg_key_from_package_info.ts", + "path": "x-pack/plugins/fleet/public/services/pkg_key_from_package_info.ts", "lineNumber": 8 }, "deprecated": false, @@ -30,7 +30,7 @@ "T" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/services/pkg_key_from_package_info.ts", + "path": "x-pack/plugins/fleet/public/services/pkg_key_from_package_info.ts", "lineNumber": 9 }, "deprecated": false, @@ -52,7 +52,7 @@ "\nSupported routing state for the agent policy details page routes with deploy agents action" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 37 }, "deprecated": false, @@ -78,7 +78,7 @@ " | undefined] | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 39 }, "deprecated": false @@ -96,7 +96,7 @@ "\nSupported routing state for the agent policy details page routes with deploy agents action" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 29 }, "deprecated": false, @@ -122,7 +122,7 @@ " | undefined] | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 31 }, "deprecated": false @@ -140,7 +140,7 @@ "\nSupported routing state for the create package policy page routes" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 15 }, "deprecated": false, @@ -182,7 +182,7 @@ " | undefined]) | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 17 }, "deprecated": false @@ -208,7 +208,7 @@ " | undefined] | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 21 }, "deprecated": false @@ -226,7 +226,7 @@ "string | undefined" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 23 }, "deprecated": false @@ -411,7 +411,7 @@ "Extension point registration contract for Integration details Custom view" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 94 }, "deprecated": false, @@ -424,7 +424,7 @@ "label": "package", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 95 }, "deprecated": false @@ -440,7 +440,7 @@ "\"package-detail-custom\"" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 96 }, "deprecated": false @@ -488,7 +488,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 97 }, "deprecated": false, @@ -523,7 +523,7 @@ "label": "PackageCustomExtensionComponentProps", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 87 }, "deprecated": false, @@ -538,7 +538,7 @@ "The package key value that should be used used for URLs" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 89 }, "deprecated": false @@ -649,7 +649,7 @@ ">>" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 90 }, "deprecated": false @@ -667,7 +667,7 @@ "Extension point registration contract for Integration Policy Create views" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 76 }, "deprecated": false, @@ -680,7 +680,7 @@ "label": "package", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 77 }, "deprecated": false @@ -696,7 +696,7 @@ "\"package-policy-create\"" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 78 }, "deprecated": false @@ -744,7 +744,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 79 }, "deprecated": false, @@ -779,7 +779,7 @@ "label": "PackagePolicyCreateExtensionComponentProps", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 60 }, "deprecated": false, @@ -803,7 +803,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 62 }, "deprecated": false @@ -829,7 +829,7 @@ "; }) => void" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 67 }, "deprecated": false, @@ -854,7 +854,7 @@ "; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 67 }, "deprecated": false @@ -874,7 +874,7 @@ "Extension point registration contract for Integration Policy Edit views" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 48 }, "deprecated": false, @@ -887,7 +887,7 @@ "label": "package", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 49 }, "deprecated": false @@ -903,7 +903,7 @@ "\"package-policy-edit\"" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 50 }, "deprecated": false @@ -951,7 +951,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 51 }, "deprecated": false, @@ -986,7 +986,7 @@ "label": "PackagePolicyEditExtensionComponentProps", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 26 }, "deprecated": false, @@ -1010,7 +1010,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 28 }, "deprecated": false @@ -1034,7 +1034,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 30 }, "deprecated": false @@ -1060,7 +1060,7 @@ ">; }) => void" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 39 }, "deprecated": false, @@ -1085,7 +1085,7 @@ ">; }" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 39 }, "deprecated": false @@ -1105,7 +1105,7 @@ "Internal storage for registered UI Extension Points" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 16 }, "deprecated": false, @@ -1121,7 +1121,7 @@ "any" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 17 }, "deprecated": false @@ -1167,7 +1167,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", "lineNumber": 45 }, "deprecated": false, @@ -1202,7 +1202,7 @@ ">" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 85 }, "deprecated": false, @@ -1237,7 +1237,7 @@ ">" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 58 }, "deprecated": false, @@ -1272,7 +1272,7 @@ ">" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 24 }, "deprecated": false, @@ -1313,7 +1313,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 101 }, "deprecated": false, @@ -1340,7 +1340,7 @@ ") => void" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 13 }, "deprecated": false, @@ -1356,8 +1356,8 @@ "label": "pagePathGetters", "description": [], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 69 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 73 }, "deprecated": false, "children": [ @@ -1369,11 +1369,11 @@ "label": "base", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 75 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 79 }, "deprecated": false, "children": [], @@ -1387,11 +1387,11 @@ "label": "overview", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 76 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 80 }, "deprecated": false, "children": [], @@ -1405,11 +1405,11 @@ "label": "integrations", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 77 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 81 }, "deprecated": false, "children": [], @@ -1423,11 +1423,11 @@ "label": "integrations_all", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 78 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 82 }, "deprecated": false, "children": [], @@ -1441,11 +1441,11 @@ "label": "integrations_installed", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 79 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 83 }, "deprecated": false, "children": [], @@ -1461,11 +1461,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 80 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 84 }, "deprecated": false, "children": [ @@ -1480,8 +1480,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 80 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 84 }, "deprecated": false, "isRequired": true @@ -1499,11 +1499,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 82 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 88 }, "deprecated": false, "children": [ @@ -1518,8 +1518,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 82 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 88 }, "deprecated": false, "isRequired": true @@ -1537,11 +1537,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 84 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 92 }, "deprecated": false, "children": [ @@ -1556,8 +1556,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 84 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 92 }, "deprecated": false, "isRequired": true @@ -1575,11 +1575,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 86 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 96 }, "deprecated": false, "children": [ @@ -1594,8 +1594,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 86 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 96 }, "deprecated": false, "isRequired": true @@ -1613,11 +1613,11 @@ "signature": [ "({ packagePolicyId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 88 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 100 }, "deprecated": false, "children": [ @@ -1632,8 +1632,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 88 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 100 }, "deprecated": false, "isRequired": true @@ -1649,11 +1649,11 @@ "label": "policies", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 90 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 104 }, "deprecated": false, "children": [], @@ -1667,11 +1667,11 @@ "label": "policies_list", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 91 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 105 }, "deprecated": false, "children": [], @@ -1687,11 +1687,11 @@ "signature": [ "({ policyId, tabId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 92 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 106 }, "deprecated": false, "children": [ @@ -1706,8 +1706,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 92 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 106 }, "deprecated": false, "isRequired": true @@ -1725,11 +1725,11 @@ "signature": [ "({ policyId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 93 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 110 }, "deprecated": false, "children": [ @@ -1744,8 +1744,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 93 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 110 }, "deprecated": false, "isRequired": true @@ -1763,11 +1763,11 @@ "signature": [ "({ pkgkey, integration }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 94 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 114 }, "deprecated": false, "children": [ @@ -1782,8 +1782,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 94 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 114 }, "deprecated": false, "isRequired": true @@ -1801,11 +1801,11 @@ "signature": [ "({ policyId, packagePolicyId }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 96 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 118 }, "deprecated": false, "children": [ @@ -1820,8 +1820,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 96 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 118 }, "deprecated": false, "isRequired": true @@ -1837,11 +1837,11 @@ "label": "fleet", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 98 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 122 }, "deprecated": false, "children": [], @@ -1857,11 +1857,11 @@ "signature": [ "({ kuery }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 99 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 123 }, "deprecated": false, "children": [ @@ -1876,8 +1876,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 99 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 123 }, "deprecated": false, "isRequired": true @@ -1895,11 +1895,11 @@ "signature": [ "({ agentId, tabId, logQuery }: ", "DynamicPagePathValues", - ") => string" + ") => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 100 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 127 }, "deprecated": false, "children": [ @@ -1914,8 +1914,8 @@ "DynamicPagePathValues" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 100 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 127 }, "deprecated": false, "isRequired": true @@ -1931,11 +1931,11 @@ "label": "fleet_enrollment_tokens", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 102 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 131 }, "deprecated": false, "children": [], @@ -1949,11 +1949,11 @@ "label": "data_streams", "description": [], "signature": [ - "() => string" + "() => [string, string]" ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts", - "lineNumber": 103 + "path": "x-pack/plugins/fleet/public/constants/page_paths.ts", + "lineNumber": 132 }, "deprecated": false, "children": [], @@ -1972,7 +1972,7 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 51 + "lineNumber": 48 }, "deprecated": false, "children": [], @@ -1990,7 +1990,7 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 56 + "lineNumber": 53 }, "deprecated": false, "children": [ @@ -2014,7 +2014,7 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 57 + "lineNumber": 54 }, "deprecated": false, "returnComment": [], @@ -2052,7 +2052,7 @@ } ], "source": { - "path": "x-pack/plugins/fleet/public/applications/fleet/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "lineNumber": 13 }, "deprecated": false @@ -2071,7 +2071,7 @@ ], "source": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 58 + "lineNumber": 55 }, "deprecated": false, "returnComment": [], @@ -3721,7 +3721,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -3966,7 +3966,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -4448,7 +4448,7 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 90 + "lineNumber": 91 }, "deprecated": false, "children": [ @@ -4470,7 +4470,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 91 + "lineNumber": 92 }, "deprecated": false }, @@ -4493,7 +4493,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false }, @@ -4516,7 +4516,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 93 + "lineNumber": 94 }, "deprecated": false }, @@ -4538,7 +4538,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 94 + "lineNumber": 95 }, "deprecated": false }, @@ -4561,7 +4561,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 95 + "lineNumber": 96 }, "deprecated": false }, @@ -4584,7 +4584,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 96 + "lineNumber": 97 }, "deprecated": false } @@ -4767,7 +4767,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 137 + "lineNumber": 138 }, "deprecated": false, "initialIsOpen": false @@ -4784,7 +4784,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/index.ts", - "lineNumber": 66 + "lineNumber": 83 }, "deprecated": false, "initialIsOpen": false @@ -4801,7 +4801,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/services/package_policy.ts", - "lineNumber": 655 + "lineNumber": 656 }, "deprecated": false, "initialIsOpen": false @@ -4838,7 +4838,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 122 + "lineNumber": 123 }, "deprecated": false, "lifecycle": "setup", @@ -4855,7 +4855,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 161 }, "deprecated": false, "children": [ @@ -4873,7 +4873,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 166 + "lineNumber": 167 }, "deprecated": false, "returnComment": [], @@ -4897,7 +4897,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 167 + "lineNumber": 168 }, "deprecated": false }, @@ -4919,7 +4919,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 168 + "lineNumber": 169 }, "deprecated": false }, @@ -4941,7 +4941,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 169 + "lineNumber": 170 }, "deprecated": false }, @@ -4959,7 +4959,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 173 + "lineNumber": 174 }, "deprecated": false }, @@ -4981,7 +4981,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 174 + "lineNumber": 175 }, "deprecated": false }, @@ -5007,7 +5007,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 179 + "lineNumber": 180 }, "deprecated": false, "returnComment": [], @@ -5088,7 +5088,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 179 + "lineNumber": 180 }, "deprecated": false } @@ -5109,7 +5109,7 @@ ], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 185 + "lineNumber": 186 }, "deprecated": false, "returnComment": [], @@ -5123,7 +5123,7 @@ "description": [], "source": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 185 + "lineNumber": 186 }, "deprecated": false } @@ -8203,7 +8203,7 @@ "label": "agents", "description": [], "signature": [ - "{ enabled: boolean; elasticsearch: { host?: string | undefined; ca_sha256?: string | undefined; }; fleet_server?: { hosts?: string[] | undefined; } | undefined; }" + "{ enabled: boolean; elasticsearch: { hosts?: string[] | undefined; ca_sha256?: string | undefined; }; fleet_server?: { hosts?: string[] | undefined; } | undefined; }" ], "source": { "path": "x-pack/plugins/fleet/common/types/index.ts", @@ -17304,6 +17304,23 @@ "deprecated": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.INTEGRATIONS_PLUGIN_ID", + "type": "string", + "tags": [], + "label": "INTEGRATIONS_PLUGIN_ID", + "description": [], + "signature": [ + "\"integrations\"" + ], + "source": { + "path": "x-pack/plugins/fleet/common/constants/plugin.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.KibanaAssetParts", diff --git a/api_docs/home.json b/api_docs/home.json index a1039beb8d3a2..c11d02dfed9de 100644 --- a/api_docs/home.json +++ b/api_docs/home.json @@ -501,7 +501,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 161 + "lineNumber": 166 }, "deprecated": false, "initialIsOpen": false @@ -534,7 +534,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 158 + "lineNumber": 163 }, "deprecated": false, "initialIsOpen": false @@ -602,7 +602,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 164 + "lineNumber": 169 }, "deprecated": false, "initialIsOpen": false @@ -873,7 +873,7 @@ "description": [], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 167 + "lineNumber": 175 }, "deprecated": false, "children": [ @@ -889,7 +889,25 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 168 + "lineNumber": 176 + }, + "deprecated": false + }, + { + "parentPluginId": "home", + "id": "def-public.HomePublicPluginSetup.addData", + "type": "Object", + "tags": [], + "label": "addData", + "description": [], + "signature": [ + "{ registerAddDataTab: (tab: ", + "AddDataTab", + ") => void; }" + ], + "source": { + "path": "src/plugins/home/public/plugin.ts", + "lineNumber": 177 }, "deprecated": false }, @@ -921,7 +939,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 169 + "lineNumber": 178 }, "deprecated": false }, @@ -949,7 +967,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 176 + "lineNumber": 185 }, "deprecated": true, "references": [ @@ -964,7 +982,7 @@ "plugin": "apm", "link": { "path": "x-pack/plugins/apm/public/plugin.ts", - "lineNumber": 82 + "lineNumber": 85 } }, { @@ -989,7 +1007,7 @@ "description": [], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 178 + "lineNumber": 187 }, "deprecated": false, "children": [ @@ -1005,7 +1023,7 @@ ], "source": { "path": "src/plugins/home/public/plugin.ts", - "lineNumber": 179 + "lineNumber": 188 }, "deprecated": false } diff --git a/api_docs/index_management.json b/api_docs/index_management.json index 9d4edf199ca27..9dc02a51148bc 100644 --- a/api_docs/index_management.json +++ b/api_docs/index_management.json @@ -722,7 +722,7 @@ "description": [], "source": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 25 + "lineNumber": 23 }, "deprecated": false, "children": [ @@ -740,7 +740,7 @@ ], "source": { "path": "x-pack/plugins/index_management/server/plugin.ts", - "lineNumber": 26 + "lineNumber": 24 }, "deprecated": false } diff --git a/api_docs/kibana_react.json b/api_docs/kibana_react.json index 98537d71d7b01..a477de7c6512c 100644 --- a/api_docs/kibana_react.json +++ b/api_docs/kibana_react.json @@ -3952,11 +3952,11 @@ "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", + "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }, { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; }> & { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", + "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }, { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; }> & { template: \"default\" | \"empty\" | \"centeredBody\" | \"centeredContent\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", "EuiPageSideBarProps", " | undefined; pageHeader?: ", "EuiPageHeaderProps", @@ -3976,19 +3976,19 @@ "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", + "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }> & { template?: \"default\" | undefined; bottomBar?: React.ReactNode; bottomBarProps?: (", + "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; }> & { template?: \"default\" | undefined; bottomBar?: React.ReactNode; bottomBarProps?: (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", + "<{ position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }, { position: \"static\" | \"sticky\"; }> & { position: \"static\" | \"sticky\"; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | (", "CommonProps", " & React.HTMLAttributes & ", "DisambiguateSet", - "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; } & { paddingSize?: \"m\" | \"s\" | \"none\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", + "<{ position: \"static\" | \"sticky\"; }, { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; }> & { position?: \"fixed\" | undefined; usePortal?: boolean | undefined; affordForDisplacement?: boolean | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; bodyClassName?: string | undefined; landmarkHeading?: string | undefined; top?: string | number | undefined; right?: string | number | undefined; bottom?: string | number | undefined; left?: string | number | undefined; }) | undefined; } & { paddingSize?: \"none\" | \"m\" | \"s\" | \"l\" | undefined; pageSideBar?: React.ReactNode; pageSideBarProps?: ", "EuiPageSideBarProps", " | undefined; pageHeader?: ", "EuiPageHeaderProps", @@ -4122,7 +4122,7 @@ "label": "POSITIONS", "description": [], "signature": [ - "(\"left\" | \"right\" | \"none\" | \"center\")[]" + "(\"none\" | \"left\" | \"right\" | \"center\")[]" ], "source": { "path": "src/plugins/kibana_react/public/toolbar_button/toolbar_button.tsx", @@ -4185,7 +4185,7 @@ "EuiButtonProps", ", { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; }>> & ", "EuiButtonProps", - " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"left\" | \"right\" | \"none\" | \"center\" | undefined; dataTestSubj?: string | undefined; }) | (", + " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"none\" | \"left\" | \"right\" | \"center\" | undefined; dataTestSubj?: string | undefined; }) | (", "DisambiguateSet", "<", "PropsForButton", @@ -4197,7 +4197,7 @@ "EuiButtonProps", ", { buttonRef?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject | null | undefined; }>> & ", "EuiButtonProps", - " & { href?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.AnchorHTMLAttributes & { buttonRef?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"left\" | \"right\" | \"none\" | \"center\" | undefined; dataTestSubj?: string | undefined; })" + " & { href?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.AnchorHTMLAttributes & { buttonRef?: ((instance: HTMLAnchorElement | null) => void) | React.RefObject | null | undefined; } & { fontWeight?: \"bold\" | \"normal\" | undefined; size?: \"m\" | \"s\" | undefined; hasArrow?: boolean | undefined; groupPosition?: \"none\" | \"left\" | \"right\" | \"center\" | undefined; dataTestSubj?: string | undefined; })" ], "source": { "path": "src/plugins/kibana_react/public/toolbar_button/toolbar_button.tsx", @@ -5003,7 +5003,7 @@ "label": "eui", "description": [], "signature": [ - "{ paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; } | { paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; }" + "{ paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; inherit: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormControlPlaceholderText: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; } | { paddingSizes: { xs: string; s: string; m: string; l: string; xl: string; }; avatarSizing: { s: { size: string; 'font-size': string; }; m: { size: string; 'font-size': string; }; l: { size: string; 'font-size': string; }; xl: { size: string; 'font-size': string; }; }; euiBadgeGroupGutterTypes: { gutterExtraSmall: string; gutterSmall: string; }; euiBreadcrumbSpacing: string; euiBreadcrumbTruncateWidth: string; euiButtonEmptyTypes: { primary: string; danger: string; disabled: string; ghost: string; text: string; success: string; warning: string; }; euiButtonIconTypes: { accent: string; danger: string; ghost: string; primary: string; subdued: string; success: string; text: string; warning: string; }; euiCallOutTypes: { primary: string; success: string; warning: string; danger: string; }; euiCardSpacing: string; euiCardBottomNodeHeight: string; euiCardSelectButtonBorders: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardSelectButtonBackgrounds: { text: string; primary: string; success: string; danger: string; ghost: string; }; euiCardPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiCheckableCardPadding: string; euiCollapsibleNavWidth: string; euiCollapsibleNavGroupLightBackgroundColor: string; euiCollapsibleNavGroupDarkBackgroundColor: string; euiCollapsibleNavGroupDarkHighContrastColor: string; euiColorPickerValueRange0: string; euiColorPickerValueRange1: string; euiColorPickerSaturationRange0: string; euiColorPickerSaturationRange1: string; euiColorPickerIndicatorSize: string; euiColorPickerWidth: string; euiColorPaletteDisplaySizes: { sizeExtraSmall: string; sizeSmall: string; sizeMedium: string; }; euiContextMenuWidth: string; euiControlBarBackground: string; euiControlBarText: string; euiControlBarBorderColor: string; euiControlBarInitialHeight: string; euiControlBarMaxHeight: string; euiControlBarHeights: { s: string; m: string; l: string; }; euiDataGridPrefix: string; euiDataGridStyles: string; euiDataGridColumnResizerWidth: string; euiDataGridPopoverMaxHeight: string; euiDataGridCellPaddingS: string; euiDataGridCellPaddingM: string; euiDataGridCellPaddingL: string; euiDataGridVerticalBorder: string; euiDatePickerCalendarWidth: string; euiSuperDatePickerWidth: string; euiSuperDatePickerButtonWidth: string; euiDragAndDropSpacing: { s: string; m: string; l: string; }; euiExpressionColors: { subdued: string; primary: string; secondary: string; warning: string; danger: string; accent: string; }; euiFacetGutterSizes: { gutterNone: number; gutterSmall: string; gutterMedium: string; gutterLarge: string; }; gutterTypes: { gutterExtraSmall: string; gutterSmall: string; gutterMedium: string; gutterLarge: string; gutterExtraLarge: string; }; fractions: { fourths: { percentage: string; count: number; }; thirds: { percentage: string; count: number; }; halves: { percentage: string; count: number; }; single: { percentage: string; count: number; }; }; flyoutSizes: { small: { min: string; width: string; max: string; }; medium: { min: string; width: string; max: string; }; large: { min: string; width: string; max: string; }; }; euiFlyoutBorder: string; euiFlyoutPaddingModifiers: { paddingNone: number; paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiFilePickerTallHeight: string; euiRangeLevelColors: { primary: string; success: string; warning: string; danger: string; }; textareaResizing: { vertical: string; horizontal: string; both: string; none: string; }; euiHeaderLinksGutterSizes: { gutterXS: string; gutterS: string; gutterM: string; gutterL: string; }; ruleMargins: { marginXSmall: string; marginSmall: string; marginMedium: string; marginLarge: string; marginXLarge: string; marginXXLarge: string; }; euiIconLoadingOpacity: number; euiIconColors: { accent: string; danger: string; ghost: string; primary: string; secondary: string; success: string; subdued: string; text: string; warning: string; inherit: string; }; euiIconSizes: { small: string; medium: string; large: string; xLarge: string; xxLarge: string; }; euiKeyPadMenuSize: string; euiKeyPadMenuItemBetaBadgeSize: string; euiLinkColors: { subdued: string; primary: string; secondary: string; accent: string; warning: string; danger: string; text: string; ghost: string; }; euiListGroupItemHoverBackground: string; euiListGroupItemHoverBackgroundGhost: string; euiListGroupGutterTypes: { gutterSmall: string; gutterMedium: string; }; euiListGroupItemColorTypes: { primary: string; text: string; subdued: string; ghost: string; }; euiListGroupItemSizeTypes: { xSmall: string; small: string; medium: string; large: string; }; euiGradientStartStop: string; euiGradientMiddle: string; browserDefaultFontSize: string; euiMarkdownEditorMinHeight: string; euiPopoverArrowSize: string; euiPopoverTranslateDistance: string; euiProgressSizes: { xs: string; s: string; m: string; l: string; }; euiProgressColors: { primary: string; secondary: string; success: string; warning: string; danger: string; accent: string; subdued: string; vis0: string; vis1: string; vis2: string; vis3: string; vis4: string; vis5: string; vis6: string; vis7: string; vis8: string; vis9: string; customColor: string; }; euiResizableButtonTransitionSpeed: string; euiResizableButtonSize: string; euiSelectableListItemBorder: string; euiSelectableListItemPadding: string; euiSelectableTemplateSitewideTypes: { application: { color: string; 'font-weight': number; }; deployment: { color: string; 'font-weight': number; }; article: { color: string; 'font-weight': number; }; case: { color: string; 'font-weight': number; }; platform: { color: string; 'font-weight': number; }; }; euiSideNavEmphasizedBackgroundColor: string; euiSideNavRootTextcolor: string; euiSideNavBranchTextcolor: string; euiSideNavSelectedTextcolor: string; spacerSizes: { xs: string; s: string; m: string; l: string; xl: string; xxl: string; }; euiStepNumberSize: string; euiStepNumberSmallSize: string; euiStepNumberMargin: string; euiStepStatusColorsToFade: { warning: string; danger: string; disabled: string; incomplete: string; }; euiSuggestItemColors: { tint0: string; tint1: string; tint2: string; tint3: string; tint4: string; tint5: string; tint6: string; tint7: string; tint8: string; tint9: string; tint10: string; }; euiTableCellContentPadding: string; euiTableCellContentPaddingCompressed: string; euiTableCellCheckboxWidth: string; euiTableActionsAreaWidth: string; euiTableHoverColor: string; euiTableSelectedColor: string; euiTableHoverSelectedColor: string; euiTableActionsBorderColor: string; euiTableHoverClickableColor: string; euiTableFocusClickableColor: string; euiTabFontSize: string; euiTabFontSizeS: string; euiTabFontSizeL: string; euiTextColors: { default: string; subdued: string; secondary: string; accent: string; warning: string; danger: string; ghost: string; }; euiTextConstrainedMaxWidth: string; euiToastWidth: string; euiToastTypes: { primary: string; success: string; warning: string; danger: string; }; euiTokenGrayColor: string; euiTokenTypes: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; gray: { graphic: string; behindText: string; }; }; euiTokenTypeKeys: string; euiAnimSlightBounce: string; euiAnimSlightResistance: string; euiAnimSpeedExtraFast: string; euiAnimSpeedFast: string; euiAnimSpeedNormal: string; euiAnimSpeedSlow: string; euiAnimSpeedExtraSlow: string; euiBorderWidthThin: string; euiBorderWidthThick: string; euiBorderColor: string; euiBorderRadius: string; euiBorderRadiusSmall: string; euiBorderThick: string; euiBorderThin: string; euiBorderEditable: string; euiButtonHeight: string; euiButtonHeightSmall: string; euiButtonHeightXSmall: string; euiButtonColorDisabled: string; euiButtonColorDisabledText: string; euiButtonColorGhostDisabled: string; euiButtonTypes: { primary: string; secondary: string; warning: string; danger: string; ghost: string; text: string; }; euiColorGhost: string; euiColorInk: string; euiColorPrimary: string; euiColorSecondary: string; euiColorAccent: string; euiColorSuccess: string; euiColorWarning: string; euiColorDanger: string; euiColorEmptyShade: string; euiColorLightestShade: string; euiColorLightShade: string; euiColorMediumShade: string; euiColorDarkShade: string; euiColorDarkestShade: string; euiColorFullShade: string; euiPageBackgroundColor: string; euiColorHighlight: string; euiTextColor: string; euiTitleColor: string; euiTextSubduedColor: string; euiColorDisabled: string; euiColorPrimaryText: string; euiColorSecondaryText: string; euiColorAccentText: string; euiColorWarningText: string; euiColorDangerText: string; euiColorDisabledText: string; euiColorSuccessText: string; euiLinkColor: string; euiPaletteColorBlind: { euiColorVis0: { graphic: string; behindText: string; }; euiColorVis1: { graphic: string; behindText: string; }; euiColorVis2: { graphic: string; behindText: string; }; euiColorVis3: { graphic: string; behindText: string; }; euiColorVis4: { graphic: string; behindText: string; }; euiColorVis5: { graphic: string; behindText: string; }; euiColorVis6: { graphic: string; behindText: string; }; euiColorVis7: { graphic: string; behindText: string; }; euiColorVis8: { graphic: string; behindText: string; }; euiColorVis9: { graphic: string; behindText: string; }; }; euiPaletteColorBlindKeys: string; euiColorVis0: string; euiColorVis1: string; euiColorVis2: string; euiColorVis3: string; euiColorVis4: string; euiColorVis5: string; euiColorVis6: string; euiColorVis7: string; euiColorVis8: string; euiColorVis9: string; euiColorVis0_behindText: string; euiColorVis1_behindText: string; euiColorVis2_behindText: string; euiColorVis3_behindText: string; euiColorVis4_behindText: string; euiColorVis5_behindText: string; euiColorVis6_behindText: string; euiColorVis7_behindText: string; euiColorVis8_behindText: string; euiColorVis9_behindText: string; euiColorChartLines: string; euiColorChartBand: string; euiCodeBlockBackgroundColor: string; euiCodeBlockColor: string; euiCodeBlockSelectedBackgroundColor: string; euiCodeBlockCommentColor: string; euiCodeBlockSelectorTagColor: string; euiCodeBlockStringColor: string; euiCodeBlockTagColor: string; euiCodeBlockNameColor: string; euiCodeBlockNumberColor: string; euiCodeBlockKeywordColor: string; euiCodeBlockFunctionTitleColor: string; euiCodeBlockTypeColor: string; euiCodeBlockAttributeColor: string; euiCodeBlockSymbolColor: string; euiCodeBlockParamsColor: string; euiCodeBlockMetaColor: string; euiCodeBlockTitleColor: string; euiCodeBlockSectionColor: string; euiCodeBlockAdditionColor: string; euiCodeBlockDeletionColor: string; euiCodeBlockSelectorClassColor: string; euiCodeBlockSelectorIdColor: string; euiFormMaxWidth: string; euiFormControlHeight: string; euiFormControlCompressedHeight: string; euiFormControlPadding: string; euiFormControlCompressedPadding: string; euiFormControlBorderRadius: number; euiFormControlCompressedBorderRadius: string; euiRadioSize: string; euiCheckBoxSize: string; euiCheckboxBorderRadius: string; euiSwitchHeight: string; euiSwitchWidth: string; euiSwitchThumbSize: string; euiSwitchIconHeight: string; euiSwitchHeightCompressed: string; euiSwitchWidthCompressed: string; euiSwitchThumbSizeCompressed: string; euiSwitchHeightMini: string; euiSwitchWidthMini: string; euiSwitchThumbSizeMini: string; euiFormBackgroundColor: string; euiFormBackgroundDisabledColor: string; euiFormBackgroundReadOnlyColor: string; euiFormBorderOpaqueColor: string; euiFormBorderColor: string; euiFormBorderDisabledColor: string; euiFormCustomControlDisabledIconColor: string; euiFormCustomControlBorderColor: string; euiFormControlDisabledColor: string; euiFormControlBoxShadow: string; euiFormControlPlaceholderText: string; euiFormInputGroupLabelBackground: string; euiFormInputGroupBorder: string; euiSwitchOffColor: string; euiFormControlLayoutGroupInputHeight: string; euiFormControlLayoutGroupInputCompressedHeight: string; euiFormControlLayoutGroupInputCompressedBorderRadius: string; euiRangeTrackColor: string; euiRangeThumbRadius: string; euiRangeThumbHeight: string; euiRangeThumbWidth: string; euiRangeThumbBorderColor: string; euiRangeTrackWidth: string; euiRangeTrackHeight: string; euiRangeTrackBorderWidth: number; euiRangeTrackBorderColor: string; euiRangeTrackRadius: string; euiRangeDisabledOpacity: number; euiRangeHighlightHeight: string; euiHeaderBackgroundColor: string; euiHeaderDarkBackgroundColor: string; euiHeaderBorderColor: string; euiHeaderBreadcrumbColor: string; euiHeaderHeight: string; euiHeaderChildSize: string; euiHeaderHeightCompensation: string; euiPageDefaultMaxWidth: string; euiPageSidebarMinWidth: string; euiPanelPaddingModifiers: { paddingSmall: string; paddingMedium: string; paddingLarge: string; }; euiPanelBorderRadiusModifiers: { borderRadiusNone: number; borderRadiusMedium: string; }; euiPanelBackgroundColorModifiers: { transparent: string; plain: string; subdued: string; accent: string; primary: string; success: string; warning: string; danger: string; }; euiBreakpoints: { xs: number; s: string; m: string; l: string; xl: string; }; euiBreakpointKeys: string; euiShadowColor: string; euiShadowColorLarge: string; euiSize: string; euiSizeXS: string; euiSizeS: string; euiSizeM: string; euiSizeL: string; euiSizeXL: string; euiSizeXXL: string; euiButtonMinWidth: string; euiScrollBar: string; euiScrollBarCorner: string; euiFocusRingColor: string; euiFocusRingAnimStartColor: string; euiFocusRingAnimStartSize: string; euiFocusRingAnimStartSizeLarge: string; euiFocusRingSizeLarge: string; euiFocusRingSize: string; euiFocusTransparency: number; euiFocusBackgroundColor: string; euiTooltipBackgroundColor: string; euiTooltipAnimations: { top: string; left: string; bottom: string; right: string; }; euiFontFamily: string; euiCodeFontFamily: string; euiFontFeatureSettings: string; euiTextScale: string; euiFontSize: string; euiFontSizeXS: string; euiFontSizeS: string; euiFontSizeM: string; euiFontSizeL: string; euiFontSizeXL: string; euiFontSizeXXL: string; euiLineHeight: number; euiBodyLineHeight: number; euiFontWeightLight: number; euiFontWeightRegular: number; euiFontWeightMedium: number; euiFontWeightSemiBold: number; euiFontWeightBold: number; euiCodeFontWeightRegular: number; euiCodeFontWeightBold: number; euiTitles: { xxxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xxs: { 'font-size': string; 'line-height': string; 'font-weight': number; }; xs: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; s: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; m: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; l: { 'font-size': string; 'line-height': string; 'font-weight': number; 'letter-spacing': string; }; }; euiZLevel0: number; euiZLevel1: number; euiZLevel2: number; euiZLevel3: number; euiZLevel4: number; euiZLevel5: number; euiZLevel6: number; euiZLevel7: number; euiZLevel8: number; euiZLevel9: number; euiZContent: number; euiZHeader: number; euiZContentMenu: number; euiZFlyout: number; euiZNavigation: number; euiZMask: number; euiZModal: number; euiZToastList: number; }" ], "source": { "path": "src/plugins/kibana_react/common/eui_styled_components.tsx", diff --git a/api_docs/kibana_utils.json b/api_docs/kibana_utils.json index 66eefa9097bfb..99296f3235f0f 100644 --- a/api_docs/kibana_utils.json +++ b/api_docs/kibana_utils.json @@ -3805,7 +3805,7 @@ "description": [], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false }, @@ -3828,7 +3828,7 @@ ], "source": { "path": "src/core/public/application/types.ts", - "lineNumber": 704 + "lineNumber": 731 }, "deprecated": false } diff --git a/api_docs/lens.json b/api_docs/lens.json index 196361f65682b..782d060f398cb 100644 --- a/api_docs/lens.json +++ b/api_docs/lens.json @@ -87,7 +87,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx", - "lineNumber": 45 + "lineNumber": 52 }, "deprecated": false, "children": [ @@ -103,7 +103,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/cardinality.tsx", - "lineNumber": 48 + "lineNumber": 55 }, "deprecated": false } @@ -119,7 +119,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 42 + "lineNumber": 48 }, "deprecated": false, "children": [ @@ -136,7 +136,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 43 + "lineNumber": 49 }, "deprecated": false }, @@ -149,7 +149,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 44 + "lineNumber": 50 }, "deprecated": false }, @@ -166,7 +166,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/datatable_visualization/visualization.tsx", - "lineNumber": 45 + "lineNumber": 51 }, "deprecated": false } @@ -199,7 +199,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx", - "lineNumber": 43 + "lineNumber": 44 }, "deprecated": false, "children": [ @@ -215,7 +215,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx", - "lineNumber": 44 + "lineNumber": 45 }, "deprecated": false }, @@ -231,7 +231,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/date_histogram.tsx", - "lineNumber": 45 + "lineNumber": 46 }, "deprecated": false } @@ -308,7 +308,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", - "lineNumber": 45 + "lineNumber": 46 }, "deprecated": false, "children": [ @@ -324,7 +324,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", - "lineNumber": 46 + "lineNumber": 47 }, "deprecated": false }, @@ -340,7 +340,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/column_types.ts", - "lineNumber": 47 + "lineNumber": 48 }, "deprecated": false } @@ -407,7 +407,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx", - "lineNumber": 80 + "lineNumber": 87 }, "deprecated": false, "children": [ @@ -423,7 +423,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx", - "lineNumber": 81 + "lineNumber": 88 }, "deprecated": false }, @@ -439,7 +439,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/last_value.tsx", - "lineNumber": 82 + "lineNumber": 89 }, "deprecated": false } @@ -522,7 +522,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 83 + "lineNumber": 84 }, "deprecated": false, "children": [ @@ -558,7 +558,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 92 + "lineNumber": 93 }, "deprecated": false }, @@ -580,7 +580,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false, "returnComment": [], @@ -599,7 +599,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false }, @@ -615,7 +615,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 101 + "lineNumber": 102 }, "deprecated": false } @@ -635,7 +635,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 105 + "lineNumber": 106 }, "deprecated": false, "returnComment": [], @@ -657,7 +657,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/plugin.ts", - "lineNumber": 110 + "lineNumber": 111 }, "deprecated": false, "returnComment": [], @@ -720,7 +720,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 363 + "lineNumber": 362 }, "deprecated": false, "children": [ @@ -736,7 +736,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 365 + "lineNumber": 364 }, "deprecated": false }, @@ -749,7 +749,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 368 + "lineNumber": 367 }, "deprecated": false }, @@ -767,7 +767,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 374 + "lineNumber": 373 }, "deprecated": false } @@ -800,7 +800,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx", - "lineNumber": 24 + "lineNumber": 25 }, "deprecated": false, "children": [ @@ -816,7 +816,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx", - "lineNumber": 25 + "lineNumber": 26 }, "deprecated": false }, @@ -832,7 +832,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/percentile.tsx", - "lineNumber": 26 + "lineNumber": 27 }, "deprecated": false } @@ -1039,7 +1039,7 @@ "label": "numberDisplay", "description": [], "signature": [ - "\"hidden\" | \"value\" | \"percent\"" + "\"percent\" | \"hidden\" | \"value\"" ], "source": { "path": "x-pack/plugins/lens/public/pie_visualization/types.ts", @@ -1156,7 +1156,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", - "lineNumber": 56 + "lineNumber": 161 }, "deprecated": false, "children": [ @@ -1172,7 +1172,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", - "lineNumber": 57 + "lineNumber": 162 }, "deprecated": false }, @@ -1188,7 +1188,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/terms/index.tsx", - "lineNumber": 58 + "lineNumber": 163 }, "deprecated": false } @@ -1277,7 +1277,13 @@ "label": "yConfig", "description": [], "signature": [ - "YConfig", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.YConfig", + "text": "YConfig" + }, "[] | undefined" ], "source": { @@ -1353,7 +1359,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 474 + "lineNumber": 475 }, "deprecated": false, "children": [ @@ -1369,7 +1375,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 475 + "lineNumber": 476 }, "deprecated": false }, @@ -1391,7 +1397,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 476 + "lineNumber": 477 }, "deprecated": false }, @@ -1407,7 +1413,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 477 + "lineNumber": 478 }, "deprecated": false }, @@ -1423,7 +1429,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 478 + "lineNumber": 479 }, "deprecated": false }, @@ -1440,7 +1446,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 479 + "lineNumber": 480 }, "deprecated": false }, @@ -1457,7 +1463,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 480 + "lineNumber": 481 }, "deprecated": false }, @@ -1480,7 +1486,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 481 + "lineNumber": 482 }, "deprecated": false }, @@ -1496,7 +1502,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 482 + "lineNumber": 483 }, "deprecated": false }, @@ -1512,7 +1518,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 483 + "lineNumber": 484 }, "deprecated": false }, @@ -1528,7 +1534,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 484 + "lineNumber": 485 }, "deprecated": false }, @@ -1551,7 +1557,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 485 + "lineNumber": 486 }, "deprecated": false }, @@ -1574,7 +1580,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 486 + "lineNumber": 487 }, "deprecated": false }, @@ -1597,7 +1603,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 487 + "lineNumber": 488 }, "deprecated": false }, @@ -1613,7 +1619,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 488 + "lineNumber": 489 }, "deprecated": false }, @@ -1629,7 +1635,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 489 + "lineNumber": 490 }, "deprecated": false }, @@ -1645,7 +1651,84 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 490 + "lineNumber": 491 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.XYState.valuesInLegend", + "type": "CompoundType", + "tags": [], + "label": "valuesInLegend", + "description": [], + "signature": [ + "boolean | undefined" + ], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 492 + }, + "deprecated": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig", + "type": "Interface", + "tags": [], + "label": "YConfig", + "description": [], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 418 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "lens", + "id": "def-public.YConfig.forAccessor", + "type": "string", + "tags": [], + "label": "forAccessor", + "description": [], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 419 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig.axisMode", + "type": "CompoundType", + "tags": [], + "label": "axisMode", + "description": [], + "signature": [ + "\"left\" | \"right\" | \"auto\" | undefined" + ], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 420 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-public.YConfig.color", + "type": "string", + "tags": [], + "label": "color", + "description": [], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", + "lineNumber": 421 }, "deprecated": false } @@ -1676,7 +1759,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 132 + "lineNumber": 139 }, "deprecated": false, "initialIsOpen": false @@ -1742,7 +1825,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/cumulative_sum.tsx", - "lineNumber": 33 + "lineNumber": 34 }, "deprecated": false, "initialIsOpen": false @@ -1759,7 +1842,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/types.ts", - "lineNumber": 352 + "lineNumber": 351 }, "deprecated": false, "initialIsOpen": false @@ -1875,7 +1958,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", - "lineNumber": 79 + "lineNumber": 80 }, "deprecated": false, "initialIsOpen": false @@ -1992,7 +2075,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", - "lineNumber": 58 + "lineNumber": 59 }, "deprecated": false, "initialIsOpen": false @@ -2018,7 +2101,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 134 + "lineNumber": 141 }, "deprecated": false, "initialIsOpen": false @@ -2044,7 +2127,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 135 + "lineNumber": 142 }, "deprecated": false, "initialIsOpen": false @@ -2070,7 +2153,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 133 + "lineNumber": 140 }, "deprecated": false, "initialIsOpen": false @@ -2090,7 +2173,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/calculations/moving_average.tsx", - "lineNumber": 47 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false @@ -2109,7 +2192,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/index.ts", - "lineNumber": 498 + "lineNumber": 533 }, "deprecated": false, "initialIsOpen": false @@ -2209,7 +2292,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/metrics.tsx", - "lineNumber": 131 + "lineNumber": 138 }, "deprecated": false, "initialIsOpen": false @@ -2296,7 +2379,7 @@ ], "source": { "path": "x-pack/plugins/lens/public/xy_visualization/types.ts", - "lineNumber": 471 + "lineNumber": 472 }, "deprecated": false, "initialIsOpen": false @@ -2350,7 +2433,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 31 + "lineNumber": 34 }, "deprecated": false, "children": [ @@ -2366,7 +2449,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 35 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -2389,7 +2472,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 35 + "lineNumber": 38 }, "deprecated": false, "isRequired": true @@ -2433,7 +2516,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 39 + "lineNumber": 42 }, "deprecated": false, "children": [ @@ -2464,7 +2547,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 39 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -2487,7 +2570,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 39 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -2523,7 +2606,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 59 + "lineNumber": 63 }, "deprecated": false, "children": [ @@ -2545,7 +2628,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 59 + "lineNumber": 63 }, "deprecated": false, "isRequired": true @@ -2568,7 +2651,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 59 + "lineNumber": 63 }, "deprecated": false, "isRequired": true @@ -2588,7 +2671,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 66 + "lineNumber": 70 }, "deprecated": false, "children": [], @@ -2609,7 +2692,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 21 + "lineNumber": 23 }, "deprecated": false, "children": [ @@ -2632,7 +2715,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 22 + "lineNumber": 24 }, "deprecated": false }, @@ -2655,7 +2738,29 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 23 + "lineNumber": 25 + }, + "deprecated": false + }, + { + "parentPluginId": "lens", + "id": "def-server.PluginSetupContract.embeddable", + "type": "Object", + "tags": [], + "label": "embeddable", + "description": [], + "signature": [ + { + "pluginId": "embeddable", + "scope": "server", + "docId": "kibEmbeddablePluginApi", + "section": "def-server.EmbeddableSetup", + "text": "EmbeddableSetup" + } + ], + "source": { + "path": "x-pack/plugins/lens/server/plugin.tsx", + "lineNumber": 26 }, "deprecated": false } @@ -2671,7 +2776,7 @@ "description": [], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 26 + "lineNumber": 29 }, "deprecated": false, "children": [ @@ -2694,7 +2799,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 27 + "lineNumber": 30 }, "deprecated": false }, @@ -2716,7 +2821,7 @@ ], "source": { "path": "x-pack/plugins/lens/server/plugin.tsx", - "lineNumber": 28 + "lineNumber": 31 }, "deprecated": false } diff --git a/api_docs/licensing.json b/api_docs/licensing.json index 1451cff869f47..862a00e65215f 100644 --- a/api_docs/licensing.json +++ b/api_docs/licensing.json @@ -45,7 +45,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\" | undefined" + "\"invalid\" | \"active\" | \"expired\" | undefined" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -381,7 +381,7 @@ "\nThe state of checking the results of a license type meeting the license minimum." ], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -492,7 +492,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -839,7 +839,7 @@ "label": "LicenseCheckState", "description": [], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -856,7 +856,7 @@ "label": "LicenseStatus", "description": [], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -987,7 +987,7 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/public/plugin.tsx", - "lineNumber": 82 + "lineNumber": 84 } }, { @@ -1001,7 +1001,7 @@ "plugin": "ml", "link": { "path": "x-pack/plugins/ml/public/plugin.ts", - "lineNumber": 136 + "lineNumber": 141 } }, { @@ -1022,7 +1022,7 @@ "plugin": "fleet", "link": { "path": "x-pack/plugins/fleet/public/plugin.ts", - "lineNumber": 97 + "lineNumber": 94 } }, { @@ -2078,7 +2078,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\" | undefined" + "\"invalid\" | \"active\" | \"expired\" | undefined" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -2414,7 +2414,7 @@ "\nThe state of checking the results of a license type meeting the license minimum." ], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -2581,7 +2581,7 @@ "\nThe validity status of the license." ], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -2947,7 +2947,7 @@ "label": "LicenseCheckState", "description": [], "signature": [ - "\"valid\" | \"invalid\" | \"expired\" | \"unavailable\"" + "\"valid\" | \"invalid\" | \"unavailable\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -2964,7 +2964,7 @@ "label": "LicenseStatus", "description": [], "signature": [ - "\"active\" | \"invalid\" | \"expired\"" + "\"invalid\" | \"active\" | \"expired\"" ], "source": { "path": "x-pack/plugins/licensing/common/types.ts", @@ -3074,7 +3074,7 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 225 + "lineNumber": 229 } }, { @@ -3119,13 +3119,6 @@ "lineNumber": 139 } }, - { - "plugin": "indexManagement", - "link": { - "path": "x-pack/plugins/index_management/server/services/license.ts", - "lineNumber": 36 - } - }, { "plugin": "remoteClusters", "link": { @@ -3137,7 +3130,7 @@ "plugin": "fleet", "link": { "path": "x-pack/plugins/fleet/server/plugin.ts", - "lineNumber": 213 + "lineNumber": 214 } }, { @@ -3154,18 +3147,11 @@ "lineNumber": 41 } }, - { - "plugin": "ingestPipelines", - "link": { - "path": "x-pack/plugins/ingest_pipelines/server/services/license.ts", - "lineNumber": 40 - } - }, { "plugin": "maps", "link": { "path": "x-pack/plugins/maps/server/plugin.ts", - "lineNumber": 164 + "lineNumber": 167 } }, { diff --git a/api_docs/lists.json b/api_docs/lists.json index 90f5cd726287b..061227499d67f 100644 --- a/api_docs/lists.json +++ b/api_docs/lists.json @@ -341,7 +341,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 56 + "lineNumber": 59 }, "deprecated": false, "children": [ @@ -357,7 +357,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 61 + "lineNumber": 64 }, "deprecated": false, "children": [ @@ -373,7 +373,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 61 + "lineNumber": 64 }, "deprecated": false, "isRequired": true @@ -395,7 +395,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 66 + "lineNumber": 69 }, "deprecated": false, "children": [ @@ -411,7 +411,45 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 66 + "lineNumber": 69 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "lists", + "id": "def-server.ExceptionListClient.getExceptionListSummary", + "type": "Function", + "tags": [], + "label": "getExceptionListSummary", + "description": [], + "signature": [ + "({ listId, id, namespaceType, }: ", + "GetExceptionListSummaryOptions", + ") => Promise<{ windows: number; linux: number; macos: number; total: number; } | null>" + ], + "source": { + "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", + "lineNumber": 78 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "lists", + "id": "def-server.ExceptionListClient.getExceptionListSummary.$1", + "type": "Object", + "tags": [], + "label": "{\n listId,\n id,\n namespaceType,\n }", + "description": [], + "signature": [ + "GetExceptionListSummaryOptions" + ], + "source": { + "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", + "lineNumber": 78 }, "deprecated": false, "isRequired": true @@ -429,11 +467,11 @@ "signature": [ "({ itemId, id, namespaceType, }: ", "GetExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 75 + "lineNumber": 87 }, "deprecated": false, "children": [ @@ -449,7 +487,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 75 + "lineNumber": 87 }, "deprecated": false, "isRequired": true @@ -471,7 +509,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 90 + "lineNumber": 102 }, "deprecated": false, "children": [], @@ -493,7 +531,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 102 + "lineNumber": 114 }, "deprecated": false, "children": [], @@ -513,7 +551,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 114 + "lineNumber": 126 }, "deprecated": false, "children": [], @@ -531,11 +569,11 @@ "signature": [ "({ comments, description, entries, itemId, meta, name, osTypes, tags, type, }: ", "CreateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 128 + "lineNumber": 140 }, "deprecated": false, "children": [ @@ -551,7 +589,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 128 + "lineNumber": 140 }, "deprecated": false, "isRequired": true @@ -571,11 +609,11 @@ "signature": [ "({ _version, comments, description, entries, id, itemId, meta, name, osTypes, tags, type, }: ", "UpdateEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 164 + "lineNumber": 176 }, "deprecated": false, "children": [ @@ -591,7 +629,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 164 + "lineNumber": 176 }, "deprecated": false, "isRequired": true @@ -611,11 +649,11 @@ "signature": [ "({ itemId, id, }: ", "GetEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 200 + "lineNumber": 212 }, "deprecated": false, "children": [ @@ -631,7 +669,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 200 + "lineNumber": 212 }, "deprecated": false, "isRequired": true @@ -653,7 +691,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 208 + "lineNumber": 220 }, "deprecated": false, "children": [ @@ -669,7 +707,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 208 + "lineNumber": 220 }, "deprecated": false, "isRequired": true @@ -691,7 +729,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 235 + "lineNumber": 247 }, "deprecated": false, "children": [ @@ -707,7 +745,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 235 + "lineNumber": 247 }, "deprecated": false, "isRequired": true @@ -729,7 +767,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 266 + "lineNumber": 278 }, "deprecated": false, "children": [ @@ -745,7 +783,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 266 + "lineNumber": 278 }, "deprecated": false, "isRequired": true @@ -769,11 +807,11 @@ "section": "def-server.CreateExceptionListItemOptions", "text": "CreateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 280 + "lineNumber": 292 }, "deprecated": false, "children": [ @@ -795,7 +833,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 280 + "lineNumber": 292 }, "deprecated": false, "isRequired": true @@ -819,11 +857,11 @@ "section": "def-server.UpdateExceptionListItemOptions", "text": "UpdateExceptionListItemOptions" }, - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 311 + "lineNumber": 323 }, "deprecated": false, "children": [ @@ -845,7 +883,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 311 + "lineNumber": 323 }, "deprecated": false, "isRequired": true @@ -863,11 +901,11 @@ "signature": [ "({ id, itemId, namespaceType, }: ", "DeleteExceptionListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 344 + "lineNumber": 356 }, "deprecated": false, "children": [ @@ -883,7 +921,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 344 + "lineNumber": 356 }, "deprecated": false, "isRequired": true @@ -905,7 +943,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 358 + "lineNumber": 370 }, "deprecated": false, "children": [ @@ -921,7 +959,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 358 + "lineNumber": 370 }, "deprecated": false, "isRequired": true @@ -941,11 +979,11 @@ "signature": [ "({ id, itemId, }: ", "DeleteEndpointListItemOptions", - ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" + ") => Promise<{ _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 373 + "lineNumber": 385 }, "deprecated": false, "children": [ @@ -961,7 +999,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 373 + "lineNumber": 385 }, "deprecated": false, "isRequired": true @@ -979,11 +1017,11 @@ "signature": [ "({ listId, filter, perPage, page, sortField, sortOrder, namespaceType, }: ", "FindExceptionListItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 386 + "lineNumber": 398 }, "deprecated": false, "children": [ @@ -999,7 +1037,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 386 + "lineNumber": 398 }, "deprecated": false, "isRequired": true @@ -1017,11 +1055,11 @@ "signature": [ "({ listId, filter, perPage, page, sortField, sortOrder, namespaceType, }: ", "FindExceptionListsItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 408 + "lineNumber": 420 }, "deprecated": false, "children": [ @@ -1037,7 +1075,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 408 + "lineNumber": 420 }, "deprecated": false, "isRequired": true @@ -1055,11 +1093,11 @@ "signature": [ "({ perPage, page, sortField, sortOrder, valueListId, }: ", "FindValueListExceptionListsItems", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 430 + "lineNumber": 442 }, "deprecated": false, "children": [ @@ -1075,7 +1113,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 430 + "lineNumber": 442 }, "deprecated": false, "isRequired": true @@ -1097,7 +1135,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 448 + "lineNumber": 460 }, "deprecated": false, "children": [ @@ -1113,7 +1151,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 448 + "lineNumber": 460 }, "deprecated": false, "isRequired": true @@ -1133,11 +1171,11 @@ "signature": [ "({ filter, perPage, page, sortField, sortOrder, }: ", "FindEndpointListItemOptions", - ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ data: { _version: string | undefined; comments: ({ comment: string; created_at: string; created_by: string; id: string; } & { updated_at?: string | undefined; updated_by?: string | undefined; })[]; created_at: string; created_by: string; description: string; entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]; id: string; item_id: string; list_id: string; meta: object | undefined; name: string; namespace_type: \"single\" | \"agnostic\"; os_types: (\"windows\" | \"linux\" | \"macos\")[]; tags: string[]; tie_breaker_id: string; type: \"simple\"; updated_at: string; updated_by: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 476 + "lineNumber": 488 }, "deprecated": false, "children": [ @@ -1153,7 +1191,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client.ts", - "lineNumber": 476 + "lineNumber": 488 }, "deprecated": false, "isRequired": true @@ -1259,7 +1297,7 @@ "signature": [ "({ id }: ", "GetListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1297,7 +1335,7 @@ "signature": [ "({ id, deserializer, immutable, serializer, name, description, type, meta, version, }: ", "CreateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1335,7 +1373,7 @@ "signature": [ "({ id, deserializer, serializer, name, description, immutable, type, meta, version, }: ", "CreateListIfItDoesNotExistOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1733,7 +1771,7 @@ "signature": [ "({ id }: ", "DeleteListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1771,7 +1809,7 @@ "signature": [ "({ listId, value, type, }: ", "DeleteListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1809,7 +1847,7 @@ "signature": [ "({ id }: ", "DeleteListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1885,7 +1923,7 @@ "signature": [ "({ deserializer, serializer, type, listId, stream, meta, version, }: ", "ImportListItemsToStreamOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1923,7 +1961,7 @@ "signature": [ "({ listId, value, type, }: ", "GetListItemByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1961,7 +1999,7 @@ "signature": [ "({ id, deserializer, serializer, listId, value, type, meta, }: ", "CreateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -1999,7 +2037,7 @@ "signature": [ "({ _version, id, value, meta, }: ", "UpdateListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2037,7 +2075,7 @@ "signature": [ "({ _version, id, name, description, meta, version, }: ", "UpdateListOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2075,7 +2113,7 @@ "signature": [ "({ id }: ", "GetListItemOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2113,7 +2151,7 @@ "signature": [ "({ type, listId, value, }: ", "GetListItemsByValueOptions", - ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" + ") => Promise<{ _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2151,7 +2189,7 @@ "signature": [ "({ type, listId, value, }: ", "SearchListItemByValuesOptions", - ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" + ") => Promise<{ items: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; value: unknown; }[]>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2189,7 +2227,7 @@ "signature": [ "({ filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; description: string; deserializer: string | undefined; id: string; immutable: boolean; meta: object | undefined; name: string; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; version: number; }[]; page: number; per_page: number; total: number; }>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2227,7 +2265,7 @@ "signature": [ "({ listId, filter, currentIndexPosition, perPage, page, sortField, sortOrder, searchAfter, }: ", "FindListItemOptions", - ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" + ") => Promise<{ cursor: string; data: { _version: string | undefined; created_at: string; created_by: string; deserializer: string | undefined; id: string; list_id: string; meta: object | undefined; serializer: string | undefined; tie_breaker_id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; updated_at: string; updated_by: string; value: string; }[]; page: number; per_page: number; total: number; } | null>" ], "source": { "path": "x-pack/plugins/lists/server/services/lists/list_client.ts", @@ -2270,7 +2308,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 118 + "lineNumber": 124 }, "deprecated": false, "children": [ @@ -2286,7 +2324,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 119 + "lineNumber": 125 }, "deprecated": false }, @@ -2298,11 +2336,11 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 120 + "lineNumber": 126 }, "deprecated": false }, @@ -2315,7 +2353,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 121 + "lineNumber": 127 }, "deprecated": false }, @@ -2328,7 +2366,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 122 + "lineNumber": 128 }, "deprecated": false }, @@ -2344,7 +2382,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 123 + "lineNumber": 129 }, "deprecated": false }, @@ -2357,7 +2395,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 124 + "lineNumber": 130 }, "deprecated": false }, @@ -2373,7 +2411,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 125 + "lineNumber": 131 }, "deprecated": false }, @@ -2386,7 +2424,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 126 + "lineNumber": 132 }, "deprecated": false }, @@ -2402,7 +2440,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 127 + "lineNumber": 133 }, "deprecated": false }, @@ -2418,7 +2456,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 128 + "lineNumber": 134 }, "deprecated": false }, @@ -2434,7 +2472,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 129 + "lineNumber": 135 }, "deprecated": false } @@ -2859,7 +2897,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -2981,7 +3019,7 @@ "description": [], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 144 + "lineNumber": 150 }, "deprecated": false, "children": [ @@ -2997,7 +3035,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 145 + "lineNumber": 151 }, "deprecated": false }, @@ -3013,7 +3051,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 146 + "lineNumber": 152 }, "deprecated": false }, @@ -3025,11 +3063,11 @@ "label": "entries", "description": [], "signature": [ - "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"integer\" | \"byte\" | \"float\" | \"half_float\" | \"integer_range\" | \"float_range\" | \"long_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" + "({ field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; } | { field: string; list: { id: string; type: \"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"ip\" | \"date_nanos\" | \"geo_point\" | \"geo_shape\" | \"binary\" | \"short\" | \"date_range\" | \"ip_range\" | \"shape\" | \"float\" | \"half_float\" | \"integer\" | \"byte\" | \"long_range\" | \"integer_range\" | \"float_range\" | \"double_range\"; }; operator: \"excluded\" | \"included\"; type: \"list\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { entries: ({ field: string; operator: \"excluded\" | \"included\"; type: \"exists\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match\"; value: string; } | { field: string; operator: \"excluded\" | \"included\"; type: \"match_any\"; value: string[]; })[]; field: string; type: \"nested\"; } | { field: string; operator: \"excluded\" | \"included\"; type: \"wildcard\"; value: string; })[]" ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 147 + "lineNumber": 153 }, "deprecated": false }, @@ -3045,7 +3083,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 148 + "lineNumber": 154 }, "deprecated": false }, @@ -3061,7 +3099,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 149 + "lineNumber": 155 }, "deprecated": false }, @@ -3077,7 +3115,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 150 + "lineNumber": 156 }, "deprecated": false }, @@ -3093,7 +3131,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 151 + "lineNumber": 157 }, "deprecated": false }, @@ -3109,7 +3147,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 152 + "lineNumber": 158 }, "deprecated": false }, @@ -3125,7 +3163,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 153 + "lineNumber": 159 }, "deprecated": false }, @@ -3141,7 +3179,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 154 + "lineNumber": 160 }, "deprecated": false }, @@ -3157,7 +3195,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 155 + "lineNumber": 161 }, "deprecated": false }, @@ -3173,7 +3211,7 @@ ], "source": { "path": "x-pack/plugins/lists/server/services/exception_lists/exception_list_client_types.ts", - "lineNumber": 156 + "lineNumber": 162 }, "deprecated": false } diff --git a/api_docs/maps.json b/api_docs/maps.json index d418518dcb0d2..9c1c7243a41bc 100644 --- a/api_docs/maps.json +++ b/api_docs/maps.json @@ -57,7 +57,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 95 + "lineNumber": 93 }, "deprecated": false, "children": [ @@ -70,7 +70,7 @@ "description": [], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 98 + "lineNumber": 96 }, "deprecated": false }, @@ -86,7 +86,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "children": [ @@ -102,7 +102,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "isRequired": true @@ -125,7 +125,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "isRequired": true @@ -165,7 +165,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 118 + "lineNumber": 115 }, "deprecated": false, "isRequired": false @@ -194,7 +194,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 200 + "lineNumber": 194 }, "deprecated": false, "children": [ @@ -216,7 +216,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 201 + "lineNumber": 195 }, "deprecated": false, "isRequired": true @@ -238,7 +238,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 206 + "lineNumber": 200 }, "deprecated": false, "children": [], @@ -258,7 +258,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 214 + "lineNumber": 208 }, "deprecated": false, "children": [], @@ -276,7 +276,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 219 + "lineNumber": 213 }, "deprecated": false, "children": [], @@ -294,7 +294,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 223 + "lineNumber": 217 }, "deprecated": false, "children": [], @@ -314,7 +314,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 227 + "lineNumber": 221 }, "deprecated": false, "children": [ @@ -330,7 +330,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 227 + "lineNumber": 221 }, "deprecated": false, "isRequired": true @@ -352,7 +352,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 231 + "lineNumber": 225 }, "deprecated": false, "children": [ @@ -368,7 +368,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 231 + "lineNumber": 225 }, "deprecated": false, "isRequired": true @@ -395,7 +395,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 235 + "lineNumber": 229 }, "deprecated": false, "children": [], @@ -413,7 +413,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 239 + "lineNumber": 233 }, "deprecated": false, "children": [], @@ -439,7 +439,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 283 + "lineNumber": 273 }, "deprecated": false, "children": [], @@ -457,7 +457,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 291 + "lineNumber": 281 }, "deprecated": false, "children": [], @@ -475,7 +475,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 301 + "lineNumber": 291 }, "deprecated": false, "children": [ @@ -488,7 +488,7 @@ "description": [], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 301 + "lineNumber": 291 }, "deprecated": false, "children": [ @@ -501,7 +501,7 @@ "description": [], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 301 + "lineNumber": 291 }, "deprecated": false } @@ -510,56 +510,6 @@ ], "returnComment": [] }, - { - "parentPluginId": "maps", - "id": "def-public.MapEmbeddable._dispatchSetRefreshConfig", - "type": "Function", - "tags": [], - "label": "_dispatchSetRefreshConfig", - "description": [], - "signature": [ - "(refreshConfig: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" - }, - ") => void" - ], - "source": { - "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 321 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "maps", - "id": "def-public.MapEmbeddable._dispatchSetRefreshConfig.$1", - "type": "Object", - "tags": [], - "label": "refreshConfig", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataQueryPluginApi", - "section": "def-common.RefreshInterval", - "text": "RefreshInterval" - } - ], - "source": { - "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 321 - }, - "deprecated": false, - "isRequired": true - } - ], - "returnComment": [] - }, { "parentPluginId": "maps", "id": "def-public.MapEmbeddable._dispatchSetChartsPaletteServiceGetColor", @@ -572,7 +522,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 331 + "lineNumber": 311 }, "deprecated": false, "children": [ @@ -588,7 +538,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 331 + "lineNumber": 311 }, "deprecated": false, "isRequired": false @@ -610,7 +560,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 349 + "lineNumber": 329 }, "deprecated": false, "children": [ @@ -626,7 +576,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 349 + "lineNumber": 329 }, "deprecated": false, "isRequired": true @@ -648,7 +598,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 375 + "lineNumber": 355 }, "deprecated": false, "children": [ @@ -665,7 +615,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 375 + "lineNumber": 355 }, "deprecated": false, "isRequired": true @@ -693,7 +643,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "children": [ @@ -709,7 +659,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "isRequired": true @@ -726,7 +676,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "isRequired": true @@ -749,7 +699,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 392 + "lineNumber": 372 }, "deprecated": false, "isRequired": false @@ -777,7 +727,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 406 + "lineNumber": 386 }, "deprecated": false, "children": [ @@ -800,7 +750,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 406 + "lineNumber": 386 }, "deprecated": false, "isRequired": true @@ -817,7 +767,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 406 + "lineNumber": 386 }, "deprecated": false, "isRequired": true @@ -845,7 +795,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 418 + "lineNumber": 398 }, "deprecated": false, "children": [], @@ -871,7 +821,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 439 + "lineNumber": 419 }, "deprecated": false, "children": [], @@ -889,7 +839,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 450 + "lineNumber": 430 }, "deprecated": false, "children": [], @@ -907,7 +857,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 487 + "lineNumber": 466 }, "deprecated": false, "children": [], @@ -925,7 +875,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 501 + "lineNumber": 480 }, "deprecated": false, "children": [], @@ -943,7 +893,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 517 + "lineNumber": 496 }, "deprecated": false, "children": [], @@ -961,7 +911,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/map_embeddable.tsx", - "lineNumber": 523 + "lineNumber": 502 }, "deprecated": false, "children": [], @@ -1377,7 +1327,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 42 + "lineNumber": 41 }, "deprecated": false, "initialIsOpen": false @@ -1409,7 +1359,7 @@ ], "source": { "path": "x-pack/plugins/maps/public/embeddable/types.ts", - "lineNumber": 44 + "lineNumber": 43 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/metrics_entities.json b/api_docs/metrics_entities.json index 3e67e8e750007..b78278a84162a 100644 --- a/api_docs/metrics_entities.json +++ b/api_docs/metrics_entities.json @@ -64,7 +64,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/ml.json b/api_docs/ml.json index dee66858b9be9..2e0e6364993d5 100644 --- a/api_docs/ml.json +++ b/api_docs/ml.json @@ -868,7 +868,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 153 + "lineNumber": 161 }, "deprecated": false, "children": [ @@ -884,7 +884,7 @@ ], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 154 + "lineNumber": 162 }, "deprecated": false }, @@ -897,7 +897,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 155 + "lineNumber": 163 }, "deprecated": false }, @@ -910,7 +910,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 156 + "lineNumber": 164 }, "deprecated": false }, @@ -923,7 +923,7 @@ "description": [], "source": { "path": "x-pack/plugins/ml/common/types/capabilities.ts", - "lineNumber": 157 + "lineNumber": 165 }, "deprecated": false } @@ -1513,14 +1513,14 @@ "description": [], "signature": [ "{ GTE: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; EQ: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; }" ], "source": { "path": "x-pack/plugins/ml/common/types/es_client.ts", - "lineNumber": 20 + "lineNumber": 22 }, "deprecated": false, "initialIsOpen": false @@ -1563,7 +1563,7 @@ ], "source": { "path": "x-pack/plugins/ml/public/plugin.ts", - "lineNumber": 213 + "lineNumber": 212 }, "deprecated": false, "lifecycle": "start", @@ -1779,7 +1779,7 @@ ", indexPatternTitle: string, query: any, fields: ", "HistogramField", "[], samplerShardSize: number, runtimeMappings?: Record | undefined) => Promise" ], "source": { @@ -1889,7 +1889,7 @@ "description": [], "signature": [ "Record | undefined" ], "source": { @@ -2852,7 +2852,7 @@ "signature": [ "CombinedJob", " extends ", - "Job" + "MlJob" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -2884,7 +2884,7 @@ "label": "datafeed_config", "description": [], "signature": [ - "Datafeed" + "MlDatafeed" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -2937,9 +2937,9 @@ "label": "datafeed_config", "description": [], "signature": [ - "Datafeed", + "MlDatafeed", " & ", - "DatafeedStats" + "MlDatafeedStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -2950,72 +2950,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions", - "type": "Interface", - "tags": [], - "label": "IndicesOptions", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 19 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions.allow_no_indices", - "type": "CompoundType", - "tags": [], - "label": "allow_no_indices", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 20 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions.expand_wildcards", - "type": "CompoundType", - "tags": [], - "label": "expand_wildcards", - "description": [], - "signature": [ - "string | ", - "ExpandWildcardOptions", - "[] | undefined" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 21 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.IndicesOptions.ignore_unavailable", - "type": "CompoundType", - "tags": [], - "label": "ignore_unavailable", - "description": [], - "signature": [ - "boolean | undefined" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", - "lineNumber": 22 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "ml", "id": "def-server.Influencer", @@ -3516,156 +3450,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot", - "type": "Interface", - "tags": [], - "label": "ModelSnapshot", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 11 - }, - "deprecated": false, - "children": [ - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.job_id", - "type": "string", - "tags": [], - "label": "job_id", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 12 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.min_version", - "type": "string", - "tags": [], - "label": "min_version", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 13 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.timestamp", - "type": "number", - "tags": [], - "label": "timestamp", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 14 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.description", - "type": "string", - "tags": [], - "label": "description", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 15 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.snapshot_id", - "type": "string", - "tags": [], - "label": "snapshot_id", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 16 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.snapshot_doc_count", - "type": "number", - "tags": [], - "label": "snapshot_doc_count", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 17 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.model_size_stats", - "type": "CompoundType", - "tags": [], - "label": "model_size_stats", - "description": [], - "signature": [ - "ModelSizeStats", - " & { model_bytes_exceeded: number; model_bytes_memory_limit: number; peak_model_bytes?: number | undefined; }" - ], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 18 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.latest_record_time_stamp", - "type": "number", - "tags": [], - "label": "latest_record_time_stamp", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 19 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.latest_result_time_stamp", - "type": "number", - "tags": [], - "label": "latest_result_time_stamp", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 20 - }, - "deprecated": false - }, - { - "parentPluginId": "ml", - "id": "def-server.ModelSnapshot.retain", - "type": "boolean", - "tags": [], - "label": "retain", - "description": [], - "source": { - "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", - "lineNumber": 21 - }, - "deprecated": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "ml", "id": "def-server.PerPartitionCategorization", @@ -3726,7 +3510,7 @@ "description": [], "signature": [ "{ [x: string]: ", - "AggregationContainer", + "AggregationsAggregationContainer", "; }" ], "source": { @@ -3744,7 +3528,7 @@ "label": "AnalysisConfig", "description": [], "signature": [ - "AnalysisConfig" + "MlAnalysisConfig" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3761,7 +3545,7 @@ "label": "AnalysisLimits", "description": [], "signature": [ - "AnalysisLimits" + "MlAnalysisLimits" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3812,7 +3596,7 @@ "label": "ChunkingConfig", "description": [], "signature": [ - "ChunkingConfig" + "MlChunkingConfig" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", @@ -3829,7 +3613,7 @@ "label": "CustomRule", "description": [], "signature": [ - "DetectionRule" + "MlDetectionRule" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3846,7 +3630,7 @@ "label": "CustomSettings", "description": [], "signature": [ - "CustomSettings" + "MlCustomSettings" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3863,11 +3647,11 @@ "label": "DataCounts", "description": [], "signature": [ - "DataCounts" + "MlDataCounts" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 15 + "lineNumber": 12 }, "deprecated": false, "initialIsOpen": false @@ -3880,7 +3664,7 @@ "label": "DataDescription", "description": [], "signature": [ - "DataDescription" + "MlDataDescription" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -3897,7 +3681,7 @@ "label": "Datafeed", "description": [], "signature": [ - "Datafeed" + "MlDatafeed" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", @@ -3931,7 +3715,7 @@ "label": "DatafeedStats", "description": [], "signature": [ - "DatafeedStats" + "MlDatafeedStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed_stats.ts", @@ -3948,9 +3732,9 @@ "label": "DatafeedWithStats", "description": [], "signature": [ - "Datafeed", + "MlDatafeed", " & ", - "DatafeedStats" + "MlDatafeedStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/combined_job.ts", @@ -3967,7 +3751,7 @@ "label": "Detector", "description": [], "signature": [ - "Detector" + "MlDetector" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -4001,11 +3785,28 @@ "label": "ForecastsStats", "description": [], "signature": [ - "JobForecastStatistics" + "MlJobForecastStatistics" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 27 + "lineNumber": 18 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "ml", + "id": "def-server.IndicesOptions", + "type": "Type", + "tags": [], + "label": "IndicesOptions", + "description": [], + "signature": [ + "MlDatafeedIndicesOptions" + ], + "source": { + "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/datafeed.ts", + "lineNumber": 18 }, "deprecated": false, "initialIsOpen": false @@ -4018,7 +3819,7 @@ "label": "Job", "description": [], "signature": [ - "Job" + "MlJob" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -4052,12 +3853,7 @@ "label": "JobStats", "description": [], "signature": [ - "JobStats", - " & { model_size_stats: ", - "ModelSizeStats", - "; timing_stats: ", - "TimingStats", - "; }" + "MlJobStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", @@ -4074,14 +3870,10 @@ "label": "JobWithStats", "description": [], "signature": [ - "Job", + "MlJob", + " & ", + "MlJobStats", " & ", - "JobStats", - " & { model_size_stats: ", - "ModelSizeStats", - "; timing_stats: ", - "TimingStats", - "; } & ", "JobAlertingRuleStats" ], "source": { @@ -4117,7 +3909,7 @@ "label": "ModelPlotConfig", "description": [], "signature": [ - "ModelPlotConfig" + "MlModelPlotConfig" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job.ts", @@ -4134,12 +3926,28 @@ "label": "ModelSizeStats", "description": [], "signature": [ - "ModelSizeStats", - " & { model_bytes_exceeded: number; model_bytes_memory_limit: number; peak_model_bytes?: number | undefined; }" + "MlModelSizeStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 17 + "lineNumber": 14 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "ml", + "id": "def-server.ModelSnapshot", + "type": "Type", + "tags": [], + "label": "ModelSnapshot", + "description": [], + "signature": [ + "MlModelSnapshot" + ], + "source": { + "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/model_snapshot.ts", + "lineNumber": 10 }, "deprecated": false, "initialIsOpen": false @@ -4169,11 +3977,11 @@ "label": "Node", "description": [], "signature": [ - "DiscoveryNode" + "MlDiscoveryNode" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 29 + "lineNumber": 20 }, "deprecated": false, "initialIsOpen": false @@ -4203,12 +4011,11 @@ "label": "TimingStats", "description": [], "signature": [ - "TimingStats", - " & { total_bucket_processing_time_ms: number; }" + "MlTimingStats" ], "source": { "path": "x-pack/plugins/ml/common/types/anomaly_detection_jobs/job_stats.ts", - "lineNumber": 23 + "lineNumber": 16 }, "deprecated": false, "initialIsOpen": false @@ -4671,7 +4478,7 @@ "description": [], "signature": [ "{ [x: string]: ", - "RuntimeField", + "MappingRuntimeField", "; }" ], "source": { @@ -4692,14 +4499,14 @@ "description": [], "signature": [ "{ GTE: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; EQ: ", - "TotalHitsRelation", + "SearchTotalHitsRelation", "; }" ], "source": { "path": "x-pack/plugins/ml/common/types/es_client.ts", - "lineNumber": 20 + "lineNumber": 22 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/monitoring.json b/api_docs/monitoring.json index 188e3f7b32100..2569619f007d7 100644 --- a/api_docs/monitoring.json +++ b/api_docs/monitoring.json @@ -96,7 +96,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/newsfeed.json b/api_docs/newsfeed.json index 45ec0de037851..eec5a9c5642e5 100644 --- a/api_docs/newsfeed.json +++ b/api_docs/newsfeed.json @@ -228,7 +228,7 @@ "description": [], "source": { "path": "src/plugins/newsfeed/public/lib/api.ts", - "lineNumber": 25 + "lineNumber": 16 }, "deprecated": false, "initialIsOpen": false diff --git a/api_docs/observability.json b/api_docs/observability.json index fc645dd7e2e6b..f59cf6407de75 100644 --- a/api_docs/observability.json +++ b/api_docs/observability.json @@ -145,7 +145,11 @@ "section": "def-public.AlertTypeModel", "text": "AlertTypeModel" }, - " & { format: Formatter; }) => void; getFormatter: (typeId: string) => Formatter | undefined; } & { registerFormatter: () => void; }" + " & { format: ", + "Formatter", + "; }) => void; getFormatter: (typeId: string) => ", + "Formatter", + " | undefined; } & { registerFormatter: () => void; }" ], "source": { "path": "x-pack/plugins/observability/public/rules/observability_rule_type_registry_mock.ts", @@ -417,7 +421,7 @@ "signature": [ "({ children, ...props }: { children?: React.ReactNode; } & ", "CommonProps", - " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"m\" | \"s\" | \"none\" | undefined; listItems?: ", + " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"none\" | \"m\" | \"s\" | undefined; listItems?: ", "EuiListGroupItemProps", "[] | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; maxWidth?: string | number | boolean | undefined; showToolTips?: boolean | undefined; wrapText?: boolean | undefined; ariaLabelledby?: string | undefined; }) => JSX.Element" ], @@ -437,7 +441,7 @@ "signature": [ "{ children?: React.ReactNode; } & ", "CommonProps", - " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"m\" | \"s\" | \"none\" | undefined; listItems?: ", + " & Pick, \"children\" | \"onClick\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\"> & { bordered?: boolean | undefined; flush?: boolean | undefined; gutterSize?: \"none\" | \"m\" | \"s\" | undefined; listItems?: ", "EuiListGroupItemProps", "[] | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; maxWidth?: string | number | boolean | undefined; showToolTips?: boolean | undefined; wrapText?: boolean | undefined; ariaLabelledby?: string | undefined; }" ], @@ -573,6 +577,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observability", + "id": "def-public.useBreadcrumbs", + "type": "Function", + "tags": [], + "label": "useBreadcrumbs", + "description": [], + "signature": [ + "(extraCrumbs: ", + "EuiBreadcrumb", + "[]) => void" + ], + "source": { + "path": "x-pack/plugins/observability/public/hooks/use_breadcrumbs.ts", + "lineNumber": 43 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "observability", + "id": "def-public.useBreadcrumbs.$1", + "type": "Array", + "tags": [], + "label": "extraCrumbs", + "description": [], + "signature": [ + "EuiBreadcrumb", + "[]" + ], + "source": { + "path": "x-pack/plugins/observability/public/hooks/use_breadcrumbs.ts", + "lineNumber": 43 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observability", "id": "def-public.useChartTheme", @@ -887,7 +931,7 @@ "label": "useUiTracker", "description": [], "signature": [ - "({\n app: defaultApp,\n}: { app?: \"apm\" | \"fleet\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined; }) => ({ app, metric, metricType }: ", + "({\n app: defaultApp,\n}: { app?: \"fleet\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined; }) => ({ app, metric, metricType }: ", { "pluginId": "observability", "scope": "public", @@ -924,7 +968,7 @@ "label": "app", "description": [], "signature": [ - "\"apm\" | \"fleet\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined" + "\"fleet\" | \"apm\" | \"infra_metrics\" | \"infra_logs\" | \"uptime\" | \"synthetics\" | \"observability-overview\" | \"stack_monitoring\" | \"ux\" | undefined" ], "source": { "path": "x-pack/plugins/observability/public/hooks/use_track_metric.tsx", @@ -2267,7 +2311,7 @@ "description": [], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 73 + "lineNumber": 82 }, "deprecated": false, "children": [ @@ -2283,7 +2327,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 74 + "lineNumber": 83 }, "deprecated": false }, @@ -2299,7 +2343,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 78 + "lineNumber": 87 }, "deprecated": false }, @@ -2316,7 +2360,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 79 + "lineNumber": 88 }, "deprecated": false }, @@ -2332,7 +2376,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 80 + "lineNumber": 89 }, "deprecated": false }, @@ -2344,11 +2388,11 @@ "label": "reportType", "description": [], "signature": [ - "\"logs\" | \"cpu\" | \"pld\" | \"kpi\" | \"upd\" | \"upp\" | \"svl\" | \"tpt\" | \"mem\" | \"nwk\"" + "\"logs\" | \"cpu\" | \"pld\" | \"kpi\" | \"cwv\" | \"upd\" | \"upp\" | \"svl\" | \"tpt\" | \"mem\" | \"nwk\"" ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 81 + "lineNumber": 90 }, "deprecated": false }, @@ -2364,7 +2408,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 82 + "lineNumber": 91 }, "deprecated": false }, @@ -2380,7 +2424,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 83 + "lineNumber": 92 }, "deprecated": false }, @@ -2396,7 +2440,7 @@ ], "source": { "path": "x-pack/plugins/observability/public/components/shared/exploratory_view/types.ts", - "lineNumber": 84 + "lineNumber": 93 }, "deprecated": false } @@ -3006,7 +3050,11 @@ "section": "def-public.AlertTypeModel", "text": "AlertTypeModel" }, - " & { format: Formatter; }) => void; getFormatter: (typeId: string) => Formatter | undefined; }" + " & { format: ", + "Formatter", + "; }) => void; getFormatter: (typeId: string) => ", + "Formatter", + " | undefined; }" ], "source": { "path": "x-pack/plugins/observability/public/rules/create_observability_rule_type_registry.ts", @@ -3046,7 +3094,9 @@ "DisambiguateSet", ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"media\" | \"target\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes)> & ", "DisambiguateSet", - ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"media\" | \"target\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), \"children\" | \"type\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"name\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"autoFocus\" | \"disabled\" | \"form\" | \"formAction\" | \"formEncType\" | \"formMethod\" | \"formNoValidate\" | \"formTarget\" | \"value\" | \"media\" | \"ping\" | \"hrefLang\" | \"referrerPolicy\"> & { size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; icon?: React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", + ", \"children\" | \"type\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"title\" | \"id\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"media\" | \"target\" | \"ping\" | \"hrefLang\" | \"rel\" | \"referrerPolicy\">, React.ButtonHTMLAttributes> & React.ButtonHTMLAttributes), \"children\" | \"type\" | \"onChange\" | \"onKeyDown\" | \"title\" | \"id\" | \"name\" | \"defaultChecked\" | \"defaultValue\" | \"suppressContentEditableWarning\" | \"suppressHydrationWarning\" | \"accessKey\" | \"className\" | \"contentEditable\" | \"contextMenu\" | \"dir\" | \"draggable\" | \"hidden\" | \"lang\" | \"placeholder\" | \"slot\" | \"spellCheck\" | \"style\" | \"tabIndex\" | \"translate\" | \"radioGroup\" | \"role\" | \"about\" | \"datatype\" | \"inlist\" | \"prefix\" | \"property\" | \"resource\" | \"typeof\" | \"vocab\" | \"autoCapitalize\" | \"autoCorrect\" | \"autoSave\" | \"itemProp\" | \"itemScope\" | \"itemType\" | \"itemID\" | \"itemRef\" | \"results\" | \"security\" | \"unselectable\" | \"inputMode\" | \"is\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"download\" | \"autoFocus\" | \"disabled\" | \"form\" | \"formAction\" | \"formEncType\" | \"formMethod\" | \"formNoValidate\" | \"formTarget\" | \"value\" | \"media\" | \"ping\" | \"hrefLang\" | \"referrerPolicy\"> & { size?: \"m\" | \"s\" | \"l\" | \"xs\" | undefined; color?: \"text\" | \"primary\" | \"inherit\" | \"ghost\" | \"subdued\" | undefined; label: React.ReactNode; isActive?: boolean | undefined; isDisabled?: boolean | undefined; href?: string | undefined; target?: string | undefined; rel?: string | undefined; iconType?: string | React.ComponentClass<{}, any> | React.FunctionComponent<{}> | undefined; iconProps?: Pick<", + "EuiIconProps", + ", \"string\" | \"children\" | \"from\" | \"origin\" | \"onClick\" | \"onChange\" | \"color\" | \"onKeyDown\" | \"y\" | \"d\" | \"x\" | \"title\" | \"id\" | \"operator\" | \"name\" | \"version\" | \"filter\" | \"size\" | \"format\" | \"order\" | \"className\" | \"lang\" | \"style\" | \"tabIndex\" | \"role\" | \"aria-activedescendant\" | \"aria-atomic\" | \"aria-autocomplete\" | \"aria-busy\" | \"aria-checked\" | \"aria-colcount\" | \"aria-colindex\" | \"aria-colspan\" | \"aria-controls\" | \"aria-current\" | \"aria-describedby\" | \"aria-details\" | \"aria-disabled\" | \"aria-dropeffect\" | \"aria-errormessage\" | \"aria-expanded\" | \"aria-flowto\" | \"aria-grabbed\" | \"aria-haspopup\" | \"aria-hidden\" | \"aria-invalid\" | \"aria-keyshortcuts\" | \"aria-label\" | \"aria-labelledby\" | \"aria-level\" | \"aria-live\" | \"aria-modal\" | \"aria-multiline\" | \"aria-multiselectable\" | \"aria-orientation\" | \"aria-owns\" | \"aria-placeholder\" | \"aria-posinset\" | \"aria-pressed\" | \"aria-readonly\" | \"aria-relevant\" | \"aria-required\" | \"aria-roledescription\" | \"aria-rowcount\" | \"aria-rowindex\" | \"aria-rowspan\" | \"aria-selected\" | \"aria-setsize\" | \"aria-sort\" | \"aria-valuemax\" | \"aria-valuemin\" | \"aria-valuenow\" | \"aria-valuetext\" | \"dangerouslySetInnerHTML\" | \"onCopy\" | \"onCopyCapture\" | \"onCut\" | \"onCutCapture\" | \"onPaste\" | \"onPasteCapture\" | \"onCompositionEnd\" | \"onCompositionEndCapture\" | \"onCompositionStart\" | \"onCompositionStartCapture\" | \"onCompositionUpdate\" | \"onCompositionUpdateCapture\" | \"onFocus\" | \"onFocusCapture\" | \"onBlur\" | \"onBlurCapture\" | \"onChangeCapture\" | \"onBeforeInput\" | \"onBeforeInputCapture\" | \"onInput\" | \"onInputCapture\" | \"onReset\" | \"onResetCapture\" | \"onSubmit\" | \"onSubmitCapture\" | \"onInvalid\" | \"onInvalidCapture\" | \"onLoad\" | \"onLoadCapture\" | \"onError\" | \"onErrorCapture\" | \"onKeyDownCapture\" | \"onKeyPress\" | \"onKeyPressCapture\" | \"onKeyUp\" | \"onKeyUpCapture\" | \"onAbort\" | \"onAbortCapture\" | \"onCanPlay\" | \"onCanPlayCapture\" | \"onCanPlayThrough\" | \"onCanPlayThroughCapture\" | \"onDurationChange\" | \"onDurationChangeCapture\" | \"onEmptied\" | \"onEmptiedCapture\" | \"onEncrypted\" | \"onEncryptedCapture\" | \"onEnded\" | \"onEndedCapture\" | \"onLoadedData\" | \"onLoadedDataCapture\" | \"onLoadedMetadata\" | \"onLoadedMetadataCapture\" | \"onLoadStart\" | \"onLoadStartCapture\" | \"onPause\" | \"onPauseCapture\" | \"onPlay\" | \"onPlayCapture\" | \"onPlaying\" | \"onPlayingCapture\" | \"onProgress\" | \"onProgressCapture\" | \"onRateChange\" | \"onRateChangeCapture\" | \"onSeeked\" | \"onSeekedCapture\" | \"onSeeking\" | \"onSeekingCapture\" | \"onStalled\" | \"onStalledCapture\" | \"onSuspend\" | \"onSuspendCapture\" | \"onTimeUpdate\" | \"onTimeUpdateCapture\" | \"onVolumeChange\" | \"onVolumeChangeCapture\" | \"onWaiting\" | \"onWaitingCapture\" | \"onAuxClick\" | \"onAuxClickCapture\" | \"onClickCapture\" | \"onContextMenu\" | \"onContextMenuCapture\" | \"onDoubleClick\" | \"onDoubleClickCapture\" | \"onDrag\" | \"onDragCapture\" | \"onDragEnd\" | \"onDragEndCapture\" | \"onDragEnter\" | \"onDragEnterCapture\" | \"onDragExit\" | \"onDragExitCapture\" | \"onDragLeave\" | \"onDragLeaveCapture\" | \"onDragOver\" | \"onDragOverCapture\" | \"onDragStart\" | \"onDragStartCapture\" | \"onDrop\" | \"onDropCapture\" | \"onMouseDown\" | \"onMouseDownCapture\" | \"onMouseEnter\" | \"onMouseLeave\" | \"onMouseMove\" | \"onMouseMoveCapture\" | \"onMouseOut\" | \"onMouseOutCapture\" | \"onMouseOver\" | \"onMouseOverCapture\" | \"onMouseUp\" | \"onMouseUpCapture\" | \"onSelect\" | \"onSelectCapture\" | \"onTouchCancel\" | \"onTouchCancelCapture\" | \"onTouchEnd\" | \"onTouchEndCapture\" | \"onTouchMove\" | \"onTouchMoveCapture\" | \"onTouchStart\" | \"onTouchStartCapture\" | \"onPointerDown\" | \"onPointerDownCapture\" | \"onPointerMove\" | \"onPointerMoveCapture\" | \"onPointerUp\" | \"onPointerUpCapture\" | \"onPointerCancel\" | \"onPointerCancelCapture\" | \"onPointerEnter\" | \"onPointerEnterCapture\" | \"onPointerLeave\" | \"onPointerLeaveCapture\" | \"onPointerOver\" | \"onPointerOverCapture\" | \"onPointerOut\" | \"onPointerOutCapture\" | \"onGotPointerCapture\" | \"onGotPointerCaptureCapture\" | \"onLostPointerCapture\" | \"onLostPointerCaptureCapture\" | \"onScroll\" | \"onScrollCapture\" | \"onWheel\" | \"onWheelCapture\" | \"onAnimationStart\" | \"onAnimationStartCapture\" | \"onAnimationEnd\" | \"onAnimationEndCapture\" | \"onAnimationIteration\" | \"onAnimationIterationCapture\" | \"onTransitionEnd\" | \"onTransitionEndCapture\" | \"css\" | \"data-test-subj\" | \"scale\" | \"height\" | \"max\" | \"media\" | \"method\" | \"min\" | \"target\" | \"width\" | \"crossOrigin\" | \"accentHeight\" | \"accumulate\" | \"additive\" | \"alignmentBaseline\" | \"allowReorder\" | \"alphabetic\" | \"amplitude\" | \"arabicForm\" | \"ascent\" | \"attributeName\" | \"attributeType\" | \"autoReverse\" | \"azimuth\" | \"baseFrequency\" | \"baselineShift\" | \"baseProfile\" | \"bbox\" | \"begin\" | \"bias\" | \"by\" | \"calcMode\" | \"capHeight\" | \"clip\" | \"clipPath\" | \"clipPathUnits\" | \"clipRule\" | \"colorInterpolation\" | \"colorInterpolationFilters\" | \"colorProfile\" | \"colorRendering\" | \"contentScriptType\" | \"contentStyleType\" | \"cursor\" | \"cx\" | \"cy\" | \"decelerate\" | \"descent\" | \"diffuseConstant\" | \"direction\" | \"display\" | \"divisor\" | \"dominantBaseline\" | \"dur\" | \"dx\" | \"dy\" | \"edgeMode\" | \"elevation\" | \"enableBackground\" | \"end\" | \"exponent\" | \"externalResourcesRequired\" | \"fill\" | \"fillOpacity\" | \"fillRule\" | \"filterRes\" | \"filterUnits\" | \"floodColor\" | \"floodOpacity\" | \"focusable\" | \"fontFamily\" | \"fontSize\" | \"fontSizeAdjust\" | \"fontStretch\" | \"fontStyle\" | \"fontVariant\" | \"fontWeight\" | \"fx\" | \"fy\" | \"g1\" | \"g2\" | \"glyphName\" | \"glyphOrientationHorizontal\" | \"glyphOrientationVertical\" | \"glyphRef\" | \"gradientTransform\" | \"gradientUnits\" | \"hanging\" | \"horizAdvX\" | \"horizOriginX\" | \"href\" | \"ideographic\" | \"imageRendering\" | \"in2\" | \"in\" | \"intercept\" | \"k1\" | \"k2\" | \"k3\" | \"k4\" | \"k\" | \"kernelMatrix\" | \"kernelUnitLength\" | \"kerning\" | \"keyPoints\" | \"keySplines\" | \"keyTimes\" | \"lengthAdjust\" | \"letterSpacing\" | \"lightingColor\" | \"limitingConeAngle\" | \"local\" | \"markerEnd\" | \"markerHeight\" | \"markerMid\" | \"markerStart\" | \"markerUnits\" | \"markerWidth\" | \"mask\" | \"maskContentUnits\" | \"maskUnits\" | \"mathematical\" | \"mode\" | \"numOctaves\" | \"offset\" | \"opacity\" | \"orient\" | \"orientation\" | \"overflow\" | \"overlinePosition\" | \"overlineThickness\" | \"paintOrder\" | \"panose1\" | \"path\" | \"pathLength\" | \"patternContentUnits\" | \"patternTransform\" | \"patternUnits\" | \"pointerEvents\" | \"points\" | \"pointsAtX\" | \"pointsAtY\" | \"pointsAtZ\" | \"preserveAlpha\" | \"preserveAspectRatio\" | \"primitiveUnits\" | \"r\" | \"radius\" | \"refX\" | \"refY\" | \"renderingIntent\" | \"repeatCount\" | \"repeatDur\" | \"requiredExtensions\" | \"requiredFeatures\" | \"restart\" | \"result\" | \"rotate\" | \"rx\" | \"ry\" | \"seed\" | \"shapeRendering\" | \"slope\" | \"spacing\" | \"specularConstant\" | \"specularExponent\" | \"speed\" | \"spreadMethod\" | \"startOffset\" | \"stdDeviation\" | \"stemh\" | \"stemv\" | \"stitchTiles\" | \"stopColor\" | \"stopOpacity\" | \"strikethroughPosition\" | \"strikethroughThickness\" | \"stroke\" | \"strokeDasharray\" | \"strokeDashoffset\" | \"strokeLinecap\" | \"strokeLinejoin\" | \"strokeMiterlimit\" | \"strokeOpacity\" | \"strokeWidth\" | \"surfaceScale\" | \"systemLanguage\" | \"tableValues\" | \"targetX\" | \"targetY\" | \"textAnchor\" | \"textDecoration\" | \"textLength\" | \"textRendering\" | \"to\" | \"transform\" | \"u1\" | \"u2\" | \"underlinePosition\" | \"underlineThickness\" | \"unicode\" | \"unicodeBidi\" | \"unicodeRange\" | \"unitsPerEm\" | \"vAlphabetic\" | \"values\" | \"vectorEffect\" | \"vertAdvY\" | \"vertOriginX\" | \"vertOriginY\" | \"vHanging\" | \"vIdeographic\" | \"viewBox\" | \"viewTarget\" | \"visibility\" | \"vMathematical\" | \"widths\" | \"wordSpacing\" | \"writingMode\" | \"x1\" | \"x2\" | \"xChannelSelector\" | \"xHeight\" | \"xlinkActuate\" | \"xlinkArcrole\" | \"xlinkHref\" | \"xlinkRole\" | \"xlinkShow\" | \"xlinkTitle\" | \"xlinkType\" | \"xmlBase\" | \"xmlLang\" | \"xmlns\" | \"xmlnsXlink\" | \"xmlSpace\" | \"y1\" | \"y2\" | \"yChannelSelector\" | \"z\" | \"zoomAndPan\" | \"titleId\" | \"onIconLoad\"> | undefined; icon?: React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)> | undefined; showToolTip?: boolean | undefined; extraAction?: ({ type?: \"reset\" | \"button\" | \"submit\" | undefined; } & ", "EuiButtonIconProps", " & { onClick?: ((event: React.MouseEvent) => void) | undefined; } & React.ButtonHTMLAttributes & { buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; } & { alwaysShow?: boolean | undefined; }) | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; wrapText?: boolean | undefined; buttonRef?: ((instance: HTMLButtonElement | null) => void) | React.RefObject | null | undefined; }" ], @@ -3142,7 +3192,11 @@ "section": "def-public.AlertTypeModel", "text": "AlertTypeModel" }, - " & { format: Formatter; }) => void; getFormatter: (typeId: string) => Formatter | undefined; }; isAlertingExperienceEnabled: () => boolean; navigation: { registerSections: (sections$: ", + " & { format: ", + "Formatter", + "; }) => void; getFormatter: (typeId: string) => ", + "Formatter", + " | undefined; }; isAlertingExperienceEnabled: () => boolean; navigation: { registerSections: (sections$: ", "Observable", "<", "NavigationSection", @@ -3328,46 +3382,50 @@ "description": [], "signature": [ "(", - "TypeMapping", + "MappingTypeMapping", " & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; }) | (Record | undefined; }) | (Record & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; })" + "MappingSourceField", + " | undefined; runtime?: Record | undefined; })" ], "source": { "path": "x-pack/plugins/observability/server/utils/create_or_update_index.ts", @@ -3385,7 +3443,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", @@ -3432,12 +3490,12 @@ "description": [], "signature": [ "(kql: string | undefined) => ", - "QueryContainer", + "QueryDslQueryContainer", "[]" ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 35 + "lineNumber": 39 }, "deprecated": false, "children": [ @@ -3453,7 +3511,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 35 + "lineNumber": 39 }, "deprecated": false, "isRequired": false @@ -3471,7 +3529,7 @@ "description": [], "signature": [ "(start: number | undefined, end: number | undefined, field: string) => ", - "QueryContainer", + "QueryDslQueryContainer", "[]" ], "source": { @@ -3492,7 +3550,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 22 }, "deprecated": false, "isRequired": false @@ -3509,7 +3567,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 23 }, "deprecated": false, "isRequired": false @@ -3526,7 +3584,7 @@ ], "source": { "path": "x-pack/plugins/observability/server/utils/queries.ts", - "lineNumber": 21 + "lineNumber": 24 }, "deprecated": false, "isRequired": true @@ -3799,46 +3857,50 @@ "description": [], "signature": [ "(", - "TypeMapping", + "MappingTypeMapping", " & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; }) | (Record | undefined; }) | (Record & { all_field?: ", - "AllField", - " | undefined; date_detection?: boolean | undefined; dynamic?: boolean | \"strict\" | undefined; dynamic_date_formats?: string[] | undefined; dynamic_templates?: Record | Record[] | undefined; field_names_field?: ", - "FieldNamesField", + "MappingFieldNamesField", " | undefined; index_field?: ", - "IndexField", + "MappingIndexField", " | undefined; meta?: Record | undefined; numeric_detection?: boolean | undefined; properties?: Record | undefined; routing_field?: ", - "RoutingField", + "MappingRoutingField", " | undefined; size_field?: ", - "SizeField", + "MappingSizeField", " | undefined; source_field?: ", - "SourceField", - " | undefined; })" + "MappingSourceField", + " | undefined; runtime?: Record | undefined; })" ], "source": { "path": "x-pack/plugins/observability/server/utils/create_or_update_index.ts", diff --git a/api_docs/rule_registry.json b/api_docs/rule_registry.json index cd1f4994c1da6..f114f1bf22751 100644 --- a/api_docs/rule_registry.json +++ b/api_docs/rule_registry.json @@ -342,6 +342,115 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.createPersistenceRuleTypeFactory", + "type": "Function", + "tags": [], + "label": "createPersistenceRuleTypeFactory", + "description": [], + "signature": [ + "({ logger, ruleDataClient, }: { ruleDataClient: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.RuleDataClient", + "text": "RuleDataClient" + }, + "; logger: ", + "Logger", + "; }) => , TAlertInstanceContext extends { [x: string]: unknown; }, TServices extends { alertWithPersistence: PersistenceAlertService; findAlerts: PersistenceAlertQueryService; }>(type: ", + "AlertTypeWithExecutor", + ") => { executor: (options: ", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertExecutorOptions", + "text": "AlertExecutorOptions" + }, + ", { [x: string]: unknown; }, TAlertInstanceContext, never> & { services: any; }) => Promise; id: string; name: string; validate?: { params?: ", + "AlertTypeParamsValidator", + " | undefined; } | undefined; actionGroups: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionGroup", + "text": "ActionGroup" + }, + "[]; defaultActionGroupId: string; recoveryActionGroup?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionGroup", + "text": "ActionGroup" + }, + " | undefined; producer: string; actionVariables?: { context?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[] | undefined; state?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[] | undefined; params?: ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[] | undefined; } | undefined; minimumLicenseRequired: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\"; }" + ], + "source": { + "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_factory.ts", + "lineNumber": 42 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.createPersistenceRuleTypeFactory.$1", + "type": "Object", + "tags": [], + "label": "{\n logger,\n ruleDataClient,\n}", + "description": [], + "signature": [ + "{ ruleDataClient: ", + { + "pluginId": "ruleRegistry", + "scope": "server", + "docId": "kibRuleRegistryPluginApi", + "section": "def-server.RuleDataClient", + "text": "RuleDataClient" + }, + "; logger: ", + "Logger", + "; }" + ], + "source": { + "path": "x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_factory.ts", + "lineNumber": 42 + }, + "deprecated": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "ruleRegistry", "id": "def-server.getRuleExecutorData", @@ -784,7 +893,7 @@ "signature": [ "(input: unknown) => OutputOf<", "Optional", - "<{ readonly \"kibana.rac.alert.producer\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.uuid\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.id\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.start\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.end\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.duration.us\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.severity.level\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.severity.value\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.status\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.evaluation.threshold\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly \"kibana.rac.alert.evaluation.value\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly '@timestamp': { readonly type: \"date\"; readonly array: false; readonly required: true; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly 'event.kind': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'event.action': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.uuid': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.id': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.name': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.category': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; }, \"tags\" | \"kibana.rac.alert.uuid\" | \"event.kind\" | \"event.action\" | \"rule.uuid\" | \"rule.id\" | \"rule.name\" | \"rule.category\" | \"kibana.rac.alert.producer\" | \"kibana.rac.alert.id\" | \"kibana.rac.alert.start\" | \"kibana.rac.alert.end\" | \"kibana.rac.alert.duration.us\" | \"kibana.rac.alert.severity.level\" | \"kibana.rac.alert.severity.value\" | \"kibana.rac.alert.status\" | \"kibana.rac.alert.evaluation.threshold\" | \"kibana.rac.alert.evaluation.value\">>" + "<{ readonly \"kibana.rac.alert.producer\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.uuid\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.id\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.start\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.end\": { readonly type: \"date\"; }; readonly \"kibana.rac.alert.duration.us\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.severity.level\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.severity.value\": { readonly type: \"long\"; }; readonly \"kibana.rac.alert.status\": { readonly type: \"keyword\"; }; readonly \"kibana.rac.alert.evaluation.threshold\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly \"kibana.rac.alert.evaluation.value\": { readonly type: \"scaled_float\"; readonly scaling_factor: 100; }; readonly tags: { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly '@timestamp': { readonly type: \"date\"; readonly array: false; readonly required: true; }; readonly 'event.kind': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'event.action': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.uuid': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.id': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.name': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly 'rule.category': { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; }, \"tags\" | \"kibana.rac.alert.uuid\" | \"event.kind\" | \"event.action\" | \"rule.uuid\" | \"rule.id\" | \"rule.name\" | \"rule.category\" | \"kibana.rac.alert.producer\" | \"kibana.rac.alert.id\" | \"kibana.rac.alert.start\" | \"kibana.rac.alert.end\" | \"kibana.rac.alert.duration.us\" | \"kibana.rac.alert.severity.level\" | \"kibana.rac.alert.severity.value\" | \"kibana.rac.alert.status\" | \"kibana.rac.alert.evaluation.threshold\" | \"kibana.rac.alert.evaluation.value\">>" ], "source": { "path": "x-pack/plugins/rule_registry/common/parse_technical_fields.ts", diff --git a/api_docs/saved_objects.json b/api_docs/saved_objects.json index 48579ca8e589e..6af18c749db67 100644 --- a/api_docs/saved_objects.json +++ b/api_docs/saved_objects.json @@ -781,15 +781,15 @@ { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/types.ts", - "lineNumber": 25 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 33 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/types.ts", - "lineNumber": 74 + "path": "src/plugins/dashboard/public/types.ts", + "lineNumber": 186 } }, { @@ -803,7 +803,7 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/plugin.tsx", - "lineNumber": 126 + "lineNumber": 127 } }, { @@ -1383,20 +1383,20 @@ "plugin": "embeddable", "link": { "path": "src/plugins/embeddable/public/lib/attribute_service/attribute_service.tsx", - "lineNumber": 167 + "lineNumber": 165 } }, { "plugin": "discover", "link": { - "path": "src/plugins/discover/public/application/components/top_nav/on_save_search.tsx", + "path": "src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx", "lineNumber": 11 } }, { "plugin": "discover", "link": { - "path": "src/plugins/discover/public/application/components/top_nav/on_save_search.tsx", + "path": "src/plugins/discover/public/application/apps/main/components/top_nav/on_save_search.tsx", "lineNumber": 133 } }, @@ -2670,42 +2670,42 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 18 + "lineNumber": 19 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", - "lineNumber": 14 + "path": "src/plugins/dashboard/public/application/lib/dashboard_tagging.ts", + "lineNumber": 10 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", - "lineNumber": 98 + "path": "src/plugins/dashboard/public/application/lib/dashboard_tagging.ts", + "lineNumber": 15 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", - "lineNumber": 126 + "lineNumber": 14 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts", - "lineNumber": 23 + "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", + "lineNumber": 98 } }, { "plugin": "dashboard", "link": { - "path": "src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts", - "lineNumber": 35 + "path": "src/plugins/dashboard/public/application/actions/clone_panel_action.tsx", + "lineNumber": 126 } }, { @@ -4337,7 +4337,7 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts", - "lineNumber": 41 + "lineNumber": 42 } } ] @@ -4364,14 +4364,14 @@ "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/listing/dashboard_listing.tsx", - "lineNumber": 87 + "lineNumber": 92 } }, { "plugin": "dashboard", "link": { "path": "src/plugins/dashboard/public/application/listing/dashboard_listing.tsx", - "lineNumber": 172 + "lineNumber": 177 } }, { diff --git a/api_docs/saved_objects_management.json b/api_docs/saved_objects_management.json index 5d95b713715fa..8e8e7850261a3 100644 --- a/api_docs/saved_objects_management.json +++ b/api_docs/saved_objects_management.json @@ -987,7 +987,7 @@ "label": "euiColumn", "description": [], "signature": [ - "{ children?: React.ReactNode; headers?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; onChange?: ((event: React.FormEvent) => void) | undefined; color?: string | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; description?: string | undefined; title?: string | undefined; id?: string | undefined; name: React.ReactNode; field: string; defaultChecked?: boolean | undefined; defaultValue?: string | number | string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: boolean | \"true\" | \"false\" | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: boolean | \"true\" | \"false\" | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: boolean | \"true\" | \"false\" | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; security?: string | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"text\" | \"none\" | \"search\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"page\" | \"true\" | \"false\" | \"step\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"listbox\" | \"tree\" | \"dialog\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"text\" | \"additions\" | \"additions text\" | \"all\" | \"removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: ((event: React.ClipboardEvent) => void) | undefined; onCopyCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCut?: ((event: React.ClipboardEvent) => void) | undefined; onCutCapture?: ((event: React.ClipboardEvent) => void) | undefined; onPaste?: ((event: React.ClipboardEvent) => void) | undefined; onPasteCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCompositionEnd?: ((event: React.CompositionEvent) => void) | undefined; onCompositionEndCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStart?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStartCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdate?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdateCapture?: ((event: React.CompositionEvent) => void) | undefined; onFocus?: ((event: React.FocusEvent) => void) | undefined; onFocusCapture?: ((event: React.FocusEvent) => void) | undefined; onBlur?: ((event: React.FocusEvent) => void) | undefined; onBlurCapture?: ((event: React.FocusEvent) => void) | undefined; onChangeCapture?: ((event: React.FormEvent) => void) | undefined; onBeforeInput?: ((event: React.FormEvent) => void) | undefined; onBeforeInputCapture?: ((event: React.FormEvent) => void) | undefined; onInput?: ((event: React.FormEvent) => void) | undefined; onInputCapture?: ((event: React.FormEvent) => void) | undefined; onReset?: ((event: React.FormEvent) => void) | undefined; onResetCapture?: ((event: React.FormEvent) => void) | undefined; onSubmit?: ((event: React.FormEvent) => void) | undefined; onSubmitCapture?: ((event: React.FormEvent) => void) | undefined; onInvalid?: ((event: React.FormEvent) => void) | undefined; onInvalidCapture?: ((event: React.FormEvent) => void) | undefined; onLoad?: ((event: React.SyntheticEvent) => void) | undefined; onLoadCapture?: ((event: React.SyntheticEvent) => void) | undefined; onError?: ((event: React.SyntheticEvent) => void) | undefined; onErrorCapture?: ((event: React.SyntheticEvent) => void) | undefined; onKeyDownCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPress?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPressCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUp?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUpCapture?: ((event: React.KeyboardEvent) => void) | undefined; onAbort?: ((event: React.SyntheticEvent) => void) | undefined; onAbortCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlay?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThrough?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThroughCapture?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChange?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEmptied?: ((event: React.SyntheticEvent) => void) | undefined; onEmptiedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEncrypted?: ((event: React.SyntheticEvent) => void) | undefined; onEncryptedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEnded?: ((event: React.SyntheticEvent) => void) | undefined; onEndedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedData?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedDataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadata?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStart?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStartCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPause?: ((event: React.SyntheticEvent) => void) | undefined; onPauseCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlay?: ((event: React.SyntheticEvent) => void) | undefined; onPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlaying?: ((event: React.SyntheticEvent) => void) | undefined; onPlayingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onProgress?: ((event: React.SyntheticEvent) => void) | undefined; onProgressCapture?: ((event: React.SyntheticEvent) => void) | undefined; onRateChange?: ((event: React.SyntheticEvent) => void) | undefined; onRateChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeked?: ((event: React.SyntheticEvent) => void) | undefined; onSeekedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeking?: ((event: React.SyntheticEvent) => void) | undefined; onSeekingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onStalled?: ((event: React.SyntheticEvent) => void) | undefined; onStalledCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSuspend?: ((event: React.SyntheticEvent) => void) | undefined; onSuspendCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdate?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdateCapture?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChange?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onWaiting?: ((event: React.SyntheticEvent) => void) | undefined; onWaitingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onAuxClick?: ((event: React.MouseEvent) => void) | undefined; onAuxClickCapture?: ((event: React.MouseEvent) => void) | undefined; onClickCapture?: ((event: React.MouseEvent) => void) | undefined; onContextMenu?: ((event: React.MouseEvent) => void) | undefined; onContextMenuCapture?: ((event: React.MouseEvent) => void) | undefined; onDoubleClick?: ((event: React.MouseEvent) => void) | undefined; onDoubleClickCapture?: ((event: React.MouseEvent) => void) | undefined; onDrag?: ((event: React.DragEvent) => void) | undefined; onDragCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnd?: ((event: React.DragEvent) => void) | undefined; onDragEndCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnter?: ((event: React.DragEvent) => void) | undefined; onDragEnterCapture?: ((event: React.DragEvent) => void) | undefined; onDragExit?: ((event: React.DragEvent) => void) | undefined; onDragExitCapture?: ((event: React.DragEvent) => void) | undefined; onDragLeave?: ((event: React.DragEvent) => void) | undefined; onDragLeaveCapture?: ((event: React.DragEvent) => void) | undefined; onDragOver?: ((event: React.DragEvent) => void) | undefined; onDragOverCapture?: ((event: React.DragEvent) => void) | undefined; onDragStart?: ((event: React.DragEvent) => void) | undefined; onDragStartCapture?: ((event: React.DragEvent) => void) | undefined; onDrop?: ((event: React.DragEvent) => void) | undefined; onDropCapture?: ((event: React.DragEvent) => void) | undefined; onMouseDown?: ((event: React.MouseEvent) => void) | undefined; onMouseDownCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseEnter?: ((event: React.MouseEvent) => void) | undefined; onMouseLeave?: ((event: React.MouseEvent) => void) | undefined; onMouseMove?: ((event: React.MouseEvent) => void) | undefined; onMouseMoveCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOut?: ((event: React.MouseEvent) => void) | undefined; onMouseOutCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOver?: ((event: React.MouseEvent) => void) | undefined; onMouseOverCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseUp?: ((event: React.MouseEvent) => void) | undefined; onMouseUpCapture?: ((event: React.MouseEvent) => void) | undefined; onSelect?: ((event: React.SyntheticEvent) => void) | undefined; onSelectCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTouchCancel?: ((event: React.TouchEvent) => void) | undefined; onTouchCancelCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchEnd?: ((event: React.TouchEvent) => void) | undefined; onTouchEndCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchMove?: ((event: React.TouchEvent) => void) | undefined; onTouchMoveCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchStart?: ((event: React.TouchEvent) => void) | undefined; onTouchStartCapture?: ((event: React.TouchEvent) => void) | undefined; onPointerDown?: ((event: React.PointerEvent) => void) | undefined; onPointerDownCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerMove?: ((event: React.PointerEvent) => void) | undefined; onPointerMoveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerUp?: ((event: React.PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerCancel?: ((event: React.PointerEvent) => void) | undefined; onPointerCancelCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerEnter?: ((event: React.PointerEvent) => void) | undefined; onPointerEnterCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerLeave?: ((event: React.PointerEvent) => void) | undefined; onPointerLeaveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOver?: ((event: React.PointerEvent) => void) | undefined; onPointerOverCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOut?: ((event: React.PointerEvent) => void) | undefined; onPointerOutCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onScroll?: ((event: React.UIEvent) => void) | undefined; onScrollCapture?: ((event: React.UIEvent) => void) | undefined; onWheel?: ((event: React.WheelEvent) => void) | undefined; onWheelCapture?: ((event: React.WheelEvent) => void) | undefined; onAnimationStart?: ((event: React.AnimationEvent) => void) | undefined; onAnimationStartCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEnd?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEndCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIteration?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIterationCapture?: ((event: React.AnimationEvent) => void) | undefined; onTransitionEnd?: ((event: React.TransitionEvent) => void) | undefined; onTransitionEndCapture?: ((event: React.TransitionEvent) => void) | undefined; css?: ", + "{ children?: React.ReactNode; headers?: string | undefined; onClick?: ((event: React.MouseEvent) => void) | undefined; onChange?: ((event: React.FormEvent) => void) | undefined; color?: string | undefined; onKeyDown?: ((event: React.KeyboardEvent) => void) | undefined; description?: string | undefined; title?: string | undefined; id?: string | undefined; name: React.ReactNode; field: string; defaultChecked?: boolean | undefined; defaultValue?: string | number | string[] | undefined; suppressContentEditableWarning?: boolean | undefined; suppressHydrationWarning?: boolean | undefined; accessKey?: string | undefined; className?: string | undefined; contentEditable?: boolean | \"true\" | \"false\" | \"inherit\" | undefined; contextMenu?: string | undefined; dir?: string | undefined; draggable?: boolean | \"true\" | \"false\" | undefined; hidden?: boolean | undefined; lang?: string | undefined; placeholder?: string | undefined; slot?: string | undefined; spellCheck?: boolean | \"true\" | \"false\" | undefined; style?: React.CSSProperties | undefined; tabIndex?: number | undefined; translate?: \"yes\" | \"no\" | undefined; radioGroup?: string | undefined; role?: string | undefined; about?: string | undefined; datatype?: string | undefined; inlist?: any; prefix?: string | undefined; property?: string | undefined; resource?: string | undefined; typeof?: string | undefined; vocab?: string | undefined; autoCapitalize?: string | undefined; autoCorrect?: string | undefined; autoSave?: string | undefined; itemProp?: string | undefined; itemScope?: boolean | undefined; itemType?: string | undefined; itemID?: string | undefined; itemRef?: string | undefined; results?: number | undefined; security?: string | undefined; unselectable?: \"on\" | \"off\" | undefined; inputMode?: \"none\" | \"text\" | \"search\" | \"email\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\" | undefined; is?: string | undefined; 'aria-activedescendant'?: string | undefined; 'aria-atomic'?: boolean | \"true\" | \"false\" | undefined; 'aria-autocomplete'?: \"none\" | \"list\" | \"inline\" | \"both\" | undefined; 'aria-busy'?: boolean | \"true\" | \"false\" | undefined; 'aria-checked'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-colcount'?: number | undefined; 'aria-colindex'?: number | undefined; 'aria-colspan'?: number | undefined; 'aria-controls'?: string | undefined; 'aria-current'?: boolean | \"date\" | \"location\" | \"page\" | \"true\" | \"false\" | \"step\" | \"time\" | undefined; 'aria-describedby'?: string | undefined; 'aria-details'?: string | undefined; 'aria-disabled'?: boolean | \"true\" | \"false\" | undefined; 'aria-dropeffect'?: \"none\" | \"copy\" | \"link\" | \"execute\" | \"move\" | \"popup\" | undefined; 'aria-errormessage'?: string | undefined; 'aria-expanded'?: boolean | \"true\" | \"false\" | undefined; 'aria-flowto'?: string | undefined; 'aria-grabbed'?: boolean | \"true\" | \"false\" | undefined; 'aria-haspopup'?: boolean | \"grid\" | \"menu\" | \"true\" | \"false\" | \"listbox\" | \"tree\" | \"dialog\" | undefined; 'aria-hidden'?: boolean | \"true\" | \"false\" | undefined; 'aria-invalid'?: boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\" | undefined; 'aria-keyshortcuts'?: string | undefined; 'aria-label'?: string | undefined; 'aria-labelledby'?: string | undefined; 'aria-level'?: number | undefined; 'aria-live'?: \"off\" | \"assertive\" | \"polite\" | undefined; 'aria-modal'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiline'?: boolean | \"true\" | \"false\" | undefined; 'aria-multiselectable'?: boolean | \"true\" | \"false\" | undefined; 'aria-orientation'?: \"horizontal\" | \"vertical\" | undefined; 'aria-owns'?: string | undefined; 'aria-placeholder'?: string | undefined; 'aria-posinset'?: number | undefined; 'aria-pressed'?: boolean | \"mixed\" | \"true\" | \"false\" | undefined; 'aria-readonly'?: boolean | \"true\" | \"false\" | undefined; 'aria-relevant'?: \"all\" | \"text\" | \"additions\" | \"additions text\" | \"removals\" | undefined; 'aria-required'?: boolean | \"true\" | \"false\" | undefined; 'aria-roledescription'?: string | undefined; 'aria-rowcount'?: number | undefined; 'aria-rowindex'?: number | undefined; 'aria-rowspan'?: number | undefined; 'aria-selected'?: boolean | \"true\" | \"false\" | undefined; 'aria-setsize'?: number | undefined; 'aria-sort'?: \"none\" | \"ascending\" | \"descending\" | \"other\" | undefined; 'aria-valuemax'?: number | undefined; 'aria-valuemin'?: number | undefined; 'aria-valuenow'?: number | undefined; 'aria-valuetext'?: string | undefined; dangerouslySetInnerHTML?: { __html: string; } | undefined; onCopy?: ((event: React.ClipboardEvent) => void) | undefined; onCopyCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCut?: ((event: React.ClipboardEvent) => void) | undefined; onCutCapture?: ((event: React.ClipboardEvent) => void) | undefined; onPaste?: ((event: React.ClipboardEvent) => void) | undefined; onPasteCapture?: ((event: React.ClipboardEvent) => void) | undefined; onCompositionEnd?: ((event: React.CompositionEvent) => void) | undefined; onCompositionEndCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStart?: ((event: React.CompositionEvent) => void) | undefined; onCompositionStartCapture?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdate?: ((event: React.CompositionEvent) => void) | undefined; onCompositionUpdateCapture?: ((event: React.CompositionEvent) => void) | undefined; onFocus?: ((event: React.FocusEvent) => void) | undefined; onFocusCapture?: ((event: React.FocusEvent) => void) | undefined; onBlur?: ((event: React.FocusEvent) => void) | undefined; onBlurCapture?: ((event: React.FocusEvent) => void) | undefined; onChangeCapture?: ((event: React.FormEvent) => void) | undefined; onBeforeInput?: ((event: React.FormEvent) => void) | undefined; onBeforeInputCapture?: ((event: React.FormEvent) => void) | undefined; onInput?: ((event: React.FormEvent) => void) | undefined; onInputCapture?: ((event: React.FormEvent) => void) | undefined; onReset?: ((event: React.FormEvent) => void) | undefined; onResetCapture?: ((event: React.FormEvent) => void) | undefined; onSubmit?: ((event: React.FormEvent) => void) | undefined; onSubmitCapture?: ((event: React.FormEvent) => void) | undefined; onInvalid?: ((event: React.FormEvent) => void) | undefined; onInvalidCapture?: ((event: React.FormEvent) => void) | undefined; onLoad?: ((event: React.SyntheticEvent) => void) | undefined; onLoadCapture?: ((event: React.SyntheticEvent) => void) | undefined; onError?: ((event: React.SyntheticEvent) => void) | undefined; onErrorCapture?: ((event: React.SyntheticEvent) => void) | undefined; onKeyDownCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPress?: ((event: React.KeyboardEvent) => void) | undefined; onKeyPressCapture?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUp?: ((event: React.KeyboardEvent) => void) | undefined; onKeyUpCapture?: ((event: React.KeyboardEvent) => void) | undefined; onAbort?: ((event: React.SyntheticEvent) => void) | undefined; onAbortCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlay?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThrough?: ((event: React.SyntheticEvent) => void) | undefined; onCanPlayThroughCapture?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChange?: ((event: React.SyntheticEvent) => void) | undefined; onDurationChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEmptied?: ((event: React.SyntheticEvent) => void) | undefined; onEmptiedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEncrypted?: ((event: React.SyntheticEvent) => void) | undefined; onEncryptedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onEnded?: ((event: React.SyntheticEvent) => void) | undefined; onEndedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedData?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedDataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadata?: ((event: React.SyntheticEvent) => void) | undefined; onLoadedMetadataCapture?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStart?: ((event: React.SyntheticEvent) => void) | undefined; onLoadStartCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPause?: ((event: React.SyntheticEvent) => void) | undefined; onPauseCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlay?: ((event: React.SyntheticEvent) => void) | undefined; onPlayCapture?: ((event: React.SyntheticEvent) => void) | undefined; onPlaying?: ((event: React.SyntheticEvent) => void) | undefined; onPlayingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onProgress?: ((event: React.SyntheticEvent) => void) | undefined; onProgressCapture?: ((event: React.SyntheticEvent) => void) | undefined; onRateChange?: ((event: React.SyntheticEvent) => void) | undefined; onRateChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeked?: ((event: React.SyntheticEvent) => void) | undefined; onSeekedCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSeeking?: ((event: React.SyntheticEvent) => void) | undefined; onSeekingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onStalled?: ((event: React.SyntheticEvent) => void) | undefined; onStalledCapture?: ((event: React.SyntheticEvent) => void) | undefined; onSuspend?: ((event: React.SyntheticEvent) => void) | undefined; onSuspendCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdate?: ((event: React.SyntheticEvent) => void) | undefined; onTimeUpdateCapture?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChange?: ((event: React.SyntheticEvent) => void) | undefined; onVolumeChangeCapture?: ((event: React.SyntheticEvent) => void) | undefined; onWaiting?: ((event: React.SyntheticEvent) => void) | undefined; onWaitingCapture?: ((event: React.SyntheticEvent) => void) | undefined; onAuxClick?: ((event: React.MouseEvent) => void) | undefined; onAuxClickCapture?: ((event: React.MouseEvent) => void) | undefined; onClickCapture?: ((event: React.MouseEvent) => void) | undefined; onContextMenu?: ((event: React.MouseEvent) => void) | undefined; onContextMenuCapture?: ((event: React.MouseEvent) => void) | undefined; onDoubleClick?: ((event: React.MouseEvent) => void) | undefined; onDoubleClickCapture?: ((event: React.MouseEvent) => void) | undefined; onDrag?: ((event: React.DragEvent) => void) | undefined; onDragCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnd?: ((event: React.DragEvent) => void) | undefined; onDragEndCapture?: ((event: React.DragEvent) => void) | undefined; onDragEnter?: ((event: React.DragEvent) => void) | undefined; onDragEnterCapture?: ((event: React.DragEvent) => void) | undefined; onDragExit?: ((event: React.DragEvent) => void) | undefined; onDragExitCapture?: ((event: React.DragEvent) => void) | undefined; onDragLeave?: ((event: React.DragEvent) => void) | undefined; onDragLeaveCapture?: ((event: React.DragEvent) => void) | undefined; onDragOver?: ((event: React.DragEvent) => void) | undefined; onDragOverCapture?: ((event: React.DragEvent) => void) | undefined; onDragStart?: ((event: React.DragEvent) => void) | undefined; onDragStartCapture?: ((event: React.DragEvent) => void) | undefined; onDrop?: ((event: React.DragEvent) => void) | undefined; onDropCapture?: ((event: React.DragEvent) => void) | undefined; onMouseDown?: ((event: React.MouseEvent) => void) | undefined; onMouseDownCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseEnter?: ((event: React.MouseEvent) => void) | undefined; onMouseLeave?: ((event: React.MouseEvent) => void) | undefined; onMouseMove?: ((event: React.MouseEvent) => void) | undefined; onMouseMoveCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOut?: ((event: React.MouseEvent) => void) | undefined; onMouseOutCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseOver?: ((event: React.MouseEvent) => void) | undefined; onMouseOverCapture?: ((event: React.MouseEvent) => void) | undefined; onMouseUp?: ((event: React.MouseEvent) => void) | undefined; onMouseUpCapture?: ((event: React.MouseEvent) => void) | undefined; onSelect?: ((event: React.SyntheticEvent) => void) | undefined; onSelectCapture?: ((event: React.SyntheticEvent) => void) | undefined; onTouchCancel?: ((event: React.TouchEvent) => void) | undefined; onTouchCancelCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchEnd?: ((event: React.TouchEvent) => void) | undefined; onTouchEndCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchMove?: ((event: React.TouchEvent) => void) | undefined; onTouchMoveCapture?: ((event: React.TouchEvent) => void) | undefined; onTouchStart?: ((event: React.TouchEvent) => void) | undefined; onTouchStartCapture?: ((event: React.TouchEvent) => void) | undefined; onPointerDown?: ((event: React.PointerEvent) => void) | undefined; onPointerDownCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerMove?: ((event: React.PointerEvent) => void) | undefined; onPointerMoveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerUp?: ((event: React.PointerEvent) => void) | undefined; onPointerUpCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerCancel?: ((event: React.PointerEvent) => void) | undefined; onPointerCancelCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerEnter?: ((event: React.PointerEvent) => void) | undefined; onPointerEnterCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerLeave?: ((event: React.PointerEvent) => void) | undefined; onPointerLeaveCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOver?: ((event: React.PointerEvent) => void) | undefined; onPointerOverCapture?: ((event: React.PointerEvent) => void) | undefined; onPointerOut?: ((event: React.PointerEvent) => void) | undefined; onPointerOutCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onGotPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCapture?: ((event: React.PointerEvent) => void) | undefined; onLostPointerCaptureCapture?: ((event: React.PointerEvent) => void) | undefined; onScroll?: ((event: React.UIEvent) => void) | undefined; onScrollCapture?: ((event: React.UIEvent) => void) | undefined; onWheel?: ((event: React.WheelEvent) => void) | undefined; onWheelCapture?: ((event: React.WheelEvent) => void) | undefined; onAnimationStart?: ((event: React.AnimationEvent) => void) | undefined; onAnimationStartCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEnd?: ((event: React.AnimationEvent) => void) | undefined; onAnimationEndCapture?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIteration?: ((event: React.AnimationEvent) => void) | undefined; onAnimationIterationCapture?: ((event: React.AnimationEvent) => void) | undefined; onTransitionEnd?: ((event: React.TransitionEvent) => void) | undefined; onTransitionEndCapture?: ((event: React.TransitionEvent) => void) | undefined; css?: ", "InterpolationWithTheme", "; 'data-test-subj'?: string | undefined; width?: string | undefined; render?: ((value: any, record: ", { @@ -1320,7 +1320,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - " | undefined; register: (entry: ", + " | undefined; all: () => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1328,7 +1328,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - ") => void; all: () => ", + "[]; register: (entry: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1336,7 +1336,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - "[]; }" + ") => void; }" ], "source": { "path": "src/plugins/saved_objects_management/public/services/service_registry.ts", @@ -1448,7 +1448,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - " | undefined; register: (entry: ", + " | undefined; all: () => ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1456,7 +1456,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - ") => void; all: () => ", + "[]; register: (entry: ", { "pluginId": "savedObjectsManagement", "scope": "public", @@ -1464,7 +1464,7 @@ "section": "def-public.SavedObjectsManagementServiceRegistryEntry", "text": "SavedObjectsManagementServiceRegistryEntry" }, - "[]; }" + ") => void; }" ], "source": { "path": "src/plugins/saved_objects_management/public/plugin.ts", diff --git a/api_docs/screenshot_mode.json b/api_docs/screenshot_mode.json index b7d680b6e93b1..22b613bf0b04b 100644 --- a/api_docs/screenshot_mode.json +++ b/api_docs/screenshot_mode.json @@ -2,11 +2,83 @@ "id": "screenshotMode", "client": { "classes": [], - "functions": [], + "functions": [ + { + "parentPluginId": "screenshotMode", + "id": "def-public.setScreenshotModeEnabled", + "type": "Function", + "tags": [], + "label": "setScreenshotModeEnabled", + "description": [ + "\nUse this function to set the current browser to screenshot mode.\n\nThis function should be called as early as possible to ensure that screenshot mode is\ncorrectly detected for the first page load. It is not suitable for use inside any plugin\ncode unless the plugin code is guaranteed to, somehow, load before any other code.\n\nAdditionally, we don't know what environment this code will run in so we remove as many external\nreferences as possible to make it portable. For instance, running inside puppeteer." + ], + "signature": [ + "() => void" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 39 + }, + "deprecated": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [], "enums": [], - "misc": [], - "objects": [] + "misc": [ + { + "parentPluginId": "screenshotMode", + "id": "def-public.KBN_SCREENSHOT_MODE_ENABLED_KEY", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_ENABLED_KEY", + "description": [], + "signature": [ + "\"__KBN_SCREENSHOT_MODE_ENABLED_KEY__\"" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 13 + }, + "deprecated": false, + "initialIsOpen": false + }, + { + "parentPluginId": "screenshotMode", + "id": "def-public.KBN_SCREENSHOT_MODE_HEADER", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_HEADER", + "description": [], + "source": { + "path": "src/plugins/screenshot_mode/common/constants.ts", + "lineNumber": 9 + }, + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [], + "setup": { + "parentPluginId": "screenshotMode", + "id": "def-public.ScreenshotModePluginSetup", + "type": "Type", + "tags": [], + "label": "ScreenshotModePluginSetup", + "description": [], + "signature": [ + "IScreenshotModeService" + ], + "source": { + "path": "src/plugins/screenshot_mode/public/types.ts", + "lineNumber": 17 + }, + "deprecated": false, + "lifecycle": "setup", + "initialIsOpen": true + } }, "server": { "classes": [], @@ -86,6 +158,23 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "screenshotMode", + "id": "def-server.KBN_SCREENSHOT_MODE_ENABLED_KEY", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_ENABLED_KEY", + "description": [], + "signature": [ + "\"__KBN_SCREENSHOT_MODE_ENABLED_KEY__\"" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 13 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "screenshotMode", "id": "def-server.KBN_SCREENSHOT_MODE_HEADER", @@ -325,6 +414,23 @@ "interfaces": [], "enums": [], "misc": [ + { + "parentPluginId": "screenshotMode", + "id": "def-common.KBN_SCREENSHOT_MODE_ENABLED_KEY", + "type": "string", + "tags": [], + "label": "KBN_SCREENSHOT_MODE_ENABLED_KEY", + "description": [], + "signature": [ + "\"__KBN_SCREENSHOT_MODE_ENABLED_KEY__\"" + ], + "source": { + "path": "src/plugins/screenshot_mode/common/get_set_browser_screenshot_mode.ts", + "lineNumber": 13 + }, + "deprecated": false, + "initialIsOpen": false + }, { "parentPluginId": "screenshotMode", "id": "def-common.KBN_SCREENSHOT_MODE_HEADER", diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 115a348cbe2e6..cdb70b22b0837 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -11,6 +11,17 @@ warning: This document is auto-generated and is meant to be viewed inside our ex import screenshotModeObj from './screenshot_mode.json'; +## Client + +### Setup + + +### Functions + + +### Consts, variables and types + + ## Server ### Setup diff --git a/api_docs/security.json b/api_docs/security.json index 7e28ad2a222bb..f7547221cec66 100644 --- a/api_docs/security.json +++ b/api_docs/security.json @@ -14,7 +14,13 @@ "\nRepresents the currently authenticated user." ], "signature": [ - "AuthenticatedUser", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, " extends ", "User" ], @@ -96,6 +102,70 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceSetup", + "type": "Interface", + "tags": [], + "label": "AuthenticationServiceSetup", + "description": [], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 33 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceSetup.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nReturns currently authenticated user and throws if current user isn't authenticated." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + ">" + ], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 37 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceSetup.areAPIKeysEnabled", + "type": "Function", + "tags": [], + "label": "areAPIKeysEnabled", + "description": [ + "\nDetermines if API Keys are currently enabled." + ], + "signature": [ + "() => Promise" + ], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 42 + }, + "deprecated": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-public.SecurityLicense", @@ -408,6 +478,104 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-public.SecurityNavControlServiceStart", + "type": "Interface", + "tags": [], + "label": "SecurityNavControlServiceStart", + "description": [], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 32 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.SecurityNavControlServiceStart.getUserMenuLinks$", + "type": "Function", + "tags": [], + "label": "getUserMenuLinks$", + "description": [ + "\nReturns an Observable of the array of user menu links (the links that show up under the user's Avatar in the UI) registered by other plugins" + ], + "signature": [ + "() => ", + "Observable", + "<", + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.UserMenuLink", + "text": "UserMenuLink" + }, + "[]>" + ], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 36 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "security", + "id": "def-public.SecurityNavControlServiceStart.addUserMenuLinks", + "type": "Function", + "tags": [], + "label": "addUserMenuLinks", + "description": [ + "\nRegisters the provided user menu links to be displayed in the user menu (the links that show up under the user's Avatar in the UI)." + ], + "signature": [ + "(newUserMenuLink: ", + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.UserMenuLink", + "text": "UserMenuLink" + }, + "[]) => void" + ], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 41 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-public.newUserMenuLink", + "type": "Array", + "tags": [], + "label": "newUserMenuLink", + "description": [], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.UserMenuLink", + "text": "UserMenuLink" + }, + "[]" + ], + "source": { + "path": "x-pack/plugins/security/public/nav_control/nav_control_service.tsx", + "lineNumber": 41 + }, + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-public.UserMenuLink", @@ -500,55 +668,161 @@ } ], "enums": [], - "misc": [], + "misc": [ + { + "parentPluginId": "security", + "id": "def-public.AuthenticationServiceStart", + "type": "Type", + "tags": [], + "label": "AuthenticationServiceStart", + "description": [ + "\nStart has the same contract as Setup for now." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.AuthenticationServiceSetup", + "text": "AuthenticationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/public/authentication/authentication_service.ts", + "lineNumber": 48 + }, + "deprecated": false, + "initialIsOpen": false + } + ], "objects": [], "setup": { "parentPluginId": "security", "id": "def-public.SecurityPluginSetup", - "type": "Type", + "type": "Interface", "tags": [], "label": "SecurityPluginSetup", "description": [], - "signature": [ - "{ authc: ", - "AuthenticationServiceSetup", - "; sessionTimeout: ", - "SessionTimeout", - "; license: Readonly<{ isLicenseAvailable: () => boolean; isEnabled: () => boolean; getType: () => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; getFeatures: () => ", - "SecurityLicenseFeatures", - "; features$: ", - "Observable", - "<", - "SecurityLicenseFeatures", - ">; }>; __legacyCompat: { logoutUrl: string; tenant: string; }; }" - ], "source": { "path": "x-pack/plugins/security/public/plugin.tsx", - "lineNumber": 164 + "lineNumber": 167 }, "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginSetup.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nExposes authentication information about the currently logged in user." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.AuthenticationServiceSetup", + "text": "AuthenticationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 171 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginSetup.license", + "type": "Object", + "tags": [], + "label": "license", + "description": [ + "\nExposes information about the available security features under the current license." + ], + "signature": [ + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.SecurityLicense", + "text": "SecurityLicense" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 175 + }, + "deprecated": false + } + ], "lifecycle": "setup", "initialIsOpen": true }, "start": { "parentPluginId": "security", "id": "def-public.SecurityPluginStart", - "type": "Type", + "type": "Interface", "tags": [], "label": "SecurityPluginStart", "description": [], - "signature": [ - "{ navControlService: ", - "SecurityNavControlServiceStart", - "; authc: ", - "AuthenticationServiceSetup", - "; }" - ], "source": { "path": "x-pack/plugins/security/public/plugin.tsx", - "lineNumber": 165 + "lineNumber": 178 }, "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginStart.navControlService", + "type": "Object", + "tags": [], + "label": "navControlService", + "description": [ + "\nExposes the ability to add custom links to the dropdown menu in the top right, where the user's Avatar is." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.SecurityNavControlServiceStart", + "text": "SecurityNavControlServiceStart" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 182 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-public.SecurityPluginStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nExposes authentication information about the currently logged in user." + ], + "signature": [ + { + "pluginId": "security", + "scope": "public", + "docId": "kibSecurityPluginApi", + "section": "def-public.AuthenticationServiceSetup", + "text": "AuthenticationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/public/plugin.tsx", + "lineNumber": 186 + }, + "deprecated": false + } + ], "lifecycle": "start", "initialIsOpen": true } @@ -681,6 +955,121 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "security", + "id": "def-server.AuditServiceSetup", + "type": "Interface", + "tags": [], + "label": "AuditServiceSetup", + "description": [], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 40 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.AuditServiceSetup.asScoped", + "type": "Function", + "tags": [], + "label": "asScoped", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuditLogger", + "text": "AuditLogger" + } + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 41 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-server.request", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 41 + }, + "deprecated": false + } + ] + }, + { + "parentPluginId": "security", + "id": "def-server.AuditServiceSetup.getLogger", + "type": "Function", + "tags": [], + "label": "getLogger", + "description": [], + "signature": [ + "(id?: string | undefined) => ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.LegacyAuditLogger", + "text": "LegacyAuditLogger" + } + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 42 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-server.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/security/server/audit/audit_service.ts", + "lineNumber": 42 + }, + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "security", "id": "def-server.AuthenticatedUser", @@ -691,7 +1080,13 @@ "\nRepresents the currently authenticated user." ], "signature": [ - "AuthenticatedUser", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, " extends ", "User" ], @@ -775,26 +1170,194 @@ }, { "parentPluginId": "security", - "id": "def-server.CheckPrivilegesPayload", + "id": "def-server.AuthenticationServiceStart", "type": "Interface", "tags": [], - "label": "CheckPrivilegesPayload", - "description": [], + "label": "AuthenticationServiceStart", + "description": [ + "\nAuthentication services available on the security plugin's start contract." + ], "source": { - "path": "x-pack/plugins/security/server/authorization/types.ts", - "lineNumber": 70 + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 72 }, "deprecated": false, "children": [ { "parentPluginId": "security", - "id": "def-server.CheckPrivilegesPayload.kibana", - "type": "CompoundType", + "id": "def-server.AuthenticationServiceStart.apiKeys", + "type": "Object", "tags": [], - "label": "kibana", + "label": "apiKeys", "description": [], "signature": [ - "string | string[] | undefined" + "{ create: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", params: ", + "CreateAPIKeyParams", + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.CreateAPIKeyResult", + "text": "CreateAPIKeyResult" + }, + " | null>; areAPIKeysEnabled: () => Promise; invalidate: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", params: ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>; grantAsInternalUser: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ", createParams: ", + "CreateAPIKeyParams", + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.GrantAPIKeyResult", + "text": "GrantAPIKeyResult" + }, + " | null>; invalidateAsInternalUser: (params: ", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeysParams", + "text": "InvalidateAPIKeysParams" + }, + ") => Promise<", + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.InvalidateAPIKeyResult", + "text": "InvalidateAPIKeyResult" + }, + " | null>; }" + ], + "source": { + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 73 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-server.AuthenticationServiceStart.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "source": { + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 81 + }, + "deprecated": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "security", + "id": "def-server.request", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "source": { + "path": "x-pack/plugins/security/server/authentication/authentication_service.ts", + "lineNumber": 81 + }, + "deprecated": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "security", + "id": "def-server.CheckPrivilegesPayload", + "type": "Interface", + "tags": [], + "label": "CheckPrivilegesPayload", + "description": [], + "source": { + "path": "x-pack/plugins/security/server/authorization/types.ts", + "lineNumber": 70 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.CheckPrivilegesPayload.kibana", + "type": "CompoundType", + "tags": [], + "label": "kibana", + "description": [], + "signature": [ + "string | string[] | undefined" ], "source": { "path": "x-pack/plugins/security/server/authorization/types.ts", @@ -832,7 +1395,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 56 + "lineNumber": 62 }, "deprecated": false, "children": [ @@ -847,7 +1410,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 60 + "lineNumber": 66 }, "deprecated": false }, @@ -862,7 +1425,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 64 + "lineNumber": 70 }, "deprecated": false }, @@ -880,7 +1443,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 68 + "lineNumber": 74 }, "deprecated": false }, @@ -895,7 +1458,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 72 + "lineNumber": 78 }, "deprecated": false } @@ -911,7 +1474,7 @@ "description": [], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 75 + "lineNumber": 81 }, "deprecated": false, "children": [ @@ -926,7 +1489,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 79 + "lineNumber": 85 }, "deprecated": false }, @@ -941,7 +1504,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 83 + "lineNumber": 89 }, "deprecated": false }, @@ -956,7 +1519,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 87 + "lineNumber": 93 }, "deprecated": false } @@ -974,7 +1537,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 93 + "lineNumber": 99 }, "deprecated": false, "children": [ @@ -992,7 +1555,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 97 + "lineNumber": 103 }, "deprecated": false }, @@ -1010,7 +1573,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 101 + "lineNumber": 107 }, "deprecated": false }, @@ -1025,7 +1588,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 105 + "lineNumber": 111 }, "deprecated": false }, @@ -1043,7 +1606,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 109 + "lineNumber": 115 }, "deprecated": false } @@ -1061,7 +1624,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 46 + "lineNumber": 52 }, "deprecated": false, "children": [ @@ -1077,7 +1640,7 @@ ], "source": { "path": "x-pack/plugins/security/server/authentication/api_keys/api_keys.ts", - "lineNumber": 47 + "lineNumber": 53 }, "deprecated": false } @@ -1234,256 +1797,478 @@ } ], "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "security", + "id": "def-server.AuthorizationServiceSetup", + "type": "Type", + "tags": [], + "label": "AuthorizationServiceSetup", + "description": [], + "source": { + "path": "x-pack/plugins/security/server/index.ts", + "lineNumber": 31 + }, + "deprecated": false, + "initialIsOpen": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup", + "id": "def-server.ROUTE_TAG_CAN_REDIRECT", + "type": "string", + "tags": [], + "label": "ROUTE_TAG_CAN_REDIRECT", + "description": [ + "\nIf the route is marked with this tag Security can safely assume that the calling party that sends\nrequest to this route can handle redirect responses. It's particularly important if we want the\nspecific route to be able to initiate or participate in the authentication handshake that may\ninvolve redirects and will eventually redirect authenticated user to this route." + ], + "signature": [ + "\"security:canRedirect\"" + ], + "source": { + "path": "x-pack/plugins/security/server/routes/tags.ts", + "lineNumber": 21 + }, + "deprecated": false, + "initialIsOpen": false + } + ], + "objects": [], + "setup": { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup", + "type": "Interface", + "tags": [], + "label": "SecurityPluginSetup", + "description": [ + "\nDescribes public Security plugin contract returned at the `setup` stage." + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 72 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.authc", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "authc", + "description": [], + "signature": [ + "{ getCurrentUser: (request: ", + { + "pluginId": "core", + "scope": "server", + "docId": "kibCoreHttpPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null; }" + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 76 + }, + "deprecated": true, + "references": [ + { + "plugin": "reporting", + "link": { + "path": "x-pack/plugins/reporting/server/routes/lib/get_user.ts", + "lineNumber": 13 + } + }, + { + "plugin": "encryptedSavedObjects", + "link": { + "path": "x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts", + "lineNumber": 107 + } + }, + { + "plugin": "encryptedSavedObjects", + "link": { + "path": "x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts", + "lineNumber": 67 + } + }, + { + "plugin": "actions", + "link": { + "path": "x-pack/plugins/actions/server/plugin.ts", + "lineNumber": 444 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/routes/annotations.ts", + "lineNumber": 105 + } + }, + { + "plugin": "dashboardMode", + "link": { + "path": "x-pack/plugins/dashboard_mode/server/interceptors/dashboard_mode_request_interceptor.ts", + "lineNumber": 33 + } + }, + { + "plugin": "dataEnhanced", + "link": { + "path": "x-pack/plugins/data_enhanced/server/search/session/session_service.ts", + "lineNumber": 448 + } + }, + { + "plugin": "logstash", + "link": { + "path": "x-pack/plugins/logstash/server/routes/pipeline/save.ts", + "lineNumber": 41 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts", + "lineNumber": 48 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts", + "lineNumber": 45 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts", + "lineNumber": 45 + } + }, + { + "plugin": "securitySolution", + "link": { + "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts", + "lineNumber": 28 + } + } + ] + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.authz", + "type": "Object", + "tags": [ + "deprecated" + ], + "label": "authz", + "description": [], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 80 + }, + "deprecated": true, + "references": [ + { + "plugin": "actions", + "link": { + "path": "x-pack/plugins/actions/server/plugin.ts", + "lineNumber": 443 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/saved_objects/initialization/initialization.ts", + "lineNumber": 54 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/plugin.ts", + "lineNumber": 153 + } + }, + { + "plugin": "ml", + "link": { + "path": "x-pack/plugins/ml/server/plugin.ts", + "lineNumber": 203 + } + }, + { + "plugin": "enterpriseSearch", + "link": { + "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", + "lineNumber": 46 + } + }, + { + "plugin": "enterpriseSearch", + "link": { + "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", + "lineNumber": 86 + } + }, + { + "plugin": "enterpriseSearch", + "link": { + "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", + "lineNumber": 88 + } + }, + { + "plugin": "savedObjectsTagging", + "link": { + "path": "x-pack/plugins/saved_objects_tagging/server/request_handler_context.ts", + "lineNumber": 37 + } + } + ] + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.license", + "type": "Object", + "tags": [], + "label": "license", + "description": [ + "\nExposes information about the available security features under the current license." + ], + "signature": [ + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.SecurityLicense", + "text": "SecurityLicense" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 84 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginSetup.audit", + "type": "Object", + "tags": [], + "label": "audit", + "description": [ + "\nExposes services for audit logging." + ], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuditServiceSetup", + "text": "AuditServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 88 + }, + "deprecated": false + } + ], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "security", + "id": "def-server.SecurityPluginStart", + "type": "Interface", + "tags": [], + "label": "SecurityPluginStart", + "description": [ + "\nDescribes public Security plugin contract returned at the `start` stage." + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 94 + }, + "deprecated": false, + "children": [ + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nAuthentication services to confirm the user is who they say they are." + ], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuthenticationServiceStart", + "text": "AuthenticationServiceStart" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 98 + }, + "deprecated": false + }, + { + "parentPluginId": "security", + "id": "def-server.SecurityPluginStart.authz", + "type": "Object", + "tags": [], + "label": "authz", + "description": [ + "\nAuthorization services to manage and access the permissions a particular user has." + ], + "signature": [ + { + "pluginId": "security", + "scope": "server", + "docId": "kibSecurityPluginApi", + "section": "def-server.AuthorizationServiceSetup", + "text": "AuthorizationServiceSetup" + } + ], + "source": { + "path": "x-pack/plugins/security/server/plugin.ts", + "lineNumber": 102 + }, + "deprecated": false + } + ], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "security", + "id": "def-common.AuthenticatedUser", "type": "Interface", "tags": [], - "label": "SecurityPluginSetup", + "label": "AuthenticatedUser", "description": [ - "\nDescribes public Security plugin contract returned at the `setup` stage." + "\nRepresents the currently authenticated user." + ], + "signature": [ + { + "pluginId": "security", + "scope": "common", + "docId": "kibSecurityPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " extends ", + "User" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 69 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 21 }, "deprecated": false, "children": [ { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.authc", + "id": "def-common.AuthenticatedUser.authentication_realm", "type": "Object", - "tags": [ - "deprecated" + "tags": [], + "label": "authentication_realm", + "description": [ + "\nThe name and type of the Realm that has authenticated the user." ], - "label": "authc", - "description": [], "signature": [ - "{ getCurrentUser: (request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - "AuthenticatedUser", - " | null; }" + "UserRealm" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 73 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 25 }, - "deprecated": true, - "references": [ - { - "plugin": "reporting", - "link": { - "path": "x-pack/plugins/reporting/server/routes/lib/get_user.ts", - "lineNumber": 13 - } - }, - { - "plugin": "encryptedSavedObjects", - "link": { - "path": "x-pack/plugins/encrypted_saved_objects/server/crypto/encryption_key_rotation_service.ts", - "lineNumber": 107 - } - }, - { - "plugin": "encryptedSavedObjects", - "link": { - "path": "x-pack/plugins/encrypted_saved_objects/server/saved_objects/index.ts", - "lineNumber": 67 - } - }, - { - "plugin": "actions", - "link": { - "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 444 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/routes/annotations.ts", - "lineNumber": 105 - } - }, - { - "plugin": "cases", - "link": { - "path": "x-pack/plugins/cases/server/plugin.ts", - "lineNumber": 89 - } - }, - { - "plugin": "dashboardMode", - "link": { - "path": "x-pack/plugins/dashboard_mode/server/interceptors/dashboard_mode_request_interceptor.ts", - "lineNumber": 33 - } - }, - { - "plugin": "dataEnhanced", - "link": { - "path": "x-pack/plugins/data_enhanced/server/search/session/session_service.ts", - "lineNumber": 448 - } - }, - { - "plugin": "logstash", - "link": { - "path": "x-pack/plugins/logstash/server/routes/pipeline/save.ts", - "lineNumber": 41 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts", - "lineNumber": 48 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts", - "lineNumber": 45 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts", - "lineNumber": 45 - } - }, - { - "plugin": "securitySolution", - "link": { - "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts", - "lineNumber": 28 - } - } - ] + "deprecated": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.authz", + "id": "def-common.AuthenticatedUser.lookup_realm", "type": "Object", - "tags": [ - "deprecated" + "tags": [], + "label": "lookup_realm", + "description": [ + "\nThe name and type of the Realm where the user information were retrieved from." ], - "label": "authz", - "description": [], "signature": [ - "{ mode: ", - "AuthorizationMode", - "; actions: ", - "Actions", - "; checkPrivilegesDynamicallyWithRequest: ", - "CheckPrivilegesDynamicallyWithRequest", - "; checkPrivilegesWithRequest: ", - "CheckPrivilegesWithRequest", - "; }" + "UserRealm" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 77 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 30 }, - "deprecated": true, - "references": [ - { - "plugin": "actions", - "link": { - "path": "x-pack/plugins/actions/server/plugin.ts", - "lineNumber": 443 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/saved_objects/initialization/initialization.ts", - "lineNumber": 54 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/plugin.ts", - "lineNumber": 153 - } - }, - { - "plugin": "ml", - "link": { - "path": "x-pack/plugins/ml/server/plugin.ts", - "lineNumber": 203 - } - }, - { - "plugin": "enterpriseSearch", - "link": { - "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", - "lineNumber": 46 - } - }, - { - "plugin": "enterpriseSearch", - "link": { - "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", - "lineNumber": 86 - } - }, - { - "plugin": "enterpriseSearch", - "link": { - "path": "x-pack/plugins/enterprise_search/server/lib/check_access.ts", - "lineNumber": 88 - } - }, - { - "plugin": "savedObjectsTagging", - "link": { - "path": "x-pack/plugins/saved_objects_tagging/server/request_handler_context.ts", - "lineNumber": 37 - } - } - ] + "deprecated": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.license", + "id": "def-common.AuthenticatedUser.authentication_provider", "type": "Object", "tags": [], - "label": "license", - "description": [], + "label": "authentication_provider", + "description": [ + "\nThe authentication provider that used to authenticate user." + ], "signature": [ - "SecurityLicense" + "AuthenticationProvider" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 81 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 35 }, "deprecated": false }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginSetup.audit", - "type": "Object", + "id": "def-common.AuthenticatedUser.authentication_type", + "type": "string", "tags": [], - "label": "audit", - "description": [], - "signature": [ - "AuditServiceSetup" + "label": "authentication_type", + "description": [ + "\nThe AuthenticationType used by ES to authenticate the user.\n" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 82 + "path": "x-pack/plugins/security/common/model/authenticated_user.ts", + "lineNumber": 42 }, "deprecated": false } @@ -1492,68 +2277,106 @@ }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginStart", + "id": "def-common.SecurityLicense", "type": "Interface", "tags": [], - "label": "SecurityPluginStart", - "description": [ - "\nDescribes public Security plugin contract returned at the `start` stage." - ], + "label": "SecurityLicense", + "description": [], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 88 + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 14 }, "deprecated": false, "children": [ { "parentPluginId": "security", - "id": "def-server.SecurityPluginStart.authc", - "type": "Object", + "id": "def-common.SecurityLicense.isLicenseAvailable", + "type": "Function", "tags": [], - "label": "authc", + "label": "isLicenseAvailable", "description": [], "signature": [ - "{ getCurrentUser: (request: ", - { - "pluginId": "core", - "scope": "server", - "docId": "kibCoreHttpPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - "AuthenticatedUser", - " | null; apiKeys: Pick<", - "APIKeys", - ", \"create\" | \"areAPIKeysEnabled\" | \"invalidate\" | \"grantAsInternalUser\" | \"invalidateAsInternalUser\">; }" + "() => boolean" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 89 + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 15 }, - "deprecated": false + "deprecated": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "security", - "id": "def-server.SecurityPluginStart.authz", + "id": "def-common.SecurityLicense.isEnabled", + "type": "Function", + "tags": [], + "label": "isEnabled", + "description": [], + "signature": [ + "() => boolean" + ], + "source": { + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 16 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-common.SecurityLicense.getType", + "type": "Function", + "tags": [], + "label": "getType", + "description": [], + "signature": [ + "() => \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined" + ], + "source": { + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 17 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-common.SecurityLicense.getFeatures", + "type": "Function", + "tags": [], + "label": "getFeatures", + "description": [], + "signature": [ + "() => ", + "SecurityLicenseFeatures" + ], + "source": { + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 18 + }, + "deprecated": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "security", + "id": "def-common.SecurityLicense.features$", "type": "Object", "tags": [], - "label": "authz", + "label": "features$", "description": [], "signature": [ - "{ mode: ", - "AuthorizationMode", - "; actions: ", - "Actions", - "; checkPrivilegesDynamicallyWithRequest: ", - "CheckPrivilegesDynamicallyWithRequest", - "; checkPrivilegesWithRequest: ", - "CheckPrivilegesWithRequest", - "; }" + "Observable", + "<", + "SecurityLicenseFeatures", + ">" ], "source": { - "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 90 + "path": "x-pack/plugins/security/common/licensing/license_service.ts", + "lineNumber": 19 }, "deprecated": false } @@ -1562,59 +2385,6 @@ } ], "enums": [], - "misc": [ - { - "parentPluginId": "security", - "id": "def-server.AuthorizationServiceSetup", - "type": "Type", - "tags": [], - "label": "AuthorizationServiceSetup", - "description": [], - "signature": [ - "{ mode: ", - "AuthorizationMode", - "; actions: ", - "Actions", - "; checkPrivilegesDynamicallyWithRequest: ", - "CheckPrivilegesDynamicallyWithRequest", - "; checkPrivilegesWithRequest: ", - "CheckPrivilegesWithRequest", - "; }" - ], - "source": { - "path": "x-pack/plugins/security/server/index.ts", - "lineNumber": 30 - }, - "deprecated": false, - "initialIsOpen": false - }, - { - "parentPluginId": "security", - "id": "def-server.ROUTE_TAG_CAN_REDIRECT", - "type": "string", - "tags": [], - "label": "ROUTE_TAG_CAN_REDIRECT", - "description": [ - "\nIf the route is marked with this tag Security can safely assume that the calling party that sends\nrequest to this route can handle redirect responses. It's particularly important if we want the\nspecific route to be able to initiate or participate in the authentication handshake that may\ninvolve redirects and will eventually redirect authenticated user to this route." - ], - "signature": [ - "\"security:canRedirect\"" - ], - "source": { - "path": "x-pack/plugins/security/server/routes/tags.ts", - "lineNumber": 21 - }, - "deprecated": false, - "initialIsOpen": false - } - ], - "objects": [] - }, - "common": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], "misc": [], "objects": [] } diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 4d2afe42cb151..250ceff429207 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -22,11 +22,25 @@ import securityObj from './security.json'; ### Interfaces +### Consts, variables and types + + ## Server +### Setup + + +### Start + + ### Interfaces ### Consts, variables and types +## Common + +### Interfaces + + diff --git a/api_docs/security_solution.json b/api_docs/security_solution.json index a265ea7fdc7ac..747ef4b4b715b 100644 --- a/api_docs/security_solution.json +++ b/api_docs/security_solution.json @@ -43,7 +43,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 74 + "lineNumber": 75 }, "deprecated": false, "children": [ @@ -59,7 +59,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 78 + "lineNumber": 79 }, "deprecated": false, "children": [ @@ -82,7 +82,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 78 + "lineNumber": 79 }, "deprecated": false, "isRequired": true @@ -123,7 +123,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false, "children": [ @@ -150,7 +150,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false, "isRequired": true @@ -167,7 +167,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 102 + "lineNumber": 103 }, "deprecated": false, "isRequired": true @@ -197,7 +197,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 343 + "lineNumber": 344 }, "deprecated": false, "children": [ @@ -219,7 +219,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 343 + "lineNumber": 344 }, "deprecated": false, "isRequired": true @@ -236,7 +236,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 343 + "lineNumber": 344 }, "deprecated": false, "isRequired": true @@ -256,7 +256,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/public/plugin.tsx", - "lineNumber": 388 + "lineNumber": 389 }, "deprecated": false, "children": [], @@ -445,7 +445,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 133 + "lineNumber": 143 }, "deprecated": false, "children": [ @@ -461,7 +461,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 148 + "lineNumber": 159 }, "deprecated": false, "children": [ @@ -484,7 +484,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 148 + "lineNumber": 159 }, "deprecated": false, "isRequired": true @@ -524,7 +524,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 171 }, "deprecated": false, "children": [ @@ -557,7 +557,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 171 }, "deprecated": false, "isRequired": true @@ -574,7 +574,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 160 + "lineNumber": 171 }, "deprecated": false, "isRequired": true @@ -604,7 +604,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 345 + "lineNumber": 471 }, "deprecated": false, "children": [ @@ -626,7 +626,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 345 + "lineNumber": 471 }, "deprecated": false, "isRequired": true @@ -643,7 +643,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 345 + "lineNumber": 471 }, "deprecated": false, "isRequired": true @@ -663,7 +663,7 @@ ], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 420 + "lineNumber": 546 }, "deprecated": false, "children": [], @@ -747,7 +747,7 @@ "description": [], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 109 + "lineNumber": 127 }, "deprecated": false, "children": [], @@ -763,7 +763,7 @@ "description": [], "source": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 112 + "lineNumber": 130 }, "deprecated": false, "children": [], diff --git a/api_docs/share.json b/api_docs/share.json index 82f5b8697b72d..41b7ecc38e1f0 100644 --- a/api_docs/share.json +++ b/api_docs/share.json @@ -124,7 +124,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 25 + "lineNumber": 35 }, "deprecated": false, "children": [ @@ -140,7 +140,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 30 + "lineNumber": 40 }, "deprecated": false, "children": [], @@ -167,7 +167,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 32 + "lineNumber": 42 }, "deprecated": false, "children": [ @@ -190,7 +190,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 32 + "lineNumber": 42 }, "deprecated": false, "isRequired": true @@ -219,7 +219,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 45 + "lineNumber": 55 }, "deprecated": false, "children": [ @@ -241,7 +241,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 45 + "lineNumber": 55 }, "deprecated": false, "isRequired": true @@ -261,7 +261,7 @@ ], "source": { "path": "src/plugins/share/public/url_generators/url_generator_service.ts", - "lineNumber": 52 + "lineNumber": 62 }, "deprecated": false, "children": [], @@ -1316,11 +1316,13 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsSetup", + "; url: ", + "UrlService", "; }" ], "source": { "path": "src/plugins/share/public/plugin.ts", - "lineNumber": 56 + "lineNumber": 32 }, "deprecated": false, "lifecycle": "setup", @@ -1344,11 +1346,13 @@ }, ") => void; } & { urlGenerators: ", "UrlGeneratorsStart", + "; url: ", + "UrlService", "; }" ], "source": { "path": "src/plugins/share/public/plugin.ts", - "lineNumber": 61 + "lineNumber": 47 }, "deprecated": false, "lifecycle": "start", diff --git a/api_docs/spaces.json b/api_docs/spaces.json index 2f2d79c2379d5..002145f3b48db 100644 --- a/api_docs/spaces.json +++ b/api_docs/spaces.json @@ -1203,7 +1203,7 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 263 + "lineNumber": 267 } }, { @@ -1245,7 +1245,7 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 194 + "lineNumber": 206 } }, { @@ -2002,28 +2002,28 @@ "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 57 + "lineNumber": 60 } }, { "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 263 + "lineNumber": 267 } }, { "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 281 + "lineNumber": 285 } }, { "plugin": "security", "link": { "path": "x-pack/plugins/security/server/plugin.ts", - "lineNumber": 297 + "lineNumber": 301 } }, { @@ -2086,7 +2086,7 @@ "plugin": "securitySolution", "link": { "path": "x-pack/plugins/security_solution/server/plugin.ts", - "lineNumber": 194 + "lineNumber": 206 } } ] diff --git a/api_docs/task_manager.json b/api_docs/task_manager.json index 61e37fa5acc0c..34f16e8ad309b 100644 --- a/api_docs/task_manager.json +++ b/api_docs/task_manager.json @@ -364,7 +364,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 297 + "lineNumber": 302 }, "deprecated": false, "children": [ @@ -379,7 +379,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 302 + "lineNumber": 307 }, "deprecated": false }, @@ -397,7 +397,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 307 + "lineNumber": 312 }, "deprecated": false }, @@ -415,7 +415,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 313 + "lineNumber": 318 }, "deprecated": false }, @@ -430,7 +430,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 319 + "lineNumber": 324 }, "deprecated": false }, @@ -454,7 +454,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 324 + "lineNumber": 329 }, "deprecated": false }, @@ -472,7 +472,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 330 + "lineNumber": 335 }, "deprecated": false }, @@ -490,7 +490,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 337 + "lineNumber": 342 }, "deprecated": false }, @@ -508,7 +508,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 343 + "lineNumber": 348 }, "deprecated": false }, @@ -526,7 +526,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 353 + "lineNumber": 358 }, "deprecated": false }, @@ -544,7 +544,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 358 + "lineNumber": 363 }, "deprecated": false } @@ -766,6 +766,24 @@ }, "deprecated": false }, + { + "parentPluginId": "taskManager", + "id": "def-server.TaskInstance.traceparent", + "type": "string", + "tags": [], + "label": "traceparent", + "description": [ + "\nThe serialized traceparent string of the current APM transaction or span." + ], + "signature": [ + "string | undefined" + ], + "source": { + "path": "x-pack/plugins/task_manager/server/task.ts", + "lineNumber": 263 + }, + "deprecated": false + }, { "parentPluginId": "taskManager", "id": "def-server.TaskInstance.user", @@ -780,7 +798,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 263 + "lineNumber": 268 }, "deprecated": false }, @@ -798,7 +816,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 269 + "lineNumber": 274 }, "deprecated": false }, @@ -816,7 +834,7 @@ ], "source": { "path": "x-pack/plugins/task_manager/server/task.ts", - "lineNumber": 274 + "lineNumber": 279 }, "deprecated": false } diff --git a/api_docs/telemetry.json b/api_docs/telemetry.json index 5a4d029dc0938..30c80119d62e2 100644 --- a/api_docs/telemetry.json +++ b/api_docs/telemetry.json @@ -15,7 +15,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 82 + "lineNumber": 90 }, "deprecated": false, "children": [ @@ -30,7 +30,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 84 + "lineNumber": 92 }, "deprecated": false }, @@ -45,7 +45,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 86 + "lineNumber": 94 }, "deprecated": false }, @@ -60,7 +60,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 88 + "lineNumber": 96 }, "deprecated": false }, @@ -75,7 +75,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 90 + "lineNumber": 98 }, "deprecated": false }, @@ -93,7 +93,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 92 + "lineNumber": 100 }, "deprecated": false }, @@ -108,7 +108,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 94 + "lineNumber": 102 }, "deprecated": false }, @@ -126,7 +126,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 96 + "lineNumber": 104 }, "deprecated": false }, @@ -144,7 +144,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 98 + "lineNumber": 106 }, "deprecated": false }, @@ -162,7 +162,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 100 + "lineNumber": 108 }, "deprecated": false } @@ -180,7 +180,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 36 + "lineNumber": 38 }, "deprecated": false, "children": [ @@ -198,7 +198,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 38 + "lineNumber": 40 }, "deprecated": false, "returnComment": [], @@ -215,10 +215,30 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 40 + "lineNumber": 42 }, "deprecated": false }, + { + "parentPluginId": "telemetry", + "id": "def-public.TelemetryServicePublicApis.canSendTelemetry", + "type": "Function", + "tags": [], + "label": "canSendTelemetry", + "description": [ + "Can phone-home telemetry calls be made? This depends on whether we have opted-in or if we are rendering a report" + ], + "signature": [ + "() => boolean" + ], + "source": { + "path": "src/plugins/telemetry/public/plugin.ts", + "lineNumber": 44 + }, + "deprecated": false, + "returnComment": [], + "children": [] + }, { "parentPluginId": "telemetry", "id": "def-public.TelemetryServicePublicApis.getCanChangeOptInStatus", @@ -233,7 +253,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 42 + "lineNumber": 46 }, "deprecated": false, "returnComment": [], @@ -253,7 +273,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 44 + "lineNumber": 48 }, "deprecated": false, "returnComment": [], @@ -273,7 +293,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false, "returnComment": [], @@ -289,7 +309,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 50 + "lineNumber": 54 }, "deprecated": false } @@ -313,7 +333,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 64 + "lineNumber": 68 }, "deprecated": false, "children": [ @@ -337,7 +357,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 66 + "lineNumber": 70 }, "deprecated": false }, @@ -355,7 +375,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 68 + "lineNumber": 72 }, "deprecated": false }, @@ -373,7 +393,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 73 + "lineNumber": 77 }, "deprecated": false } @@ -392,7 +412,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 56 + "lineNumber": 60 }, "deprecated": false, "children": [ @@ -416,7 +436,7 @@ ], "source": { "path": "src/plugins/telemetry/public/plugin.ts", - "lineNumber": 58 + "lineNumber": 62 }, "deprecated": false } @@ -641,7 +661,7 @@ "text": "NodeUsage" }, " extends ", - "NodeUsageInformation" + "NodesUsageNodeUsage" ], "source": { "path": "src/plugins/telemetry/server/telemetry_collection/get_nodes_usage.ts", diff --git a/api_docs/telemetry_collection_manager.json b/api_docs/telemetry_collection_manager.json index d30ff36b56093..681e10bd3ffaa 100644 --- a/api_docs/telemetry_collection_manager.json +++ b/api_docs/telemetry_collection_manager.json @@ -86,7 +86,7 @@ "signature": [ "Pick<", "KibanaClient", - ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", + ", \"get\" | \"delete\" | \"create\" | \"index\" | \"update\" | \"closePointInTime\" | \"helpers\" | \"count\" | \"search\" | \"security\" | \"eql\" | \"on\" | \"off\" | \"transform\" | \"emit\" | \"once\" | \"asyncSearch\" | \"autoscaling\" | \"bulk\" | \"cat\" | \"ccr\" | \"clearScroll\" | \"cluster\" | \"danglingIndices\" | \"dataFrameTransformDeprecated\" | \"deleteByQuery\" | \"deleteByQueryRethrottle\" | \"deleteScript\" | \"enrich\" | \"exists\" | \"existsSource\" | \"explain\" | \"features\" | \"fieldCaps\" | \"fleet\" | \"getScript\" | \"getScriptContext\" | \"getScriptLanguages\" | \"getSource\" | \"graph\" | \"ilm\" | \"indices\" | \"info\" | \"ingest\" | \"license\" | \"logstash\" | \"mget\" | \"migration\" | \"ml\" | \"monitoring\" | \"msearch\" | \"msearchTemplate\" | \"mtermvectors\" | \"nodes\" | \"openPointInTime\" | \"ping\" | \"putScript\" | \"rankEval\" | \"reindex\" | \"reindexRethrottle\" | \"renderSearchTemplate\" | \"rollup\" | \"scriptsPainlessExecute\" | \"scroll\" | \"searchShards\" | \"searchTemplate\" | \"searchableSnapshots\" | \"shutdown\" | \"slm\" | \"snapshot\" | \"sql\" | \"ssl\" | \"tasks\" | \"termsEnum\" | \"termvectors\" | \"textStructure\" | \"updateByQuery\" | \"updateByQueryRethrottle\" | \"watcher\" | \"xpack\"> & { transport: { request(params: ", "TransportRequestParams", ", options?: ", "TransportRequestOptions", diff --git a/api_docs/telemetry_collection_xpack.json b/api_docs/telemetry_collection_xpack.json index a97647773c7f1..1dd45d1d619f1 100644 --- a/api_docs/telemetry_collection_xpack.json +++ b/api_docs/telemetry_collection_xpack.json @@ -22,7 +22,7 @@ "label": "ESLicense", "description": [], "signature": [ - "LicenseInformation" + "LicenseGetLicenseInformation" ], "source": { "path": "x-pack/plugins/telemetry_collection_xpack/server/telemetry_collection/get_license.ts", diff --git a/api_docs/triggers_actions_ui.json b/api_docs/triggers_actions_ui.json index de7a13b3080fe..bccb50d96759a 100644 --- a/api_docs/triggers_actions_ui.json +++ b/api_docs/triggers_actions_ui.json @@ -422,60 +422,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getActionType", - "type": "Function", - "tags": [], - "label": "getActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "JiraConfig", - ", ", - "JiraSecrets", - ", ", - "JiraActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/jira/jira.tsx", - "lineNumber": 62 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getActionType", - "type": "Function", - "tags": [], - "label": "getActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "ResilientConfig", - ", ", - "ResilientSecrets", - ", ", - "ResilientActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/resilient/resilient.tsx", - "lineNumber": 67 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.getFields", @@ -656,60 +602,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getServiceNowITSMActionType", - "type": "Function", - "tags": [], - "label": "getServiceNowITSMActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "ServiceNowConfig", - ", ", - "ServiceNowSecrets", - ", ", - "ServiceNowITSMActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow.tsx", - "lineNumber": 63 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "triggersActionsUi", - "id": "def-public.getServiceNowSIRActionType", - "type": "Function", - "tags": [], - "label": "getServiceNowSIRActionType", - "description": [], - "signature": [ - "() => ", - "ActionTypeModel", - "<", - "ServiceNowConfig", - ", ", - "ServiceNowSecrets", - ", ", - "ServiceNowSIRActionParams", - ">" - ], - "source": { - "path": "x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types/servicenow/servicenow.tsx", - "lineNumber": 98 - }, - "deprecated": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "triggersActionsUi", "id": "def-public.getTimeFieldOptions", diff --git a/api_docs/ui_actions.json b/api_docs/ui_actions.json index b623984736ee1..cb35cacedf7ba 100644 --- a/api_docs/ui_actions.json +++ b/api_docs/ui_actions.json @@ -775,7 +775,7 @@ "plugin": "discover", "link": { "path": "src/plugins/discover/public/application/embeddable/search_embeddable.ts", - "lineNumber": 114 + "lineNumber": 115 } }, { diff --git a/api_docs/usage_collection.json b/api_docs/usage_collection.json index ab02b8b567fb8..e0912fe6bed40 100644 --- a/api_docs/usage_collection.json +++ b/api_docs/usage_collection.json @@ -777,7 +777,7 @@ "\nPossible type values in the schema" ], "signature": [ - "\"boolean\" | \"date\" | \"text\" | \"keyword\" | \"long\" | \"double\" | \"short\" | \"integer\" | \"byte\" | \"float\"" + "\"boolean\" | \"date\" | \"keyword\" | \"text\" | \"long\" | \"double\" | \"short\" | \"float\" | \"integer\" | \"byte\"" ], "source": { "path": "src/plugins/usage_collection/server/collector/types.ts", diff --git a/api_docs/visualizations.json b/api_docs/visualizations.json index 0df428a158a3d..83f9436420dcd 100644 --- a/api_docs/visualizations.json +++ b/api_docs/visualizations.json @@ -1888,7 +1888,7 @@ "label": "group", "description": [], "signature": [ - "\"buckets\" | \"metrics\" | \"none\"" + "\"none\" | \"buckets\" | \"metrics\"" ], "source": { "path": "src/plugins/visualizations/public/vis_types/types.ts", diff --git a/dev_docs/tutorials/expressions.mdx b/dev_docs/tutorials/expressions.mdx new file mode 100644 index 0000000000000..4688da98b7b01 --- /dev/null +++ b/dev_docs/tutorials/expressions.mdx @@ -0,0 +1,132 @@ +--- +id: kibDevTutorialExpressions +slug: /kibana-dev-docs/tutorials/expressions +title: Kibana Expressions Service +summary: Kibana Expressions Service +date: 2021-06-01 +tags: ['kibana', 'onboarding', 'dev', 'architecture'] +--- + +## Expressions service + +Expression service exposes a registry of reusable functions primary used for fetching and transposing data and a registry of renderer functions that can render data into a DOM element. +Adding functions is easy and so is reusing them. + +An expression is a chain of functions with provided arguments, which given a single input translates to a single output. +Each expression is representable by a human friendly string which a user can type. + +### Creating expressions + +Here is a very simple expression string: + +``` +essql 'select column1, column2 from myindex' | mapColumn name=column3 fn='{ column1 + 3 }' | table +``` + +It consists of 3 functions: + + - `essql` which runs given sql query against elasticsearch and returns the results + - `mapColumn`, which computes a new column from existing ones; + - `table`, which prepares the data for rendering in a tabular format. + +The same expression could also be constructed in the code: + +```ts +import { buildExpression, buildExpressionFunction } from 'src/plugins/expressions'; + +const expression = buildExpression([ + buildExpressionFunction('essql', [ q: 'select column1, column2 from myindex' ]), + buildExpressionFunction('mapColumn', [ name: 'column3', expression: 'column1 + 3' ]), + buildExpressionFunction('table'), +] +``` + +Note: Consumers need to be aware which plugin registers specific functions with expressions function registry and import correct type definitions from there. + + + The `expressions` service is available on both server and client, with similar APIs. + + +### Running expressions + +Expression service exposes `execute` method which allows you to execute an expression: + +```ts +const executionContract = expressions.execute(expression, input); +const result = await executionContract.getData(); +``` + + + Check the full spec of execute function [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.execution.md) + + +In addition, on the browser side, there are two additional ways to run expressions and render the results. + +#### React expression renderer component + +This is the easiest way to get expressions rendered inside your application. + +```ts + +``` + + + Check the full spec of ReactExpressionRenderer component props [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.reactexpressionrendererprops.md) + + +#### Expression loader + +If you are not using React, you can use the loader expression service provides to achieve the same: + +```ts +const handler = loader(domElement, expression, params); +``` + + + Check the full spec of expression loader params [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.iexpressionloaderparams.md) + + +### Creating new expression functions + +Creating a new expression function is easy, just call `registerFunction` method on expressions service setup contract with your function definition: + +```ts +const functionDefinition = { + name: 'clog', + args: {}, + help: 'Outputs the context to the console', + fn: (input: unknown) => { + // eslint-disable-next-line no-console + console.log(input); + return input; + }, +}; + +expressions.registerFunction(functionDefinition); +``` + + + Check the full interface of ExpressionFuntionDefinition [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionfunctiondefinition.md) + + +### Creating new expression renderers + +Adding new renderers is just as easy as adding functions: + +```ts +const rendererDefinition = { + name: 'debug', + help: 'Outputs the context to the dom element', + render: (domElement, input, handlers) => { + // eslint-disable-next-line no-console + domElement.innerText = JSON.strinfigy(input); + handlers.done(); + }, +}; + +expressions.registerRenderer(rendererDefinition); +``` + + + Check the full interface of ExpressionRendererDefinition [here](https://github.com/elastic/kibana/blob/master/docs/development/plugins/expressions/public/kibana-plugin-plugins-expressions-public.expressionrenderdefinition.md) + diff --git a/docs/api/index-patterns.asciidoc b/docs/api/index-patterns.asciidoc index 79d2f164fb8c3..b343d80b4fc15 100644 --- a/docs/api/index-patterns.asciidoc +++ b/docs/api/index-patterns.asciidoc @@ -20,6 +20,12 @@ The following index patterns APIs are available: ** <> to set a default index pattern * Fields ** <> to change field metadata, such as `count`, `customLabel` and `format` +* Runtime fields + ** <> to retrieve a runtime field + ** <> to create a runtime field + ** <> to create or update a runtime field + ** <> to partially update an existing runtime field + ** <> to delete a runtime field include::index-patterns/get.asciidoc[] include::index-patterns/create.asciidoc[] @@ -28,3 +34,9 @@ include::index-patterns/delete.asciidoc[] include::index-patterns/default-get.asciidoc[] include::index-patterns/default-set.asciidoc[] include::index-patterns/update-fields.asciidoc[] +include::index-patterns/runtime-fields/get.asciidoc[] +include::index-patterns/runtime-fields/create.asciidoc[] +include::index-patterns/runtime-fields/upsert.asciidoc[] +include::index-patterns/runtime-fields/update.asciidoc[] +include::index-patterns/runtime-fields/delete.asciidoc[] + diff --git a/docs/api/index-patterns/create.asciidoc b/docs/api/index-patterns/create.asciidoc index 771292d6f934d..521e25931ad49 100644 --- a/docs/api/index-patterns/create.asciidoc +++ b/docs/api/index-patterns/create.asciidoc @@ -84,6 +84,7 @@ $ curl -X POST api/index_patterns/index_pattern "typeMeta": {}, "fieldFormats": {}, "fieldAttrs": {}, + "runtimeFieldMap": {} "allowNoIndex": "..." } } diff --git a/docs/api/index-patterns/get.asciidoc b/docs/api/index-patterns/get.asciidoc index 3f53bf0726bf1..64588e63f62ae 100644 --- a/docs/api/index-patterns/get.asciidoc +++ b/docs/api/index-patterns/get.asciidoc @@ -58,6 +58,7 @@ The API returns an index pattern object: "typeMeta": {}, "fieldFormats": {}, "fieldAttrs": {}, + "runtimeFieldMap" {}, "allowNoIndex: "..." } } diff --git a/docs/api/index-patterns/runtime-fields/create.asciidoc b/docs/api/index-patterns/runtime-fields/create.asciidoc new file mode 100644 index 0000000000000..b0773c29e5309 --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/create.asciidoc @@ -0,0 +1,61 @@ +[[index-patterns-runtime-field-api-create]] +=== Create runtime field API +++++ +Create runtime field +++++ + +experimental[] Create a runtime field + +[[index-patterns-runtime-field-create-request]] +==== Request + +`POST :/api/index_patterns/index_pattern//runtime_field` + +`POST :/s//api/index_patterns/index_pattern//runtime_field` + +[[index-patterns-runtime-field-create-params]] +==== Path parameters + +`space_id`:: +(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +[[index-patterns-runtime-field-create-body]] +==== Request body + +`name`:: (Required, string) The name for a runtime field. + +`runtimeField`:: (Required, object) The runtime field definition object. + + +[[index-patterns-runtime-field-create-example]] +==== Examples + +Create a runtime field on an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X POST api/index_patterns/index_pattern//runtime_field +{ + "name": "runtimeFoo", + "runtimeField": { + "type": "long", + "script": { + "source": "emit(doc["foo"].value)" + } + } +} +-------------------------------------------------- +// KIBANA + +The API returns created runtime field object and update index pattern object: + +[source,sh] +-------------------------------------------------- +{ + "index_pattern": {...}, + "field": {...} +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/delete.asciidoc b/docs/api/index-patterns/runtime-fields/delete.asciidoc new file mode 100644 index 0000000000000..840789fe1ec23 --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/delete.asciidoc @@ -0,0 +1,37 @@ +[[index-patterns-runtime-field-api-delete]] +=== Delete runtime field API +++++ +Delete runtime field +++++ + +experimental[] Delete a runtime field from an index pattern. + +[[index-patterns-runtime-field-api-delete-request]] +==== Request + +`DELETE :/api/index_patterns/index_pattern//runtime_field/` + +`DELETE :/s//api/index_patterns/index_pattern//runtime_field/` + +[[index-patterns-runtime-field-api-delete-path-params]] +==== Path parameters + +`space_id`:: +(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern your want to delete a runtime field from. + +`name`:: +(Required, string) The name of the runtime field you want to delete. + + +==== Example + +Delete a runtime field from an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X DELETE api/index_patterns/index_pattern//runtime_field/ +-------------------------------------------------- +// KIBANA diff --git a/docs/api/index-patterns/runtime-fields/get.asciidoc b/docs/api/index-patterns/runtime-fields/get.asciidoc new file mode 100644 index 0000000000000..42bd209c708bc --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/get.asciidoc @@ -0,0 +1,52 @@ +[[index-patterns-runtime-field-api-get]] +=== Get runtime field API +++++ +Get runtime field +++++ + +experimental[] Get a runtime field + +[[index-patterns-runtime-field-get-request]] +==== Request + +`GET :/api/index_patterns/index_pattern//runtime_field/` + +`GET :/s//api/index_patterns/index_pattern//runtime_field/` + +[[index-patterns-runtime-field-get-params]] +==== Path parameters + +`space_id`:: +(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +`name`:: +(Required, string) The name of the runtime field you want to retrieve. + + +[[index-patterns-runtime-field-get-example]] +==== Example + +Retrieve a runtime field named `foo` of index pattern with the `my-pattern` ID: + +[source,sh] +-------------------------------------------------- +$ curl -X GET api/index_patterns/index_pattern/my-pattern/runtime_field/foo +-------------------------------------------------- +// KIBANA + +The API returns a runtime `field` object, and a `runtimeField` definition object: + +[source,sh] +-------------------------------------------------- +{ + "field": { + ... + }, + "runtimeField": { + ... + } +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/update.asciidoc b/docs/api/index-patterns/runtime-fields/update.asciidoc new file mode 100644 index 0000000000000..f34460896f7bc --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/update.asciidoc @@ -0,0 +1,66 @@ +[[index-patterns-runtime-field-api-update]] +=== Update runtime field API +++++ +Update runtime field +++++ + +experimental[] Update an existing runtime field + +[[index-patterns-runtime-field-update-request]] +==== Request + +`POST :/api/index_patterns/index_pattern//runtime_field/` + +`POST :/s//api/index_patterns/index_pattern//runtime_field/` + +[[index-patterns-runtime-field-update-params]] +==== Path parameters + +`space_id`:: +(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +`name`:: +(Required, string) The name of the runtime field you want to update. + +[[index-patterns-runtime-field-update-body]] +==== Request body + +`runtimeField`:: (Required, object) The runtime field definition object. + +You can update following fields: + +* `type` +* `script` + + + +[[index-patterns-runtime-field-update-example]] +==== Examples + +Update an existing runtime field on an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X POST api/index_patterns/index_pattern//runtime_field/ +{ + "runtimeField": { + "script": { + "source": "emit(doc["bar"].value)" + } + } +} +-------------------------------------------------- +// KIBANA + +The API returns updated runtime field object and updated index pattern object: + +[source,sh] +-------------------------------------------------- +{ + "index_pattern": {...}, + "field": {...} +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/runtime-fields/upsert.asciidoc b/docs/api/index-patterns/runtime-fields/upsert.asciidoc new file mode 100644 index 0000000000000..1b436db19c62e --- /dev/null +++ b/docs/api/index-patterns/runtime-fields/upsert.asciidoc @@ -0,0 +1,61 @@ +[[index-patterns-runtime-field-api-upsert]] +=== Upsert runtime field API +++++ +Upsert runtime field +++++ + +experimental[] Create or update an existing runtime field + +[[index-patterns-runtime-field-upsert-request]] +==== Request + +`PUT :/api/index_patterns/index_pattern//runtime_field` + +`PUT :/s//api/index_patterns/index_pattern//runtime_field` + +[[index-patterns-runtime-field-upsert-params]] +==== Path parameters + +`space_id`:: +(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used. + +`index_pattern_id`:: +(Required, string) The ID of the index pattern. + +[[index-patterns-runtime-field-upsert-body]] +==== Request body + +`name`:: (Required, string) The name for a new runtime field or a name of an existing runtime field. + +`runtimeField`:: (Required, object) The runtime field definition object. + + +[[index-patterns-runtime-field-upsert-example]] +==== Examples + +Create or update an existing runtime field on an index pattern: + +[source,sh] +-------------------------------------------------- +$ curl -X PUT api/index_patterns/index_pattern//runtime_field +{ + "name": "runtimeFoo", + "runtimeField": { + "type": "long", + "script": { + "source": "emit(doc["foo"].value)" + } + } +} +-------------------------------------------------- +// KIBANA + +The API returns created or updated runtime field object and updated index pattern object: + +[source,sh] +-------------------------------------------------- +{ + "index_pattern": {...}, + "field": {...} +} +-------------------------------------------------- diff --git a/docs/api/index-patterns/update.asciidoc b/docs/api/index-patterns/update.asciidoc index 8ed0ff89fb928..2d5fe882d448d 100644 --- a/docs/api/index-patterns/update.asciidoc +++ b/docs/api/index-patterns/update.asciidoc @@ -93,7 +93,8 @@ $ curl -X POST api/saved_objects/index-pattern/my-pattern "fieldFormats": {}, "type": "...", "typeMeta": {}, - "fields": {} + "fields": {}, + "runtimeFieldMap": {} } } -------------------------------------------------- diff --git a/docs/developer/contributing/development-functional-tests.asciidoc b/docs/developer/contributing/development-functional-tests.asciidoc index f0041b85c14eb..6f5c05f526bd6 100644 --- a/docs/developer/contributing/development-functional-tests.asciidoc +++ b/docs/developer/contributing/development-functional-tests.asciidoc @@ -229,9 +229,9 @@ export default function ({ getService, getPageObject }) { before(async () => { await Promise.all([ // start with an empty .kibana index - esArchiver.load('empty_kibana'), + esArchiver.load('test/functional/fixtures/es_archiver/empty_kibana'), // load some basic log data only if the index doesn't exist - esArchiver.loadIfNeeded('makelogs') + esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/makelogs') ]); // go to the page described by `apps.visualize` in the config await PageObjects.common.navigateTo('visualize'); @@ -243,7 +243,7 @@ export default function ({ getService, getPageObject }) { // we unload the empty_kibana archive but not the makelogs // archive because we don't make any changes to it, and subsequent // suites could use it if they call `.loadIfNeeded()`. - await esArchiver.unload('empty_kibana'); + await esArchiver.unload('test/functional/fixtures/es_archiver/empty_kibana'); }); // This series of tests illustrate how tests generally verify @@ -370,9 +370,9 @@ await testSubjects.click(‘containerButton’); * Source: {blob}test/common/services/es_archiver.ts[test/common/services/es_archiver.ts] * Load/unload archives created with the `esArchiver` * Popular methods: -** `esArchiver.load(name)` -** `esArchiver.loadIfNeeded(name)` -** `esArchiver.unload(name)` +** `esArchiver.load(path)` +** `esArchiver.loadIfNeeded(path)` +** `esArchiver.unload(path)` Full list of services that are used in functional tests can be found here: {blob}test/functional/services[test/functional/services] diff --git a/docs/developer/getting-started/index.asciidoc b/docs/developer/getting-started/index.asciidoc index 5ab0581201959..a28a95605bc6a 100644 --- a/docs/developer/getting-started/index.asciidoc +++ b/docs/developer/getting-started/index.asciidoc @@ -14,9 +14,14 @@ In order to support Windows development we currently require you to use one of t As well as installing https://www.microsoft.com/en-us/download/details.aspx?id=48145[Visual C++ Redistributable for Visual Studio 2015]. +In addition we also require you to do the following: + +- Install https://www.microsoft.com/en-us/download/details.aspx?id=48145[Visual C++ Redistributable for Visual Studio 2015] +- Enable the https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development[Windows Developer Mode] +- Enable https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name[8.3 filename support] by running the following command in a windows command prompt with admin rights `fsutil 8dot3name set 0` + Before running the steps listed below, please make sure you have installed everything -that we require and listed above and that you are running the mentioned commands -through Git bash or WSL. +that we require and listed above and that you are running all the commands from now on through Git bash or WSL. [discrete] [[get-kibana-code]] @@ -92,6 +97,10 @@ may need to run: yarn kbn clean ---- +NOTE: Running this command is only necessary in rare circumstance where you need to recover +a consistent state when problems arise. If you need to run this command often, complete +this form to provide feedback: https://ela.st/yarn-kbn-clean + If you have failures during `yarn kbn bootstrap` you may have some corrupted packages in your yarn cache which you can clean with: diff --git a/docs/developer/getting-started/monorepo-packages.asciidoc b/docs/developer/getting-started/monorepo-packages.asciidoc index dbfbe90ec9263..029ee9ea4faf6 100644 --- a/docs/developer/getting-started/monorepo-packages.asciidoc +++ b/docs/developer/getting-started/monorepo-packages.asciidoc @@ -85,6 +85,7 @@ yarn kbn watch-bazel - @kbn/logging - @kbn/mapbox-gl - @kbn/monaco +- @kbn/rule-data-utils - @kbn/securitysolution-es-utils - @kbn/securitysolution-io-ts-alerting-types - @kbn/securitysolution-io-ts-list-types diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 087626240ff33..6675a8dd283c9 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -265,6 +265,10 @@ The plugin exposes the static DefaultEditorController class to consume. |Contains the metric visualization. +|{kib-repo}blob/{branch}/src/plugins/vis_type_pie/README.md[visTypePie] +|Contains the pie chart implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy charts library advanced setting. + + |{kib-repo}blob/{branch}/src/plugins/vis_type_table/README.md[visTypeTable] |Contains the data table visualization, that allows presenting data in a simple table format. @@ -365,6 +369,10 @@ The client-side plugin configures following values: |The data_enhanced plugin is the x-pack counterpart to the src/plguins/data plugin. +|{kib-repo}blob/{branch}/x-pack/plugins/data_visualizer/README.md[dataVisualizer] +|The data_visualizer plugin enables you to explore the fields in your data. + + |{kib-repo}blob/{branch}/x-pack/plugins/discover_enhanced/README.md[discoverEnhanced] |Contains the enhancements to the OSS discover app. @@ -392,10 +400,6 @@ actitivies. |The features plugin enhance Kibana with a per-feature privilege system. -|{kib-repo}blob/{branch}/x-pack/plugins/file_data_visualizer[fileDataVisualizer] -|WARNING: Missing README. - - |{kib-repo}blob/{branch}/x-pack/plugins/file_upload[fileUpload] |WARNING: Missing README. diff --git a/docs/developer/plugin/external-plugin-functional-tests.asciidoc b/docs/developer/plugin/external-plugin-functional-tests.asciidoc index b39d576d85268..55b311794f9dc 100644 --- a/docs/developer/plugin/external-plugin-functional-tests.asciidoc +++ b/docs/developer/plugin/external-plugin-functional-tests.asciidoc @@ -58,11 +58,6 @@ export default async function ({ readConfigFile }) { } }, - // choose where esArchiver should load archives from - esArchiver: { - directory: resolve(__dirname, './es_archives'), - }, - // choose where screenshots should be saved screenshots: { directory: resolve(__dirname, './tmp/screenshots'), diff --git a/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md b/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md deleted file mode 100644 index ff79d832f92e2..0000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.euiicontype.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [euiIconType](./kibana-plugin-core-public.app.euiicontype.md) - -## App.euiIconType property - -A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property. - -Signature: - -```typescript -euiIconType?: string; -``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.icon.md b/docs/development/core/public/kibana-plugin-core-public.app.icon.md deleted file mode 100644 index 98260da5d2021..0000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.icon.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [icon](./kibana-plugin-core-public.app.icon.md) - -## App.icon property - -A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided. - -Signature: - -```typescript -icon?: string; -``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.md b/docs/development/core/public/kibana-plugin-core-public.app.md index 721d9a2f121c7..d79a12a83367d 100644 --- a/docs/development/core/public/kibana-plugin-core-public.app.md +++ b/docs/development/core/public/kibana-plugin-core-public.app.md @@ -8,7 +8,7 @@ Signature: ```typescript -export interface App +export interface App extends AppNavOptions ``` ## Properties @@ -21,16 +21,13 @@ export interface App | [chromeless](./kibana-plugin-core-public.app.chromeless.md) | boolean | Hide the UI chrome when the application is mounted. Defaults to false. Takes precedence over chrome service visibility settings. | | [deepLinks](./kibana-plugin-core-public.app.deeplinks.md) | AppDeepLink[] | Input type for registering secondary in-app locations for an application.Deep links must include at least one of path or deepLinks. A deep link that does not have a path represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. | | [defaultPath](./kibana-plugin-core-public.app.defaultpath.md) | string | Allow to define the default path a user should be directed to when navigating to the app. When defined, this value will be used as a default for the path option when calling [navigateToApp](./kibana-plugin-core-public.applicationstart.navigatetoapp.md)\`, and will also be appended to the [application navLink](./kibana-plugin-core-public.chromenavlink.md) in the navigation bar. | -| [euiIconType](./kibana-plugin-core-public.app.euiicontype.md) | string | A EUI iconType that will be used for the app's icon. This icon takes precendence over the icon property. | | [exactRoute](./kibana-plugin-core-public.app.exactroute.md) | boolean | If set to true, the application's route will only be checked against an exact match. Defaults to false. | -| [icon](./kibana-plugin-core-public.app.icon.md) | string | A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | | [id](./kibana-plugin-core-public.app.id.md) | string | The unique identifier of the application | | [keywords](./kibana-plugin-core-public.app.keywords.md) | string[] | Optional keywords to match with in deep links search. Omit if this part of the hierarchy does not have a page URL. | | [mount](./kibana-plugin-core-public.app.mount.md) | AppMount<HistoryLocationState> | A mount function called when the user navigates to this app's route. | | [navLinkStatus](./kibana-plugin-core-public.app.navlinkstatus.md) | AppNavLinkStatus | The initial status of the application's navLink. Defaulting to visible if status is accessible and hidden if status is inaccessible See [AppNavLinkStatus](./kibana-plugin-core-public.appnavlinkstatus.md) | -| [order](./kibana-plugin-core-public.app.order.md) | number | An ordinal used to sort nav links relative to one another for display. | +| [searchable](./kibana-plugin-core-public.app.searchable.md) | boolean | The initial flag to determine if the application is searchable in the global search. Defaulting to true if navLinkStatus is visible or omitted. | | [status](./kibana-plugin-core-public.app.status.md) | AppStatus | The initial status of the application. Defaulting to accessible | | [title](./kibana-plugin-core-public.app.title.md) | string | The title of the application. | -| [tooltip](./kibana-plugin-core-public.app.tooltip.md) | string | A tooltip shown when hovering over app link. | | [updater$](./kibana-plugin-core-public.app.updater_.md) | Observable<AppUpdater> | An [AppUpdater](./kibana-plugin-core-public.appupdater.md) observable that can be used to update the application [AppUpdatableFields](./kibana-plugin-core-public.appupdatablefields.md) at runtime. | diff --git a/docs/development/core/public/kibana-plugin-core-public.app.order.md b/docs/development/core/public/kibana-plugin-core-public.app.order.md deleted file mode 100644 index bb6be116b6b58..0000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.order.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [order](./kibana-plugin-core-public.app.order.md) - -## App.order property - -An ordinal used to sort nav links relative to one another for display. - -Signature: - -```typescript -order?: number; -``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.searchable.md b/docs/development/core/public/kibana-plugin-core-public.app.searchable.md new file mode 100644 index 0000000000000..ab1b559a7f6a1 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.app.searchable.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [searchable](./kibana-plugin-core-public.app.searchable.md) + +## App.searchable property + +The initial flag to determine if the application is searchable in the global search. Defaulting to `true` if `navLinkStatus` is `visible` or omitted. + +Signature: + +```typescript +searchable?: boolean; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md b/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md deleted file mode 100644 index e901de0fdccc9..0000000000000 --- a/docs/development/core/public/kibana-plugin-core-public.app.tooltip.md +++ /dev/null @@ -1,13 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [App](./kibana-plugin-core-public.app.md) > [tooltip](./kibana-plugin-core-public.app.tooltip.md) - -## App.tooltip property - -A tooltip shown when hovering over app link. - -Signature: - -```typescript -tooltip?: string; -``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md b/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md index 5aa951cffdcb5..30fd3085a4341 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md +++ b/docs/development/core/public/kibana-plugin-core-public.appdeeplink.md @@ -16,7 +16,8 @@ export declare type AppDeepLink = { title: string; keywords?: string[]; navLinkStatus?: AppNavLinkStatus; -} & ({ + searchable?: boolean; +} & AppNavOptions & ({ path: string; deepLinks?: AppDeepLink[]; } | { diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md new file mode 100644 index 0000000000000..069eccf63a235 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.euiicontype.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [euiIconType](./kibana-plugin-core-public.appnavoptions.euiicontype.md) + +## AppNavOptions.euiIconType property + +A EUI iconType that will be used for the app's icon. This icon takes precendence over the `icon` property. + +Signature: + +```typescript +euiIconType?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md new file mode 100644 index 0000000000000..3b809fc4aec39 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.icon.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [icon](./kibana-plugin-core-public.appnavoptions.icon.md) + +## AppNavOptions.icon property + +A URL to an image file used as an icon. Used as a fallback if `euiIconType` is not provided. + +Signature: + +```typescript +icon?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md new file mode 100644 index 0000000000000..52c28c861dc70 --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) + +## AppNavOptions interface + +App navigation menu options + +Signature: + +```typescript +export interface AppNavOptions +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [euiIconType](./kibana-plugin-core-public.appnavoptions.euiicontype.md) | string | A EUI iconType that will be used for the app's icon. This icon takes precendence over the icon property. | +| [icon](./kibana-plugin-core-public.appnavoptions.icon.md) | string | A URL to an image file used as an icon. Used as a fallback if euiIconType is not provided. | +| [order](./kibana-plugin-core-public.appnavoptions.order.md) | number | An ordinal used to sort nav links relative to one another for display. | +| [tooltip](./kibana-plugin-core-public.appnavoptions.tooltip.md) | string | A tooltip shown when hovering over app link. | + diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md new file mode 100644 index 0000000000000..ca7ae482a04ad --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.order.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [order](./kibana-plugin-core-public.appnavoptions.order.md) + +## AppNavOptions.order property + +An ordinal used to sort nav links relative to one another for display. + +Signature: + +```typescript +order?: number; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md new file mode 100644 index 0000000000000..97c18c2e56a1e --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.appnavoptions.tooltip.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) > [tooltip](./kibana-plugin-core-public.appnavoptions.tooltip.md) + +## AppNavOptions.tooltip property + +A tooltip shown when hovering over app link. + +Signature: + +```typescript +tooltip?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md b/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md index d7b12d4b70701..c24da05abe7ec 100644 --- a/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md +++ b/docs/development/core/public/kibana-plugin-core-public.appupdatablefields.md @@ -9,5 +9,5 @@ Defines the list of fields that can be updated via an [AppUpdater](./kibana-plug Signature: ```typescript -export declare type AppUpdatableFields = Pick; +export declare type AppUpdatableFields = Pick; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md index dfe8f119505aa..c7dd461617e34 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.md @@ -26,5 +26,5 @@ export interface ChromeNavLink | [order](./kibana-plugin-core-public.chromenavlink.order.md) | number | An ordinal used to sort nav links relative to one another for display. | | [title](./kibana-plugin-core-public.chromenavlink.title.md) | string | The title of the application. | | [tooltip](./kibana-plugin-core-public.chromenavlink.tooltip.md) | string | A tooltip shown when hovering over an app link. | -| [url](./kibana-plugin-core-public.chromenavlink.url.md) | string | The route used to open the of an application. If unset, baseUrl will be used instead. | +| [url](./kibana-plugin-core-public.chromenavlink.url.md) | string | The route used to open the default path and the deep links of an application. | diff --git a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md index 833930c494786..b9d12e450df50 100644 --- a/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md +++ b/docs/development/core/public/kibana-plugin-core-public.chromenavlink.url.md @@ -4,10 +4,10 @@ ## ChromeNavLink.url property -The route used to open the of an application. If unset, `baseUrl` will be used instead. +The route used to open the default path and the deep links of an application. Signature: ```typescript -readonly url?: string; +readonly url: string; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.md b/docs/development/core/public/kibana-plugin-core-public.md index 6239279f275d1..f341a7cd9315f 100644 --- a/docs/development/core/public/kibana-plugin-core-public.md +++ b/docs/development/core/public/kibana-plugin-core-public.md @@ -38,6 +38,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [ApplicationSetup](./kibana-plugin-core-public.applicationsetup.md) | | | [ApplicationStart](./kibana-plugin-core-public.applicationstart.md) | | | [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) | | +| [AppNavOptions](./kibana-plugin-core-public.appnavoptions.md) | App navigation menu options | | [AsyncPlugin](./kibana-plugin-core-public.asyncplugin.md) | A plugin with asynchronous lifecycle methods. | | [Capabilities](./kibana-plugin-core-public.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | | [ChromeBadge](./kibana-plugin-core-public.chromebadge.md) | | diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md new file mode 100644 index 0000000000000..4039e1338fc1c --- /dev/null +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [kibana-plugin-core-public](./kibana-plugin-core-public.md) > [NavigateToAppOptions](./kibana-plugin-core-public.navigatetoappoptions.md) > [deepLinkId](./kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md) + +## NavigateToAppOptions.deepLinkId property + +optional [deep link](./kibana-plugin-core-public.app.deeplinks.md) id inside the application to navigate to. If an additional [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) is defined it will be appended to the deep link path. + +Signature: + +```typescript +deepLinkId?: string; +``` diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md index 79b59a19508e7..7b01bab056d84 100644 --- a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.md @@ -16,8 +16,9 @@ export interface NavigateToAppOptions | Property | Type | Description | | --- | --- | --- | +| [deepLinkId](./kibana-plugin-core-public.navigatetoappoptions.deeplinkid.md) | string | optional [deep link](./kibana-plugin-core-public.app.deeplinks.md) id inside the application to navigate to. If an additional [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) is defined it will be appended to the deep link path. | | [openInNewTab](./kibana-plugin-core-public.navigatetoappoptions.openinnewtab.md) | boolean | if true, will open the app in new tab, will share session information via window.open if base | -| [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) | string | optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md)\` as default. | +| [path](./kibana-plugin-core-public.navigatetoappoptions.path.md) | string | optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md) as default. | | [replace](./kibana-plugin-core-public.navigatetoappoptions.replace.md) | boolean | if true, will not create a new history entry when navigating (using replace instead of push) | | [state](./kibana-plugin-core-public.navigatetoappoptions.state.md) | unknown | optional state to forward to the application | diff --git a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md index 095553d05778c..b39fc8c324ad9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md +++ b/docs/development/core/public/kibana-plugin-core-public.navigatetoappoptions.path.md @@ -4,7 +4,7 @@ ## NavigateToAppOptions.path property -optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md)\` as default. +optional path inside application to deep link to. If undefined, will use [the app's default path](./kibana-plugin-core-public.app.defaultpath.md) as default. Signature: diff --git a/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md b/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md index d3a6a4de905fd..40fd98687c619 100644 --- a/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md +++ b/docs/development/core/public/kibana-plugin-core-public.publicappdeeplinkinfo.md @@ -9,9 +9,10 @@ Public information about a registered app's [deepLinks](./kibana-plugin-core-pub Signature: ```typescript -export declare type PublicAppDeepLinkInfo = Omit & { +export declare type PublicAppDeepLinkInfo = Omit & { deepLinks: PublicAppDeepLinkInfo[]; keywords: string[]; navLinkStatus: AppNavLinkStatus; + searchable: boolean; }; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md b/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md index a5563eae83563..01d23ae47a0d9 100644 --- a/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md +++ b/docs/development/core/public/kibana-plugin-core-public.publicappinfo.md @@ -9,11 +9,12 @@ Public information about a registered [application](./kibana-plugin-core-public. Signature: ```typescript -export declare type PublicAppInfo = Omit & { +export declare type PublicAppInfo = Omit & { status: AppStatus; navLinkStatus: AppNavLinkStatus; appRoute: string; keywords: string[]; deepLinks: PublicAppDeepLinkInfo[]; + searchable: boolean; }; ``` diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md index 7be45c6c173b4..706408f81f02a 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.md @@ -30,7 +30,7 @@ export interface SavedObjectsFindOptions | [searchAfter](./kibana-plugin-core-public.savedobjectsfindoptions.searchafter.md) | estypes.Id[] | Use the sort values from the previous page to retrieve the next page of results. | | [searchFields](./kibana-plugin-core-public.savedobjectsfindoptions.searchfields.md) | string[] | The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | | [sortField](./kibana-plugin-core-public.savedobjectsfindoptions.sortfield.md) | string | | -| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SortOrder | | +| [sortOrder](./kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | | | [type](./kibana-plugin-core-public.savedobjectsfindoptions.type.md) | string | string[] | | | [typeToNamespacesMap](./kibana-plugin-core-public.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | diff --git a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md index 36f99e51ea8c6..506fb9041e353 100644 --- a/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md +++ b/docs/development/core/public/kibana-plugin-core-public.savedobjectsfindoptions.sortorder.md @@ -7,5 +7,5 @@ Signature: ```typescript -sortOrder?: estypes.SortOrder; +sortOrder?: estypes.SearchSortOrder; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md index e362bc4e0329c..447823a5c3491 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md @@ -15,6 +15,6 @@ correctiveActions: { [key: string]: any; }; }; - manualSteps?: string[]; + manualSteps: string[]; }; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md new file mode 100644 index 0000000000000..3a76bc60ee630 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) + +## DeprecationsDetails.deprecationType property + +(optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab. + +Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. + +Signature: + +```typescript +deprecationType?: 'config' | 'feature'; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md index bb77e4247711f..7592b8486d950 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md @@ -14,7 +14,8 @@ export interface DeprecationsDetails | Property | Type | Description | | --- | --- | --- | -| [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
};
manualSteps?: string[];
} | | +| [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
};
manualSteps: string[];
} | | +| [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) | 'config' | 'feature' | (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | | [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) | string | | | [level](./kibana-plugin-core-server.deprecationsdetails.level.md) | 'warning' | 'critical' | 'fetch_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | | [message](./kibana-plugin-core-server.deprecationsdetails.message.md) | string | | diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index 32a2f3312708c..604cdea1a7fbe 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -159,8 +159,6 @@ The plugin integrates with the core system via lifecycle events: `setup` | [SavedObjectsCollectMultiNamespaceReferencesObject](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesobject.md) | An object to collect references for. It must be a multi-namespace type (in other words, the object type must be registered with the namespaceType: 'multiple' or namespaceType: 'multiple-isolated' option).Note: if options.purpose is 'updateObjectsSpaces', it must be a shareable type (in other words, the object type must be registered with the namespaceType: 'multiple'). | | [SavedObjectsCollectMultiNamespaceReferencesOptions](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesoptions.md) | Options for collecting references. | | [SavedObjectsCollectMultiNamespaceReferencesResponse](./kibana-plugin-core-server.savedobjectscollectmultinamespacereferencesresponse.md) | The response when object references are collected. | -| [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. | -| [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) | See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. | | [SavedObjectsCreateOptions](./kibana-plugin-core-server.savedobjectscreateoptions.md) | | | [SavedObjectsCreatePointInTimeFinderDependencies](./kibana-plugin-core-server.savedobjectscreatepointintimefinderdependencies.md) | | | [SavedObjectsDeleteByNamespaceOptions](./kibana-plugin-core-server.savedobjectsdeletebynamespaceoptions.md) | | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md deleted file mode 100644 index 3f2d81cc97c7c..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) - -## SavedObjectsComplexFieldMapping.doc\_values property - -Signature: - -```typescript -doc_values?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md deleted file mode 100644 index b01da3c62fda6..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md +++ /dev/null @@ -1,15 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) - -## SavedObjectsComplexFieldMapping.dynamic property - -The dynamic property of the mapping, either `false` or `'strict'`. If unspecified `dynamic: 'strict'` will be inherited from the top-level index mappings. - -Note: To limit the number of mapping fields Saved Object types should \*never\* use `dynamic: true`. - -Signature: - -```typescript -dynamic?: false | 'strict'; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md deleted file mode 100644 index 08513aa2a849b..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) - -## SavedObjectsComplexFieldMapping.enabled property - -Signature: - -```typescript -enabled?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md deleted file mode 100644 index fc262cad54f18..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) - -## SavedObjectsComplexFieldMapping interface - -See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. - -Signature: - -```typescript -export interface SavedObjectsComplexFieldMapping -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [doc\_values](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.doc_values.md) | boolean | | -| [dynamic](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.dynamic.md) | false | 'strict' | The dynamic property of the mapping, either false or 'strict'. If unspecified dynamic: 'strict' will be inherited from the top-level index mappings.Note: To limit the number of mapping fields Saved Object types should \*never\* use dynamic: true. | -| [enabled](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.enabled.md) | boolean | | -| [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) | SavedObjectsMappingProperties | | -| [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) | string | | - diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md deleted file mode 100644 index 613a36a09ba1e..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [properties](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.properties.md) - -## SavedObjectsComplexFieldMapping.properties property - -Signature: - -```typescript -properties: SavedObjectsMappingProperties; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md deleted file mode 100644 index 8aaa524dad43a..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.md) > [type](./kibana-plugin-core-server.savedobjectscomplexfieldmapping.type.md) - -## SavedObjectsComplexFieldMapping.type property - -Signature: - -```typescript -type?: string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md deleted file mode 100644 index 2a79eafd85a6c..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) - -## SavedObjectsCoreFieldMapping.doc\_values property - -Signature: - -```typescript -doc_values?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md deleted file mode 100644 index 4f88b635ca2f7..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md +++ /dev/null @@ -1,16 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) - -## SavedObjectsCoreFieldMapping.fields property - -Signature: - -```typescript -fields?: { - [subfield: string]: { - type: string; - ignore_above?: number; - }; - }; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.index.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.index.md deleted file mode 100644 index e3cf685e310d2..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.index.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) - -## SavedObjectsCoreFieldMapping.index property - -Signature: - -```typescript -index?: boolean; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md deleted file mode 100644 index e9b9c2bcf51b5..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.md +++ /dev/null @@ -1,24 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) - -## SavedObjectsCoreFieldMapping interface - -See [SavedObjectsFieldMapping](./kibana-plugin-core-server.savedobjectsfieldmapping.md) for documentation. - -Signature: - -```typescript -export interface SavedObjectsCoreFieldMapping -``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [doc\_values](./kibana-plugin-core-server.savedobjectscorefieldmapping.doc_values.md) | boolean | | -| [fields](./kibana-plugin-core-server.savedobjectscorefieldmapping.fields.md) | {
[subfield: string]: {
type: string;
ignore_above?: number;
};
} | | -| [index](./kibana-plugin-core-server.savedobjectscorefieldmapping.index.md) | boolean | | -| [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) | number | boolean | string | | -| [type](./kibana-plugin-core-server.savedobjectscorefieldmapping.type.md) | string | | - diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md deleted file mode 100644 index 627ea3695383a..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [null\_value](./kibana-plugin-core-server.savedobjectscorefieldmapping.null_value.md) - -## SavedObjectsCoreFieldMapping.null\_value property - -Signature: - -```typescript -null_value?: number | boolean | string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.type.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.type.md deleted file mode 100644 index 94d395d7983e5..0000000000000 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectscorefieldmapping.type.md +++ /dev/null @@ -1,11 +0,0 @@ - - -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-core-server.savedobjectscorefieldmapping.md) > [type](./kibana-plugin-core-server.savedobjectscorefieldmapping.type.md) - -## SavedObjectsCoreFieldMapping.type property - -Signature: - -```typescript -type: string; -``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md index 925ca4be92e66..85b52bacafa25 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfieldmapping.md @@ -11,5 +11,7 @@ Please refer to [elasticsearch documentation](https://www.elastic.co/guide/en/el Signature: ```typescript -export declare type SavedObjectsFieldMapping = SavedObjectsCoreFieldMapping | SavedObjectsComplexFieldMapping; +export declare type SavedObjectsFieldMapping = estypes.MappingProperty & { + dynamic?: false | 'strict'; +}; ``` diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md index a92b1f48d08eb..d3696ee71049a 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.md @@ -30,7 +30,7 @@ export interface SavedObjectsFindOptions | [searchAfter](./kibana-plugin-core-server.savedobjectsfindoptions.searchafter.md) | estypes.Id[] | Use the sort values from the previous page to retrieve the next page of results. | | [searchFields](./kibana-plugin-core-server.savedobjectsfindoptions.searchfields.md) | string[] | The fields to perform the parsed query against. See Elasticsearch Simple Query String fields argument for more information | | [sortField](./kibana-plugin-core-server.savedobjectsfindoptions.sortfield.md) | string | | -| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SortOrder | | +| [sortOrder](./kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md) | estypes.SearchSortOrder | | | [type](./kibana-plugin-core-server.savedobjectsfindoptions.type.md) | string | string[] | | | [typeToNamespacesMap](./kibana-plugin-core-server.savedobjectsfindoptions.typetonamespacesmap.md) | Map<string, string[] | undefined> | This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved object client wrapper. If this is defined, it supersedes the type and namespaces fields when building the Elasticsearch query. Any types that are not included in this map will be excluded entirely. If a type is included but its value is undefined, the operation will search for that type in the Default namespace. | diff --git a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md index e1c657e3a5171..dca5a7d8c7583 100644 --- a/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md +++ b/docs/development/core/server/kibana-plugin-core-server.savedobjectsfindoptions.sortorder.md @@ -7,5 +7,5 @@ Signature: ```typescript -sortOrder?: estypes.SortOrder; +sortOrder?: estypes.SearchSortOrder; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md new file mode 100644 index 0000000000000..de0d41286c0bb --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getTimeShift](./kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md) + +## AggConfig.getTimeShift() method + +Signature: + +```typescript +getTimeShift(): undefined | moment.Duration; +``` +Returns: + +`undefined | moment.Duration` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md new file mode 100644 index 0000000000000..024b0766ffd7b --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [hasTimeShift](./kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md) + +## AggConfig.hasTimeShift() method + +Signature: + +```typescript +hasTimeShift(): boolean; +``` +Returns: + +`boolean` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md index d4a8eddf51cfc..a96626d1a485d 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md @@ -46,8 +46,10 @@ export declare class AggConfig | [getRequestAggs()](./kibana-plugin-plugins-data-public.aggconfig.getrequestaggs.md) | | | | [getResponseAggs()](./kibana-plugin-plugins-data-public.aggconfig.getresponseaggs.md) | | | | [getTimeRange()](./kibana-plugin-plugins-data-public.aggconfig.gettimerange.md) | | | +| [getTimeShift()](./kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md) | | | | [getValue(bucket)](./kibana-plugin-plugins-data-public.aggconfig.getvalue.md) | | | | [getValueBucketPath()](./kibana-plugin-plugins-data-public.aggconfig.getvaluebucketpath.md) | | Returns the bucket path containing the main value the agg will produce (e.g. for sum of bytes it will point to the sum, for median it will point to the 50 percentile in the percentile multi value bucket) | +| [hasTimeShift()](./kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md) | | | | [isFilterable()](./kibana-plugin-plugins-data-public.aggconfig.isfilterable.md) | | | | [makeLabel(percentageMode)](./kibana-plugin-plugins-data-public.aggconfig.makelabel.md) | | | | [nextId(list)](./kibana-plugin-plugins-data-public.aggconfig.nextid.md) | static | Calculate the next id based on the ids in this list {array} list - a list of objects with id properties | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.forcenow.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.forcenow.md new file mode 100644 index 0000000000000..8040c2939e2e4 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.forcenow.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [forceNow](./kibana-plugin-plugins-data-public.aggconfigs.forcenow.md) + +## AggConfigs.forceNow property + +Signature: + +```typescript +forceNow?: Date; +``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md new file mode 100644 index 0000000000000..1f8bc1300a0a8 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md @@ -0,0 +1,72 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getSearchSourceTimeFilter](./kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md) + +## AggConfigs.getSearchSourceTimeFilter() method + +Signature: + +```typescript +getSearchSourceTimeFilter(forceNow?: Date): RangeFilter[] | { + meta: { + index: string | undefined; + params: {}; + alias: string; + disabled: boolean; + negate: boolean; + }; + query: { + bool: { + should: { + bool: { + filter: { + range: { + [x: string]: { + gte: string; + lte: string; + }; + }; + }[]; + }; + }[]; + minimum_should_match: number; + }; + }; + }[]; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| forceNow | Date | | + +Returns: + +`RangeFilter[] | { + meta: { + index: string | undefined; + params: {}; + alias: string; + disabled: boolean; + negate: boolean; + }; + query: { + bool: { + should: { + bool: { + filter: { + range: { + [x: string]: { + gte: string; + lte: string; + }; + }; + }[]; + }; + }[]; + minimum_should_match: number; + }; + }; + }[]` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md new file mode 100644 index 0000000000000..d15ccbc5dc0a1 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getTimeShiftInterval](./kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md) + +## AggConfigs.getTimeShiftInterval() method + +Signature: + +```typescript +getTimeShiftInterval(): moment.Duration | undefined; +``` +Returns: + +`moment.Duration | undefined` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md new file mode 100644 index 0000000000000..44ab25cf30eb2 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getTimeShifts](./kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md) + +## AggConfigs.getTimeShifts() method + +Signature: + +```typescript +getTimeShifts(): Record; +``` +Returns: + +`Record` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md new file mode 100644 index 0000000000000..db31e549666b4 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [hasTimeShifts](./kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md) + +## AggConfigs.hasTimeShifts() method + +Signature: + +```typescript +hasTimeShifts(): boolean; +``` +Returns: + +`boolean` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md index 02e9a63d95ba3..45333b6767cac 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md @@ -22,6 +22,7 @@ export declare class AggConfigs | --- | --- | --- | --- | | [aggs](./kibana-plugin-plugins-data-public.aggconfigs.aggs.md) | | IAggConfig[] | | | [createAggConfig](./kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md) | | <T extends AggConfig = AggConfig>(params: CreateAggConfigParams, { addToAggConfigs }?: {
addToAggConfigs?: boolean | undefined;
}) => T | | +| [forceNow](./kibana-plugin-plugins-data-public.aggconfigs.forcenow.md) | | Date | | | [hierarchical](./kibana-plugin-plugins-data-public.aggconfigs.hierarchical.md) | | boolean | | | [indexPattern](./kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md) | | IndexPattern | | | [timeFields](./kibana-plugin-plugins-data-public.aggconfigs.timefields.md) | | string[] | | @@ -43,8 +44,14 @@ export declare class AggConfigs | [getRequestAggs()](./kibana-plugin-plugins-data-public.aggconfigs.getrequestaggs.md) | | | | [getResponseAggById(id)](./kibana-plugin-plugins-data-public.aggconfigs.getresponseaggbyid.md) | | Find a response agg by it's id. This may be an agg in the aggConfigs, or one created specifically for a response value | | [getResponseAggs()](./kibana-plugin-plugins-data-public.aggconfigs.getresponseaggs.md) | | Gets the AggConfigs (and possibly ResponseAggConfigs) that represent the values that will be produced when all aggs are run.With multi-value metric aggs it is possible for a single agg request to result in multiple agg values, which is why the length of a vis' responseValuesAggs may be different than the vis' aggs {array\[AggConfig\]} | +| [getSearchSourceTimeFilter(forceNow)](./kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md) | | | +| [getTimeShiftInterval()](./kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md) | | | +| [getTimeShifts()](./kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md) | | | +| [hasTimeShifts()](./kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md) | | | | [jsonDataEquals(aggConfigs)](./kibana-plugin-plugins-data-public.aggconfigs.jsondataequals.md) | | Data-by-data comparison of this Aggregation Ignores the non-array indexes | | [onSearchRequestStart(searchSource, options)](./kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md) | | | +| [postFlightTransform(response)](./kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md) | | | +| [setForceNow(now)](./kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md) | | | | [setTimeFields(timeFields)](./kibana-plugin-plugins-data-public.aggconfigs.settimefields.md) | | | | [setTimeRange(timeRange)](./kibana-plugin-plugins-data-public.aggconfigs.settimerange.md) | | | | [toDsl()](./kibana-plugin-plugins-data-public.aggconfigs.todsl.md) | | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md new file mode 100644 index 0000000000000..b34fda40a3089 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [postFlightTransform](./kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md) + +## AggConfigs.postFlightTransform() method + +Signature: + +```typescript +postFlightTransform(response: IEsSearchResponse): IEsSearchResponse; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| response | IEsSearchResponse<any> | | + +Returns: + +`IEsSearchResponse` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md new file mode 100644 index 0000000000000..60a1bfe0872fa --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [setForceNow](./kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md) + +## AggConfigs.setForceNow() method + +Signature: + +```typescript +setForceNow(now: Date | undefined): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| now | Date | undefined | | + +Returns: + +`void` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md index a994fc458cfb6..f99e7ba8b967e 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.lang.md @@ -7,5 +7,5 @@ Signature: ```typescript -lang?: string; +lang?: estypes.ScriptLanguage; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md index 4e3dea5549b56..29377ff8fd392 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.ifieldtype.md @@ -26,7 +26,7 @@ export interface IFieldType | [esTypes](./kibana-plugin-plugins-data-public.ifieldtype.estypes.md) | string[] | | | [filterable](./kibana-plugin-plugins-data-public.ifieldtype.filterable.md) | boolean | | | [format](./kibana-plugin-plugins-data-public.ifieldtype.format.md) | any | | -| [lang](./kibana-plugin-plugins-data-public.ifieldtype.lang.md) | string | | +| [lang](./kibana-plugin-plugins-data-public.ifieldtype.lang.md) | estypes.ScriptLanguage | | | [name](./kibana-plugin-plugins-data-public.ifieldtype.name.md) | string | | | [readFromDocValues](./kibana-plugin-plugins-data-public.ifieldtype.readfromdocvalues.md) | boolean | | | [script](./kibana-plugin-plugins-data-public.ifieldtype.script.md) | string | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md index 99d2fc00a6b7b..e0ee1f0ec15a4 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.addscriptedfield.md @@ -4,6 +4,11 @@ ## IndexPattern.addScriptedField() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Add scripted field to field list Signature: diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getassavedobjectbody.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getassavedobjectbody.md index 48d94b84497bd..cc40ab8bb1173 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getassavedobjectbody.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getassavedobjectbody.md @@ -9,33 +9,9 @@ Returns index pattern as saved object body for saving Signature: ```typescript -getAsSavedObjectBody(): { - fieldAttrs: string | undefined; - title: string; - timeFieldName: string | undefined; - intervalName: string | undefined; - sourceFilters: string | undefined; - fields: string | undefined; - fieldFormatMap: string | undefined; - type: string | undefined; - typeMeta: string | undefined; - allowNoIndex: true | undefined; - runtimeFieldMap: string | undefined; - }; +getAsSavedObjectBody(): IndexPatternAttributes; ``` Returns: -`{ - fieldAttrs: string | undefined; - title: string; - timeFieldName: string | undefined; - intervalName: string | undefined; - sourceFilters: string | undefined; - fields: string | undefined; - fieldFormatMap: string | undefined; - type: string | undefined; - typeMeta: string | undefined; - allowNoIndex: true | undefined; - runtimeFieldMap: string | undefined; - }` +`IndexPatternAttributes` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md index 77ce6f6f23a67..94adbefe535dd 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md @@ -4,6 +4,11 @@ ## IndexPattern.getNonScriptedFields() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Signature: ```typescript diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md new file mode 100644 index 0000000000000..c0aca53255b8f --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [getRuntimeField](./kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md) + +## IndexPattern.getRuntimeField() method + +Returns runtime field if exists + +Signature: + +```typescript +getRuntimeField(name: string): RuntimeField | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`RuntimeField | null` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md index 055f07367c96e..57e1b5f49371b 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md @@ -4,6 +4,11 @@ ## IndexPattern.getScriptedFields() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Signature: ```typescript diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md new file mode 100644 index 0000000000000..96dbe13a7f197 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [hasRuntimeField](./kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md) + +## IndexPattern.hasRuntimeField() method + +Checks if runtime field exists + +Signature: + +```typescript +hasRuntimeField(name: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`boolean` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md index 53d173d39f50d..51ca42fdce70a 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md @@ -54,13 +54,16 @@ export declare class IndexPattern implements IIndexPattern | [getFormatterForField(field)](./kibana-plugin-plugins-data-public.indexpattern.getformatterforfield.md) | | Provide a field, get its formatter | | [getFormatterForFieldNoDefault(fieldname)](./kibana-plugin-plugins-data-public.indexpattern.getformatterforfieldnodefault.md) | | Get formatter for a given field name. Return undefined if none exists | | [getNonScriptedFields()](./kibana-plugin-plugins-data-public.indexpattern.getnonscriptedfields.md) | | | +| [getRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.getruntimefield.md) | | Returns runtime field if exists | | [getScriptedFields()](./kibana-plugin-plugins-data-public.indexpattern.getscriptedfields.md) | | | | [getSourceFiltering()](./kibana-plugin-plugins-data-public.indexpattern.getsourcefiltering.md) | | Get the source filtering configuration for that index. | | [getTimeField()](./kibana-plugin-plugins-data-public.indexpattern.gettimefield.md) | | | +| [hasRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.hasruntimefield.md) | | Checks if runtime field exists | | [isTimeBased()](./kibana-plugin-plugins-data-public.indexpattern.istimebased.md) | | | | [isTimeNanosBased()](./kibana-plugin-plugins-data-public.indexpattern.istimenanosbased.md) | | | -| [removeRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate | +| [removeRuntimeField(name)](./kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. | | [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md) | | Remove scripted field from field list | +| [replaceAllRuntimeFields(newFields)](./kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md) | | Replaces all existing runtime fields with new fields | | [setFieldAttrs(fieldName, attrName, value)](./kibana-plugin-plugins-data-public.indexpattern.setfieldattrs.md) | | | | [setFieldCount(fieldName, count)](./kibana-plugin-plugins-data-public.indexpattern.setfieldcount.md) | | | | [setFieldCustomLabel(fieldName, customLabel)](./kibana-plugin-plugins-data-public.indexpattern.setfieldcustomlabel.md) | | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md index 7a5228fece782..f2774924fc73c 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removeruntimefield.md @@ -4,7 +4,7 @@ ## IndexPattern.removeRuntimeField() method -Remove a runtime field - removed from mapped field or removed unmapped field as appropriate +Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. Signature: @@ -16,7 +16,7 @@ removeRuntimeField(name: string): void; | Parameter | Type | Description | | --- | --- | --- | -| name | string | | +| name | string | Field name to remove | Returns: diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md index aaaebdaccca5d..d3e1b26810fd7 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.removescriptedfield.md @@ -4,6 +4,11 @@ ## IndexPattern.removeScriptedField() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Remove scripted field from field list Signature: diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md new file mode 100644 index 0000000000000..076b2b38cf474 --- /dev/null +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [IndexPattern](./kibana-plugin-plugins-data-public.indexpattern.md) > [replaceAllRuntimeFields](./kibana-plugin-plugins-data-public.indexpattern.replaceallruntimefields.md) + +## IndexPattern.replaceAllRuntimeFields() method + +Replaces all existing runtime fields with new fields + +Signature: + +```typescript +replaceAllRuntimeFields(newFields: Record): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newFields | Record<string, RuntimeField> | | + +Returns: + +`void` + diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md index b81218eb08886..3666e503e2722 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.lang.md @@ -9,7 +9,7 @@ Script field language Signature: ```typescript -get lang(): string | undefined; +get lang(): "painless" | "expression" | "mustache" | "java" | undefined; -set lang(lang: string | undefined); +set lang(lang: "painless" | "expression" | "mustache" | "java" | undefined); ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md index 05c807b1cd845..8cd1a476cf32f 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.md @@ -28,7 +28,7 @@ export declare class IndexPatternField implements IFieldType | [esTypes](./kibana-plugin-plugins-data-public.indexpatternfield.estypes.md) | | string[] | undefined | | | [filterable](./kibana-plugin-plugins-data-public.indexpatternfield.filterable.md) | | boolean | | | [isMapped](./kibana-plugin-plugins-data-public.indexpatternfield.ismapped.md) | | boolean | undefined | Is the field part of the index mapping? | -| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | string | undefined | Script field language | +| [lang](./kibana-plugin-plugins-data-public.indexpatternfield.lang.md) | | "painless" | "expression" | "mustache" | "java" | undefined | Script field language | | [name](./kibana-plugin-plugins-data-public.indexpatternfield.name.md) | | string | | | [readFromDocValues](./kibana-plugin-plugins-data-public.indexpatternfield.readfromdocvalues.md) | | boolean | | | [runtimeField](./kibana-plugin-plugins-data-public.indexpatternfield.runtimefield.md) | | RuntimeField | undefined | | diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md index f0600dd20658a..8882fa05ce0c2 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpatternfield.tojson.md @@ -10,7 +10,7 @@ toJSON(): { count: number; script: string | undefined; - lang: string | undefined; + lang: "painless" | "expression" | "mustache" | "java" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; @@ -28,7 +28,7 @@ toJSON(): { `{ count: number; script: string | undefined; - lang: string | undefined; + lang: "painless" | "expression" | "mustache" | "java" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md index 090b78a7078cc..8d0447d58634c 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.phrasefilter.md @@ -12,7 +12,7 @@ export declare type PhraseFilter = Filter & { script?: { script: { source?: any; - lang?: string; + lang?: estypes.ScriptLanguage; params: any; }; }; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md index fbe04f5e0a2a9..1cb627ec3a8f9 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.rangefilter.md @@ -12,7 +12,7 @@ export declare type RangeFilter = Filter & EsRangeFilter & { script?: { script: { params: any; - lang: string; + lang: estypes.ScriptLanguage; source: any; }; }; diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md index 095142cf0f05b..757d8f34a0c3a 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.lang.md @@ -7,5 +7,5 @@ Signature: ```typescript -lang?: string; +lang?: estypes.ScriptLanguage; ``` diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md index a1a76f2d2a295..fb39333cf245e 100644 --- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md +++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.reason.md @@ -15,7 +15,7 @@ export interface Reason | Property | Type | Description | | --- | --- | --- | | [caused\_by](./kibana-plugin-plugins-data-public.reason.caused_by.md) | {
type: string;
reason: string;
} | | -| [lang](./kibana-plugin-plugins-data-public.reason.lang.md) | string | | +| [lang](./kibana-plugin-plugins-data-public.reason.lang.md) | estypes.ScriptLanguage | | | [position](./kibana-plugin-plugins-data-public.reason.position.md) | {
offset: number;
start: number;
end: number;
} | | | [reason](./kibana-plugin-plugins-data-public.reason.reason.md) | string | | | [script\_stack](./kibana-plugin-plugins-data-public.reason.script_stack.md) | string[] | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md index d033804cb6fcb..3d5a757cb8f18 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.lang.md @@ -7,5 +7,5 @@ Signature: ```typescript -lang?: string; +lang?: estypes.ScriptLanguage; ``` diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md index 5ac48d26a85d6..bbc4cc2135d40 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.ifieldtype.md @@ -26,7 +26,7 @@ export interface IFieldType | [esTypes](./kibana-plugin-plugins-data-server.ifieldtype.estypes.md) | string[] | | | [filterable](./kibana-plugin-plugins-data-server.ifieldtype.filterable.md) | boolean | | | [format](./kibana-plugin-plugins-data-server.ifieldtype.format.md) | any | | -| [lang](./kibana-plugin-plugins-data-server.ifieldtype.lang.md) | string | | +| [lang](./kibana-plugin-plugins-data-server.ifieldtype.lang.md) | estypes.ScriptLanguage | | | [name](./kibana-plugin-plugins-data-server.ifieldtype.name.md) | string | | | [readFromDocValues](./kibana-plugin-plugins-data-server.ifieldtype.readfromdocvalues.md) | boolean | | | [script](./kibana-plugin-plugins-data-server.ifieldtype.script.md) | string | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md index a86fea3106225..33f1ac5e31660 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.addscriptedfield.md @@ -4,6 +4,11 @@ ## IndexPattern.addScriptedField() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Add scripted field to field list Signature: diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getassavedobjectbody.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getassavedobjectbody.md index 668d563ff04c0..f5e87638e2f1c 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getassavedobjectbody.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getassavedobjectbody.md @@ -9,33 +9,9 @@ Returns index pattern as saved object body for saving Signature: ```typescript -getAsSavedObjectBody(): { - fieldAttrs: string | undefined; - title: string; - timeFieldName: string | undefined; - intervalName: string | undefined; - sourceFilters: string | undefined; - fields: string | undefined; - fieldFormatMap: string | undefined; - type: string | undefined; - typeMeta: string | undefined; - allowNoIndex: true | undefined; - runtimeFieldMap: string | undefined; - }; +getAsSavedObjectBody(): IndexPatternAttributes; ``` Returns: -`{ - fieldAttrs: string | undefined; - title: string; - timeFieldName: string | undefined; - intervalName: string | undefined; - sourceFilters: string | undefined; - fields: string | undefined; - fieldFormatMap: string | undefined; - type: string | undefined; - typeMeta: string | undefined; - allowNoIndex: true | undefined; - runtimeFieldMap: string | undefined; - }` +`IndexPatternAttributes` diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md index 89d79d9b750fa..e791dfc7c3738 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md @@ -4,6 +4,11 @@ ## IndexPattern.getNonScriptedFields() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Signature: ```typescript diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md new file mode 100644 index 0000000000000..d5dc8f966316b --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [getRuntimeField](./kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md) + +## IndexPattern.getRuntimeField() method + +Returns runtime field if exists + +Signature: + +```typescript +getRuntimeField(name: string): RuntimeField | null; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`RuntimeField | null` + diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md index edfff8ec5efac..95f9f31309674 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md @@ -4,6 +4,11 @@ ## IndexPattern.getScriptedFields() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Signature: ```typescript diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md new file mode 100644 index 0000000000000..5000d5e645cbb --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [hasRuntimeField](./kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md) + +## IndexPattern.hasRuntimeField() method + +Checks if runtime field exists + +Signature: + +```typescript +hasRuntimeField(name: string): boolean; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| name | string | | + +Returns: + +`boolean` + diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md index 97d1cd9115262..27b8a31a2582b 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md @@ -54,13 +54,16 @@ export declare class IndexPattern implements IIndexPattern | [getFormatterForField(field)](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfield.md) | | Provide a field, get its formatter | | [getFormatterForFieldNoDefault(fieldname)](./kibana-plugin-plugins-data-server.indexpattern.getformatterforfieldnodefault.md) | | Get formatter for a given field name. Return undefined if none exists | | [getNonScriptedFields()](./kibana-plugin-plugins-data-server.indexpattern.getnonscriptedfields.md) | | | +| [getRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.getruntimefield.md) | | Returns runtime field if exists | | [getScriptedFields()](./kibana-plugin-plugins-data-server.indexpattern.getscriptedfields.md) | | | | [getSourceFiltering()](./kibana-plugin-plugins-data-server.indexpattern.getsourcefiltering.md) | | Get the source filtering configuration for that index. | | [getTimeField()](./kibana-plugin-plugins-data-server.indexpattern.gettimefield.md) | | | +| [hasRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.hasruntimefield.md) | | Checks if runtime field exists | | [isTimeBased()](./kibana-plugin-plugins-data-server.indexpattern.istimebased.md) | | | | [isTimeNanosBased()](./kibana-plugin-plugins-data-server.indexpattern.istimenanosbased.md) | | | -| [removeRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate | +| [removeRuntimeField(name)](./kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md) | | Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. | | [removeScriptedField(fieldName)](./kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md) | | Remove scripted field from field list | +| [replaceAllRuntimeFields(newFields)](./kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md) | | Replaces all existing runtime fields with new fields | | [setFieldAttrs(fieldName, attrName, value)](./kibana-plugin-plugins-data-server.indexpattern.setfieldattrs.md) | | | | [setFieldCount(fieldName, count)](./kibana-plugin-plugins-data-server.indexpattern.setfieldcount.md) | | | | [setFieldCustomLabel(fieldName, customLabel)](./kibana-plugin-plugins-data-server.indexpattern.setfieldcustomlabel.md) | | | diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md index da8e7e40a7fac..ef32b80ba8502 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removeruntimefield.md @@ -4,7 +4,7 @@ ## IndexPattern.removeRuntimeField() method -Remove a runtime field - removed from mapped field or removed unmapped field as appropriate +Remove a runtime field - removed from mapped field or removed unmapped field as appropriate. Doesn't clear associated field attributes. Signature: @@ -16,7 +16,7 @@ removeRuntimeField(name: string): void; | Parameter | Type | Description | | --- | --- | --- | -| name | string | | +| name | string | Field name to remove | Returns: diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md index 3162a7f42dd12..b351eba2ace4f 100644 --- a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.removescriptedfield.md @@ -4,6 +4,11 @@ ## IndexPattern.removeScriptedField() method +> Warning: This API is now obsolete. +> +> use runtime field instead +> + Remove scripted field from field list Signature: diff --git a/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md new file mode 100644 index 0000000000000..35df871763f8a --- /dev/null +++ b/docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) > [IndexPattern](./kibana-plugin-plugins-data-server.indexpattern.md) > [replaceAllRuntimeFields](./kibana-plugin-plugins-data-server.indexpattern.replaceallruntimefields.md) + +## IndexPattern.replaceAllRuntimeFields() method + +Replaces all existing runtime fields with new fields + +Signature: + +```typescript +replaceAllRuntimeFields(newFields: Record): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| newFields | Record<string, RuntimeField> | | + +Returns: + +`void` + diff --git a/docs/discover/images/add-field-to-pattern.png b/docs/discover/images/add-field-to-pattern.png index 84dfcb0745c69..04f564ab89857 100644 Binary files a/docs/discover/images/add-field-to-pattern.png and b/docs/discover/images/add-field-to-pattern.png differ diff --git a/docs/discover/images/customer.png b/docs/discover/images/customer.png new file mode 100644 index 0000000000000..f2042080f0a37 Binary files /dev/null and b/docs/discover/images/customer.png differ diff --git a/docs/discover/images/discover-from-visualize.png b/docs/discover/images/discover-from-visualize.png index cbf64dff18b15..07d34b8b49018 100644 Binary files a/docs/discover/images/discover-from-visualize.png and b/docs/discover/images/discover-from-visualize.png differ diff --git a/docs/discover/images/discover-search-for-relevance.png b/docs/discover/images/discover-search-for-relevance.png index 4d59ad186ded4..e42ed2416f79e 100644 Binary files a/docs/discover/images/discover-search-for-relevance.png and b/docs/discover/images/discover-search-for-relevance.png differ diff --git a/docs/discover/images/discover-visualize.png b/docs/discover/images/discover-visualize.png index f4bcaf8aca028..242aa16709a9f 100644 Binary files a/docs/discover/images/discover-visualize.png and b/docs/discover/images/discover-visualize.png differ diff --git a/docs/discover/images/document-table-expanded.png b/docs/discover/images/document-table-expanded.png index 87c8e2047a0cb..38ea0987b120a 100644 Binary files a/docs/discover/images/document-table-expanded.png and b/docs/discover/images/document-table-expanded.png differ diff --git a/docs/discover/images/document-table.png b/docs/discover/images/document-table.png index f47ca5353124e..097feb4dc9034 100644 Binary files a/docs/discover/images/document-table.png and b/docs/discover/images/document-table.png differ diff --git a/docs/discover/images/double-arrow.png b/docs/discover/images/double-arrow.png new file mode 100644 index 0000000000000..ba4ee11ebf738 Binary files /dev/null and b/docs/discover/images/double-arrow.png differ diff --git a/docs/discover/images/downward-arrow.png b/docs/discover/images/downward-arrow.png new file mode 100644 index 0000000000000..47b03cfe82b34 Binary files /dev/null and b/docs/discover/images/downward-arrow.png differ diff --git a/docs/discover/images/hello-field.png b/docs/discover/images/hello-field.png index 07d97e054d7ec..fe4cfbb41fdc2 100644 Binary files a/docs/discover/images/hello-field.png and b/docs/discover/images/hello-field.png differ diff --git a/docs/discover/search-for-relevance.asciidoc b/docs/discover/search-for-relevance.asciidoc index 0232c02b6e061..f3cf1c3a7f52c 100644 --- a/docs/discover/search-for-relevance.asciidoc +++ b/docs/discover/search-for-relevance.asciidoc @@ -1,24 +1,36 @@ [[discover-search-for-relevance]] == Search for relevance -Sometimes you might be unsure which documents best match your question. +Sometimes you might be unsure which documents best match your search. {es} assigns a relevancy, or score to each document, so you can can narrow your search to the documents with the most relevant results. The higher the score, the better it matches your query. -For example, suppose you have the <>, and you're a searching for -a flight that arrived or departed from `Warsaw` or `Venice` when the weather was clear. +This example shows how to use *Discover* to list +your documents from most relevant to least relevant. This example uses +the <>, or you can use your own data. -. In *Discover*, open the index pattern dropdown, and select `kibana_sample_data_flight`. -. In the query bar, click *KQL*, and switch to the <>. -. Search for `Warsaw OR Venice OR Clear`. -. If you don't see any results, open the time filter and select a time range that contains data. -. From the list of *Available fields*, add `_score` to the document table. -. In the document table, click the header for the `_score` column, and then sort the column by descending scores. +. In *Discover*, open the index pattern dropdown, and select that data you want to work with. + -The results are currently sorted by first `Time`, and then by `_score`. -. To sort only by `_score`, remove the `Time` field. +For the sample flights data, set the index pattern to *kibana_sample_data_flights*. +. In the query bar, click *KQL*, and then turn it off. + -Your table now shows documents with the best matches, from most to least relevant. +You're now using the <>. +. Run your search. For the sample data, try: ++ +```ts +Warsaw OR Venice OR Clear +``` +. If you don't see any results, expand the <>, for example to *Last 7 days*. +. From the list of *Available fields*, add `_score` and any other fields you want to the document table. +. To sort the `_score` column in descending order, hover over its header, and then click twice on +the arrow icon +image:images/double-arrow.png[Double arrow icon to indicate sorting] so it changes to +image:images/downward-arrow.png[Downward pointing arrow to indicate descending sorting]. ++ +At this point, you're doing a multi-column sort: first by `Time`, and then by `_score`. +. To turn off sorting for the `Time` field, hover over its header, and then click the down arrow. ++ +Your table now sorts documents from most to least relevant. + [role="screenshot"] image::images/discover-search-for-relevance.png["Example of a search for relevance"] diff --git a/docs/index-extra-title-page.html b/docs/index-extra-title-page.html new file mode 100644 index 0000000000000..7bcbc9f075124 --- /dev/null +++ b/docs/index-extra-title-page.html @@ -0,0 +1,37 @@ +
+

From creating beautiful visualizations to managing the Elastic Stack, learn how Kibana helps you get the most of your data.

+

Watch our videos

+ + + + + + + + + +

New to Kibana?

Popular topics

+ + +
+

All topics

+
diff --git a/docs/maps/index.asciidoc b/docs/maps/index.asciidoc index 45d24bfb5a7e4..20320c5a938c9 100644 --- a/docs/maps/index.asciidoc +++ b/docs/maps/index.asciidoc @@ -24,8 +24,8 @@ Create beautiful maps from your geographical data. With **Maps**, you can: diff --git a/docs/settings/fleet-settings.asciidoc b/docs/settings/fleet-settings.asciidoc index 9c054fbc00222..134d9de3f49d8 100644 --- a/docs/settings/fleet-settings.asciidoc +++ b/docs/settings/fleet-settings.asciidoc @@ -39,8 +39,8 @@ See the {fleet-guide}/index.html[{fleet}] docs for more information. |=== | `xpack.fleet.agents.fleet_server.hosts` | Hostnames used by {agent} for accessing {fleet-server}. -| `xpack.fleet.agents.elasticsearch.host` - | The hostname used by {agent} for accessing {es}. +| `xpack.fleet.agents.elasticsearch.hosts` + | Hostnames used by {agent} for accessing {es}. |=== [NOTE] diff --git a/docs/setup/install/brew.asciidoc b/docs/setup/install/brew.asciidoc index e3085f6e225aa..eeba869a259d4 100644 --- a/docs/setup/install/brew.asciidoc +++ b/docs/setup/install/brew.asciidoc @@ -14,15 +14,13 @@ brew tap elastic/tap ------------------------- Once you've tapped the Elastic Homebrew repo, you can use `brew install` to -install the default distribution of {kib}: +install the **latest version** of {kib}: [source,sh] ------------------------- brew install elastic/tap/kibana-full ------------------------- -This installs the most recently released distribution of {kib}. - [[brew-layout]] ==== Directory layout for Homebrew installs diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index bac2b0ebdf15f..ddb906f390a2d 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -262,11 +262,11 @@ on the {kib} index at startup. {kib} users still need to authenticate with {es} {ref}/indices-create-index.html[index name limitations]. *Default: `".kibana"`* -| `kibana.autocompleteTimeout:` {ess-icon} +| `data.autocomplete.valueSuggestions.timeout:` {ess-icon} | Time in milliseconds to wait for autocomplete suggestions from {es}. This value must be a whole number greater than zero. *Default: `"1000"`* -| `kibana.autocompleteTerminateAfter:` {ess-icon} +| `data.autocomplete.valueSuggestions.terminateAfter:` {ess-icon} | Maximum number of documents loaded by each shard to generate autocomplete suggestions. This value must be a whole number greater than zero. *Default: `"100000"`* @@ -596,6 +596,10 @@ inactive socket. *Default: `"120000"`* | Paths to a PEM-encoded X.509 server certificate and its corresponding private key. These are used by {kib} to establish trust when receiving inbound SSL/TLS connections from users. +|[[server-uuid]] `server.uuid:` + | The unique identifier for this {kib} instance. + + |=== [NOTE] diff --git a/docs/user/dashboard/lens.asciidoc b/docs/user/dashboard/lens.asciidoc index c5718b2a089bf..3b3a7a9ee527d 100644 --- a/docs/user/dashboard/lens.asciidoc +++ b/docs/user/dashboard/lens.asciidoc @@ -10,8 +10,8 @@ src="https://play.vidyard.com/embed/v4.js"> diff --git a/docs/user/dashboard/timelion.asciidoc b/docs/user/dashboard/timelion.asciidoc index 675fd03df3648..ec9e8b56f9342 100644 --- a/docs/user/dashboard/timelion.asciidoc +++ b/docs/user/dashboard/timelion.asciidoc @@ -4,7 +4,7 @@ To use *Timelion*, you define a graph by chaining functions together, using the *Timelion*-specific syntax. The syntax enables some features that classical point series charts don't offer, such as pulling data from different indices or data sources into one graph. -deprecated::[7.0.0,"*Timelion* is still supported. The *Timelion app* is deprecated in 7.0, replaced by dashboard features. In the last 7.x minor version and later, the *Timelion app* is removed from {kib}. To prepare for the removal of *Timelion app*, you must migrate *Timelion app* worksheets to a dashboard. For information on how to migrate *Timelion app* worksheets, refer to the link:https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html#deprecation-v7.10.0[7.10.0 Release Notes]."] +deprecated::[7.0.0,"*Timelion* is still supported. The *Timelion app* is deprecated in 7.0, replaced by dashboard features. In 7.16 and later, the *Timelion app* is removed from {kib}. To prepare for the removal of *Timelion app*, you must migrate *Timelion app* worksheets to a dashboard. For information on how to migrate *Timelion app* worksheets, refer to the link:https://www.elastic.co/guide/en/kibana/7.10/release-notes-7.10.0.html#deprecation-v7.10.0[7.10.0 Release Notes]."] [float] ==== Timelion expressions diff --git a/docs/user/discover.asciidoc b/docs/user/discover.asciidoc index ea413747a2aad..82a7dd300f028 100644 --- a/docs/user/discover.asciidoc +++ b/docs/user/discover.asciidoc @@ -101,22 +101,24 @@ image:images/find-manufacturer-field.png[Fields list that displays the top five . Click image:images/add-icon.png[Add icon] to toggle the field into the document table. -. Find the `day of week` field and add it to your document table. Your table should look like this: +. Find the `customer_first_name` and `customer_last_name` last name fields and add +them to your document table. Your table should look similar to this: + [role="screenshot"] -image:images/document-table.png[Document table with fields for manufacturer, geo.country_iso_code, and day_of_week] - +image:images/document-table.png[Document table with fields for manufacturer, customer_first_name, and customer_last_name] . To rearrange the table columns, hover the mouse over a -column header, and then use the move and sort controls. +column header, and then use the move controls. + +. To view more of the document table, click *Hide chart*. [float] [[add-field-in-discover]] -=== Add a field +=== Add a field to your index pattern What happens if you forgot to define an important value as a separate field? Or, what if you -want to combine two fields and treat them as one? -You can add a field to your index pattern from inside of **Discover**, +want to combine two fields and treat them as one? This is where {ref}/runtime.html[runtime fields] come into play. +You can add a runtime field to your index pattern from inside of **Discover**, and then use that field for analysis and visualizations, the same way you do with other fields. @@ -129,7 +131,7 @@ image:images/add-field-to-pattern.png[Dropdown menu located next to index patter . Turn on *Set value*. -. Use the Painless scripting language to define the field: +. Define the script using the Painless scripting language. Runtime fields require an `emit()`. + ```ts emit("Hello World!"); @@ -137,15 +139,25 @@ emit("Hello World!"); . Click *Save*. -. In the fields list, search for the *hello* field, and then click it. -+ -You'll see the top values for the field. The pop-up also includes actions for filtering, -editing, and deleting the field. +. In the fields list, search for the *hello* field, and then add it to the table to view it's value. + [role="screenshot"] -image:images/hello-field.png[Top values for the hello field, width=50%] +image:images/hello-field.png[hello field in the document table] -For more information on adding fields and Painless scripting language examples, refer to <>. +. Create a second field named `customer` that combines customer last name and first initial. ++ +```ts +String str = doc['customer_first_name.keyword'].value; +char ch1 = str.charAt(0); +emit(doc['customer_last_name.keyword'].value + ", " + ch1); +``` +. Simplify the the document table by removing `customer_first_name` and `customer_last_name` and adding `customer` in their place. ++ +[role="screenshot"] +image:images/customer.png[Customer last name, first initial in the document table] ++ +For more information on adding fields and Painless scripting language examples, +refer to <>. [float] @@ -202,7 +214,7 @@ click the close icon (x) next to its name in the filter bar. Dive into an individual document to view its fields and the documents that occurred before and after it. -. In the document table, expand any document. To view more of the document table, click *Hide chart*. +. In the document table, expand any document. + [role="screenshot"] image:images/document-table-expanded.png[Table view with document expanded] @@ -238,7 +250,7 @@ image:images/discover-save-saved-search.png[Save saved search in Discover, width If a field can be {ref}/search-aggregations.html[aggregated], you can quickly visualize it from **Discover**. -. From the **Selected fields** list, click `day_of_week`, and then click **Visualize**. +. From the **Available fields** list, click `day_of_week`, and then click **Visualize**. + [role="screenshot"] image:images/discover-visualize.png[Discover sidebar field popover with visualize button, width=75%] diff --git a/docs/user/introduction.asciidoc b/docs/user/introduction.asciidoc index 38435708aaf99..25780d303eec4 100644 --- a/docs/user/introduction.asciidoc +++ b/docs/user/introduction.asciidoc @@ -26,8 +26,8 @@ which features. diff --git a/docs/user/production-considerations/production.asciidoc b/docs/user/production-considerations/production.asciidoc index 726747d5d69d0..1ffca4b6ae6ab 100644 --- a/docs/user/production-considerations/production.asciidoc +++ b/docs/user/production-considerations/production.asciidoc @@ -8,7 +8,6 @@ * <> * <> * <> -* <> * <> * <> * <> @@ -22,9 +21,8 @@ Kibana instances that are all connected to the same Elasticsearch instance. While Kibana isn't terribly resource intensive, we still recommend running Kibana separate from your Elasticsearch data or master nodes. To distribute Kibana -traffic across the nodes in your Elasticsearch cluster, you can run Kibana -and an Elasticsearch client node on the same machine. For more information, see -<>. +traffic across the nodes in your Elasticsearch cluster, +you can configure Kibana to use a list of Elasticsearch hosts. [float] [[configuring-kibana-shield]] @@ -69,58 +67,6 @@ csp.strict: true See <>. -[float] -[[load-balancing-es]] -=== Load Balancing across multiple {es} nodes -If you have multiple nodes in your Elasticsearch cluster, the easiest way to distribute Kibana requests -across the nodes is to run an Elasticsearch _Coordinating only_ node on the same machine as Kibana. -Elasticsearch Coordinating only nodes are essentially smart load balancers that are part of the cluster. They -process incoming HTTP requests, redirect operations to the other nodes in the cluster as needed, and -gather and return the results. For more information, see -{ref}/modules-node.html[Node] in the Elasticsearch reference. - -To use a local client node to load balance Kibana requests: - -. Install Elasticsearch on the same machine as Kibana. -. Configure the node as a Coordinating only node. In `elasticsearch.yml`, set `node.data`, `node.master` and `node.ingest` to `false`: -+ -[source,js] --------- -# 3. You want this node to be neither master nor data node nor ingest node, but -# to act as a "search load balancer" (fetching data from nodes, -# aggregating results, etc.) -# -node.master: false -node.data: false -node.ingest: false --------- -. Configure the client node to join your Elasticsearch cluster. In `elasticsearch.yml`, set the `cluster.name` to the -name of your cluster. -+ -[source,js] --------- -cluster.name: "my_cluster" --------- -. Check your transport and HTTP host configs in `elasticsearch.yml` under `network.host` and `transport.host`. The `transport.host` needs to be on the network reachable to the cluster members, the `network.host` is the network for the HTTP connection for Kibana (localhost:9200 by default). -+ -[source,js] --------- -network.host: localhost -http.port: 9200 - -# by default transport.host refers to network.host -transport.host: -transport.tcp.port: 9300 - 9400 --------- -. Make sure Kibana is configured to point to your local client node. In `kibana.yml`, the `elasticsearch.hosts` setting should be set to -`["localhost:9200"]`. -+ -[source,js] --------- -# The Elasticsearch instance to use for all your queries. -elasticsearch.hosts: ["http://localhost:9200"] --------- - [float] [[load-balancing-kibana]] === Load balancing across multiple Kibana instances diff --git a/docs/user/production-considerations/task-manager-health-monitoring.asciidoc b/docs/user/production-considerations/task-manager-health-monitoring.asciidoc index f64c120f61298..d6b90a4f19e11 100644 --- a/docs/user/production-considerations/task-manager-health-monitoring.asciidoc +++ b/docs/user/production-considerations/task-manager-health-monitoring.asciidoc @@ -6,6 +6,8 @@ Health monitoring ++++ +experimental[] + The Task Manager has an internal monitoring mechanism to keep track of a variety of metrics, which can be consumed with either the health monitoring API or the {kib} server log. The health monitoring API provides a reliable endpoint that can be monitored. diff --git a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc index 5e75aef0d9570..c6a7b7f3d53fd 100644 --- a/docs/user/production-considerations/task-manager-troubleshooting.asciidoc +++ b/docs/user/production-considerations/task-manager-troubleshooting.asciidoc @@ -60,6 +60,8 @@ For details on scaling Task Manager, see <>. [[task-manager-diagnosing-root-cause]] ==== Diagnose a root cause for drift +experimental[] + The following guide helps you identify a root cause for _drift_ by making sense of the output from the <> endpoint. By analyzing the different sections of the output, you can evaluate different theories that explain the drift in a deployment. diff --git a/docs/user/security/api-keys/images/create-api-key.png b/docs/user/security/api-keys/images/create-api-key.png index c763dcbfa53f8..b0041f69b05b6 100644 Binary files a/docs/user/security/api-keys/images/create-api-key.png and b/docs/user/security/api-keys/images/create-api-key.png differ diff --git a/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc b/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc index f5192f4641d4d..63fd2799c90cf 100644 --- a/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc +++ b/docs/user/security/securing-communications/elasticsearch-mutual-tls.asciidoc @@ -39,7 +39,7 @@ This entails generating a "server certificate" for {es} to use on the HTTP layer . Obtain a client certificate and private key for {kib}. + -- -{kib} must this "client certificate" and corresponding private key when connecting to {es}. +{kib} uses the client certificate and corresponding private key when connecting to {es}. NOTE: This is not the same as the <> that {kib} will present to web browsers. diff --git a/examples/search_examples/public/search_sessions/app.tsx b/examples/search_examples/public/search_sessions/app.tsx index a768600db24ee..7fdf91537c977 100644 --- a/examples/search_examples/public/search_sessions/app.tsx +++ b/examples/search_examples/public/search_sessions/app.tsx @@ -702,7 +702,7 @@ function doSearch( const startTs = performance.now(); // Submit the search request using the `data.search` service. - // @ts-expect-error request.params is incompatible. Filter is not assignable to QueryContainer + // @ts-expect-error request.params is incompatible. Filter is not assignable to QueryDslQueryContainer return data.search .search(req, { sessionId }) .pipe( diff --git a/package.json b/package.json index f41c85c4c7b80..6f5994a8679d6 100644 --- a/package.json +++ b/package.json @@ -86,6 +86,7 @@ "**/prismjs": "1.23.0", "**/react-syntax-highlighter": "^15.3.1", "**/react-syntax-highlighter/**/highlight.js": "^10.4.1", + "**/refractor": "^3.3.1", "**/request": "^2.88.2", "**/trim": "1.0.1", "**/typescript": "4.1.3", @@ -98,11 +99,11 @@ "dependencies": { "@elastic/apm-rum": "^5.6.1", "@elastic/apm-rum-react": "^1.2.5", - "@elastic/charts": "29.2.0", - "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath/npm_module", - "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.4", + "@elastic/charts": "30.0.0", + "@elastic/datemath": "link:bazel-bin/packages/elastic-datemath", + "@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.13", "@elastic/ems-client": "7.13.0", - "@elastic/eui": "32.1.0", + "@elastic/eui": "33.0.0", "@elastic/filesaver": "1.1.2", "@elastic/good": "^9.0.1-kibana3", "@elastic/maki": "6.3.0", @@ -110,51 +111,52 @@ "@elastic/numeral": "^2.5.1", "@elastic/react-search-ui": "^1.5.1", "@elastic/request-crypto": "1.1.4", - "@elastic/safer-lodash-set": "link:bazel-bin/packages/elastic-safer-lodash-set/npm_module", + "@elastic/safer-lodash-set": "link:bazel-bin/packages/elastic-safer-lodash-set", "@elastic/search-ui-app-search-connector": "^1.5.0", "@elastic/ui-ace": "0.2.3", "@hapi/accept": "^5.0.2", "@hapi/boom": "^9.1.1", "@hapi/cookie": "^11.0.2", "@hapi/good-squeeze": "6.0.0", - "@hapi/h2o2": "^9.0.2", + "@hapi/h2o2": "^9.1.0", "@hapi/hapi": "^20.0.3", "@hapi/hoek": "^9.1.1", "@hapi/inert": "^6.0.3", "@hapi/podium": "^4.1.1", "@hapi/wreck": "^17.1.0", - "@kbn/ace": "link:bazel-bin/packages/kbn-ace/npm_module", - "@kbn/analytics": "link:bazel-bin/packages/kbn-analytics/npm_module", - "@kbn/apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader/npm_module", - "@kbn/apm-utils": "link:bazel-bin/packages/kbn-apm-utils/npm_module", - "@kbn/config": "link:bazel-bin/packages/kbn-config/npm_module", - "@kbn/config-schema": "link:bazel-bin/packages/kbn-config-schema/npm_module", - "@kbn/crypto": "link:bazel-bin/packages/kbn-crypto/npm_module", - "@kbn/mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl/npm_module", - "@kbn/i18n": "link:bazel-bin/packages/kbn-i18n/npm_module", + "@kbn/ace": "link:bazel-bin/packages/kbn-ace", + "@kbn/analytics": "link:bazel-bin/packages/kbn-analytics", + "@kbn/apm-config-loader": "link:bazel-bin/packages/kbn-apm-config-loader", + "@kbn/apm-utils": "link:bazel-bin/packages/kbn-apm-utils", + "@kbn/config": "link:bazel-bin/packages/kbn-config", + "@kbn/config-schema": "link:bazel-bin/packages/kbn-config-schema", + "@kbn/crypto": "link:bazel-bin/packages/kbn-crypto", + "@kbn/mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl", + "@kbn/i18n": "link:bazel-bin/packages/kbn-i18n", "@kbn/interpreter": "link:packages/kbn-interpreter", - "@kbn/io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils/npm_module", - "@kbn/legacy-logging": "link:bazel-bin/packages/kbn-legacy-logging/npm_module", - "@kbn/logging": "link:bazel-bin/packages/kbn-logging/npm_module", - "@kbn/monaco": "link:bazel-bin/packages/kbn-monaco/npm_module", - "@kbn/securitysolution-list-constants": "link:bazel-bin/packages/kbn-securitysolution-list-constants/npm_module", - "@kbn/securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils/npm_module", - "@kbn/securitysolution-io-ts-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-types/npm_module", - "@kbn/securitysolution-io-ts-alerting-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types/npm_module", - "@kbn/securitysolution-io-ts-list-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-list-types/npm_module", - "@kbn/securitysolution-io-ts-utils": "link:bazel-bin/packages/kbn-securitysolution-io-ts-utils/npm_module", - "@kbn/securitysolution-list-api": "link:bazel-bin/packages/kbn-securitysolution-list-api/npm_module", - "@kbn/securitysolution-list-hooks": "link:bazel-bin/packages/kbn-securitysolution-list-hooks/npm_module", - "@kbn/securitysolution-list-utils": "link:bazel-bin/packages/kbn-securitysolution-list-utils/npm_module", - "@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils/npm_module", - "@kbn/server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools/npm_module", + "@kbn/io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils", + "@kbn/legacy-logging": "link:bazel-bin/packages/kbn-legacy-logging", + "@kbn/logging": "link:bazel-bin/packages/kbn-logging", + "@kbn/monaco": "link:bazel-bin/packages/kbn-monaco", + "@kbn/rule-data-utils": "link:bazel-bin/packages/kbn-rule-data-utils", + "@kbn/securitysolution-list-constants": "link:bazel-bin/packages/kbn-securitysolution-list-constants", + "@kbn/securitysolution-es-utils": "link:bazel-bin/packages/kbn-securitysolution-es-utils", + "@kbn/securitysolution-io-ts-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-types", + "@kbn/securitysolution-io-ts-alerting-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types", + "@kbn/securitysolution-io-ts-list-types": "link:bazel-bin/packages/kbn-securitysolution-io-ts-list-types", + "@kbn/securitysolution-io-ts-utils": "link:bazel-bin/packages/kbn-securitysolution-io-ts-utils", + "@kbn/securitysolution-list-api": "link:bazel-bin/packages/kbn-securitysolution-list-api", + "@kbn/securitysolution-list-hooks": "link:bazel-bin/packages/kbn-securitysolution-list-hooks", + "@kbn/securitysolution-list-utils": "link:bazel-bin/packages/kbn-securitysolution-list-utils", + "@kbn/securitysolution-utils": "link:bazel-bin/packages/kbn-securitysolution-utils", + "@kbn/server-http-tools": "link:bazel-bin/packages/kbn-server-http-tools", "@kbn/server-route-repository": "link:packages/kbn-server-route-repository", - "@kbn/std": "link:bazel-bin/packages/kbn-std/npm_module", - "@kbn/tinymath": "link:bazel-bin/packages/kbn-tinymath/npm_module", + "@kbn/std": "link:bazel-bin/packages/kbn-std", + "@kbn/tinymath": "link:bazel-bin/packages/kbn-tinymath", "@kbn/ui-framework": "link:packages/kbn-ui-framework", "@kbn/ui-shared-deps": "link:packages/kbn-ui-shared-deps", - "@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types/npm_module", - "@kbn/utils": "link:bazel-bin/packages/kbn-utils/npm_module", + "@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types", + "@kbn/utils": "link:bazel-bin/packages/kbn-utils", "@loaders.gl/core": "^2.3.1", "@loaders.gl/json": "^2.3.1", "@mapbox/geojson-rewind": "^0.5.0", @@ -162,7 +164,6 @@ "@mapbox/mapbox-gl-rtl-text": "0.2.3", "@mapbox/vector-tile": "1.3.1", "@reduxjs/toolkit": "^1.5.1", - "@scant/router": "^0.1.1", "@slack/webhook": "^5.0.4", "@turf/along": "6.0.1", "@turf/area": "6.0.1", @@ -197,7 +198,7 @@ "broadcast-channel": "^3.0.3", "chalk": "^4.1.0", "check-disk-space": "^2.1.0", - "cheerio": "0.22.0", + "cheerio": "^1.0.0-rc.9", "chokidar": "^3.4.3", "chroma-js": "^1.4.1", "classnames": "2.2.6", @@ -229,6 +230,7 @@ "expiry-js": "0.1.7", "extract-zip": "^2.0.1", "fast-deep-equal": "^3.1.1", + "fflate": "^0.6.9", "file-saver": "^1.3.8", "file-type": "^10.9.0", "focus-trap-react": "^3.1.1", @@ -239,7 +241,6 @@ "get-port": "^5.0.0", "getopts": "^2.2.5", "getos": "^3.1.0", - "git-url-parse": "11.1.2", "github-markdown-css": "^2.10.0", "glob": "^7.1.2", "glob-all": "^3.2.1", @@ -274,7 +275,6 @@ "json-stringify-safe": "5.0.1", "jsonwebtoken": "^8.5.1", "jsts": "^1.6.2", - "@kbn/rule-data-utils": "link:packages/kbn-rule-data-utils", "kea": "^2.4.2", "leaflet": "1.5.1", "leaflet-draw": "0.4.14", @@ -293,7 +293,7 @@ "memoize-one": "^5.0.0", "mime": "^2.4.4", "mime-types": "^2.1.27", - "mini-css-extract-plugin": "0.8.0", + "mini-css-extract-plugin": "1.1.0", "minimatch": "^3.0.4", "moment": "^2.24.0", "moment-duration-format": "^2.3.2", @@ -441,33 +441,33 @@ "@babel/traverse": "^7.12.12", "@babel/types": "^7.12.12", "@bazel/ibazel": "^0.15.10", - "@bazel/typescript": "^3.5.0", + "@bazel/typescript": "^3.5.1", "@cypress/snapshot": "^2.1.7", "@cypress/webpack-preprocessor": "^5.6.0", "@elastic/apm-rum": "^5.6.1", "@elastic/apm-rum-react": "^1.2.5", - "@elastic/eslint-config-kibana": "link:bazel-bin/packages/elastic-eslint-config-kibana/npm_module", + "@elastic/eslint-config-kibana": "link:bazel-bin/packages/elastic-eslint-config-kibana", "@elastic/eslint-plugin-eui": "0.0.2", "@elastic/github-checks-reporter": "0.0.20b3", "@elastic/makelogs": "^6.0.0", "@istanbuljs/schema": "^0.1.2", "@jest/reporters": "^26.6.2", - "@kbn/babel-code-parser": "link:bazel-bin/packages/kbn-babel-code-parser/npm_module", - "@kbn/babel-preset": "link:bazel-bin/packages/kbn-babel-preset/npm_module", + "@kbn/babel-code-parser": "link:bazel-bin/packages/kbn-babel-code-parser", + "@kbn/babel-preset": "link:bazel-bin/packages/kbn-babel-preset", "@kbn/cli-dev-mode": "link:packages/kbn-cli-dev-mode", - "@kbn/dev-utils": "link:bazel-bin/packages/kbn-dev-utils/npm_module", - "@kbn/docs-utils": "link:bazel-bin/packages/kbn-docs-utils/npm_module", - "@kbn/es": "link:bazel-bin/packages/kbn-es/npm_module", + "@kbn/dev-utils": "link:bazel-bin/packages/kbn-dev-utils", + "@kbn/docs-utils": "link:bazel-bin/packages/kbn-docs-utils", + "@kbn/es": "link:bazel-bin/packages/kbn-es", "@kbn/es-archiver": "link:packages/kbn-es-archiver", - "@kbn/eslint-import-resolver-kibana": "link:bazel-bin/packages/kbn-eslint-import-resolver-kibana/npm_module", - "@kbn/eslint-plugin-eslint": "link:bazel-bin/packages/kbn-eslint-plugin-eslint/npm_module", - "@kbn/expect": "link:bazel-bin/packages/kbn-expect/npm_module", + "@kbn/eslint-import-resolver-kibana": "link:bazel-bin/packages/kbn-eslint-import-resolver-kibana", + "@kbn/eslint-plugin-eslint": "link:bazel-bin/packages/kbn-eslint-plugin-eslint", + "@kbn/expect": "link:bazel-bin/packages/kbn-expect", "@kbn/optimizer": "link:packages/kbn-optimizer", - "@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator/npm_module", + "@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator", "@kbn/plugin-helpers": "link:packages/kbn-plugin-helpers", "@kbn/pm": "link:packages/kbn-pm", "@kbn/storybook": "link:packages/kbn-storybook", - "@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools/npm_module", + "@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools", "@kbn/test": "link:packages/kbn-test", "@kbn/test-subj-selector": "link:packages/kbn-test-subj-selector", "@loaders.gl/polyfills": "^2.3.5", @@ -501,7 +501,6 @@ "@types/base64-js": "^1.2.5", "@types/bluebird": "^3.1.1", "@types/chance": "^1.0.0", - "@types/cheerio": "^0.22.28", "@types/chroma-js": "^1.4.2", "@types/chromedriver": "^81.0.0", "@types/classnames": "^2.2.9", @@ -532,7 +531,6 @@ "@types/geojson": "7946.0.7", "@types/getopts": "^2.0.1", "@types/getos": "^3.0.0", - "@types/git-url-parse": "^9.0.0", "@types/glob": "^7.1.2", "@types/gulp": "^4.0.6", "@types/gulp-zip": "^4.0.1", @@ -749,6 +747,7 @@ "jest-cli": "^26.6.3", "jest-diff": "^26.6.2", "jest-environment-jsdom": "^26.6.2", + "jest-environment-jsdom-thirteen": "^1.0.1", "jest-raw-loader": "^1.0.1", "jest-silent-reporter": "^0.5.0", "jest-snapshot": "^26.6.2", diff --git a/packages/BUILD.bazel b/packages/BUILD.bazel index de3498da1a697..083ae90a031f5 100644 --- a/packages/BUILD.bazel +++ b/packages/BUILD.bazel @@ -28,6 +28,7 @@ filegroup( "//packages/kbn-mapbox-gl:build", "//packages/kbn-monaco:build", "//packages/kbn-plugin-generator:build", + "//packages/kbn-rule-data-utils:build", "//packages/kbn-securitysolution-list-constants:build", "//packages/kbn-securitysolution-io-ts-types:build", "//packages/kbn-securitysolution-io-ts-alerting-types:build", diff --git a/packages/kbn-apm-utils/src/index.ts b/packages/kbn-apm-utils/src/index.ts index f2f537138dad0..384b6683199e5 100644 --- a/packages/kbn-apm-utils/src/index.ts +++ b/packages/kbn-apm-utils/src/index.ts @@ -16,6 +16,8 @@ export interface SpanOptions { labels?: Record; } +type Span = Exclude; + export function parseSpanOptions(optionsOrName: SpanOptions | string) { const options = typeof optionsOrName === 'string' ? { name: optionsOrName } : optionsOrName; @@ -30,7 +32,7 @@ const runInNewContext = any>(cb: T): ReturnType( optionsOrName: SpanOptions | string, - cb: () => Promise + cb: (span?: Span) => Promise ): Promise { const options = parseSpanOptions(optionsOrName); @@ -71,13 +73,17 @@ export async function withSpan( span.addLabels(labels); } - return cb() + return cb(span) .then((res) => { - span.outcome = 'success'; + if (!span.outcome || span.outcome === 'unknown') { + span.outcome = 'success'; + } return res; }) .catch((err) => { - span.outcome = 'failure'; + if (!span.outcome || span.outcome === 'unknown') { + span.outcome = 'failure'; + } throw err; }) .finally(() => { diff --git a/packages/kbn-babel-code-parser/BUILD.bazel b/packages/kbn-babel-code-parser/BUILD.bazel index c1576ce59aa5c..dcdc042d7b802 100644 --- a/packages/kbn-babel-code-parser/BUILD.bazel +++ b/packages/kbn-babel-code-parser/BUILD.bazel @@ -34,10 +34,10 @@ DEPS = [ babel( name = "target", - data = [ + data = DEPS + [ ":srcs", ".babelrc", - ] + DEPS, + ], output_dir = True, # the following arg paths includes $(execpath) as babel runs on the sandbox root args = [ diff --git a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts b/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts index a0afbe3a9b8c9..34c6be02847a7 100644 --- a/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts +++ b/packages/kbn-cli-dev-mode/src/base_path_proxy_server.test.ts @@ -185,6 +185,45 @@ describe('BasePathProxyServer', () => { }); }); + test('forwards request cancellation', async () => { + let propagated = false; + + let notifyRequestReceived: () => void; + const requestReceived = new Promise((resolve) => { + notifyRequestReceived = resolve; + }); + + let notifyRequestAborted: () => void; + const requestAborted = new Promise((resolve) => { + notifyRequestAborted = resolve; + }); + + server.route({ + method: 'GET', + path: `${basePath}/foo/{test}`, + handler: async (request, h) => { + notifyRequestReceived(); + + request.raw.req.once('aborted', () => { + notifyRequestAborted(); + propagated = true; + }); + return await new Promise((resolve) => undefined); + }, + }); + await server.start(); + + const request = proxySupertest.get(`${basePath}/foo/some-string`).end(); + + await requestReceived; + + request.abort(); + + await requestAborted; + + expect(propagated).toEqual(true); + }); + test('handles putting', async () => { server.route({ method: 'PUT', diff --git a/packages/kbn-config/src/config_service.test.ts b/packages/kbn-config/src/config_service.test.ts index c2d4f15b6d915..b1b622381abb1 100644 --- a/packages/kbn-config/src/config_service.test.ts +++ b/packages/kbn-config/src/config_service.test.ts @@ -418,8 +418,14 @@ test('logs deprecation warning during validation', async () => { const configService = new ConfigService(rawConfig, defaultEnv, logger); mockApplyDeprecations.mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); - addDeprecation({ message: 'some deprecation message' }); - addDeprecation({ message: 'another deprecation message' }); + addDeprecation({ + message: 'some deprecation message', + correctiveActions: { manualSteps: ['do X'] }, + }); + addDeprecation({ + message: 'another deprecation message', + correctiveActions: { manualSteps: ['do Y'] }, + }); return { config, changedPaths: mockedChangedPaths }; }); @@ -444,13 +450,24 @@ test('does not log warnings for silent deprecations during validation', async () mockApplyDeprecations .mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); - addDeprecation({ message: 'some deprecation message', silent: true }); - addDeprecation({ message: 'another deprecation message' }); + addDeprecation({ + message: 'some deprecation message', + correctiveActions: { manualSteps: ['do X'] }, + silent: true, + }); + addDeprecation({ + message: 'another deprecation message', + correctiveActions: { manualSteps: ['do Y'] }, + }); return { config, changedPaths: mockedChangedPaths }; }) .mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); - addDeprecation({ message: 'I am silent', silent: true }); + addDeprecation({ + message: 'I am silent', + silent: true, + correctiveActions: { manualSteps: ['do Z'] }, + }); return { config, changedPaths: mockedChangedPaths }; }); @@ -519,7 +536,11 @@ describe('getHandledDeprecatedConfigs', () => { mockApplyDeprecations.mockImplementationOnce((config, deprecations, createAddDeprecation) => { deprecations.forEach((deprecation) => { const addDeprecation = createAddDeprecation!(deprecation.path); - addDeprecation({ message: `some deprecation message`, documentationUrl: 'some-url' }); + addDeprecation({ + message: `some deprecation message`, + documentationUrl: 'some-url', + correctiveActions: { manualSteps: ['do X'] }, + }); }); return { config, changedPaths: mockedChangedPaths }; }); @@ -532,6 +553,11 @@ describe('getHandledDeprecatedConfigs', () => { "base", Array [ Object { + "correctiveActions": Object { + "manualSteps": Array [ + "do X", + ], + }, "documentationUrl": "some-url", "message": "some deprecation message", }, diff --git a/packages/kbn-config/src/deprecation/types.ts b/packages/kbn-config/src/deprecation/types.ts index 0522365ad76c1..1791dac060e2b 100644 --- a/packages/kbn-config/src/deprecation/types.ts +++ b/packages/kbn-config/src/deprecation/types.ts @@ -25,8 +25,8 @@ export interface DeprecatedConfigDetails { silent?: boolean; /* (optional) link to the documentation for more details on the deprecation. */ documentationUrl?: string; - /* (optional) corrective action needed to fix this deprecation. */ - correctiveActions?: { + /* corrective action needed to fix this deprecation. */ + correctiveActions: { /** * Specify a list of manual steps our users need to follow * to fix the deprecation before upgrade. diff --git a/packages/kbn-crypto/BUILD.bazel b/packages/kbn-crypto/BUILD.bazel index b1723e4120e79..20793e27de629 100644 --- a/packages/kbn-crypto/BUILD.bazel +++ b/packages/kbn-crypto/BUILD.bazel @@ -38,6 +38,7 @@ TYPES_DEPS = [ "@npm//@types/node", "@npm//@types/node-forge", "@npm//@types/testing-library__jest-dom", + "@npm//resize-observer-polyfill" ] DEPS = SRC_DEPS + TYPES_DEPS diff --git a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json index 7d8a90c3aad77..0c3f65bc1b205 100644 --- a/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json +++ b/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json @@ -598,7 +598,7 @@ "section": "def-public.ImAType", "text": "ImAType" }, - ", e?: string | undefined) => ", + ", e: string | undefined) => ", { "pluginId": "pluginA", "scope": "public", diff --git a/packages/kbn-es-archiver/src/actions/edit.ts b/packages/kbn-es-archiver/src/actions/edit.ts index eb28985f71437..7a97bf08f3675 100644 --- a/packages/kbn-es-archiver/src/actions/edit.ts +++ b/packages/kbn-es-archiver/src/actions/edit.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -import { resolve, relative } from 'path'; +import { relative } from 'path'; import Fs from 'fs'; -import { createGunzip, createGzip, Z_BEST_COMPRESSION } from 'zlib'; +import { createGunzip, createGzip, constants } from 'zlib'; import { promisify } from 'util'; import globby from 'globby'; import { ToolingLog } from '@kbn/dev-utils'; @@ -17,24 +17,22 @@ import { createPromiseFromStreams } from '@kbn/utils'; const unlinkAsync = promisify(Fs.unlink); export async function editAction({ - prefix, - dataDir, + path, log, handler, }: { - prefix: string; - dataDir: string; + path: string; log: ToolingLog; handler: () => Promise; }) { const archives = ( await globby('**/*.gz', { - cwd: prefix ? resolve(dataDir, prefix) : dataDir, + cwd: path, absolute: true, }) - ).map((path) => ({ - path, - rawPath: path.slice(0, -3), + ).map((found) => ({ + path: found, + rawPath: found.slice(0, -3), })); await Promise.all( @@ -61,7 +59,7 @@ export async function editAction({ archives.map(async (archive) => { await createPromiseFromStreams([ Fs.createReadStream(archive.rawPath), - createGzip({ level: Z_BEST_COMPRESSION }), + createGzip({ level: constants.Z_BEST_COMPRESSION }), Fs.createWriteStream(archive.path), ]); diff --git a/packages/kbn-es-archiver/src/actions/load.ts b/packages/kbn-es-archiver/src/actions/load.ts index 248c4a65cb20a..673fa7e7d96c8 100644 --- a/packages/kbn-es-archiver/src/actions/load.ts +++ b/packages/kbn-es-archiver/src/actions/load.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +import { resolve, relative } from 'path'; import { createReadStream } from 'fs'; import { Readable } from 'stream'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClient } from '@kbn/test'; import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; import { createPromiseFromStreams, concatStreamProviders } from '@kbn/utils'; @@ -37,23 +37,21 @@ const pipeline = (...streams: Readable[]) => ); export async function loadAction({ - name, + inputDir, skipExisting, useCreate, client, - dataDir, log, kbnClient, }: { - name: string; + inputDir: string; skipExisting: boolean; useCreate: boolean; client: KibanaClient; - dataDir: string; log: ToolingLog; kbnClient: KbnClient; }) { - const inputDir = resolve(dataDir, name); + const name = relative(REPO_ROOT, inputDir); const stats = createStats(name, log); const files = prioritizeMappings(await readDirectory(inputDir)); const kibanaPluginIds = await kbnClient.plugins.getEnabledIds(); diff --git a/packages/kbn-es-archiver/src/actions/rebuild_all.ts b/packages/kbn-es-archiver/src/actions/rebuild_all.ts index 1581ff41b95fc..f286f9719bdf1 100644 --- a/packages/kbn-es-archiver/src/actions/rebuild_all.ts +++ b/packages/kbn-es-archiver/src/actions/rebuild_all.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { resolve, dirname, relative } from 'path'; +import { resolve, relative } from 'path'; import { stat, Stats, rename, createReadStream, createWriteStream } from 'fs'; import { Readable, Writable } from 'stream'; import { fromNode } from 'bluebird'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { createPromiseFromStreams } from '@kbn/utils'; import { prioritizeMappings, @@ -25,15 +25,7 @@ async function isDirectory(path: string): Promise { return stats.isDirectory(); } -export async function rebuildAllAction({ - dataDir, - log, - rootDir = dataDir, -}: { - dataDir: string; - log: ToolingLog; - rootDir?: string; -}) { +export async function rebuildAllAction({ dataDir, log }: { dataDir: string; log: ToolingLog }) { const childNames = prioritizeMappings(await readDirectory(dataDir)); for (const childName of childNames) { const childPath = resolve(dataDir, childName); @@ -42,13 +34,12 @@ export async function rebuildAllAction({ await rebuildAllAction({ dataDir: childPath, log, - rootDir, }); continue; } - const archiveName = dirname(relative(rootDir, childPath)); - log.info(`${archiveName} Rebuilding ${childName}`); + const archiveName = relative(REPO_ROOT, childPath); + log.info('[%s] Rebuilding %j', archiveName, childName); const gzip = isGzip(childPath); const tempFile = childPath + (gzip ? '.rebuilding.gz' : '.rebuilding'); @@ -60,6 +51,6 @@ export async function rebuildAllAction({ ] as [Readable, ...Writable[]]); await fromNode((cb) => rename(tempFile, childPath, cb)); - log.info(`${archiveName} Rebuilt ${childName}`); + log.info('[%s] Rebuilt %j', archiveName, childName); } } diff --git a/packages/kbn-es-archiver/src/actions/save.ts b/packages/kbn-es-archiver/src/actions/save.ts index c90f241a1c639..da0966920de24 100644 --- a/packages/kbn-es-archiver/src/actions/save.ts +++ b/packages/kbn-es-archiver/src/actions/save.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +import { resolve, relative } from 'path'; import { createWriteStream, mkdirSync } from 'fs'; import { Readable, Writable } from 'stream'; import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { createListStream, createPromiseFromStreams } from '@kbn/utils'; import { @@ -22,23 +22,21 @@ import { } from '../lib'; export async function saveAction({ - name, + outputDir, indices, client, - dataDir, log, raw, query, }: { - name: string; + outputDir: string; indices: string | string[]; client: KibanaClient; - dataDir: string; log: ToolingLog; raw: boolean; query?: Record; }) { - const outputDir = resolve(dataDir, name); + const name = relative(REPO_ROOT, outputDir); const stats = createStats(name, log); log.info('[%s] Creating archive of %j', name, indices); diff --git a/packages/kbn-es-archiver/src/actions/unload.ts b/packages/kbn-es-archiver/src/actions/unload.ts index f4e37871a5337..d8bc013b40991 100644 --- a/packages/kbn-es-archiver/src/actions/unload.ts +++ b/packages/kbn-es-archiver/src/actions/unload.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -import { resolve } from 'path'; +import { resolve, relative } from 'path'; import { createReadStream } from 'fs'; import { Readable, Writable } from 'stream'; import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClient } from '@kbn/test'; import { createPromiseFromStreams } from '@kbn/utils'; @@ -25,19 +25,17 @@ import { } from '../lib'; export async function unloadAction({ - name, + inputDir, client, - dataDir, log, kbnClient, }: { - name: string; + inputDir: string; client: KibanaClient; - dataDir: string; log: ToolingLog; kbnClient: KbnClient; }) { - const inputDir = resolve(dataDir, name); + const name = relative(REPO_ROOT, inputDir); const stats = createStats(name, log); const kibanaPluginIds = await kbnClient.plugins.getEnabledIds(); diff --git a/packages/kbn-es-archiver/src/cli.ts b/packages/kbn-es-archiver/src/cli.ts index 9617457d4573e..9268f5fa7bbb5 100644 --- a/packages/kbn-es-archiver/src/cli.ts +++ b/packages/kbn-es-archiver/src/cli.ts @@ -30,13 +30,12 @@ export function runCli() { new RunWithCommands({ description: 'CLI to manage archiving/restoring data in elasticsearch', globalFlags: { - string: ['es-url', 'kibana-url', 'dir', 'config', 'es-ca', 'kibana-ca'], + string: ['es-url', 'kibana-url', 'config', 'es-ca', 'kibana-ca'], help: ` - --config path to an FTR config file that sets --es-url, --kibana-url, and --dir + --config path to an FTR config file that sets --es-url and --kibana-url default: ${defaultConfigPath} --es-url url for Elasticsearch, prefer the --config flag --kibana-url url for Kibana, prefer the --config flag - --dir where arechives are stored, prefer the --config flag --kibana-ca if Kibana url points to https://localhost we default to the CA from @kbn/dev-utils, customize the CA with this flag --es-ca if Elasticsearch url points to https://localhost we default to the CA from @kbn/dev-utils, customize the CA with this flag `, @@ -104,17 +103,6 @@ export function runCli() { } } - let dir = flags.dir; - if (dir && typeof dir !== 'string') { - throw createFlagError('--dir must be a string'); - } - if (!dir && config) { - dir = Path.resolve(config.get('esArchiver.directory')); - } - if (!dir) { - throw createFlagError('--dir or --config must be defined'); - } - const client = new Client({ node: esUrl, ssl: esCa ? { ca: esCa } : undefined, @@ -130,7 +118,7 @@ export function runCli() { const esArchiver = new EsArchiver({ log, client, - dataDir: dir, + baseDir: process.cwd(), kbnClient, }); @@ -141,16 +129,16 @@ export function runCli() { }) .command({ name: 'save', - usage: 'save [name] [...indices]', + usage: 'save [path] [...indices]', description: ` - archive the [indices ...] into the --dir with [name] + archive the [indices ...] into a directory at [path] Example: - Save all [logstash-*] indices from http://localhost:9200 to [snapshots/my_test_data] directory + Save all [logstash-*] indices from http://localhost:9200 to the [test/functional/es_archives/my_test_data] directory - WARNING: If the [my_test_data] snapshot exists it will be deleted! + WARNING: If the [test/functional/es_archives/my_test_data] snapshot exists it will be deleted! - $ node scripts/es_archiver save my_test_data logstash-* --dir snapshots + $ node scripts/es_archiver save test/functional/es_archives/my_test_data logstash-* `, flags: { boolean: ['raw'], @@ -161,9 +149,9 @@ export function runCli() { `, }, async run({ flags, esArchiver }) { - const [name, ...indices] = flags._; - if (!name) { - throw createFlagError('missing [name] argument'); + const [path, ...indices] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (!indices.length) { throw createFlagError('missing [...indices] arguments'); @@ -184,22 +172,22 @@ export function runCli() { } } - await esArchiver.save(name, indices, { raw, query: parsedQuery }); + await esArchiver.save(path, indices, { raw, query: parsedQuery }); }, }) .command({ name: 'load', - usage: 'load [name]', + usage: 'load [path]', description: ` - load the archive in --dir with [name] + load the archive stored at [path] Example: - Load the [my_test_data] snapshot from the archive directory and elasticsearch instance defined - in the [test/functional/config.js] config file + Load the [my_test_data] snapshot from the local directory and elasticsearch instance defined + in the [../config.js] config file WARNING: If the indices exist already they will be deleted! - $ node scripts/es_archiver load my_test_data --config test/functional/config.js + $ node scripts/es_archiver load my_test_data --config ../config.js `, flags: { boolean: ['use-create'], @@ -208,9 +196,9 @@ export function runCli() { `, }, async run({ flags, esArchiver }) { - const [name] = flags._; - if (!name) { - throw createFlagError('missing [name] argument'); + const [path] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (flags._.length > 1) { throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); @@ -221,40 +209,40 @@ export function runCli() { throw createFlagError('--use-create does not take a value'); } - await esArchiver.load(name, { useCreate }); + await esArchiver.load(path, { useCreate }); }, }) .command({ name: 'unload', - usage: 'unload [name]', - description: 'remove indices created by the archive in --dir with [name]', + usage: 'unload [path]', + description: 'remove indices created by the archive at [path]', async run({ flags, esArchiver }) { - const [name] = flags._; - if (!name) { - throw createFlagError('missing [name] argument'); + const [path] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (flags._.length > 1) { throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); } - await esArchiver.unload(name); + await esArchiver.unload(path); }, }) .command({ name: 'edit', - usage: 'edit [prefix]', + usage: 'edit [path]', description: - 'extract the archives under the prefix, wait for edits to be completed, and then recompress the archives', + 'extract the archives within or at [path], wait for edits to be completed, and then recompress the archives', async run({ flags, esArchiver }) { - const [prefix] = flags._; - if (!prefix) { - throw createFlagError('missing [prefix] argument'); + const [path] = flags._; + if (!path) { + throw createFlagError('missing [path] argument'); } if (flags._.length > 1) { throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); } - await esArchiver.edit(prefix, async () => { + await esArchiver.edit(path, async () => { const rl = readline.createInterface({ input: process.stdin, output: process.stdout, @@ -278,10 +266,19 @@ export function runCli() { }, }) .command({ - name: 'rebuild-all', - description: '[internal] read and write all archives in --dir to remove any inconsistencies', - async run({ esArchiver }) { - await esArchiver.rebuildAll(); + name: 'rebuild-all [dir]', + description: + '[internal] read and write all archives within [dir] to remove any inconsistencies', + async run({ flags, esArchiver }) { + const [dir] = flags._; + if (!dir) { + throw createFlagError('missing [dir] argument'); + } + if (flags._.length > 1) { + throw createFlagError(`unknown extra arguments: [${flags._.slice(1).join(', ')}]`); + } + + await esArchiver.rebuildAll(dir); }, }) .execute(); diff --git a/packages/kbn-es-archiver/src/es_archiver.ts b/packages/kbn-es-archiver/src/es_archiver.ts index 93ce97efd4c84..06a56b79e3012 100644 --- a/packages/kbn-es-archiver/src/es_archiver.ts +++ b/packages/kbn-es-archiver/src/es_archiver.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ +import Fs from 'fs'; +import Path from 'path'; + import type { KibanaClient } from '@elastic/elasticsearch/api/kibana'; -import { ToolingLog } from '@kbn/dev-utils'; +import { ToolingLog, REPO_ROOT } from '@kbn/dev-utils'; import { KbnClient } from '@kbn/test'; import { @@ -21,139 +24,128 @@ import { interface Options { client: KibanaClient; - dataDir: string; + baseDir?: string; log: ToolingLog; kbnClient: KbnClient; } export class EsArchiver { private readonly client: KibanaClient; - private readonly dataDir: string; + private readonly baseDir: string; private readonly log: ToolingLog; private readonly kbnClient: KbnClient; constructor(options: Options) { this.client = options.client; - this.dataDir = options.dataDir; + this.baseDir = options.baseDir ?? REPO_ROOT; this.log = options.log; this.kbnClient = options.kbnClient; } /** - * Extract data and mappings from an elasticsearch index and store - * it in the dataDir so it can be used later to recreate the index. + * Extract data and mappings from an elasticsearch index and store + * it in the baseDir so it can be used later to recreate the index. * - * @param {String} name - the name of this archive, used to determine filename - * @param {String|Array} indices - the indices to archive - * @param {Object} options - * @property {Boolean} options.raw - should the archive be raw (unzipped) or not - * @return Promise + * @param {String} path - relative path to the archive, resolved relative to this.baseDir which defaults to REPO_ROOT + * @param {String|Array} indices - the indices to archive + * @param {Object} options + * @property {Boolean} options.raw - should the archive be raw (unzipped) or not */ async save( - name: string, + path: string, indices: string | string[], { raw = false, query }: { raw?: boolean; query?: Record } = {} ) { return await saveAction({ - name, + outputDir: Path.resolve(this.baseDir, path), indices, raw, client: this.client, - dataDir: this.dataDir, log: this.log, query, }); } /** - * Load an index from an archive + * Load an index from an archive * - * @param {String} name - the name of the archive to load - * @param {Object} options - * @property {Boolean} options.skipExisting - should existing indices + * @param {String} path - relative path to the archive to load, resolved relative to this.baseDir which defaults to REPO_ROOT + * @param {Object} options + * @property {Boolean} options.skipExisting - should existing indices * be ignored or overwritten - * @property {Boolean} options.useCreate - use a create operation instead of index for documents - * @return Promise + * @property {Boolean} options.useCreate - use a create operation instead of index for documents */ async load( - name: string, + path: string, { skipExisting = false, useCreate = false, }: { skipExisting?: boolean; useCreate?: boolean } = {} ) { return await loadAction({ - name, + inputDir: this.findArchive(path), skipExisting: !!skipExisting, useCreate: !!useCreate, client: this.client, - dataDir: this.dataDir, log: this.log, kbnClient: this.kbnClient, }); } /** - * Remove the indexes in elasticsearch that have data in an archive. + * Remove the indexes in elasticsearch that have data in an archive. * - * @param {String} name - * @return Promise + * @param {String} path - relative path to the archive to unload, resolved relative to this.baseDir which defaults to REPO_ROOT */ - async unload(name: string) { + async unload(path: string) { return await unloadAction({ - name, + inputDir: this.findArchive(path), client: this.client, - dataDir: this.dataDir, log: this.log, kbnClient: this.kbnClient, }); } /** - * Parse and reformat all of the archives. This is primarily helpful - * for working on the esArchiver. + * Parse and reformat all of the archives. This is primarily helpful + * for working on the esArchiver. * - * @return Promise + * @param {String} dir - relative path to a directory which contains archives, resolved relative to this.baseDir which defaults to REPO_ROOT */ - async rebuildAll() { + async rebuildAll(dir: string) { return await rebuildAllAction({ - dataDir: this.dataDir, + dataDir: Path.resolve(this.baseDir, dir), log: this.log, }); } /** - * Extract the gzipped files in an archive, then call the handler. When it - * resolves re-archive the gzipped files. + * Extract the gzipped files in an archive, then call the handler. When it + * resolves re-archive the gzipped files. * - * @param {String} prefix optional prefix to limit archives that are extracted - * @param {() => Promise} handler - * @return Promise + * @param {String} path optional prefix to limit archives that are extracted + * @param {() => Promise} handler */ - async edit(prefix: string, handler: () => Promise) { + async edit(path: string, handler: () => Promise) { return await editAction({ - prefix, + path: Path.resolve(this.baseDir, path), log: this.log, - dataDir: this.dataDir, handler, }); } /** - * Just like load, but skips any existing index + * Just like load, but skips any existing index * - * @param {String} name - * @return Promise + * @param name */ async loadIfNeeded(name: string) { return await this.load(name, { skipExisting: true }); } /** - * Delete any Kibana indices, and initialize the Kibana index as Kibana would do - * on startup. - * - * @return Promise + * Delete any Kibana indices, and initialize the Kibana index as Kibana would do + * on startup. */ async emptyKibanaIndex() { return await emptyKibanaIndexAction({ @@ -162,4 +154,33 @@ export class EsArchiver { kbnClient: this.kbnClient, }); } + + /** + * Resolve a path relative to the baseDir + * + * @param relativePath + */ + private findArchive(relativePath: string) { + const path = Path.resolve(this.baseDir, relativePath); + let stats; + try { + stats = Fs.statSync(path); + } catch (error) { + if (error.code === 'ENOENT') { + throw new Error( + `Attempt to reference an esArchive with relative path [${relativePath}] could not be resolved. This path was resolved relative to [${this.baseDir}].` + ); + } + + throw error; + } + + if (stats.isDirectory()) { + return path; + } + + throw new Error( + `Attempt to reference an esArchive with relative path [${relativePath}] resolved to a file instead of a directory containing data/mapping files. This path was resolved relative to [${this.baseDir}].` + ); + } } diff --git a/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts b/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts index b45a8b18a5776..fba3df24e896f 100644 --- a/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts +++ b/packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts @@ -19,7 +19,7 @@ import { deleteIndex } from './delete_index'; import { ES_CLIENT_HEADERS } from '../../client_headers'; interface DocRecord { - value: estypes.IndexState & { + value: estypes.IndicesIndexState & { index: string; type: string; }; diff --git a/packages/kbn-es-archiver/src/lib/indices/delete_index.ts b/packages/kbn-es-archiver/src/lib/indices/delete_index.ts index 2a42d52e2ca80..d3d6f85d7a360 100644 --- a/packages/kbn-es-archiver/src/lib/indices/delete_index.ts +++ b/packages/kbn-es-archiver/src/lib/indices/delete_index.ts @@ -126,7 +126,7 @@ export async function waitForSnapshotCompletion( const { body: repositoryMap } = await client.snapshot.getRepository({} as any); for (const repository of Object.keys(repositoryMap)) { const allInProgress = await getInProgressSnapshots(repository); - const found = allInProgress.find((s: any) => s.indices.includes(index)); + const found = allInProgress?.find((s: any) => s.indices.includes(index)); if (!found) { continue; diff --git a/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts b/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts index 51d4f28d20f2e..0712d2789a91a 100644 --- a/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts +++ b/packages/kbn-es-archiver/src/lib/indices/kibana_index.ts @@ -35,7 +35,7 @@ export async function deleteKibanaIndices({ await client.indices.putSettings( { index: indexNames, - body: { index: { blocks: { read_only: false } } }, + body: { settings: { blocks: { read_only: false } } }, }, { headers: ES_CLIENT_HEADERS, diff --git a/packages/kbn-es/BUILD.bazel b/packages/kbn-es/BUILD.bazel index 6c845996ce5e5..48f0fb58e983f 100644 --- a/packages/kbn-es/BUILD.bazel +++ b/packages/kbn-es/BUILD.bazel @@ -47,10 +47,10 @@ DEPS = [ babel( name = "target", - data = [ + data = DEPS + [ ":srcs", ".babelrc", - ] + DEPS, + ], output_dir = True, # the following arg paths includes $(execpath) as babel runs on the sandbox root args = [ diff --git a/packages/kbn-expect/BUILD.bazel b/packages/kbn-expect/BUILD.bazel index 82e6200e9688a..b7eb91a451b9a 100644 --- a/packages/kbn-expect/BUILD.bazel +++ b/packages/kbn-expect/BUILD.bazel @@ -5,7 +5,7 @@ PKG_REQUIRE_NAME = "@kbn/expect" SOURCE_FILES = glob([ "expect.js", - "expect.js.d.ts", + "expect.d.ts", ]) SRCS = SOURCE_FILES diff --git a/packages/kbn-expect/expect.js.d.ts b/packages/kbn-expect/expect.d.ts similarity index 100% rename from packages/kbn-expect/expect.js.d.ts rename to packages/kbn-expect/expect.d.ts diff --git a/packages/kbn-expect/package.json b/packages/kbn-expect/package.json index 8ca37c7c88673..2040683c539e2 100644 --- a/packages/kbn-expect/package.json +++ b/packages/kbn-expect/package.json @@ -1,6 +1,7 @@ { "name": "@kbn/expect", "main": "./expect.js", + "typings": "./expect.d.ts", "version": "1.0.0", "license": "MIT", "private": true, diff --git a/packages/kbn-expect/tsconfig.json b/packages/kbn-expect/tsconfig.json index 7baae093bc3a9..8c0d9f1e34bd0 100644 --- a/packages/kbn-expect/tsconfig.json +++ b/packages/kbn-expect/tsconfig.json @@ -4,6 +4,6 @@ "incremental": false, }, "include": [ - "expect.js.d.ts" + "expect.d.ts" ] } diff --git a/packages/kbn-legacy-logging/BUILD.bazel b/packages/kbn-legacy-logging/BUILD.bazel index 21cb8c338f89f..1fd04604dbd24 100644 --- a/packages/kbn-legacy-logging/BUILD.bazel +++ b/packages/kbn-legacy-logging/BUILD.bazel @@ -25,6 +25,7 @@ NPM_MODULE_EXTRA_FILES = [ SRC_DEPS = [ "//packages/kbn-config-schema", + "//packages/kbn-utils", "@npm//@elastic/numeral", "@npm//@hapi/hapi", "@npm//chokidar", diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 3a25568dfd811..325187cdebc3a 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -48,7 +48,7 @@ webpack( name = "target_web", data = DEPS + [ ":src", - ":webpack.config.js", + "webpack.config.js", ], output_dir = True, args = [ @@ -87,7 +87,7 @@ ts_project( js_library( name = PKG_BASE_NAME, srcs = NPM_MODULE_EXTRA_FILES, - deps = DEPS + [":target_web", ":tsc"], + deps = DEPS + [":tsc", ":target_web"], package_name = PKG_REQUIRE_NAME, visibility = ["//visibility:public"], ) diff --git a/packages/kbn-monaco/webpack.config.js b/packages/kbn-monaco/webpack.config.js index d035134565463..ef482cd55159b 100644 --- a/packages/kbn-monaco/webpack.config.js +++ b/packages/kbn-monaco/webpack.config.js @@ -22,7 +22,6 @@ const createLangWorkerConfig = (lang) => { filename: `${lang}.editor.worker.js`, }, resolve: { - modules: ['node_modules'], extensions: ['.js', '.ts', '.tsx'], }, stats: 'errors-only', diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index c28fd83591960..9b4199c812864 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -3,7 +3,7 @@ pageLoadAssetSize: alerting: 106936 apm: 64385 apmOss: 18996 - bfetch: 41874 + bfetch: 51874 canvas: 1066647 charts: 195358 cloud: 21076 @@ -34,7 +34,7 @@ pageLoadAssetSize: indexManagement: 140608 indexPatternManagement: 28222 infra: 184320 - fleet: 415829 + fleet: 450005 ingestPipelines: 58003 inputControlVis: 172675 inspector: 148711 @@ -104,9 +104,10 @@ pageLoadAssetSize: indexPatternFieldEditor: 90489 osquery: 107090 fileUpload: 25664 - fileDataVisualizer: 27530 + dataVisualizer: 27530 banners: 17946 mapsEms: 26072 timelines: 28613 cases: 162385 screenshotMode: 17856 + visTypePie: 35583 diff --git a/packages/kbn-optimizer/src/optimizer/cache_keys.ts b/packages/kbn-optimizer/src/optimizer/cache_keys.ts index 9275cab1fdff0..e622b3b8f593e 100644 --- a/packages/kbn-optimizer/src/optimizer/cache_keys.ts +++ b/packages/kbn-optimizer/src/optimizer/cache_keys.ts @@ -121,6 +121,10 @@ export interface OptimizerCacheKey { } async function getLastCommit() { + if (!Fs.existsSync(Path.join(REPO_ROOT, '.git'))) { + return undefined; + } + const { stdout } = await execa( 'git', ['log', '-n', '1', '--pretty=format:%H', '--', RELATIVE_DIR], diff --git a/packages/kbn-optimizer/src/optimizer/get_changes.test.ts b/packages/kbn-optimizer/src/optimizer/get_changes.test.ts index 4d4a902bb186a..d8be1917c101b 100644 --- a/packages/kbn-optimizer/src/optimizer/get_changes.test.ts +++ b/packages/kbn-optimizer/src/optimizer/get_changes.test.ts @@ -7,6 +7,7 @@ */ jest.mock('execa'); +jest.mock('fs'); import { getChanges } from './get_changes'; @@ -15,6 +16,8 @@ const execa: jest.Mock = jest.requireMock('execa'); it('parses git ls-files output', async () => { expect.assertions(4); + jest.requireMock('fs').existsSync.mockImplementation(() => true); + execa.mockImplementation((cmd, args, options) => { expect(cmd).toBe('git'); expect(args).toEqual(['ls-files', '-dmt', '--', '/foo/bar/x']); diff --git a/packages/kbn-optimizer/src/optimizer/get_changes.ts b/packages/kbn-optimizer/src/optimizer/get_changes.ts index e5574d9b1a2e4..73fa5e9d931e7 100644 --- a/packages/kbn-optimizer/src/optimizer/get_changes.ts +++ b/packages/kbn-optimizer/src/optimizer/get_changes.ts @@ -9,6 +9,7 @@ import Path from 'path'; import execa from 'execa'; +import fs from 'fs'; export type Changes = Map; @@ -16,11 +17,16 @@ export type Changes = Map; * get the changes in all the context directories (plugin public paths) */ export async function getChanges(dir: string) { + const changes: Changes = new Map(); + + if (!fs.existsSync(Path.join(dir, '.git'))) { + return changes; + } + const { stdout } = await execa('git', ['ls-files', '-dmt', '--', dir], { cwd: dir, }); - const changes: Changes = new Map(); const output = stdout.trim(); if (output) { diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 29c0457c316f0..e455f487d1384 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -650,6 +650,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArray", function() { return __spreadArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); @@ -683,6 +684,8 @@ var extendStatics = function(d, b) { }; function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); @@ -805,19 +808,27 @@ function __read(o, n) { return ar; } +/** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i])); return ar; } +/** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; -}; +} + +function __spreadArray(to, from) { + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) + to[j] = from[i]; + return to; +} function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); @@ -872,19 +883,17 @@ function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } -function __classPrivateFieldGet(receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); +function __classPrivateFieldGet(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } -function __classPrivateFieldSet(receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; +function __classPrivateFieldSet(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } @@ -23045,7 +23054,7 @@ class Project { ensureValidProjectDependency(project) { const relativePathToProject = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, project.path)); - const relativePathToProjectIfBazelPkg = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, `${__dirname}/../../../bazel-bin/packages/${path__WEBPACK_IMPORTED_MODULE_1___default.a.basename(project.path)}/npm_module`)); + const relativePathToProjectIfBazelPkg = normalizePath(path__WEBPACK_IMPORTED_MODULE_1___default.a.relative(this.path, `${__dirname}/../../../bazel-bin/packages/${path__WEBPACK_IMPORTED_MODULE_1___default.a.basename(project.path)}`)); const versionInPackageJson = this.allDependencies[project.name]; const expectedVersionInPackageJson = `link:${relativePathToProject}`; const expectedVersionInPackageJsonIfBazelPkg = `link:${relativePathToProjectIfBazelPkg}`; // TODO: after introduce bazel to build all the packages and completely remove the support for kbn packages @@ -23234,7 +23243,7 @@ function transformDependencies(dependencies = {}) { } if (isBazelPackageDependency(depVersion)) { - newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:').replace('/npm_module', ''); + newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:'); continue; } @@ -48471,7 +48480,7 @@ async function runBazelCommandWithRunner(bazelCommandRunner, bazelArgs, offline }); if (offline) { - bazelArgs.push('--config=offline'); + bazelArgs = [...bazelArgs, '--config=offline']; } const bazelProc = Object(_child_process__WEBPACK_IMPORTED_MODULE_4__["spawn"])(bazelCommandRunner, bazelArgs, bazelOpts); diff --git a/packages/kbn-pm/src/utils/bazel/run.ts b/packages/kbn-pm/src/utils/bazel/run.ts index 7b20ea43982e6..c030081e53daa 100644 --- a/packages/kbn-pm/src/utils/bazel/run.ts +++ b/packages/kbn-pm/src/utils/bazel/run.ts @@ -30,7 +30,7 @@ async function runBazelCommandWithRunner( }; if (offline) { - bazelArgs.push('--config=offline'); + bazelArgs = [...bazelArgs, '--config=offline']; } const bazelProc = spawn(bazelCommandRunner, bazelArgs, bazelOpts); diff --git a/packages/kbn-pm/src/utils/package_json.ts b/packages/kbn-pm/src/utils/package_json.ts index e635c2566e65a..a50d8994b5720 100644 --- a/packages/kbn-pm/src/utils/package_json.ts +++ b/packages/kbn-pm/src/utils/package_json.ts @@ -61,7 +61,7 @@ export function transformDependencies(dependencies: IPackageDependencies = {}) { } if (isBazelPackageDependency(depVersion)) { - newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:').replace('/npm_module', ''); + newDeps[name] = depVersion.replace('link:bazel-bin/', 'file:'); continue; } diff --git a/packages/kbn-pm/src/utils/project.ts b/packages/kbn-pm/src/utils/project.ts index 5d2a0547b2577..8e86b111c6a18 100644 --- a/packages/kbn-pm/src/utils/project.ts +++ b/packages/kbn-pm/src/utils/project.ts @@ -94,7 +94,7 @@ export class Project { const relativePathToProjectIfBazelPkg = normalizePath( Path.relative( this.path, - `${__dirname}/../../../bazel-bin/packages/${Path.basename(project.path)}/npm_module` + `${__dirname}/../../../bazel-bin/packages/${Path.basename(project.path)}` ) ); diff --git a/packages/kbn-rule-data-utils/BUILD.bazel b/packages/kbn-rule-data-utils/BUILD.bazel new file mode 100644 index 0000000000000..ccd1793feb161 --- /dev/null +++ b/packages/kbn-rule-data-utils/BUILD.bazel @@ -0,0 +1,79 @@ +load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm") + +PKG_BASE_NAME = "kbn-rule-data-utils" +PKG_REQUIRE_NAME = "@kbn/rule-data-utils" + +SOURCE_FILES = glob( + [ + "src/**/*.ts", + ], +) + +SRCS = SOURCE_FILES + +filegroup( + name = "srcs", + srcs = SRCS, +) + +NPM_MODULE_EXTRA_FILES = [ + "package.json", +] + +SRC_DEPS = [ + "@npm//tslib", + "@npm//utility-types", +] + +TYPES_DEPS = [ + "@npm//@types/jest", + "@npm//@types/node", +] + +DEPS = SRC_DEPS + TYPES_DEPS + +ts_config( + name = "tsconfig", + src = "tsconfig.json", + deps = [ + "//:tsconfig.base.json", + ], +) + +ts_project( + name = "tsc", + args = ['--pretty'], + srcs = SRCS, + deps = DEPS, + declaration = True, + declaration_map = True, + incremental = True, + out_dir = "target", + source_map = True, + root_dir = "src", + tsconfig = ":tsconfig", +) + +js_library( + name = PKG_BASE_NAME, + srcs = NPM_MODULE_EXTRA_FILES, + deps = DEPS + [":tsc"], + package_name = PKG_REQUIRE_NAME, + visibility = ["//visibility:public"], +) + +pkg_npm( + name = "npm_module", + deps = [ + ":%s" % PKG_BASE_NAME, + ] +) + +filegroup( + name = "build", + srcs = [ + ":npm_module", + ], + visibility = ["//visibility:public"], +) diff --git a/packages/kbn-rule-data-utils/tsconfig.json b/packages/kbn-rule-data-utils/tsconfig.json index 4b1262d11f3af..852393f01e594 100644 --- a/packages/kbn-rule-data-utils/tsconfig.json +++ b/packages/kbn-rule-data-utils/tsconfig.json @@ -1,11 +1,12 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "incremental": false, + "incremental": true, "outDir": "./target", "stripInternal": false, "declaration": true, "declarationMap": true, + "rootDir": "./src", "sourceMap": true, "sourceRoot": "../../../../packages/kbn-rule-data-utils/src", "types": [ diff --git a/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel b/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel index 91e4667c16b4e..99df07c3d8ea8 100644 --- a/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel +++ b/packages/kbn-securitysolution-io-ts-list-types/BUILD.bazel @@ -27,9 +27,10 @@ NPM_MODULE_EXTRA_FILES = [ ] SRC_DEPS = [ + "//packages/elastic-datemath", "//packages/kbn-securitysolution-io-ts-types", "//packages/kbn-securitysolution-io-ts-utils", - "//packages/elastic-datemath", + "//packages/kbn-securitysolution-list-constants", "@npm//fp-ts", "@npm//io-ts", "@npm//lodash", diff --git a/packages/kbn-telemetry-tools/BUILD.bazel b/packages/kbn-telemetry-tools/BUILD.bazel index 9a6b4a10bd190..d394b0c93d45f 100644 --- a/packages/kbn-telemetry-tools/BUILD.bazel +++ b/packages/kbn-telemetry-tools/BUILD.bazel @@ -47,6 +47,7 @@ TYPES_DEPS = [ "@npm//@types/node", "@npm//@types/normalize-path", "@npm//@types/testing-library__jest-dom", + "@npm//resize-observer-polyfill" ] DEPS = SRC_DEPS + TYPES_DEPS diff --git a/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts b/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts index b5d379d3426e7..0a2dba60742ad 100644 --- a/packages/kbn-test/src/functional_test_runner/functional_test_runner.ts +++ b/packages/kbn-test/src/functional_test_runner/functional_test_runner.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 { relative } from 'path'; import { ToolingLog } from '@kbn/dev-utils'; @@ -120,6 +121,9 @@ export class FunctionalTestRunner { throw new Error('No tests defined.'); } + // eslint-disable-next-line + console.log(`--- Running ${relative(process.cwd(), this.configFile)}`); + const dockerServers = new DockerServersService( config.get('dockerServers'), this.log, diff --git a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts index e5d0fdc122a1a..6a8f384208fd8 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/config/schema.ts @@ -209,13 +209,6 @@ export const schema = Joi.object() // definition of apps that work with `common.navigateToApp()` apps: Joi.object().pattern(ID_PATTERN, appUrlPartsSchema()).default(), - // settings for the esArchiver module - esArchiver: Joi.object() - .keys({ - directory: Joi.string().default(defaultRelativeToConfigPath('fixtures/es_archiver')), - }) - .default(), - // settings for the saved objects svc kbnArchiver: Joi.object() .keys({ diff --git a/packages/kbn-test/src/functional_test_runner/public_types.ts b/packages/kbn-test/src/functional_test_runner/public_types.ts index 4a30744c09b51..d94f61e23b8b8 100644 --- a/packages/kbn-test/src/functional_test_runner/public_types.ts +++ b/packages/kbn-test/src/functional_test_runner/public_types.ts @@ -74,6 +74,12 @@ export interface GenericFtrProviderContext< getService(serviceName: 'failureMetadata'): FailureMetadata; getService(serviceName: T): ServiceMap[T]; + /** + * Get the instance of a page object + * @param pageObjectName + */ + getPageObject(pageObjectName: K): PageObjectMap[K]; + /** * Get a map of PageObjects * @param pageObjects diff --git a/packages/kbn-test/src/functional_tests/tasks.js b/packages/kbn-test/src/functional_tests/tasks.js index 02c55b6af91dc..122a5a23842d6 100644 --- a/packages/kbn-test/src/functional_tests/tasks.js +++ b/packages/kbn-test/src/functional_tests/tasks.js @@ -88,6 +88,8 @@ export async function runTests(options) { continue; } + console.log(`--- Running ${relative(process.cwd(), configPath)}`); + await withProcRunner(log, async (procs) => { const config = await readConfigFile(log, configPath); diff --git a/packages/kbn-test/src/jest/utils/testbed/types.ts b/packages/kbn-test/src/jest/utils/testbed/types.ts index 520a78d03d701..fdc000215c4f1 100644 --- a/packages/kbn-test/src/jest/utils/testbed/types.ts +++ b/packages/kbn-test/src/jest/utils/testbed/types.ts @@ -121,7 +121,7 @@ export interface TestBed { * * @param switchTestSubject The test subject of the EuiSwitch (can be a nested path. e.g. "myForm.mySwitch"). */ - toggleEuiSwitch: (switchTestSubject: T, isChecked?: boolean) => void; + toggleEuiSwitch: (switchTestSubject: T) => void; /** * The EUI ComboBox is a special input as it needs the ENTER key to be pressed * in order to register the value set. This helpers automatically does that. diff --git a/packages/kbn-test/src/kbn_client/kbn_client.ts b/packages/kbn-test/src/kbn_client/kbn_client.ts index 3fa74412c1a8b..ac14a399918cb 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client.ts @@ -8,13 +8,14 @@ import { ToolingLog } from '@kbn/dev-utils'; -import { KbnClientRequester, ReqOptions } from './kbn_client_requester'; -import { KbnClientStatus } from './kbn_client_status'; +import { KbnClientImportExport } from './kbn_client_import_export'; import { KbnClientPlugins } from './kbn_client_plugins'; -import { KbnClientVersion } from './kbn_client_version'; +import { KbnClientRequester, ReqOptions } from './kbn_client_requester'; import { KbnClientSavedObjects } from './kbn_client_saved_objects'; +import { KbnClientSpaces } from './kbn_client_spaces'; +import { KbnClientStatus } from './kbn_client_status'; import { KbnClientUiSettings, UiSettingValues } from './kbn_client_ui_settings'; -import { KbnClientImportExport } from './kbn_client_import_export'; +import { KbnClientVersion } from './kbn_client_version'; export interface KbnClientOptions { url: string; @@ -29,6 +30,7 @@ export class KbnClient { readonly plugins: KbnClientPlugins; readonly version: KbnClientVersion; readonly savedObjects: KbnClientSavedObjects; + readonly spaces: KbnClientSpaces; readonly uiSettings: KbnClientUiSettings; readonly importExport: KbnClientImportExport; @@ -59,6 +61,7 @@ export class KbnClient { this.plugins = new KbnClientPlugins(this.status); this.version = new KbnClientVersion(this.status); this.savedObjects = new KbnClientSavedObjects(this.log, this.requester); + this.spaces = new KbnClientSpaces(this.requester); this.uiSettings = new KbnClientUiSettings(this.log, this.requester, this.uiSettingDefaults); this.importExport = new KbnClientImportExport( this.log, diff --git a/packages/kbn-test/src/kbn_client/kbn_client_requester.ts b/packages/kbn-test/src/kbn_client/kbn_client_requester.ts index af75137d148e9..a194b593b3863 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_requester.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_requester.ts @@ -121,6 +121,8 @@ export class KbnClientRequester { responseType: options.responseType, // work around https://github.com/axios/axios/issues/2791 transformResponse: options.responseType === 'text' ? [(x) => x] : undefined, + maxContentLength: 30000000, + maxBodyLength: 30000000, paramsSerializer: (params) => Qs.stringify(params), }); diff --git a/packages/kbn-test/src/kbn_client/kbn_client_spaces.ts b/packages/kbn-test/src/kbn_client/kbn_client_spaces.ts new file mode 100644 index 0000000000000..e88531606e917 --- /dev/null +++ b/packages/kbn-test/src/kbn_client/kbn_client_spaces.ts @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { KbnClientRequester, uriencode } from './kbn_client_requester'; + +interface UpdateBody { + name: string; + description?: string; + disabledFeatures?: string | string[]; + initials?: string; + color?: string; + imageUrl?: string; +} + +interface CreateBody extends UpdateBody { + id: string; +} + +export class KbnClientSpaces { + constructor(private readonly requester: KbnClientRequester) {} + + async create(body: CreateBody) { + await this.requester.request({ + method: 'POST', + path: '/api/spaces/space', + body, + }); + } + + async update(id: string, body: UpdateBody) { + await this.requester.request({ + method: 'PUT', + path: uriencode`/api/spaces/space/${id}`, + body, + }); + } + + async get(id: string) { + const { data } = await this.requester.request({ + method: 'GET', + path: uriencode`/api/spaces/space/${id}`, + }); + + return data; + } + + async list() { + const { data } = await this.requester.request({ + method: 'GET', + path: '/api/spaces/space', + }); + + return data; + } + + async delete(id: string) { + await this.requester.request({ + method: 'DELETE', + path: uriencode`/api/spaces/space/${id}`, + }); + } +} diff --git a/packages/kbn-test/src/report_path.ts b/packages/kbn-test/src/report_path.ts index 9f41fdd41c061..dcda0f5eb2d3c 100644 --- a/packages/kbn-test/src/report_path.ts +++ b/packages/kbn-test/src/report_path.ts @@ -16,11 +16,17 @@ export function getUniqueJunitReportPath( reportName: string, counter?: number ): string { + const BUILDKITE_ID_SUFFIX = process.env.BUILDKITE_JOB_ID + ? `-${process.env.BUILDKITE_JOB_ID}` + : ''; + const path = Path.resolve( rootDirectory, 'target/junit', process.env.JOB || '.', - `TEST-${CI_PARALLEL_PROCESS_PREFIX}${reportName}${counter ? `-${counter}` : ''}.xml` + `TEST-${CI_PARALLEL_PROCESS_PREFIX}${reportName}${ + counter ? `-${counter}` : '' + }${BUILDKITE_ID_SUFFIX}.xml` ); return Fs.existsSync(path) diff --git a/packages/kbn-ui-shared-deps/entry.js b/packages/kbn-ui-shared-deps/entry.js index 4029ce28faf5b..b8d21a473c65f 100644 --- a/packages/kbn-ui-shared-deps/entry.js +++ b/packages/kbn-ui-shared-deps/entry.js @@ -44,6 +44,9 @@ export const Theme = require('./theme.ts'); export const Lodash = require('lodash'); export const LodashFp = require('lodash/fp'); +import { unzlibSync, strFromU8 } from 'fflate'; +export const Fflate = { unzlibSync, strFromU8 }; + // runtime deps which don't need to be copied across all bundles export const TsLib = require('tslib'); export const KbnAnalytics = require('@kbn/analytics'); diff --git a/packages/kbn-ui-shared-deps/index.js b/packages/kbn-ui-shared-deps/index.js index 62ddb09d25add..877bf3df6c039 100644 --- a/packages/kbn-ui-shared-deps/index.js +++ b/packages/kbn-ui-shared-deps/index.js @@ -52,6 +52,7 @@ exports.externals = { '@elastic/eui/dist/eui_theme_dark.json': '__kbnSharedDeps__.Theme.euiDarkVars', lodash: '__kbnSharedDeps__.Lodash', 'lodash/fp': '__kbnSharedDeps__.LodashFp', + fflate: '__kbnSharedDeps__.Fflate', /** * runtime deps which don't need to be copied across all bundles diff --git a/src/core/TESTING.md b/src/core/TESTING.md index ef6db57c1a993..10ead1ea8cfe2 100644 --- a/src/core/TESTING.md +++ b/src/core/TESTING.md @@ -792,8 +792,8 @@ To do that we'll write a Jest integration test using `TestUtils` to start Kibana and esArchiver to load fixture data into Elasticsearch. 1. Create the fixtures data you need in Elasticsearch -2. Create a fixtures archive with `node scripts/es_archiver save [index patterns...]` -3. Load the fixtures in your test using esArchiver `esArchiver.load('name')`; +2. Create a fixtures archive with `node scripts/es_archiver save [index patterns...]` +3. Load the fixtures in your test using esArchiver `esArchiver.load('path from root of repo')`; _todo: fully worked out example_ diff --git a/src/core/public/application/application_service.test.ts b/src/core/public/application/application_service.test.ts index 2e2f1cad49f19..5658d3f626077 100644 --- a/src/core/public/application/application_service.test.ts +++ b/src/core/public/application/application_service.test.ts @@ -107,6 +107,7 @@ describe('#setup()', () => { status: AppStatus.inaccessible, tooltip: 'App inaccessible due to reason', defaultPath: 'foo/bar', + deepLinks: [{ id: 'subapp2', title: 'Subapp 2', path: '/subapp2' }], })); applications = await applications$.pipe(take(1)).toPromise(); @@ -118,6 +119,9 @@ describe('#setup()', () => { status: AppStatus.inaccessible, defaultPath: 'foo/bar', tooltip: 'App inaccessible due to reason', + deepLinks: [ + expect.objectContaining({ id: 'subapp2', title: 'Subapp 2', path: '/subapp2' }), + ], }) ); expect(applications.get('app2')).toEqual( @@ -814,6 +818,128 @@ describe('#start()', () => { expect(MockHistory.replace).not.toHaveBeenCalled(); }); }); + + describe('deepLinkId option', () => { + beforeEach(() => { + MockHistory.push.mockClear(); + }); + + it('preserves trailing slash when path contains a hash', async () => { + const { register } = service.setup(setupDeps); + + register( + Symbol(), + createApp({ + id: 'app1', + appRoute: '/custom/app-path', + deepLinks: [{ id: 'dl1', title: 'deep link 1', path: '/deep-link' }], + }) + ); + + const { navigateToApp } = await service.start(startDeps); + await navigateToApp('app1', { deepLinkId: 'dl1', path: '#/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link#/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '#/foo/bar/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link#/foo/bar/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '/path#/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link/path#/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '/path#/hash/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link/path#/hash/', + undefined + ); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: '/path/' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom/app-path/deep-link/path', + undefined + ); + }); + + it('omits the defaultPath when the deepLinkId parameter is specified', async () => { + const { register } = service.setup(setupDeps); + + register( + Symbol(), + createApp({ + id: 'app1', + defaultPath: 'default/path', + deepLinks: [{ id: 'dl1', title: 'deep link 1', path: '/deep-link' }], + }) + ); + register( + Symbol(), + createApp({ + id: 'app2', + appRoute: '/custom-app-path', + defaultPath: '/my-default', + deepLinks: [{ id: 'dl2', title: 'deep link 2', path: '/deep-link-2' }], + }) + ); + + const { navigateToApp } = await service.start(startDeps); + + await navigateToApp('app1', {}); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/default/path', undefined); + + await navigateToApp('app1', { deepLinkId: 'dl1' }); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/deep-link', undefined); + + await navigateToApp('app1', { deepLinkId: 'dl1', path: 'some-other-path' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/app/app1/deep-link/some-other-path', + undefined + ); + + await navigateToApp('app2', {}); + expect(MockHistory.push).toHaveBeenLastCalledWith('/custom-app-path/my-default', undefined); + + await navigateToApp('app2', { deepLinkId: 'dl2' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom-app-path/deep-link-2', + undefined + ); + + await navigateToApp('app2', { deepLinkId: 'dl2', path: 'some-other-path' }); + expect(MockHistory.push).toHaveBeenLastCalledWith( + '/custom-app-path/deep-link-2/some-other-path', + undefined + ); + }); + + it('ignores the deepLinkId parameter if it is unknown', async () => { + const { register } = service.setup(setupDeps); + + register( + Symbol(), + createApp({ + id: 'app1', + defaultPath: 'default/path', + deepLinks: [{ id: 'dl1', title: 'deep link 1', path: '/deep-link' }], + }) + ); + + const { navigateToApp } = await service.start(startDeps); + + await navigateToApp('app1', { deepLinkId: 'dl-unknown' }); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/default/path', undefined); + + await navigateToApp('app1', { deepLinkId: 'dl-unknown', path: 'some-other-path' }); + expect(MockHistory.push).toHaveBeenLastCalledWith('/app/app1/some-other-path', undefined); + }); + }); }); describe('navigateToUrl', () => { diff --git a/src/core/public/application/application_service.tsx b/src/core/public/application/application_service.tsx index bbfea61220b51..32d45b32c32ff 100644 --- a/src/core/public/application/application_service.tsx +++ b/src/core/public/application/application_service.tsx @@ -64,6 +64,10 @@ const getAppUrl = (mounters: Map, appId: string, path: string = return appendAppPath(appBasePath, path); }; +const getAppDeepLinkPath = (mounters: Map, appId: string, deepLinkId: string) => { + return mounters.get(appId)?.deepLinkPaths[deepLinkId]; +}; + const allApplicationsFilter = '__ALL__'; interface AppUpdaterWrapper { @@ -175,6 +179,7 @@ export class ApplicationService { this.mounters.set(app.id, { appRoute: app.appRoute!, appBasePath: basePath.prepend(app.appRoute!), + deepLinkPaths: toDeepLinkPaths(app.deepLinks), exactRoute: app.exactRoute ?? false, mount: wrapMount(plugin, app), unmountBeforeMounting: false, @@ -226,7 +231,7 @@ export class ApplicationService { const navigateToApp: InternalApplicationStart['navigateToApp'] = async ( appId, - { path, state, replace = false, openInNewTab = false }: NavigateToAppOptions = {} + { deepLinkId, path, state, replace = false, openInNewTab = false }: NavigateToAppOptions = {} ) => { const currentAppId = this.currentAppId$.value; const navigatingToSameApp = currentAppId === appId; @@ -235,6 +240,12 @@ export class ApplicationService { : await this.shouldNavigate(overlays, appId); if (shouldNavigate) { + if (deepLinkId) { + const deepLinkPath = getAppDeepLinkPath(availableMounters, appId, deepLinkId); + if (deepLinkPath) { + path = appendAppPath(deepLinkPath, path); + } + } if (path === undefined) { path = applications$.value.get(appId)?.defaultPath; } @@ -384,8 +395,18 @@ const updateStatus = (app: App, statusUpdaters: AppUpdaterWrapper[]): App => { ...fields, // status and navLinkStatus enums are ordered by reversed priority // if multiple updaters wants to change these fields, we will always follow the priority order. - status: Math.max(changes.status ?? 0, fields.status ?? 0), - navLinkStatus: Math.max(changes.navLinkStatus ?? 0, fields.navLinkStatus ?? 0), + status: Math.max( + changes.status ?? AppStatus.accessible, + fields.status ?? AppStatus.accessible + ), + navLinkStatus: Math.max( + changes.navLinkStatus ?? AppNavLinkStatus.default, + fields.navLinkStatus ?? AppNavLinkStatus.default + ), + // deepLinks take the last defined update + deepLinks: fields.deepLinks + ? populateDeepLinkDefaults(fields.deepLinks) + : changes.deepLinks, }; } }); @@ -396,10 +417,22 @@ const updateStatus = (app: App, statusUpdaters: AppUpdaterWrapper[]): App => { }; const populateDeepLinkDefaults = (deepLinks?: AppDeepLink[]): AppDeepLink[] => { - if (!deepLinks) return []; + if (!deepLinks) { + return []; + } return deepLinks.map((deepLink) => ({ ...deepLink, navLinkStatus: deepLink.navLinkStatus ?? AppNavLinkStatus.default, deepLinks: populateDeepLinkDefaults(deepLink.deepLinks), })); }; + +const toDeepLinkPaths = (deepLinks?: AppDeepLink[]): Mounter['deepLinkPaths'] => { + if (!deepLinks) { + return {}; + } + return deepLinks.reduce((deepLinkPaths: Mounter['deepLinkPaths'], deepLink) => { + if (deepLink.path) deepLinkPaths[deepLink.id] = deepLink.path; + return { ...deepLinkPaths, ...toDeepLinkPaths(deepLink.deepLinks) }; + }, {}); +}; diff --git a/src/core/public/application/index.ts b/src/core/public/application/index.ts index 68e1991646afb..882555fcd60e0 100644 --- a/src/core/public/application/index.ts +++ b/src/core/public/application/index.ts @@ -17,6 +17,7 @@ export type { AppUnmount, AppMountParameters, AppUpdatableFields, + AppNavOptions, AppUpdater, AppDeepLink, ApplicationSetup, diff --git a/src/core/public/application/integration_tests/utils.tsx b/src/core/public/application/integration_tests/utils.tsx index 40f8f3b795719..dcf071719c11a 100644 --- a/src/core/public/application/integration_tests/utils.tsx +++ b/src/core/public/application/integration_tests/utils.tsx @@ -35,12 +35,14 @@ export const createAppMounter = ({ appId, html = `
App ${appId}
`, appRoute = `/app/${appId}`, + deepLinkPaths = {}, exactRoute = false, extraMountHook, }: { appId: string; html?: string; appRoute?: string; + deepLinkPaths?: Record; exactRoute?: boolean; extraMountHook?: (params: AppMountParameters) => void; }): MockedMounterTuple => { @@ -51,6 +53,7 @@ export const createAppMounter = ({ mounter: { appRoute, appBasePath: appRoute, + deepLinkPaths, exactRoute, mount: jest.fn(async (params: AppMountParameters) => { const { appBasePath: basename, element } = params; diff --git a/src/core/public/application/types.ts b/src/core/public/application/types.ts index ffc41955360bd..60b0dbf158dd9 100644 --- a/src/core/public/application/types.ts +++ b/src/core/public/application/types.ts @@ -63,9 +63,37 @@ export enum AppNavLinkStatus { */ export type AppUpdatableFields = Pick< App, - 'status' | 'navLinkStatus' | 'tooltip' | 'defaultPath' | 'deepLinks' + 'status' | 'navLinkStatus' | 'searchable' | 'tooltip' | 'defaultPath' | 'deepLinks' >; +/** + * App navigation menu options + * @public + */ +export interface AppNavOptions { + /** + * An ordinal used to sort nav links relative to one another for display. + */ + order?: number; + + /** + * A tooltip shown when hovering over app link. + */ + tooltip?: string; + + /** + * A EUI iconType that will be used for the app's icon. This icon + * takes precendence over the `icon` property. + */ + euiIconType?: string; + + /** + * A URL to an image file used as an icon. Used as a fallback + * if `euiIconType` is not provided. + */ + icon?: string; +} + /** * Updater for applications. * see {@link ApplicationSetup} @@ -76,7 +104,7 @@ export type AppUpdater = (app: App) => Partial | undefined; /** * @public */ -export interface App { +export interface App extends AppNavOptions { /** * The unique identifier of the application */ @@ -107,6 +135,12 @@ export interface App { */ navLinkStatus?: AppNavLinkStatus; + /** + * The initial flag to determine if the application is searchable in the global search. + * Defaulting to `true` if `navLinkStatus` is `visible` or omitted. + */ + searchable?: boolean; + /** * Allow to define the default path a user should be directed to when navigating to the app. * When defined, this value will be used as a default for the `path` option when calling {@link ApplicationStart.navigateToApp | navigateToApp}`, @@ -148,28 +182,6 @@ export interface App { */ updater$?: Observable; - /** - * An ordinal used to sort nav links relative to one another for display. - */ - order?: number; - - /** - * A tooltip shown when hovering over app link. - */ - tooltip?: string; - - /** - * A EUI iconType that will be used for the app's icon. This icon - * takes precendence over the `icon` property. - */ - euiIconType?: string; - - /** - * A URL to an image file used as an icon. Used as a fallback - * if `euiIconType` is not provided. - */ - icon?: string; - /** * Custom capabilities defined by the app. */ @@ -261,11 +273,12 @@ export interface App { */ export type PublicAppDeepLinkInfo = Omit< AppDeepLink, - 'deepLinks' | 'keywords' | 'navLinkStatus' + 'deepLinks' | 'keywords' | 'navLinkStatus' | 'searchable' > & { deepLinks: PublicAppDeepLinkInfo[]; keywords: string[]; navLinkStatus: AppNavLinkStatus; + searchable: boolean; }; /** @@ -285,33 +298,40 @@ export type AppDeepLink = { keywords?: string[]; /** Optional status of the chrome navigation, defaults to `hidden` */ navLinkStatus?: AppNavLinkStatus; -} & ( - | { - /** URL path to access this link, relative to the application's appRoute. */ - path: string; - /** Optional array of links that are 'underneath' this section in the hierarchy */ - deepLinks?: AppDeepLink[]; - } - | { - /** Optional path to access this section. Omit if this part of the hierarchy does not have a page URL. */ - path?: string; - /** Array links that are 'underneath' this section in this hierarchy. */ - deepLinks: AppDeepLink[]; - } -); + /** Optional flag to determine if the link is searchable in the global search. Defaulting to `true` if `navLinkStatus` is `visible` or omitted */ + searchable?: boolean; +} & AppNavOptions & + ( + | { + /** URL path to access this link, relative to the application's appRoute. */ + path: string; + /** Optional array of links that are 'underneath' this section in the hierarchy */ + deepLinks?: AppDeepLink[]; + } + | { + /** Optional path to access this section. Omit if this part of the hierarchy does not have a page URL. */ + path?: string; + /** Array links that are 'underneath' this section in this hierarchy. */ + deepLinks: AppDeepLink[]; + } + ); /** * Public information about a registered {@link App | application} * * @public */ -export type PublicAppInfo = Omit & { +export type PublicAppInfo = Omit< + App, + 'mount' | 'updater$' | 'keywords' | 'deepLinks' | 'searchable' +> & { // remove optional on fields populated with default values status: AppStatus; navLinkStatus: AppNavLinkStatus; appRoute: string; keywords: string[]; deepLinks: PublicAppDeepLinkInfo[]; + searchable: boolean; }; /** @@ -592,6 +612,7 @@ export interface AppLeaveActionFactory { export interface Mounter { appRoute: string; appBasePath: string; + deepLinkPaths: Record; mount: AppMount; exactRoute: boolean; unmountBeforeMounting?: boolean; @@ -657,11 +678,17 @@ export interface InternalApplicationSetup extends Pick { appRoute: '/some-route', unmountBeforeMounting: false, exactRoute: false, + deepLinkPaths: {}, mount: async ({ element }: AppMountParameters) => { await promise; const container = document.createElement('div'); @@ -133,6 +134,7 @@ describe('AppContainer', () => { const mounter = { appBasePath: '/base-path/some-route', appRoute: '/some-route', + deepLinkPaths: {}, unmountBeforeMounting: false, exactRoute: false, mount: async ({ element }: AppMountParameters) => { diff --git a/src/core/public/application/utils/get_app_info.test.ts b/src/core/public/application/utils/get_app_info.test.ts index ef4a06707d666..fa1e2dd9a4537 100644 --- a/src/core/public/application/utils/get_app_info.test.ts +++ b/src/core/public/application/utils/get_app_info.test.ts @@ -7,7 +7,7 @@ */ import { of } from 'rxjs'; -import { App, AppNavLinkStatus, AppStatus } from '../types'; +import { App, AppDeepLink, AppNavLinkStatus, AppStatus } from '../types'; import { getAppInfo } from './get_app_info'; describe('getAppInfo', () => { @@ -18,10 +18,22 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.default, + searchable: true, appRoute: `/app/some-id`, ...props, }); + const createDeepLink = (props: Partial = {}): AppDeepLink => ({ + id: 'some-deep-link-id', + title: 'my deep link', + path: '/my-deep-link', + navLinkStatus: AppNavLinkStatus.default, + searchable: true, + deepLinks: [], + keywords: [], + ...props, + }); + it('converts an application and remove sensitive properties', () => { const app = createApp(); const info = getAppInfo(app); @@ -31,6 +43,7 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.visible, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [], @@ -54,12 +67,15 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.visible, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [ { id: 'sub-id', title: 'sub-title', + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, keywords: [], deepLinks: [ { @@ -67,6 +83,8 @@ describe('getAppInfo', () => { title: 'sub-sub-title', path: '/sub-sub', keywords: [], + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, deepLinks: [], // default empty array added }, ], @@ -102,7 +120,70 @@ describe('getAppInfo', () => { ); }); - it('adds default meta fields to sublinks when needed', () => { + it('computes the searchable flag depending on the navLinkStatus when needed', () => { + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.default, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: true, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.visible, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: true, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.disabled, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: false, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: undefined, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: false, + }) + ); + expect( + getAppInfo( + createApp({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, + }) + ) + ).toEqual( + expect.objectContaining({ + searchable: true, + }) + ); + }); + + it('adds default deepLinks when needed', () => { const app = createApp({ deepLinks: [ { @@ -126,17 +207,22 @@ describe('getAppInfo', () => { title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.visible, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [ { id: 'sub-id', title: 'sub-title', - keywords: [], // default empty array + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, + keywords: [], deepLinks: [ { id: 'sub-sub-id', title: 'sub-sub-title', + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, path: '/sub-sub', keywords: ['sub sub'], deepLinks: [], @@ -146,4 +232,127 @@ describe('getAppInfo', () => { ], }); }); + + it('computes the deepLinks navLinkStatus when needed', () => { + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.visible, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.visible, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.default, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.hidden, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: undefined, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + navLinkStatus: AppNavLinkStatus.hidden, + }), + ], + }) + ); + }); + + it('computes the deepLinks searchable depending on the navLinkStatus when needed', () => { + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.default, + searchable: undefined, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + searchable: true, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: undefined, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + searchable: false, + }), + ], + }) + ); + expect( + getAppInfo( + createApp({ + deepLinks: [ + createDeepLink({ + navLinkStatus: AppNavLinkStatus.hidden, + searchable: true, + }), + ], + }) + ) + ).toEqual( + expect.objectContaining({ + deepLinks: [ + expect.objectContaining({ + searchable: true, + }), + ], + }) + ); + }); }); diff --git a/src/core/public/application/utils/get_app_info.ts b/src/core/public/application/utils/get_app_info.ts index 4c94e24f501bc..6c753b7a71a0f 100644 --- a/src/core/public/application/utils/get_app_info.ts +++ b/src/core/public/application/utils/get_app_info.ts @@ -16,17 +16,19 @@ import { } from '../types'; export function getAppInfo(app: App): PublicAppInfo { - const navLinkStatus = - app.navLinkStatus === AppNavLinkStatus.default - ? app.status === AppStatus.inaccessible - ? AppNavLinkStatus.hidden - : AppNavLinkStatus.visible - : app.navLinkStatus!; - const { updater$, mount, ...infos } = app; + const { updater$, mount, navLinkStatus = AppNavLinkStatus.default, ...infos } = app; return { ...infos, status: app.status!, - navLinkStatus, + navLinkStatus: + navLinkStatus === AppNavLinkStatus.default + ? app.status === AppStatus.inaccessible + ? AppNavLinkStatus.hidden + : AppNavLinkStatus.visible + : navLinkStatus, + searchable: + app.searchable ?? + (navLinkStatus === AppNavLinkStatus.default || navLinkStatus === AppNavLinkStatus.visible), appRoute: app.appRoute!, keywords: app.keywords ?? [], deepLinks: getDeepLinkInfos(app.deepLinks), @@ -37,17 +39,18 @@ function getDeepLinkInfos(deepLinks?: AppDeepLink[]): PublicAppDeepLinkInfo[] { if (!deepLinks) return []; return deepLinks.map( - (rawDeepLink): PublicAppDeepLinkInfo => { - const navLinkStatus = - rawDeepLink.navLinkStatus === AppNavLinkStatus.default - ? AppNavLinkStatus.hidden - : rawDeepLink.navLinkStatus!; + ({ navLinkStatus = AppNavLinkStatus.default, ...rawDeepLink }): PublicAppDeepLinkInfo => { return { id: rawDeepLink.id, title: rawDeepLink.title, path: rawDeepLink.path, keywords: rawDeepLink.keywords ?? [], - navLinkStatus, + navLinkStatus: + navLinkStatus === AppNavLinkStatus.default ? AppNavLinkStatus.hidden : navLinkStatus, + searchable: + rawDeepLink.searchable ?? + (navLinkStatus === AppNavLinkStatus.default || + navLinkStatus === AppNavLinkStatus.visible), deepLinks: getDeepLinkInfos(rawDeepLink.deepLinks), }; } diff --git a/src/core/public/chrome/nav_links/nav_link.ts b/src/core/public/chrome/nav_links/nav_link.ts index 87175ea465b7f..4e9158cac5cd4 100644 --- a/src/core/public/chrome/nav_links/nav_link.ts +++ b/src/core/public/chrome/nav_links/nav_link.ts @@ -33,10 +33,9 @@ export interface ChromeNavLink { readonly baseUrl: string; /** - * The route used to open the {@link AppBase.defaultPath | default path } of an application. - * If unset, `baseUrl` will be used instead. + * The route used to open the default path and the deep links of an application. */ - readonly url?: string; + readonly url: string; /** * An ordinal used to sort nav links relative to one another for display. diff --git a/src/core/public/chrome/nav_links/nav_links_service.test.ts b/src/core/public/chrome/nav_links/nav_links_service.test.ts index afb902fd6bd83..e1d537da6959b 100644 --- a/src/core/public/chrome/nav_links/nav_links_service.test.ts +++ b/src/core/public/chrome/nav_links/nav_links_service.test.ts @@ -20,6 +20,22 @@ const availableApps = new Map([ order: -10, title: 'App 2', euiIconType: 'canvasApp', + deepLinks: [ + { + id: 'deepApp1', + order: 50, + title: 'Deep App 1', + path: '/deepapp1', + deepLinks: [ + { + id: 'deepApp2', + order: 40, + title: 'Deep App 2', + path: '/deepapp2', + }, + ], + }, + ], }, ], ['chromelessApp', { id: 'chromelessApp', order: 20, title: 'Chromless App', chromeless: true }], @@ -66,7 +82,7 @@ describe('NavLinksService', () => { map((links) => links.map((l) => l.id)) ) .toPromise() - ).toEqual(['app2', 'app1']); + ).toEqual(['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1']); }); it('emits multiple values', async () => { @@ -76,7 +92,7 @@ describe('NavLinksService', () => { start.showOnly('app1'); service.stop(); - expect(emittedLinks).toEqual([['app2', 'app1'], ['app1']]); + expect(emittedLinks).toEqual([['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1'], ['app1']]); }); it('completes when service is stopped', async () => { @@ -98,7 +114,12 @@ describe('NavLinksService', () => { describe('#getAll()', () => { it('returns a sorted array of navlinks', () => { - expect(start.getAll().map((l) => l.id)).toEqual(['app2', 'app1']); + expect(start.getAll().map((l) => l.id)).toEqual([ + 'app2', + 'app1', + 'app2:deepApp2', + 'app2:deepApp1', + ]); }); }); @@ -123,7 +144,7 @@ describe('NavLinksService', () => { map((links) => links.map((l) => l.id)) ) .toPromise() - ).toEqual(['app2', 'app1']); + ).toEqual(['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1']); }); it('does nothing on chromeless applications', async () => { @@ -136,7 +157,7 @@ describe('NavLinksService', () => { map((links) => links.map((l) => l.id)) ) .toPromise() - ).toEqual(['app2', 'app1']); + ).toEqual(['app2', 'app1', 'app2:deepApp2', 'app2:deepApp1']); }); it('removes all other links', async () => { @@ -152,6 +173,19 @@ describe('NavLinksService', () => { ).toEqual(['app2']); }); + it('show only deep link', async () => { + start.showOnly('app2:deepApp1'); + expect( + await start + .getNavLinks$() + .pipe( + take(1), + map((links) => links.map((l) => l.id)) + ) + .toPromise() + ).toEqual(['app2:deepApp1']); + }); + it('still removes all other links when availableApps are re-emitted', async () => { start.showOnly('app2'); mockAppService.applications$.next(mockAppService.applications$.value); diff --git a/src/core/public/chrome/nav_links/nav_links_service.ts b/src/core/public/chrome/nav_links/nav_links_service.ts index d41d8ae964d62..af961987a6309 100644 --- a/src/core/public/chrome/nav_links/nav_links_service.ts +++ b/src/core/public/chrome/nav_links/nav_links_service.ts @@ -10,8 +10,8 @@ import { sortBy } from 'lodash'; import { BehaviorSubject, combineLatest, Observable, ReplaySubject } from 'rxjs'; import { map, takeUntil } from 'rxjs/operators'; -import { InternalApplicationStart } from '../../application'; -import { HttpStart } from '../../http'; +import { InternalApplicationStart, PublicAppDeepLinkInfo, PublicAppInfo } from '../../application'; +import { HttpStart, IBasePath } from '../../http'; import { ChromeNavLink, NavLinkWrapper } from './nav_link'; import { toNavLink } from './to_nav_link'; @@ -89,7 +89,13 @@ export class NavLinksService { return new Map( [...apps] .filter(([, app]) => !app.chromeless) - .map(([appId, app]) => [appId, toNavLink(app, http.basePath)]) + .reduce((navLinks: Array<[string, NavLinkWrapper]>, [appId, app]) => { + navLinks.push( + [appId, toNavLink(app, http.basePath)], + ...toNavDeepLinks(app, app.deepLinks, http.basePath) + ); + return navLinks; + }, []) ); }) ); @@ -163,3 +169,21 @@ function sortNavLinks(navLinks: ReadonlyMap) { 'order' ); } + +function toNavDeepLinks( + app: PublicAppInfo, + deepLinks: PublicAppDeepLinkInfo[], + basePath: IBasePath +): Array<[string, NavLinkWrapper]> { + if (!deepLinks) { + return []; + } + return deepLinks.reduce((navDeepLinks: Array<[string, NavLinkWrapper]>, deepLink) => { + const id = `${app.id}:${deepLink.id}`; + if (deepLink.path) { + navDeepLinks.push([id, toNavLink(app, basePath, { ...deepLink, id })]); + } + navDeepLinks.push(...toNavDeepLinks(app, deepLink.deepLinks, basePath)); + return navDeepLinks; + }, []); +} diff --git a/src/core/public/chrome/nav_links/to_nav_link.test.ts b/src/core/public/chrome/nav_links/to_nav_link.test.ts index db783d0028f07..9791f1bd1354b 100644 --- a/src/core/public/chrome/nav_links/to_nav_link.test.ts +++ b/src/core/public/chrome/nav_links/to_nav_link.test.ts @@ -6,7 +6,12 @@ * Side Public License, v 1. */ -import { PublicAppInfo, AppNavLinkStatus, AppStatus } from '../../application'; +import { + PublicAppInfo, + AppNavLinkStatus, + AppStatus, + PublicAppDeepLinkInfo, +} from '../../application'; import { toNavLink } from './to_nav_link'; import { httpServiceMock } from '../../mocks'; @@ -16,12 +21,24 @@ const app = (props: Partial = {}): PublicAppInfo => ({ title: 'some-title', status: AppStatus.accessible, navLinkStatus: AppNavLinkStatus.default, + searchable: true, appRoute: `/app/some-id`, keywords: [], deepLinks: [], ...props, }); +const deepLink = (props: Partial = {}): PublicAppDeepLinkInfo => ({ + id: 'some-deep-link-id', + title: 'my deep link', + path: '/my-deep-link', + navLinkStatus: AppNavLinkStatus.default, + searchable: true, + deepLinks: [], + keywords: [], + ...props, +}); + describe('toNavLink', () => { const basePath = httpServiceMock.createSetupContract({ basePath: '/base-path' }).basePath; @@ -64,7 +81,7 @@ describe('toNavLink', () => { }), basePath ); - expect(link.properties.url).toEqual('http://localhost/base-path/my-route/my-path'); + expect(link.properties.url).toEqual('/base-path/my-route/my-path'); link = toNavLink( app({ @@ -73,9 +90,7 @@ describe('toNavLink', () => { }), basePath ); - expect(link.properties.url).toEqual( - 'http://localhost/base-path/my-route/my-path/some/default/path' - ); + expect(link.properties.url).toEqual('/base-path/my-route/my-path/some/default/path'); }); it('uses the application status when the navLinkStatus is set to default', () => { @@ -153,4 +168,90 @@ describe('toNavLink', () => { }) ); }); + + describe('deepLink parameter', () => { + it('should be hidden and not disabled by default', () => { + expect(toNavLink(app(), basePath, deepLink()).properties).toEqual( + expect.objectContaining({ + disabled: false, + hidden: true, + }) + ); + }); + + it('should not be hidden when navLinkStatus is visible', () => { + expect( + toNavLink( + app(), + basePath, + deepLink({ + navLinkStatus: AppNavLinkStatus.visible, + }) + ).properties + ).toEqual( + expect.objectContaining({ + disabled: false, + hidden: false, + }) + ); + }); + + it('should be disabled when navLinkStatus is disabled', () => { + expect( + toNavLink( + app(), + basePath, + deepLink({ + navLinkStatus: AppNavLinkStatus.disabled, + }) + ).properties + ).toEqual( + expect.objectContaining({ + disabled: true, + hidden: false, + }) + ); + }); + + it('should have href, baseUrl and url containing the path', () => { + const testApp = app({ + appRoute: '/app/app-id', + defaultPath: '/default-path', + }); + + expect(toNavLink(testApp, basePath).properties).toEqual( + expect.objectContaining({ + baseUrl: 'http://localhost/base-path/app/app-id', + url: '/base-path/app/app-id/default-path', + href: 'http://localhost/base-path/app/app-id/default-path', + }) + ); + + expect( + toNavLink( + testApp, + basePath, + deepLink({ + id: 'deep-link-id', + path: '/my-deep-link', + }) + ).properties + ).toEqual( + expect.objectContaining({ + baseUrl: 'http://localhost/base-path/app/app-id', + url: '/base-path/app/app-id/my-deep-link', + href: 'http://localhost/base-path/app/app-id/my-deep-link', + }) + ); + }); + + it('should use the main app category', () => { + expect(toNavLink(app(), basePath, deepLink()).properties.category).toBeUndefined(); + + const category = { id: 'some-category', label: 'some category' }; + expect(toNavLink(app({ category }), basePath, deepLink()).properties.category).toEqual( + category + ); + }); + }); }); diff --git a/src/core/public/chrome/nav_links/to_nav_link.ts b/src/core/public/chrome/nav_links/to_nav_link.ts index f56d496f42d8f..6acf37d40f089 100644 --- a/src/core/public/chrome/nav_links/to_nav_link.ts +++ b/src/core/public/chrome/nav_links/to_nav_link.ts @@ -6,29 +6,50 @@ * Side Public License, v 1. */ -import { PublicAppInfo, AppNavLinkStatus, AppStatus } from '../../application'; +import { + PublicAppInfo, + AppNavLinkStatus, + AppStatus, + PublicAppDeepLinkInfo, +} from '../../application'; import { IBasePath } from '../../http'; import { NavLinkWrapper } from './nav_link'; import { appendAppPath } from '../../application/utils'; -export function toNavLink(app: PublicAppInfo, basePath: IBasePath): NavLinkWrapper { - const useAppStatus = app.navLinkStatus === AppNavLinkStatus.default; +export function toNavLink( + app: PublicAppInfo, + basePath: IBasePath, + deepLink?: PublicAppDeepLinkInfo +): NavLinkWrapper { const relativeBaseUrl = basePath.prepend(app.appRoute!); - const url = relativeToAbsolute(appendAppPath(relativeBaseUrl, app.defaultPath)); + const url = appendAppPath(relativeBaseUrl, deepLink?.path || app.defaultPath); + const href = relativeToAbsolute(url); const baseUrl = relativeToAbsolute(relativeBaseUrl); return new NavLinkWrapper({ - ...app, - hidden: useAppStatus - ? app.status === AppStatus.inaccessible - : app.navLinkStatus === AppNavLinkStatus.hidden, - disabled: useAppStatus ? false : app.navLinkStatus === AppNavLinkStatus.disabled, + ...(deepLink || app), + ...(app.category ? { category: app.category } : {}), // deepLinks use the main app category + hidden: deepLink ? isDeepNavLinkHidden(deepLink) : isAppNavLinkHidden(app), + disabled: (deepLink?.navLinkStatus ?? app.navLinkStatus) === AppNavLinkStatus.disabled, baseUrl, - href: url, + href, url, }); } +function isAppNavLinkHidden(app: PublicAppInfo) { + return app.navLinkStatus === AppNavLinkStatus.default + ? app.status === AppStatus.inaccessible + : app.navLinkStatus === AppNavLinkStatus.hidden; +} + +function isDeepNavLinkHidden(deepLink: PublicAppDeepLinkInfo) { + return ( + deepLink.navLinkStatus === AppNavLinkStatus.default || + deepLink.navLinkStatus === AppNavLinkStatus.hidden + ); +} + /** * @param {string} url - a relative or root relative url. If a relative path is given then the * absolute url returned will depend on the current page where this function is called from. For example diff --git a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 575a247ffeccb..3668829a6888c 100644 --- a/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -73,6 +73,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "Custom link", "isActive": true, "title": "Custom link", + "url": "/", }, "closed": false, "hasError": false, @@ -140,6 +141,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "discover", "isActive": true, "title": "discover", + "url": "/", }, Object { "baseUrl": "/", @@ -154,6 +156,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "siem", "isActive": true, "title": "siem", + "url": "/", }, Object { "baseUrl": "/", @@ -168,6 +171,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "metrics", "isActive": true, "title": "metrics", + "url": "/", }, Object { "baseUrl": "/", @@ -182,6 +186,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "monitoring", "isActive": true, "title": "monitoring", + "url": "/", }, Object { "baseUrl": "/", @@ -196,6 +201,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "visualize", "isActive": true, "title": "visualize", + "url": "/", }, Object { "baseUrl": "/", @@ -210,6 +216,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "dashboard", "isActive": true, "title": "dashboard", + "url": "/", }, Object { "baseUrl": "/", @@ -219,6 +226,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "canvas", "isActive": true, "title": "canvas", + "url": "/", }, Object { "baseUrl": "/", @@ -233,6 +241,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "id": "logs", "isActive": true, "title": "logs", + "url": "/", }, ], "closed": false, @@ -351,6 +360,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` "values": Array [], } } + url="/" > @@ -1921,6 +1933,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` > @@ -1999,6 +2014,7 @@ exports[`CollapsibleNav renders links grouped by category 1`] = ` @@ -3084,6 +3107,7 @@ exports[`CollapsibleNav renders the default nav 3`] = ` > @@ -3162,6 +3188,7 @@ exports[`CollapsibleNav renders the default nav 3`] = ` @@ -5469,6 +5479,7 @@ exports[`Header renders 1`] = ` > @@ -5547,6 +5560,7 @@ exports[`Header renders 1`] = ` ) { id: title, href: title, baseUrl: '/', + url: '/', isActive: true, 'data-test-subj': title, }; @@ -50,6 +51,7 @@ function mockProps() { isLocked: false, isNavOpen: false, homeHref: '/', + url: '/', navLinks$: new BehaviorSubject([]), recentlyAccessed$: new BehaviorSubject([]), storage: new StubBrowserStorage(), diff --git a/src/core/public/chrome/ui/header/collapsible_nav.tsx b/src/core/public/chrome/ui/header/collapsible_nav.tsx index b5b2919b659bd..0e85dbea237cb 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.tsx @@ -107,7 +107,7 @@ export function CollapsibleNav({ link, appId, dataTestSubj: 'collapsibleNavAppLink', - navigateToApp, + navigateToUrl, onClick: closeNav, ...(needsIcon && { basePath }), }); @@ -137,7 +137,7 @@ export function CollapsibleNav({ createEuiListItem({ link: customNavLink, basePath, - navigateToApp, + navigateToUrl, dataTestSubj: 'collapsibleNavCustomNavLink', onClick: closeNav, externalLink: true, diff --git a/src/core/public/chrome/ui/header/header.test.tsx b/src/core/public/chrome/ui/header/header.test.tsx index e0f10fe66c9f0..fdbdde8556eeb 100644 --- a/src/core/public/chrome/ui/header/header.test.tsx +++ b/src/core/public/chrome/ui/header/header.test.tsx @@ -61,13 +61,14 @@ describe('Header', () => { const breadcrumbs$ = new BehaviorSubject([{ text: 'test' }]); const isLocked$ = new BehaviorSubject(false); const navLinks$ = new BehaviorSubject([ - { id: 'kibana', title: 'kibana', baseUrl: '', href: '' }, + { id: 'kibana', title: 'kibana', baseUrl: '', href: '', url: '' }, ]); const headerBanner$ = new BehaviorSubject(undefined); const customNavLink$ = new BehaviorSubject({ id: 'cloud-deployment-link', title: 'Manage cloud deployment', baseUrl: '', + url: '', href: '', }); const recentlyAccessed$ = new BehaviorSubject([ diff --git a/src/core/public/chrome/ui/header/nav_link.tsx b/src/core/public/chrome/ui/header/nav_link.tsx index 84f758e2c737e..b0ebf7cc5f8e5 100644 --- a/src/core/public/chrome/ui/header/nav_link.tsx +++ b/src/core/public/chrome/ui/header/nav_link.tsx @@ -23,7 +23,7 @@ interface Props { basePath?: HttpStart['basePath']; dataTestSubj: string; onClick?: Function; - navigateToApp: CoreStart['application']['navigateToApp']; + navigateToUrl: CoreStart['application']['navigateToUrl']; externalLink?: boolean; } @@ -36,11 +36,11 @@ export function createEuiListItem({ appId, basePath, onClick = () => {}, - navigateToApp, + navigateToUrl, dataTestSubj, externalLink = false, }: Props) { - const { href, id, title, disabled, euiIconType, icon, tooltip } = link; + const { href, id, title, disabled, euiIconType, icon, tooltip, url } = link; return { label: tooltip ?? title, @@ -57,7 +57,7 @@ export function createEuiListItem({ !isModifiedOrPrevented(event) ) { event.preventDefault(); - navigateToApp(id); + navigateToUrl(url); } }, isActive: appId === id, diff --git a/src/core/public/deprecations/deprecations_client.test.ts b/src/core/public/deprecations/deprecations_client.test.ts index 2f52f7b4af195..a998a03772cca 100644 --- a/src/core/public/deprecations/deprecations_client.test.ts +++ b/src/core/public/deprecations/deprecations_client.test.ts @@ -90,6 +90,7 @@ describe('DeprecationsClient', () => { path: 'some-path', method: 'POST', }, + manualSteps: ['manual-step'], }, }; @@ -104,7 +105,9 @@ describe('DeprecationsClient', () => { domainId: 'testPluginId-1', message: 'some-message', level: 'warning', - correctiveActions: {}, + correctiveActions: { + manualSteps: ['manual-step'], + }, }; const isResolvable = deprecationsClient.isDeprecationResolvable(mockDeprecationDetails); @@ -120,7 +123,9 @@ describe('DeprecationsClient', () => { domainId: 'testPluginId-1', message: 'some-message', level: 'warning', - correctiveActions: {}, + correctiveActions: { + manualSteps: ['manual-step'], + }, }; const result = await deprecationsClient.resolveDeprecation(mockDeprecationDetails); @@ -144,6 +149,7 @@ describe('DeprecationsClient', () => { extra_param: 123, }, }, + manualSteps: ['manual-step'], }, }; const result = await deprecationsClient.resolveDeprecation(mockDeprecationDetails); @@ -176,6 +182,7 @@ describe('DeprecationsClient', () => { extra_param: 123, }, }, + manualSteps: ['manual-step'], }, }; http.fetch.mockRejectedValue({ body: { message: mockResponse } }); diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 36d613ec82f9e..d4ab8f624f711 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -32,14 +32,14 @@ export class DocLinksService { guide: `${KIBANA_DOCS}canvas.html`, }, dashboard: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html`, - drilldowns: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html`, - drilldownsTriggerPicker: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/drilldowns.html#url-drilldowns`, - urlDrilldownTemplateSyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url_templating-language.html`, - urlDrilldownVariables: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/url_templating-language.html#url-template-variables`, + guide: `${KIBANA_DOCS}dashboard.html`, + drilldowns: `${KIBANA_DOCS}drilldowns.html`, + drilldownsTriggerPicker: `${KIBANA_DOCS}drilldowns.html#url-drilldowns`, + urlDrilldownTemplateSyntax: `${KIBANA_DOCS}url_templating-language.html`, + urlDrilldownVariables: `${KIBANA_DOCS}url_templating-language.html#url-template-variables`, }, discover: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/discover.html`, + guide: `${KIBANA_DOCS}discover.html`, }, filebeat: { base: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}`, @@ -128,14 +128,14 @@ export class DocLinksService { luceneExpressions: `${ELASTICSEARCH_DOCS}modules-scripting-expression.html`, }, indexPatterns: { - introduction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-patterns.html`, - fieldFormattersNumber: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/numeral.html`, - fieldFormattersString: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/field-formatters-string.html`, + introduction: `${KIBANA_DOCS}index-patterns.html`, + fieldFormattersNumber: `${KIBANA_DOCS}numeral.html`, + fieldFormattersString: `${KIBANA_DOCS}field-formatters-string.html`, runtimeFields: `${KIBANA_DOCS}managing-index-patterns.html#runtime-fields`, }, - addData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/connect-to-elasticsearch.html`, - kibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index.html`, - upgradeAssistant: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/upgrade-assistant.html`, + addData: `${KIBANA_DOCS}connect-to-elasticsearch.html`, + kibana: `${KIBANA_DOCS}index.html`, + upgradeAssistant: `${KIBANA_DOCS}upgrade-assistant.html`, elasticsearch: { docsBase: `${ELASTICSEARCH_DOCS}`, asyncSearch: `${ELASTICSEARCH_DOCS}async-search-intro.html`, @@ -195,23 +195,23 @@ export class DocLinksService { }, query: { eql: `${ELASTICSEARCH_DOCS}eql.html`, - kueryQuerySyntax: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kuery-query.html`, + kueryQuerySyntax: `${KIBANA_DOCS}kuery-query.html`, luceneQuerySyntax: `${ELASTICSEARCH_DOCS}query-dsl-query-string-query.html#query-string-syntax`, percolate: `${ELASTICSEARCH_DOCS}query-dsl-percolate-query.html`, queryDsl: `${ELASTICSEARCH_DOCS}query-dsl.html`, }, search: { - sessions: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/search-sessions.html`, + sessions: `${KIBANA_DOCS}search-sessions.html`, }, date: { dateMath: `${ELASTICSEARCH_DOCS}common-options.html#date-math`, dateMathIndexNames: `${ELASTICSEARCH_DOCS}date-math-index-names.html`, }, management: { - dashboardSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-dashboard-settings`, + dashboardSettings: `${KIBANA_DOCS}advanced-options.html#kibana-dashboard-settings`, indexManagement: `${ELASTICSEARCH_DOCS}index-mgmt.html`, - kibanaSearchSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-search-settings`, - visualizationSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/advanced-options.html#kibana-visualization-settings`, + kibanaSearchSettings: `${KIBANA_DOCS}advanced-options.html#kibana-search-settings`, + visualizationSettings: `${KIBANA_DOCS}advanced-options.html#kibana-visualization-settings`, }, ml: { guide: `${ELASTIC_WEBSITE_URL}guide/en/machine-learning/${DOC_LINK_VERSION}/index.html`, @@ -242,52 +242,52 @@ export class DocLinksService { guide: `${ELASTICSEARCH_DOCS}transforms.html`, }, visualize: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/dashboard.html`, - timelionDeprecation: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/timelion.html`, + guide: `${KIBANA_DOCS}dashboard.html`, + timelionDeprecation: `${KIBANA_DOCS}timelion.html`, lens: `${ELASTIC_WEBSITE_URL}what-is/kibana-lens`, - lensPanels: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/lens.html`, + lensPanels: `${KIBANA_DOCS}lens.html`, maps: `${ELASTIC_WEBSITE_URL}maps`, - vega: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/vega.html`, + vega: `${KIBANA_DOCS}vega.html`, }, observability: { guide: `${ELASTIC_WEBSITE_URL}guide/en/observability/${DOC_LINK_VERSION}/index.html`, }, alerting: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alert-management.html`, - actionTypes: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/action-types.html`, - emailAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/email-action-type.html`, - emailActionConfig: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/email-action-type.html`, - generalSettings: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alert-action-settings-kb.html#general-alert-action-settings`, - indexAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-action-type.html`, - esQuery: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/rule-type-es-query.html`, - indexThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/rule-type-index-threshold.html`, - pagerDutyAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/pagerduty-action-type.html`, - preconfiguredConnectors: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/pre-configured-connectors.html`, - preconfiguredAlertHistoryConnector: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/index-action-type.html#preconfigured-connector-alert-history`, - serviceNowAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/servicenow-action-type.html#configuring-servicenow`, - setupPrerequisites: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alerting-getting-started.html#alerting-setup-prerequisites`, - slackAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/slack-action-type.html#configuring-slack`, - teamsAction: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/teams-action-type.html#configuring-teams`, + guide: `${KIBANA_DOCS}alert-management.html`, + actionTypes: `${KIBANA_DOCS}action-types.html`, + emailAction: `${KIBANA_DOCS}email-action-type.html`, + emailActionConfig: `${KIBANA_DOCS}email-action-type.html`, + generalSettings: `${KIBANA_DOCS}alert-action-settings-kb.html#general-alert-action-settings`, + indexAction: `${KIBANA_DOCS}index-action-type.html`, + esQuery: `${KIBANA_DOCS}rule-type-es-query.html`, + indexThreshold: `${KIBANA_DOCS}rule-type-index-threshold.html`, + pagerDutyAction: `${KIBANA_DOCS}pagerduty-action-type.html`, + preconfiguredConnectors: `${KIBANA_DOCS}pre-configured-connectors.html`, + preconfiguredAlertHistoryConnector: `${KIBANA_DOCS}index-action-type.html#preconfigured-connector-alert-history`, + serviceNowAction: `${KIBANA_DOCS}servicenow-action-type.html#configuring-servicenow`, + setupPrerequisites: `${KIBANA_DOCS}alerting-getting-started.html#alerting-setup-prerequisites`, + slackAction: `${KIBANA_DOCS}slack-action-type.html#configuring-slack`, + teamsAction: `${KIBANA_DOCS}teams-action-type.html#configuring-teams`, }, maps: { - guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/maps.html`, - importGeospatialPrivileges: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/import-geospatial-data.html#import-geospatial-privileges`, + guide: `${KIBANA_DOCS}maps.html`, + importGeospatialPrivileges: `${KIBANA_DOCS}import-geospatial-data.html#import-geospatial-privileges`, }, monitoring: { - alertsKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html`, - alertsKibanaCpuThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-cpu-threshold`, - alertsKibanaDiskThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-disk-usage-threshold`, - alertsKibanaJvmThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-jvm-memory-threshold`, - alertsKibanaMissingData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-missing-monitoring-data`, - alertsKibanaThreadpoolRejections: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-thread-pool-rejections`, - alertsKibanaCCRReadExceptions: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-ccr-read-exceptions`, - alertsKibanaLargeShardSize: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-large-shard-size`, - alertsKibanaClusterAlerts: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-cluster-alerts`, + alertsKibana: `${KIBANA_DOCS}kibana-alerts.html`, + alertsKibanaCpuThreshold: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-cpu-threshold`, + alertsKibanaDiskThreshold: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-disk-usage-threshold`, + alertsKibanaJvmThreshold: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-jvm-memory-threshold`, + alertsKibanaMissingData: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-missing-monitoring-data`, + alertsKibanaThreadpoolRejections: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-thread-pool-rejections`, + alertsKibanaCCRReadExceptions: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-ccr-read-exceptions`, + alertsKibanaLargeShardSize: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-large-shard-size`, + alertsKibanaClusterAlerts: `${KIBANA_DOCS}kibana-alerts.html#kibana-alerts-cluster-alerts`, metricbeatBlog: `${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`, monitorElasticsearch: `${ELASTICSEARCH_DOCS}configuring-metricbeat.html`, - monitorKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`, + monitorKibana: `${KIBANA_DOCS}monitoring-metricbeat.html`, monitorLogstash: `${ELASTIC_WEBSITE_URL}guide/en/logstash/${DOC_LINK_VERSION}/monitoring-with-metricbeat.html`, - troubleshootKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitor-troubleshooting.html`, + troubleshootKibana: `${KIBANA_DOCS}monitor-troubleshooting.html`, }, security: { apiKeyServiceSettings: `${ELASTICSEARCH_DOCS}security-settings.html#api-key-service-settings`, @@ -295,8 +295,8 @@ export class DocLinksService { elasticsearchSettings: `${ELASTICSEARCH_DOCS}security-settings.html`, elasticsearchEnableSecurity: `${ELASTICSEARCH_DOCS}configuring-stack-security.html`, indicesPrivileges: `${ELASTICSEARCH_DOCS}security-privileges.html#privileges-list-indices`, - kibanaTLS: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/configuring-tls.html`, - kibanaPrivileges: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-privileges.html`, + kibanaTLS: `${KIBANA_DOCS}configuring-tls.html`, + kibanaPrivileges: `${KIBANA_DOCS}kibana-privileges.html`, mappingRoles: `${ELASTICSEARCH_DOCS}mapping-roles.html`, mappingRolesFieldRules: `${ELASTICSEARCH_DOCS}role-mapping-resources.html#mapping-roles-rule-field`, runAsPrivilege: `${ELASTICSEARCH_DOCS}security-privileges.html#_run_as_privilege`, @@ -305,7 +305,7 @@ export class DocLinksService { jiraAction: `${ELASTICSEARCH_DOCS}actions-jira.html`, pagerDutyAction: `${ELASTICSEARCH_DOCS}actions-pagerduty.html`, slackAction: `${ELASTICSEARCH_DOCS}actions-slack.html`, - ui: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/watcher-ui.html`, + ui: `${KIBANA_DOCS}watcher-ui.html`, }, ccs: { guide: `${ELASTICSEARCH_DOCS}modules-cross-cluster-search.html`, diff --git a/src/core/public/index.ts b/src/core/public/index.ts index 24b48683cdd93..32737ff427ef3 100644 --- a/src/core/public/index.ts +++ b/src/core/public/index.ts @@ -91,6 +91,7 @@ export type { AppLeaveConfirmAction, AppUpdatableFields, AppUpdater, + AppNavOptions, AppDeepLink, PublicAppInfo, PublicAppDeepLinkInfo, diff --git a/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap b/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap index 0d10ac47d0b75..f5a1c51ccbe15 100644 --- a/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap +++ b/src/core/public/overlays/flyout/__snapshots__/flyout_service.test.tsx.snap @@ -26,7 +26,7 @@ Array [ ] `; -exports[`FlyoutService openFlyout() renders a flyout to the DOM 2`] = `"
Flyout content
"`; +exports[`FlyoutService openFlyout() renders a flyout to the DOM 2`] = `"
Flyout content
"`; exports[`FlyoutService openFlyout() with a currently active flyout replaces the current flyout with a new one 1`] = ` Array [ @@ -59,4 +59,4 @@ Array [ ] `; -exports[`FlyoutService openFlyout() with a currently active flyout replaces the current flyout with a new one 2`] = `"
Flyout content 2
"`; +exports[`FlyoutService openFlyout() with a currently active flyout replaces the current flyout with a new one 2`] = `"
Flyout content 2
"`; diff --git a/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap b/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap index 19ebb5a9113c3..9c39776fcea5c 100644 --- a/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap +++ b/src/core/public/overlays/modal/__snapshots__/modal_service.test.tsx.snap @@ -29,7 +29,7 @@ Array [ ] `; -exports[`ModalService openConfirm() renders a mountpoint confirm message 2`] = `"
Modal content
"`; +exports[`ModalService openConfirm() renders a mountpoint confirm message 2`] = `"
Modal content
"`; exports[`ModalService openConfirm() renders a string confirm message 1`] = ` Array [ @@ -49,7 +49,7 @@ Array [ ] `; -exports[`ModalService openConfirm() renders a string confirm message 2`] = `"

Some message

"`; +exports[`ModalService openConfirm() renders a string confirm message 2`] = `"

Some message

"`; exports[`ModalService openConfirm() with a currently active confirm replaces the current confirm with the new one 1`] = ` Array [ @@ -131,7 +131,7 @@ Array [ ] `; -exports[`ModalService openModal() renders a modal to the DOM 2`] = `"
Modal content
"`; +exports[`ModalService openModal() renders a modal to the DOM 2`] = `"
Modal content
"`; exports[`ModalService openModal() with a currently active confirm replaces the current confirm with the new one 1`] = ` Array [ diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 667863d29623e..235110aeb4633 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -53,24 +53,21 @@ import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/type export function __kbnBootstrap__(): Promise; // @public (undocumented) -export interface App { +export interface App extends AppNavOptions { appRoute?: string; capabilities?: Partial; category?: AppCategory; chromeless?: boolean; deepLinks?: AppDeepLink[]; defaultPath?: string; - euiIconType?: string; exactRoute?: boolean; - icon?: string; id: string; keywords?: string[]; mount: AppMount; navLinkStatus?: AppNavLinkStatus; - order?: number; + searchable?: boolean; status?: AppStatus; title: string; - tooltip?: string; updater$?: Observable; } @@ -92,7 +89,8 @@ export type AppDeepLink = { title: string; keywords?: string[]; navLinkStatus?: AppNavLinkStatus; -} & ({ + searchable?: boolean; +} & AppNavOptions & ({ path: string; deepLinks?: AppDeepLink[]; } | { @@ -179,6 +177,14 @@ export enum AppNavLinkStatus { visible = 1 } +// @public +export interface AppNavOptions { + euiIconType?: string; + icon?: string; + order?: number; + tooltip?: string; +} + // @public export enum AppStatus { accessible = 0, @@ -189,7 +195,7 @@ export enum AppStatus { export type AppUnmount = () => void; // @public -export type AppUpdatableFields = Pick; +export type AppUpdatableFields = Pick; // @public export type AppUpdater = (app: App) => Partial | undefined; @@ -314,8 +320,7 @@ export interface ChromeNavLink { readonly order?: number; readonly title: string; readonly tooltip?: string; - // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "AppBase" - readonly url?: string; + readonly url: string; } // @public @@ -916,10 +921,9 @@ export interface IUiSettingsClient { // @public export type MountPoint = (element: T) => UnmountCallback; -// Warning: (ae-missing-release-tag) "NavigateToAppOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export interface NavigateToAppOptions { + deepLinkId?: string; openInNewTab?: boolean; path?: string; replace?: boolean; @@ -1067,19 +1071,21 @@ export interface PluginInitializerContext export type PluginOpaqueId = symbol; // @public -export type PublicAppDeepLinkInfo = Omit & { +export type PublicAppDeepLinkInfo = Omit & { deepLinks: PublicAppDeepLinkInfo[]; keywords: string[]; navLinkStatus: AppNavLinkStatus; + searchable: boolean; }; // @public -export type PublicAppInfo = Omit & { +export type PublicAppInfo = Omit & { status: AppStatus; navLinkStatus: AppNavLinkStatus; appRoute: string; keywords: string[]; deepLinks: PublicAppDeepLinkInfo[]; + searchable: boolean; }; // @public @@ -1249,7 +1255,7 @@ export interface SavedObjectsCreateOptions { // @public (undocumented) export interface SavedObjectsFindOptions { // @alpha - aggs?: Record; + aggs?: Record; defaultSearchOperator?: 'AND' | 'OR'; fields?: string[]; // Warning: (ae-forgotten-export) The symbol "KueryNode" needs to be exported by the entry point index.d.ts @@ -1275,7 +1281,7 @@ export interface SavedObjectsFindOptions { // (undocumented) sortField?: string; // (undocumented) - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; // (undocumented) type: string | string[]; typeToNamespacesMap?: Map; diff --git a/src/core/public/styles/_base.scss b/src/core/public/styles/_base.scss index 46f46b469783b..3386fa73f328a 100644 --- a/src/core/public/styles/_base.scss +++ b/src/core/public/styles/_base.scss @@ -28,3 +28,9 @@ .euiBody--collapsibleNavIsDocked .euiBottomBar { margin-left: $euiCollapsibleNavWidth; } + +// Temporary fix for EuiPageHeader with a bottom border but no tabs or padding +// Will fix in EUI -- @cchaos +.euiPageHeader--bottomBorder:not(.euiPageHeader--tabsAtBottom):not([class*='euiPageHeader--padding']) { + padding-bottom: $euiSizeL; +} diff --git a/src/core/server/config/deprecation/core_deprecations.test.ts b/src/core/server/config/deprecation/core_deprecations.test.ts index a8063c317b3c5..06c7116c8bebb 100644 --- a/src/core/server/config/deprecation/core_deprecations.test.ts +++ b/src/core/server/config/deprecation/core_deprecations.test.ts @@ -24,7 +24,7 @@ describe('core deprecations', () => { const { messages } = applyCoreDeprecations(); expect(messages).toMatchInlineSnapshot(` Array [ - "Environment variable CONFIG_PATH is deprecated. It has been replaced with KBN_PATH_CONF pointing to a config folder", + "Environment variable \\"CONFIG_PATH\\" is deprecated. It has been replaced with \\"KBN_PATH_CONF\\" pointing to a config folder", ] `); }); @@ -405,7 +405,7 @@ describe('core deprecations', () => { }); expect(messages).toMatchInlineSnapshot(` Array [ - "\\"logging.events.log\\" has been deprecated and will be removed in 8.0. Moving forward, log levels can be customized on a per-logger basis using the new logging configuration. ", + "\\"logging.events.log\\" has been deprecated and will be removed in 8.0. Moving forward, log levels can be customized on a per-logger basis using the new logging configuration.", ] `); }); @@ -418,7 +418,7 @@ describe('core deprecations', () => { }); expect(messages).toMatchInlineSnapshot(` Array [ - "\\"logging.events.error\\" has been deprecated and will be removed in 8.0. Moving forward, you can use \\"logging.root.level: error\\" in your logging configuration. ", + "\\"logging.events.error\\" has been deprecated and will be removed in 8.0. Moving forward, you can use \\"logging.root.level: error\\" in your logging configuration.", ] `); }); diff --git a/src/core/server/config/deprecation/core_deprecations.ts b/src/core/server/config/deprecation/core_deprecations.ts index 0722bbe0a71ad..222f92321d917 100644 --- a/src/core/server/config/deprecation/core_deprecations.ts +++ b/src/core/server/config/deprecation/core_deprecations.ts @@ -11,7 +11,10 @@ import { ConfigDeprecationProvider, ConfigDeprecation } from '@kbn/config'; const configPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (process.env?.CONFIG_PATH) { addDeprecation({ - message: `Environment variable CONFIG_PATH is deprecated. It has been replaced with KBN_PATH_CONF pointing to a config folder`, + message: `Environment variable "CONFIG_PATH" is deprecated. It has been replaced with "KBN_PATH_CONF" pointing to a config folder`, + correctiveActions: { + manualSteps: ['Use "KBN_PATH_CONF" instead of "CONFIG_PATH" to point to a config folder.'], + }, }); } }; @@ -20,6 +23,11 @@ const dataPathDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati if (process.env?.DATA_PATH) { addDeprecation({ message: `Environment variable "DATA_PATH" will be removed. It has been replaced with kibana.yml setting "path.data"`, + correctiveActions: { + manualSteps: [ + `Set 'path.data' in the config file or CLI flag with the value of the environment variable "DATA_PATH".`, + ], + }, }); } }; @@ -32,6 +40,12 @@ const rewriteBasePathDeprecation: ConfigDeprecation = (settings, fromPath, addDe 'will expect that all requests start with server.basePath rather than expecting you to rewrite ' + 'the requests in your reverse proxy. Set server.rewriteBasePath to false to preserve the ' + 'current behavior and silence this warning.', + correctiveActions: { + manualSteps: [ + `Set 'server.rewriteBasePath' in the config file, CLI flag, or environment variable (in Docker only).`, + `Set to false to preserve the current behavior and silence this warning.`, + ], + }, }); } }; @@ -41,6 +55,11 @@ const rewriteCorsSettings: ConfigDeprecation = (settings, fromPath, addDeprecati if (typeof corsSettings === 'boolean') { addDeprecation({ message: '"server.cors" is deprecated and has been replaced by "server.cors.enabled"', + correctiveActions: { + manualSteps: [ + `Replace "server.cors: ${corsSettings}" with "server.cors.enabled: ${corsSettings}"`, + ], + }, }); return { @@ -72,6 +91,9 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati if (sourceList.find((source) => source.includes(NONCE_STRING))) { addDeprecation({ message: `csp.rules no longer supports the {nonce} syntax. Replacing with 'self' in ${policy}`, + correctiveActions: { + manualSteps: [`Replace {nonce} syntax with 'self' in ${policy}`], + }, }); sourceList = sourceList.filter((source) => !source.includes(NONCE_STRING)); @@ -87,6 +109,9 @@ const cspRulesDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecati ) { addDeprecation({ message: `csp.rules must contain the 'self' source. Automatically adding to ${policy}.`, + correctiveActions: { + manualSteps: [`Add 'self' source to ${policy}.`], + }, }); sourceList.push(SELF_STRING); } @@ -111,6 +136,12 @@ const mapManifestServiceUrlDeprecation: ConfigDeprecation = ( 'of the Elastic Maps Service settings. These settings have moved to the "map.emsTileApiUrl" and ' + '"map.emsFileApiUrl" settings instead. These settings are for development use only and should not be ' + 'modified for use in production environments.', + correctiveActions: { + manualSteps: [ + `Use "map.emsTileApiUrl" and "map.emsFileApiUrl" config instead of "map.manifestServiceUrl".`, + `These settings are for development use only and should not be modified for use in production environments.`, + ], + }, }); } }; @@ -125,12 +156,28 @@ const opsLoggingEventDeprecation: ConfigDeprecation = (settings, fromPath, addDe 'in 8.0. To access ops data moving forward, please enable debug logs for the ' + '"metrics.ops" context in your logging configuration. For more details, see ' + 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx', + correctiveActions: { + manualSteps: [ + `Remove "logging.events.ops" from your kibana settings.`, + `Enable debug logs for the "metrics.ops" context in your logging configuration`, + ], + }, }); } }; const requestLoggingEventDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { if (settings.logging?.events?.request || settings.logging?.events?.response) { + const removeConfigsSteps = []; + + if (settings.logging?.events?.request) { + removeConfigsSteps.push(`Remove "logging.events.request" from your kibana configs.`); + } + + if (settings.logging?.events?.response) { + removeConfigsSteps.push(`Remove "logging.events.response" from your kibana configs.`); + } + addDeprecation({ documentationUrl: 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#loggingevents', @@ -139,6 +186,12 @@ const requestLoggingEventDeprecation: ConfigDeprecation = (settings, fromPath, a 'in 8.0. To access request and/or response data moving forward, please enable debug logs for the ' + '"http.server.response" context in your logging configuration. For more details, see ' + 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx', + correctiveActions: { + manualSteps: [ + ...removeConfigsSteps, + `enable debug logs for the "http.server.response" context in your logging configuration.`, + ], + }, }); } }; @@ -153,6 +206,12 @@ const timezoneLoggingDeprecation: ConfigDeprecation = (settings, fromPath, addDe 'in 8.0. To set the timezone moving forward, please add a timezone date modifier to the log pattern ' + 'in your logging configuration. For more details, see ' + 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx', + correctiveActions: { + manualSteps: [ + `Remove "logging.timezone" from your kibana configs.`, + `To set the timezone add a timezone date modifier to the log pattern in your logging configuration.`, + ], + }, }); } }; @@ -167,6 +226,12 @@ const destLoggingDeprecation: ConfigDeprecation = (settings, fromPath, addDeprec 'in 8.0. To set the destination moving forward, you can use the "console" appender ' + 'in your logging configuration or define a custom one. For more details, see ' + 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx', + correctiveActions: { + manualSteps: [ + `Remove "logging.dest" from your kibana configs.`, + `To set the destination use the "console" appender in your logging configuration or define a custom one.`, + ], + }, }); } }; @@ -179,6 +244,12 @@ const quietLoggingDeprecation: ConfigDeprecation = (settings, fromPath, addDepre message: '"logging.quiet" has been deprecated and will be removed ' + 'in 8.0. Moving forward, you can use "logging.root.level:error" in your logging configuration. ', + correctiveActions: { + manualSteps: [ + `Remove "logging.quiet" from your kibana configs.`, + `Use "logging.root.level:error" in your logging configuration.`, + ], + }, }); } }; @@ -191,6 +262,12 @@ const silentLoggingDeprecation: ConfigDeprecation = (settings, fromPath, addDepr message: '"logging.silent" has been deprecated and will be removed ' + 'in 8.0. Moving forward, you can use "logging.root.level:off" in your logging configuration. ', + correctiveActions: { + manualSteps: [ + `Remove "logging.silent" from your kibana configs.`, + `Use "logging.root.level:off" in your logging configuration.`, + ], + }, }); } }; @@ -203,6 +280,12 @@ const verboseLoggingDeprecation: ConfigDeprecation = (settings, fromPath, addDep message: '"logging.verbose" has been deprecated and will be removed ' + 'in 8.0. Moving forward, you can use "logging.root.level:all" in your logging configuration. ', + correctiveActions: { + manualSteps: [ + `Remove "logging.verbose" from your kibana configs.`, + `Use "logging.root.level:all" in your logging configuration.`, + ], + }, }); } }; @@ -223,6 +306,12 @@ const jsonLoggingDeprecation: ConfigDeprecation = (settings, fromPath, addDeprec 'There is currently no default layout for custom appenders and each one must be declared explicitly. ' + 'For more details, see ' + 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx', + correctiveActions: { + manualSteps: [ + `Remove "logging.json" from your kibana configs.`, + `Configure the "appender.layout" property for every custom appender in your logging configuration.`, + ], + }, }); } }; @@ -237,6 +326,12 @@ const logRotateDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecat 'Moving forward, you can enable log rotation using the "rolling-file" appender for a logger ' + 'in your logging configuration. For more details, see ' + 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#rolling-file-appender', + correctiveActions: { + manualSteps: [ + `Remove "logging.rotate" from your kibana configs.`, + `Enable log rotation using the "rolling-file" appender for a logger in your logging configuration.`, + ], + }, }); } }; @@ -248,7 +343,13 @@ const logEventsLogDeprecation: ConfigDeprecation = (settings, fromPath, addDepre 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#loggingevents', message: '"logging.events.log" has been deprecated and will be removed ' + - 'in 8.0. Moving forward, log levels can be customized on a per-logger basis using the new logging configuration. ', + 'in 8.0. Moving forward, log levels can be customized on a per-logger basis using the new logging configuration.', + correctiveActions: { + manualSteps: [ + `Remove "logging.events.log" from your kibana configs.`, + `Customize log levels can be per-logger using the new logging configuration.`, + ], + }, }); } }; @@ -260,7 +361,13 @@ const logEventsErrorDeprecation: ConfigDeprecation = (settings, fromPath, addDep 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#loggingevents', message: '"logging.events.error" has been deprecated and will be removed ' + - 'in 8.0. Moving forward, you can use "logging.root.level: error" in your logging configuration. ', + 'in 8.0. Moving forward, you can use "logging.root.level: error" in your logging configuration.', + correctiveActions: { + manualSteps: [ + `Remove "logging.events.error" from your kibana configs.`, + `Use "logging.root.level: error" in your logging configuration.`, + ], + }, }); } }; @@ -271,6 +378,9 @@ const logFilterDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecat documentationUrl: 'https://github.com/elastic/kibana/blob/master/src/core/server/logging/README.mdx#loggingfilter', message: '"logging.filter" has been deprecated and will be removed in 8.0.', + correctiveActions: { + manualSteps: [`Remove "logging.filter" from your kibana configs.`], + }, }); } }; diff --git a/src/core/server/deprecations/deprecations_factory.mock.ts b/src/core/server/deprecations/deprecations_factory.mock.ts new file mode 100644 index 0000000000000..91ae4e6fa9af9 --- /dev/null +++ b/src/core/server/deprecations/deprecations_factory.mock.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 type { PublicMethodsOf } from '@kbn/utility-types'; +import type { DeprecationsFactory } from './deprecations_factory'; +type DeprecationsFactoryContract = PublicMethodsOf; + +const createDeprecationsFactoryMock = () => { + const mocked: jest.Mocked = { + getRegistry: jest.fn(), + getDeprecations: jest.fn(), + getAllDeprecations: jest.fn(), + }; + + mocked.getDeprecations.mockResolvedValue([]); + mocked.getAllDeprecations.mockResolvedValue([]); + return mocked as jest.Mocked; +}; + +export const mockDeprecationsFactory = { + create: createDeprecationsFactoryMock, +}; diff --git a/src/core/server/deprecations/deprecations_factory.test.ts b/src/core/server/deprecations/deprecations_factory.test.ts index 469451b0020c0..187f3880f9998 100644 --- a/src/core/server/deprecations/deprecations_factory.test.ts +++ b/src/core/server/deprecations/deprecations_factory.test.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { GetDeprecationsContext } from './types'; +import type { GetDeprecationsContext } from './types'; import { DeprecationsFactory } from './deprecations_factory'; import { loggerMock } from '../logging/logger.mock'; diff --git a/src/core/server/deprecations/deprecations_registry.mock.ts b/src/core/server/deprecations/deprecations_registry.mock.ts new file mode 100644 index 0000000000000..bb178c3935cdc --- /dev/null +++ b/src/core/server/deprecations/deprecations_registry.mock.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { PublicMethodsOf } from '@kbn/utility-types'; +import type { DeprecationsRegistry } from './deprecations_registry'; +import type { GetDeprecationsContext } from './types'; +import { elasticsearchClientMock } from '../elasticsearch/client/mocks'; +import { savedObjectsClientMock } from '../saved_objects/service/saved_objects_client.mock'; +type DeprecationsRegistryContract = PublicMethodsOf; + +const createDeprecationsRegistryMock = () => { + const mocked: jest.Mocked = { + registerDeprecations: jest.fn(), + getDeprecations: jest.fn(), + }; + + return mocked as jest.Mocked; +}; + +const createGetDeprecationsContextMock = () => { + const mocked: jest.Mocked = { + esClient: elasticsearchClientMock.createScopedClusterClient(), + savedObjectsClient: savedObjectsClientMock.create(), + }; + + return mocked; +}; + +export const mockDeprecationsRegistry = { + create: createDeprecationsRegistryMock, + createGetDeprecationsContext: createGetDeprecationsContextMock, +}; diff --git a/src/core/server/deprecations/deprecations_registry.test.ts b/src/core/server/deprecations/deprecations_registry.test.ts index 507677a531861..82b09beaa5123 100644 --- a/src/core/server/deprecations/deprecations_registry.test.ts +++ b/src/core/server/deprecations/deprecations_registry.test.ts @@ -7,7 +7,7 @@ */ /* eslint-disable dot-notation */ -import { RegisterDeprecationsConfig, GetDeprecationsContext } from './types'; +import type { RegisterDeprecationsConfig, GetDeprecationsContext } from './types'; import { DeprecationsRegistry } from './deprecations_registry'; describe('DeprecationsRegistry', () => { diff --git a/src/core/server/deprecations/deprecations_registry.ts b/src/core/server/deprecations/deprecations_registry.ts index f92d807514b82..cc05473923ac8 100644 --- a/src/core/server/deprecations/deprecations_registry.ts +++ b/src/core/server/deprecations/deprecations_registry.ts @@ -6,7 +6,11 @@ * Side Public License, v 1. */ -import { DeprecationsDetails, RegisterDeprecationsConfig, GetDeprecationsContext } from './types'; +import type { + DeprecationsDetails, + RegisterDeprecationsConfig, + GetDeprecationsContext, +} from './types'; export class DeprecationsRegistry { private readonly deprecationContexts: RegisterDeprecationsConfig[] = []; diff --git a/src/core/server/deprecations/deprecations_service.test.ts b/src/core/server/deprecations/deprecations_service.test.ts new file mode 100644 index 0000000000000..d1ed7a83402cb --- /dev/null +++ b/src/core/server/deprecations/deprecations_service.test.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. + */ + +/* eslint-disable dot-notation */ +import { DeprecationsService } from './deprecations_service'; +import { httpServiceMock } from '../http/http_service.mock'; +import { mockRouter } from '../http/router/router.mock'; +import { mockCoreContext } from '../core_context.mock'; +import { mockDeprecationsFactory } from './deprecations_factory.mock'; +import { mockDeprecationsRegistry } from './deprecations_registry.mock'; + +describe('DeprecationsService', () => { + const coreContext = mockCoreContext.create(); + beforeEach(() => jest.clearAllMocks()); + + describe('#setup', () => { + const http = httpServiceMock.createInternalSetupContract(); + const router = mockRouter.create(); + http.createRouter.mockReturnValue(router); + const deprecationsCoreSetupDeps = { http }; + + it('registers routes', () => { + const deprecationsService = new DeprecationsService(coreContext); + deprecationsService.setup(deprecationsCoreSetupDeps); + // Registers correct base api path + expect(http.createRouter).toBeCalledWith('/api/deprecations'); + // registers get route '/' + expect(router.get).toHaveBeenCalledTimes(1); + expect(router.get).toHaveBeenCalledWith({ path: '/', validate: false }, expect.any(Function)); + }); + + it('calls registerConfigDeprecationsInfo', () => { + const deprecationsService = new DeprecationsService(coreContext); + const mockRegisterConfigDeprecationsInfo = jest.fn(); + deprecationsService['registerConfigDeprecationsInfo'] = mockRegisterConfigDeprecationsInfo; + deprecationsService.setup(deprecationsCoreSetupDeps); + expect(mockRegisterConfigDeprecationsInfo).toBeCalledTimes(1); + }); + }); + + describe('#registerConfigDeprecationsInfo', () => { + const deprecationsFactory = mockDeprecationsFactory.create(); + const deprecationsRegistry = mockDeprecationsRegistry.create(); + const getDeprecationsContext = mockDeprecationsRegistry.createGetDeprecationsContext(); + + it('registers config deprecations', () => { + const deprecationsService = new DeprecationsService(coreContext); + coreContext.configService.getHandledDeprecatedConfigs.mockReturnValue([ + [ + 'testDomain', + [ + { + message: 'testMessage', + documentationUrl: 'testDocUrl', + correctiveActions: { + manualSteps: [ + 'Using Kibana user management, change all users using the kibana_user role to the kibana_admin role.', + 'Using Kibana role-mapping management, change all role-mappings which assing the kibana_user role to the kibana_admin role.', + ], + }, + }, + ], + ], + ]); + + deprecationsFactory.getRegistry.mockReturnValue(deprecationsRegistry); + deprecationsService['registerConfigDeprecationsInfo'](deprecationsFactory); + + expect(coreContext.configService.getHandledDeprecatedConfigs).toBeCalledTimes(1); + expect(deprecationsFactory.getRegistry).toBeCalledTimes(1); + expect(deprecationsFactory.getRegistry).toBeCalledWith('testDomain'); + expect(deprecationsRegistry.registerDeprecations).toBeCalledTimes(1); + const configDeprecations = deprecationsRegistry.registerDeprecations.mock.calls[0][0].getDeprecations( + getDeprecationsContext + ); + expect(configDeprecations).toMatchInlineSnapshot(` + Array [ + Object { + "correctiveActions": Object { + "manualSteps": Array [ + "Using Kibana user management, change all users using the kibana_user role to the kibana_admin role.", + "Using Kibana role-mapping management, change all role-mappings which assing the kibana_user role to the kibana_admin role.", + ], + }, + "deprecationType": "config", + "documentationUrl": "testDocUrl", + "level": "critical", + "message": "testMessage", + }, + ] + `); + }); + }); +}); diff --git a/src/core/server/deprecations/deprecations_service.ts b/src/core/server/deprecations/deprecations_service.ts index 8eca1ba5790c5..ede7f859ffd0d 100644 --- a/src/core/server/deprecations/deprecations_service.ts +++ b/src/core/server/deprecations/deprecations_service.ts @@ -11,8 +11,6 @@ import { RegisterDeprecationsConfig } from './types'; import { registerRoutes } from './routes'; import { CoreContext } from '../core_context'; -import { CoreUsageDataSetup } from '../core_usage_data'; -import { InternalElasticsearchServiceSetup } from '../elasticsearch'; import { CoreService } from '../../types'; import { InternalHttpServiceSetup } from '../http'; import { Logger } from '../logging'; @@ -112,15 +110,13 @@ export interface InternalDeprecationsServiceSetup { /** @internal */ export interface DeprecationsSetupDeps { http: InternalHttpServiceSetup; - elasticsearch: InternalElasticsearchServiceSetup; - coreUsageData: CoreUsageDataSetup; } /** @internal */ export class DeprecationsService implements CoreService { private readonly logger: Logger; - constructor(private readonly coreContext: CoreContext) { + constructor(private readonly coreContext: Pick) { this.logger = coreContext.logger.get('deprecations-service'); } @@ -156,8 +152,9 @@ export class DeprecationsService implements CoreService { return { level: 'critical', + deprecationType: 'config', message, - correctiveActions: correctiveActions ?? {}, + correctiveActions, documentationUrl, }; }); diff --git a/src/core/server/deprecations/types.ts b/src/core/server/deprecations/types.ts index 31734b51b46bd..4c4f84f313102 100644 --- a/src/core/server/deprecations/types.ts +++ b/src/core/server/deprecations/types.ts @@ -25,6 +25,16 @@ export interface DeprecationsDetails { * - fetch_error: Deprecations service failed to grab the deprecation details for the domain. */ level: 'warning' | 'critical' | 'fetch_error'; + /** + * (optional) Used to identify between different deprecation types. + * Example use case: in Upgrade Assistant, we may want to allow the user to sort by + * deprecation type or show each type in a separate tab. + * + * Feel free to add new types if necessary. + * Predefined types are necessary to reduce having similar definitions with different keywords + * across kibana deprecations. + */ + deprecationType?: 'config' | 'feature'; /* (optional) link to the documentation for more details on the deprecation. */ documentationUrl?: string; /* corrective action needed to fix this deprecation. */ @@ -45,11 +55,11 @@ export interface DeprecationsDetails { }; }; /** - * (optional) If this deprecation cannot be automtically fixed - * via an API corrective action. Specify a list of manual steps - * users need to follow to fix the deprecation before upgrade. + * Specify a list of manual steps users need to follow to + * fix the deprecation before upgrade. Required even if an API + * corrective action is set in case the API fails. */ - manualSteps?: string[]; + manualSteps: string[]; }; } diff --git a/src/core/server/elasticsearch/elasticsearch_config.ts b/src/core/server/elasticsearch/elasticsearch_config.ts index b5ea0ec8c3456..b2b25cda3ac2a 100644 --- a/src/core/server/elasticsearch/elasticsearch_config.ts +++ b/src/core/server/elasticsearch/elasticsearch_config.ts @@ -152,23 +152,45 @@ const deprecations: ConfigDeprecationProvider = () => [ if (es.username === 'elastic') { addDeprecation({ message: `Setting [${fromPath}.username] to "elastic" is deprecated. You should use the "kibana_system" user instead.`, + correctiveActions: { + manualSteps: [`Replace [${fromPath}.username] from "elastic" to "kibana_system".`], + }, }); } else if (es.username === 'kibana') { addDeprecation({ message: `Setting [${fromPath}.username] to "kibana" is deprecated. You should use the "kibana_system" user instead.`, + correctiveActions: { + manualSteps: [`Replace [${fromPath}.username] from "kibana" to "kibana_system".`], + }, }); } if (es.ssl?.key !== undefined && es.ssl?.certificate === undefined) { addDeprecation({ message: `Setting [${fromPath}.ssl.key] without [${fromPath}.ssl.certificate] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`, + correctiveActions: { + manualSteps: [ + `Set [${fromPath}.ssl.certificate] in your kibana configs to enable TLS client authentication to Elasticsearch.`, + ], + }, }); } else if (es.ssl?.certificate !== undefined && es.ssl?.key === undefined) { addDeprecation({ message: `Setting [${fromPath}.ssl.certificate] without [${fromPath}.ssl.key] is deprecated. This has no effect, you should use both settings to enable TLS client authentication to Elasticsearch.`, + correctiveActions: { + manualSteps: [ + `Set [${fromPath}.ssl.key] in your kibana configs to enable TLS client authentication to Elasticsearch.`, + ], + }, }); } else if (es.logQueries === true) { addDeprecation({ message: `Setting [${fromPath}.logQueries] is deprecated and no longer used. You should set the log level to "debug" for the "elasticsearch.queries" context in "logging.loggers" or use "logging.verbose: true".`, + correctiveActions: { + manualSteps: [ + `Remove Setting [${fromPath}.logQueries] from your kibana configs`, + `Set the log level to "debug" for the "elasticsearch.queries" context in "logging.loggers".`, + ], + }, }); } return; diff --git a/src/core/server/elasticsearch/version_check/ensure_es_version.ts b/src/core/server/elasticsearch/version_check/ensure_es_version.ts index 43cd52f1b5721..e1f18f8ad836a 100644 --- a/src/core/server/elasticsearch/version_check/ensure_es_version.ts +++ b/src/core/server/elasticsearch/version_check/ensure_es_version.ts @@ -31,7 +31,7 @@ export interface PollEsNodesVersionOptions { interface NodeInfo { version: string; ip: string; - http: { + http?: { publish_address: string; }; name: string; diff --git a/src/core/server/http/integration_tests/core_services.test.ts b/src/core/server/http/integration_tests/core_services.test.ts index 5433f0d3c3e31..99b63fc73687a 100644 --- a/src/core/server/http/integration_tests/core_services.test.ts +++ b/src/core/server/http/integration_tests/core_services.test.ts @@ -405,7 +405,7 @@ describe('http service', () => { const { body } = await kbnTestServer.request.get(root, '/new-platform/').expect(400); - expect(body.message).toEqual('[error_type]: error_reason'); + expect(body.message).toMatch('[error_type]: error_reason'); }); }); }); diff --git a/src/core/server/index.ts b/src/core/server/index.ts index 2e495657d3410..ef1ee69ff529b 100644 --- a/src/core/server/index.ts +++ b/src/core/server/index.ts @@ -339,8 +339,6 @@ export type { SavedObjectsDeleteByNamespaceOptions, SavedObjectsIncrementCounterOptions, SavedObjectsIncrementCounterField, - SavedObjectsComplexFieldMapping, - SavedObjectsCoreFieldMapping, SavedObjectsFieldMapping, SavedObjectsTypeMappingDefinition, SavedObjectsMappingProperties, diff --git a/src/core/server/kibana_config.test.ts b/src/core/server/kibana_config.test.ts index 47bb6cf2a064c..72ddb3b65081b 100644 --- a/src/core/server/kibana_config.test.ts +++ b/src/core/server/kibana_config.test.ts @@ -22,8 +22,6 @@ it('set correct defaults ', () => { const configValue = config.schema.validate({}); expect(configValue).toMatchInlineSnapshot(` Object { - "autocompleteTerminateAfter": "PT1M40S", - "autocompleteTimeout": "PT1S", "enabled": true, "index": ".kibana", } diff --git a/src/core/server/kibana_config.ts b/src/core/server/kibana_config.ts index 848c51dcb69f3..77ee3197b988d 100644 --- a/src/core/server/kibana_config.ts +++ b/src/core/server/kibana_config.ts @@ -18,6 +18,12 @@ const deprecations: ConfigDeprecationProvider = () => [ addDeprecation({ message: `"kibana.index" is deprecated. Multitenancy by changing "kibana.index" will not be supported starting in 8.0. See https://ela.st/kbn-remove-legacy-multitenancy for more details`, documentationUrl: 'https://ela.st/kbn-remove-legacy-multitenancy', + correctiveActions: { + manualSteps: [ + `If you rely on this setting to achieve multitenancy you should use Spaces, cross-cluster replication, or cross-cluster search instead.`, + `To migrate to Spaces, we encourage using saved object management to export your saved objects from a tenant into the default tenant in a space.`, + ], + }, }); } return settings; @@ -29,12 +35,6 @@ export const config = { schema: schema.object({ enabled: schema.boolean({ defaultValue: true }), index: schema.string({ defaultValue: '.kibana' }), - autocompleteTerminateAfter: schema.duration({ defaultValue: 100000 }), - autocompleteTimeout: schema.duration({ defaultValue: 1000 }), }), deprecations, - exposeToUsage: { - autocompleteTerminateAfter: true, - autocompleteTimeout: true, - }, }; diff --git a/src/core/server/mocks.ts b/src/core/server/mocks.ts index 6f1b9dc5bf820..0d52ff64499c1 100644 --- a/src/core/server/mocks.ts +++ b/src/core/server/mocks.ts @@ -58,8 +58,6 @@ export function pluginInitializerContextConfigMock(config: T) { const globalConfig: SharedGlobalConfig = { kibana: { index: '.kibana-tests', - autocompleteTerminateAfter: duration(100000), - autocompleteTimeout: duration(1000), }, elasticsearch: { shardTimeout: duration('30s'), diff --git a/src/core/server/plugins/legacy_config.test.ts b/src/core/server/plugins/legacy_config.test.ts index 0ea26f2e0333e..2a980e38a4e19 100644 --- a/src/core/server/plugins/legacy_config.test.ts +++ b/src/core/server/plugins/legacy_config.test.ts @@ -43,8 +43,6 @@ describe('Legacy config', () => { expect(legacyConfig).toStrictEqual({ kibana: { index: '.kibana', - autocompleteTerminateAfter: duration(100000), - autocompleteTimeout: duration(1000), }, elasticsearch: { shardTimeout: duration(30, 's'), @@ -66,8 +64,6 @@ describe('Legacy config', () => { expect(legacyConfig).toStrictEqual({ kibana: { index: '.kibana', - autocompleteTerminateAfter: duration(100000), - autocompleteTimeout: duration(1000), }, elasticsearch: { shardTimeout: duration(30, 's'), diff --git a/src/core/server/plugins/plugin_context.test.ts b/src/core/server/plugins/plugin_context.test.ts index e37d985d42321..4ba34ccb2149f 100644 --- a/src/core/server/plugins/plugin_context.test.ts +++ b/src/core/server/plugins/plugin_context.test.ts @@ -115,8 +115,6 @@ describe('createPluginInitializerContext', () => { expect(configObject).toStrictEqual({ kibana: { index: '.kibana', - autocompleteTerminateAfter: duration(100000), - autocompleteTimeout: duration(1000), }, elasticsearch: { shardTimeout: duration(30, 's'), diff --git a/src/core/server/plugins/types.ts b/src/core/server/plugins/types.ts index 2b5acd8ed5e94..6b50b5e820665 100644 --- a/src/core/server/plugins/types.ts +++ b/src/core/server/plugins/types.ts @@ -313,7 +313,7 @@ export interface AsyncPlugin< export const SharedGlobalConfigKeys = { // We can add more if really needed - kibana: ['index', 'autocompleteTerminateAfter', 'autocompleteTimeout'] as const, + kibana: ['index'] as const, elasticsearch: ['shardTimeout', 'requestTimeout', 'pingTimeout'] as const, path: ['data'] as const, savedObjects: ['maxImportPayloadBytes'] as const, diff --git a/src/core/server/saved_objects/export/collect_exported_objects.test.mocks.ts b/src/core/server/saved_objects/export/collect_exported_objects.test.mocks.ts new file mode 100644 index 0000000000000..1f61788e55650 --- /dev/null +++ b/src/core/server/saved_objects/export/collect_exported_objects.test.mocks.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const applyExportTransformsMock = jest.fn(); +jest.doMock('./apply_export_transforms', () => ({ + applyExportTransforms: applyExportTransformsMock, +})); diff --git a/src/core/server/saved_objects/export/collect_exported_objects.test.ts b/src/core/server/saved_objects/export/collect_exported_objects.test.ts new file mode 100644 index 0000000000000..0929ff0d40910 --- /dev/null +++ b/src/core/server/saved_objects/export/collect_exported_objects.test.ts @@ -0,0 +1,528 @@ +/* + * Copyright 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 { applyExportTransformsMock } from './collect_exported_objects.test.mocks'; +import { savedObjectsClientMock } from '../../mocks'; +import { httpServerMock } from '../../http/http_server.mocks'; +import { SavedObject, SavedObjectError } from '../../../types'; +import type { SavedObjectsExportTransform } from './types'; +import { collectExportedObjects } from './collect_exported_objects'; + +const createObject = (parts: Partial): SavedObject => ({ + id: 'id', + type: 'type', + references: [], + attributes: {}, + ...parts, +}); + +const createError = (parts: Partial = {}): SavedObjectError => ({ + error: 'error', + message: 'message', + statusCode: 404, + ...parts, +}); + +const toIdTuple = (obj: SavedObject) => ({ type: obj.type, id: obj.id }); + +describe('collectExportedObjects', () => { + let savedObjectsClient: ReturnType; + let request: ReturnType; + + beforeEach(() => { + savedObjectsClient = savedObjectsClientMock.create(); + request = httpServerMock.createKibanaRequest(); + applyExportTransformsMock.mockImplementation(({ objects }) => objects); + savedObjectsClient.bulkGet.mockResolvedValue({ saved_objects: [] }); + }); + + afterEach(() => { + applyExportTransformsMock.mockReset(); + savedObjectsClient.bulkGet.mockReset(); + }); + + describe('when `includeReferences` is `true`', () => { + it('calls `applyExportTransforms` with the correct parameters', async () => { + const obj1 = createObject({ + type: 'foo', + id: '1', + }); + const obj2 = createObject({ + type: 'foo', + id: '2', + }); + + const fooTransform: SavedObjectsExportTransform = jest.fn(); + + await collectExportedObjects({ + objects: [obj1, obj2], + savedObjectsClient, + request, + exportTransforms: { foo: fooTransform }, + includeReferences: true, + }); + + expect(applyExportTransformsMock).toHaveBeenCalledTimes(1); + expect(applyExportTransformsMock).toHaveBeenCalledWith({ + objects: [obj1, obj2], + transforms: { foo: fooTransform }, + request, + }); + }); + + it('returns the collected objects', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'bar', + id: '2', + name: 'bar-2', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + }); + const dolly3 = createObject({ + type: 'dolly', + id: '3', + }); + + applyExportTransformsMock.mockImplementationOnce(({ objects }) => [...objects, dolly3]); + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [bar2], + }); + + const { objects, missingRefs } = await collectExportedObjects({ + objects: [foo1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(missingRefs).toHaveLength(0); + expect(objects.map(toIdTuple)).toEqual([foo1, dolly3, bar2].map(toIdTuple)); + }); + + it('returns the missing references', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'bar', + id: '2', + name: 'bar-2', + }, + { + type: 'missing', + id: '1', + name: 'missing-1', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + references: [ + { + type: 'missing', + id: '2', + name: 'missing-2', + }, + ], + }); + const missing1 = createObject({ + type: 'missing', + id: '1', + error: createError(), + }); + const missing2 = createObject({ + type: 'missing', + id: '2', + error: createError(), + }); + + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [bar2, missing1], + }); + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [missing2], + }); + + const { objects, missingRefs } = await collectExportedObjects({ + objects: [foo1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(missingRefs).toEqual([missing1, missing2].map(toIdTuple)); + expect(objects.map(toIdTuple)).toEqual([foo1, bar2].map(toIdTuple)); + }); + + it('does not call `client.bulkGet` when no objects have references', async () => { + const obj1 = createObject({ + type: 'foo', + id: '1', + }); + const obj2 = createObject({ + type: 'foo', + id: '2', + }); + + const { objects, missingRefs } = await collectExportedObjects({ + objects: [obj1, obj2], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(missingRefs).toHaveLength(0); + expect(objects.map(toIdTuple)).toEqual([ + { + type: 'foo', + id: '1', + }, + { + type: 'foo', + id: '2', + }, + ]); + + expect(savedObjectsClient.bulkGet).not.toHaveBeenCalled(); + }); + + it('calls `applyExportTransforms` for each iteration', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'bar', + id: '2', + name: 'bar-2', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + }); + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [bar2], + }); + + await collectExportedObjects({ + objects: [foo1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(savedObjectsClient.bulkGet).toHaveBeenCalledTimes(1); + expect(savedObjectsClient.bulkGet).toHaveBeenCalledWith( + [toIdTuple(bar2)], + expect.any(Object) + ); + + expect(applyExportTransformsMock).toHaveBeenCalledTimes(2); + expect(applyExportTransformsMock).toHaveBeenCalledWith({ + objects: [foo1], + transforms: {}, + request, + }); + expect(applyExportTransformsMock).toHaveBeenCalledWith({ + objects: [bar2], + transforms: {}, + request, + }); + }); + + it('ignores references that are already included in the export', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'bar', + id: '2', + name: 'bar-2', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + references: [ + { + type: 'foo', + id: '1', + name: 'foo-1', + }, + { + type: 'dolly', + id: '3', + name: 'dolly-3', + }, + ], + }); + const dolly3 = createObject({ + type: 'dolly', + id: '3', + references: [ + { + type: 'foo', + id: '1', + name: 'foo-1', + }, + ], + }); + + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [bar2], + }); + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [foo1, dolly3], + }); + + const { objects } = await collectExportedObjects({ + objects: [foo1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(savedObjectsClient.bulkGet).toHaveBeenCalledTimes(2); + expect(savedObjectsClient.bulkGet).toHaveBeenNthCalledWith( + 1, + [toIdTuple(bar2)], + expect.any(Object) + ); + expect(savedObjectsClient.bulkGet).toHaveBeenNthCalledWith( + 2, + [toIdTuple(dolly3)], + expect.any(Object) + ); + + expect(objects.map(toIdTuple)).toEqual([foo1, bar2, dolly3].map(toIdTuple)); + }); + + it('does not fetch duplicates of references', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'dolly', + id: '3', + name: 'dolly-3', + }, + { + type: 'baz', + id: '4', + name: 'baz-4', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + references: [ + { + type: 'dolly', + id: '3', + name: 'dolly-3', + }, + ], + }); + const dolly3 = createObject({ + type: 'dolly', + id: '3', + }); + const baz4 = createObject({ + type: 'baz', + id: '4', + }); + + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [dolly3, baz4], + }); + + await collectExportedObjects({ + objects: [foo1, bar2], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(savedObjectsClient.bulkGet).toHaveBeenCalledTimes(1); + expect(savedObjectsClient.bulkGet).toHaveBeenCalledWith( + [dolly3, baz4].map(toIdTuple), + expect.any(Object) + ); + }); + + it('fetch references for additional objects returned by the export transform', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'baz', + id: '4', + name: 'baz-4', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + references: [ + { + type: 'dolly', + id: '3', + name: 'dolly-3', + }, + ], + }); + + applyExportTransformsMock.mockImplementationOnce(({ objects }) => [...objects, bar2]); + + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [], + }); + + await collectExportedObjects({ + objects: [foo1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(savedObjectsClient.bulkGet).toHaveBeenCalledTimes(1); + expect(savedObjectsClient.bulkGet).toHaveBeenCalledWith( + [ + { type: 'baz', id: '4' }, + { type: 'dolly', id: '3' }, + ], + expect.any(Object) + ); + }); + + it('fetch references for additional objects returned by the export transform of nested references', async () => { + const foo1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + type: 'bar', + id: '2', + name: 'bar-2', + }, + ], + }); + const bar2 = createObject({ + type: 'bar', + id: '2', + references: [], + }); + const dolly3 = createObject({ + type: 'dolly', + id: '3', + references: [ + { + type: 'baz', + id: '4', + name: 'baz-4', + }, + ], + }); + const baz4 = createObject({ + type: 'baz', + id: '4', + }); + + // first call for foo-1 + applyExportTransformsMock.mockImplementationOnce(({ objects }) => [...objects]); + // second call for bar-2 + applyExportTransformsMock.mockImplementationOnce(({ objects }) => [...objects, dolly3]); + + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [bar2], + }); + savedObjectsClient.bulkGet.mockResolvedValueOnce({ + saved_objects: [baz4], + }); + + await collectExportedObjects({ + objects: [foo1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: true, + }); + + expect(savedObjectsClient.bulkGet).toHaveBeenCalledTimes(2); + expect(savedObjectsClient.bulkGet).toHaveBeenNthCalledWith( + 1, + [toIdTuple(bar2)], + expect.any(Object) + ); + expect(savedObjectsClient.bulkGet).toHaveBeenNthCalledWith( + 2, + [toIdTuple(baz4)], + expect.any(Object) + ); + }); + }); + + describe('when `includeReferences` is `false`', () => { + it('does not fetch the object references', async () => { + const obj1 = createObject({ + type: 'foo', + id: '1', + references: [ + { + id: '2', + type: 'bar', + name: 'bar-2', + }, + ], + }); + + const { objects, missingRefs } = await collectExportedObjects({ + objects: [obj1], + savedObjectsClient, + request, + exportTransforms: {}, + includeReferences: false, + }); + + expect(missingRefs).toHaveLength(0); + expect(objects.map(toIdTuple)).toEqual([ + { + type: 'foo', + id: '1', + }, + ]); + + expect(savedObjectsClient.bulkGet).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/src/core/server/saved_objects/export/collect_exported_objects.ts b/src/core/server/saved_objects/export/collect_exported_objects.ts new file mode 100644 index 0000000000000..d45782a83c284 --- /dev/null +++ b/src/core/server/saved_objects/export/collect_exported_objects.ts @@ -0,0 +1,128 @@ +/* + * Copyright 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 { SavedObject } from '../../../types'; +import type { KibanaRequest } from '../../http'; +import { SavedObjectsClientContract } from '../types'; +import type { SavedObjectsExportTransform } from './types'; +import { applyExportTransforms } from './apply_export_transforms'; + +interface CollectExportedObjectOptions { + savedObjectsClient: SavedObjectsClientContract; + objects: SavedObject[]; + /** flag to also include all related saved objects in the export stream. */ + includeReferences?: boolean; + /** optional namespace to override the namespace used by the savedObjectsClient. */ + namespace?: string; + /** The http request initiating the export. */ + request: KibanaRequest; + /** export transform per type */ + exportTransforms: Record; +} + +interface CollectExportedObjectResult { + objects: SavedObject[]; + missingRefs: CollectedReference[]; +} + +export const collectExportedObjects = async ({ + objects, + includeReferences = true, + namespace, + request, + exportTransforms, + savedObjectsClient, +}: CollectExportedObjectOptions): Promise => { + const collectedObjects: SavedObject[] = []; + const collectedMissingRefs: CollectedReference[] = []; + const alreadyProcessed: Set = new Set(); + + let currentObjects = objects; + do { + const transformed = ( + await applyExportTransforms({ + request, + objects: currentObjects, + transforms: exportTransforms, + }) + ).filter((object) => !alreadyProcessed.has(objKey(object))); + + transformed.forEach((obj) => alreadyProcessed.add(objKey(obj))); + collectedObjects.push(...transformed); + + if (includeReferences) { + const references = collectReferences(transformed, alreadyProcessed); + if (references.length) { + const { objects: fetchedObjects, missingRefs } = await fetchReferences({ + references, + namespace, + client: savedObjectsClient, + }); + collectedMissingRefs.push(...missingRefs); + currentObjects = fetchedObjects; + } else { + currentObjects = []; + } + } else { + currentObjects = []; + } + } while (includeReferences && currentObjects.length); + + return { + objects: collectedObjects, + missingRefs: collectedMissingRefs, + }; +}; + +const objKey = (obj: { type: string; id: string }) => `${obj.type}:${obj.id}`; + +type ObjectKey = string; + +interface CollectedReference { + id: string; + type: string; +} + +const collectReferences = ( + objects: SavedObject[], + alreadyProcessed: Set +): CollectedReference[] => { + const references: Map = new Map(); + objects.forEach((obj) => { + obj.references?.forEach((ref) => { + const refKey = objKey(ref); + if (!alreadyProcessed.has(refKey)) { + references.set(refKey, { type: ref.type, id: ref.id }); + } + }); + }); + return [...references.values()]; +}; + +interface FetchReferencesResult { + objects: SavedObject[]; + missingRefs: CollectedReference[]; +} + +const fetchReferences = async ({ + references, + client, + namespace, +}: { + references: CollectedReference[]; + client: SavedObjectsClientContract; + namespace?: string; +}): Promise => { + const { saved_objects: savedObjects } = await client.bulkGet(references, { namespace }); + return { + objects: savedObjects.filter((obj) => !obj.error), + missingRefs: savedObjects + .filter((obj) => obj.error) + .map((obj) => ({ type: obj.type, id: obj.id })), + }; +}; diff --git a/src/core/server/saved_objects/export/fetch_nested_dependencies.test.ts b/src/core/server/saved_objects/export/fetch_nested_dependencies.test.ts deleted file mode 100644 index a47c629f9066b..0000000000000 --- a/src/core/server/saved_objects/export/fetch_nested_dependencies.test.ts +++ /dev/null @@ -1,606 +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 { SavedObject } from '../types'; -import { savedObjectsClientMock } from '../../mocks'; -import { getObjectReferencesToFetch, fetchNestedDependencies } from './fetch_nested_dependencies'; -import { SavedObjectsErrorHelpers } from '..'; - -describe('getObjectReferencesToFetch()', () => { - test('works with no saved objects', () => { - const map = new Map(); - const result = getObjectReferencesToFetch(map); - expect(result).toEqual([]); - }); - - test('excludes already fetched objects', () => { - const map = new Map(); - map.set('index-pattern:1', { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [], - }); - map.set('visualization:2', { - id: '2', - type: 'visualization', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }); - const result = getObjectReferencesToFetch(map); - expect(result).toEqual([]); - }); - - test('returns objects that are missing', () => { - const map = new Map(); - map.set('visualization:2', { - id: '2', - type: 'visualization', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }); - const result = getObjectReferencesToFetch(map); - expect(result).toMatchInlineSnapshot(` - Array [ - Object { - "id": "1", - "type": "index-pattern", - }, - ] - `); - }); - - test('does not fail on circular dependencies', () => { - const map = new Map(); - map.set('index-pattern:1', { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'visualization', - id: '2', - }, - ], - }); - map.set('visualization:2', { - id: '2', - type: 'visualization', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }); - const result = getObjectReferencesToFetch(map); - expect(result).toEqual([]); - }); -}); - -describe('injectNestedDependencies', () => { - const savedObjectsClient = savedObjectsClientMock.create(); - - afterEach(() => { - jest.resetAllMocks(); - }); - - test(`doesn't fetch when no dependencies are missing`, async () => { - const savedObjects = [ - { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [], - }, - ]; - const result = await fetchNestedDependencies(savedObjects, savedObjectsClient); - expect(result).toMatchInlineSnapshot(` - Object { - "missingRefs": Array [], - "objects": Array [ - Object { - "attributes": Object {}, - "id": "1", - "references": Array [], - "type": "index-pattern", - }, - ], - } - `); - }); - - test(`doesn't fetch references that are already fetched`, async () => { - const savedObjects = [ - { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [], - }, - { - id: '2', - type: 'search', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }, - ]; - const result = await fetchNestedDependencies(savedObjects, savedObjectsClient); - expect(result).toMatchInlineSnapshot(` - Object { - "missingRefs": Array [], - "objects": Array [ - Object { - "attributes": Object {}, - "id": "1", - "references": Array [], - "type": "index-pattern", - }, - Object { - "attributes": Object {}, - "id": "2", - "references": Array [ - Object { - "id": "1", - "name": "ref_0", - "type": "index-pattern", - }, - ], - "type": "search", - }, - ], - } - `); - }); - - test('fetches dependencies at least one level deep', async () => { - const savedObjects = [ - { - id: '2', - type: 'search', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }, - ]; - savedObjectsClient.bulkGet.mockResolvedValueOnce({ - saved_objects: [ - { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [], - }, - ], - }); - const result = await fetchNestedDependencies(savedObjects, savedObjectsClient); - expect(result).toMatchInlineSnapshot(` - Object { - "missingRefs": Array [], - "objects": Array [ - Object { - "attributes": Object {}, - "id": "2", - "references": Array [ - Object { - "id": "1", - "name": "ref_0", - "type": "index-pattern", - }, - ], - "type": "search", - }, - Object { - "attributes": Object {}, - "id": "1", - "references": Array [], - "type": "index-pattern", - }, - ], - } - `); - expect(savedObjectsClient.bulkGet).toMatchInlineSnapshot(` - [MockFunction] { - "calls": Array [ - Array [ - Array [ - Object { - "id": "1", - "type": "index-pattern", - }, - ], - Object { - "namespace": undefined, - }, - ], - ], - "results": Array [ - Object { - "type": "return", - "value": Promise {}, - }, - ], - } - `); - }); - - test('fetches dependencies multiple levels deep', async () => { - const savedObjects = [ - { - id: '5', - type: 'dashboard', - attributes: {}, - references: [ - { - name: 'panel_0', - type: 'visualization', - id: '4', - }, - { - name: 'panel_1', - type: 'visualization', - id: '3', - }, - ], - }, - ]; - savedObjectsClient.bulkGet.mockResolvedValueOnce({ - saved_objects: [ - { - id: '4', - type: 'visualization', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'search', - id: '2', - }, - ], - }, - { - id: '3', - type: 'visualization', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }, - ], - }); - savedObjectsClient.bulkGet.mockResolvedValueOnce({ - saved_objects: [ - { - id: '2', - type: 'search', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }, - { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [], - }, - ], - }); - const result = await fetchNestedDependencies(savedObjects, savedObjectsClient); - expect(result).toMatchInlineSnapshot(` - Object { - "missingRefs": Array [], - "objects": Array [ - Object { - "attributes": Object {}, - "id": "5", - "references": Array [ - Object { - "id": "4", - "name": "panel_0", - "type": "visualization", - }, - Object { - "id": "3", - "name": "panel_1", - "type": "visualization", - }, - ], - "type": "dashboard", - }, - Object { - "attributes": Object {}, - "id": "4", - "references": Array [ - Object { - "id": "2", - "name": "ref_0", - "type": "search", - }, - ], - "type": "visualization", - }, - Object { - "attributes": Object {}, - "id": "3", - "references": Array [ - Object { - "id": "1", - "name": "ref_0", - "type": "index-pattern", - }, - ], - "type": "visualization", - }, - Object { - "attributes": Object {}, - "id": "2", - "references": Array [ - Object { - "id": "1", - "name": "ref_0", - "type": "index-pattern", - }, - ], - "type": "search", - }, - Object { - "attributes": Object {}, - "id": "1", - "references": Array [], - "type": "index-pattern", - }, - ], - } - `); - expect(savedObjectsClient.bulkGet).toMatchInlineSnapshot(` - [MockFunction] { - "calls": Array [ - Array [ - Array [ - Object { - "id": "4", - "type": "visualization", - }, - Object { - "id": "3", - "type": "visualization", - }, - ], - Object { - "namespace": undefined, - }, - ], - Array [ - Array [ - Object { - "id": "2", - "type": "search", - }, - Object { - "id": "1", - "type": "index-pattern", - }, - ], - Object { - "namespace": undefined, - }, - ], - ], - "results": Array [ - Object { - "type": "return", - "value": Promise {}, - }, - Object { - "type": "return", - "value": Promise {}, - }, - ], - } - `); - }); - - test('returns list of missing references', async () => { - const savedObjects = [ - { - id: '1', - type: 'search', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - { - name: 'ref_1', - type: 'index-pattern', - id: '2', - }, - ], - }, - ]; - savedObjectsClient.bulkGet.mockResolvedValueOnce({ - saved_objects: [ - { - id: '1', - type: 'index-pattern', - error: SavedObjectsErrorHelpers.createGenericNotFoundError('index-pattern', '1').output - .payload, - attributes: {}, - references: [], - }, - { - id: '2', - type: 'index-pattern', - attributes: {}, - references: [], - }, - ], - }); - const result = await fetchNestedDependencies(savedObjects, savedObjectsClient); - expect(result).toMatchInlineSnapshot(` - Object { - "missingRefs": Array [ - Object { - "id": "1", - "type": "index-pattern", - }, - ], - "objects": Array [ - Object { - "attributes": Object {}, - "id": "1", - "references": Array [ - Object { - "id": "1", - "name": "ref_0", - "type": "index-pattern", - }, - Object { - "id": "2", - "name": "ref_1", - "type": "index-pattern", - }, - ], - "type": "search", - }, - Object { - "attributes": Object {}, - "id": "2", - "references": Array [], - "type": "index-pattern", - }, - ], - } - `); - }); - - test('does not fail on circular dependencies', async () => { - const savedObjects = [ - { - id: '2', - type: 'search', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'index-pattern', - id: '1', - }, - ], - }, - ]; - savedObjectsClient.bulkGet.mockResolvedValueOnce({ - saved_objects: [ - { - id: '1', - type: 'index-pattern', - attributes: {}, - references: [ - { - name: 'ref_0', - type: 'search', - id: '2', - }, - ], - }, - ], - }); - const result = await fetchNestedDependencies(savedObjects, savedObjectsClient); - expect(result).toMatchInlineSnapshot(` - Object { - "missingRefs": Array [], - "objects": Array [ - Object { - "attributes": Object {}, - "id": "2", - "references": Array [ - Object { - "id": "1", - "name": "ref_0", - "type": "index-pattern", - }, - ], - "type": "search", - }, - Object { - "attributes": Object {}, - "id": "1", - "references": Array [ - Object { - "id": "2", - "name": "ref_0", - "type": "search", - }, - ], - "type": "index-pattern", - }, - ], - } - `); - expect(savedObjectsClient.bulkGet).toMatchInlineSnapshot(` - [MockFunction] { - "calls": Array [ - Array [ - Array [ - Object { - "id": "1", - "type": "index-pattern", - }, - ], - Object { - "namespace": undefined, - }, - ], - ], - "results": Array [ - Object { - "type": "return", - "value": Promise {}, - }, - ], - } - `); - }); -}); diff --git a/src/core/server/saved_objects/export/fetch_nested_dependencies.ts b/src/core/server/saved_objects/export/fetch_nested_dependencies.ts deleted file mode 100644 index 778c01804b893..0000000000000 --- a/src/core/server/saved_objects/export/fetch_nested_dependencies.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 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 { SavedObject, SavedObjectsClientContract } from '../types'; - -export function getObjectReferencesToFetch(savedObjectsMap: Map) { - const objectsToFetch = new Map(); - for (const savedObject of savedObjectsMap.values()) { - for (const ref of savedObject.references || []) { - if (!savedObjectsMap.has(objKey(ref))) { - objectsToFetch.set(objKey(ref), { type: ref.type, id: ref.id }); - } - } - } - return [...objectsToFetch.values()]; -} - -export async function fetchNestedDependencies( - savedObjects: SavedObject[], - savedObjectsClient: SavedObjectsClientContract, - namespace?: string -) { - const savedObjectsMap = new Map(); - for (const savedObject of savedObjects) { - savedObjectsMap.set(objKey(savedObject), savedObject); - } - let objectsToFetch = getObjectReferencesToFetch(savedObjectsMap); - while (objectsToFetch.length > 0) { - const bulkGetResponse = await savedObjectsClient.bulkGet(objectsToFetch, { namespace }); - // Push to array result - for (const savedObject of bulkGetResponse.saved_objects) { - savedObjectsMap.set(objKey(savedObject), savedObject); - } - objectsToFetch = getObjectReferencesToFetch(savedObjectsMap); - } - const allObjects = [...savedObjectsMap.values()]; - return { - objects: allObjects.filter((obj) => !obj.error), - missingRefs: allObjects - .filter((obj) => !!obj.error) - .map((obj) => ({ type: obj.type, id: obj.id })), - }; -} - -const objKey = (obj: { type: string; id: string }) => `${obj.type}:${obj.id}`; diff --git a/src/core/server/saved_objects/export/saved_objects_exporter.ts b/src/core/server/saved_objects/export/saved_objects_exporter.ts index 8cd6934bf1af9..9d56bb4872a6d 100644 --- a/src/core/server/saved_objects/export/saved_objects_exporter.ts +++ b/src/core/server/saved_objects/export/saved_objects_exporter.ts @@ -12,7 +12,6 @@ import { Logger } from '../../logging'; import { SavedObject, SavedObjectsClientContract } from '../types'; import { SavedObjectsFindResult } from '../service'; import { ISavedObjectTypeRegistry } from '../saved_objects_type_registry'; -import { fetchNestedDependencies } from './fetch_nested_dependencies'; import { sortObjects } from './sort_objects'; import { SavedObjectsExportResultDetails, @@ -22,7 +21,7 @@ import { SavedObjectsExportTransform, } from './types'; import { SavedObjectsExportError } from './errors'; -import { applyExportTransforms } from './apply_export_transforms'; +import { collectExportedObjects } from './collect_exported_objects'; import { byIdAscComparator, getPreservedOrderComparator, SavedObjectComparator } from './utils'; /** @@ -118,28 +117,21 @@ export class SavedObjectsExporter { }: SavedObjectExportBaseOptions ) { this.#log.debug(`Processing [${savedObjects.length}] saved objects.`); - let exportedObjects: Array>; - let missingReferences: SavedObjectsExportResultDetails['missingReferences'] = []; - savedObjects = await applyExportTransforms({ - request, + const { + objects: collectedObjects, + missingRefs: missingReferences, + } = await collectExportedObjects({ objects: savedObjects, - transforms: this.#exportTransforms, - sortFunction, + includeReferences: includeReferencesDeep, + namespace, + request, + exportTransforms: this.#exportTransforms, + savedObjectsClient: this.#savedObjectsClient, }); - if (includeReferencesDeep) { - this.#log.debug(`Fetching saved objects references.`); - const fetchResult = await fetchNestedDependencies( - savedObjects, - this.#savedObjectsClient, - namespace - ); - exportedObjects = sortObjects(fetchResult.objects); - missingReferences = fetchResult.missingRefs; - } else { - exportedObjects = sortObjects(savedObjects); - } + // sort with the provided sort function then with the default export sorting + const exportedObjects = sortObjects(collectedObjects.sort(sortFunction)); // redact attributes that should not be exported const redactedObjects = includeNamespaces diff --git a/src/core/server/saved_objects/index.ts b/src/core/server/saved_objects/index.ts index 2af25e0cdef3f..b1b1584d7de88 100644 --- a/src/core/server/saved_objects/index.ts +++ b/src/core/server/saved_objects/index.ts @@ -72,8 +72,6 @@ export type { } from './service/lib/repository'; export type { - SavedObjectsCoreFieldMapping, - SavedObjectsComplexFieldMapping, SavedObjectsFieldMapping, SavedObjectsMappingProperties, SavedObjectsTypeMappingDefinition, diff --git a/src/core/server/saved_objects/mappings/index.ts b/src/core/server/saved_objects/mappings/index.ts index bf1029e9f3b81..5da185ace79c6 100644 --- a/src/core/server/saved_objects/mappings/index.ts +++ b/src/core/server/saved_objects/mappings/index.ts @@ -8,8 +8,6 @@ export { getTypes, getProperty, getRootProperties, getRootPropertiesObjects } from './lib'; export type { - SavedObjectsComplexFieldMapping, - SavedObjectsCoreFieldMapping, SavedObjectsTypeMappingDefinition, SavedObjectsTypeMappingDefinitions, SavedObjectsMappingProperties, diff --git a/src/core/server/saved_objects/mappings/lib/get_property.test.ts b/src/core/server/saved_objects/mappings/lib/get_property.test.ts index dab712bbb87ad..8732b5e07d3fa 100644 --- a/src/core/server/saved_objects/mappings/lib/get_property.test.ts +++ b/src/core/server/saved_objects/mappings/lib/get_property.test.ts @@ -34,7 +34,7 @@ const MAPPINGS = { }, }, }, -}; +} as const; function runTest(key: string | string[], mapping: IndexMapping | SavedObjectsFieldMapping) { expect(typeof key === 'string' || Array.isArray(key)).toBeTruthy(); diff --git a/src/core/server/saved_objects/mappings/lib/get_property.ts b/src/core/server/saved_objects/mappings/lib/get_property.ts index c2daa1e70a898..2a9993bc175ca 100644 --- a/src/core/server/saved_objects/mappings/lib/get_property.ts +++ b/src/core/server/saved_objects/mappings/lib/get_property.ts @@ -7,7 +7,7 @@ */ import { toPath } from 'lodash'; -import { SavedObjectsCoreFieldMapping, SavedObjectsFieldMapping, IndexMapping } from '../types'; +import { SavedObjectsFieldMapping, IndexMapping } from '../types'; function getPropertyMappingFromObjectMapping( mapping: IndexMapping | SavedObjectsFieldMapping, @@ -15,7 +15,7 @@ function getPropertyMappingFromObjectMapping( ): SavedObjectsFieldMapping | undefined { const props = (mapping && (mapping as IndexMapping).properties) || - (mapping && (mapping as SavedObjectsCoreFieldMapping).fields); + (mapping && (mapping as SavedObjectsFieldMapping).fields); if (!props) { return undefined; diff --git a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts index 2daca3a1fdd83..cbc6808418bc0 100644 --- a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts +++ b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.test.ts @@ -15,7 +15,7 @@ test(`returns single object with properties`, () => { properties: {}, }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -32,7 +32,7 @@ test(`returns single object with type === 'object'`, () => { type: 'object', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -75,7 +75,7 @@ test(`returns two objects with type === 'object'`, () => { type: 'object', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -95,7 +95,7 @@ test(`excludes objects without properties and type of keyword`, () => { type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({}); @@ -111,7 +111,7 @@ test(`excludes two objects without properties and type of keyword`, () => { type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({}); @@ -127,7 +127,7 @@ test(`includes one object with properties and excludes one object without proper type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -147,7 +147,7 @@ test(`includes one object with type === 'object' and excludes one object without type: 'keyword', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ @@ -170,7 +170,7 @@ test('excludes references and migrationVersion which are part of the blacklist', type: 'object', }, }, - }; + } as const; const result = getRootPropertiesObjects(mappings); expect(result).toEqual({ foo: { diff --git a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts index 3a25865c03b26..54ea4eafc186f 100644 --- a/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts +++ b/src/core/server/saved_objects/mappings/lib/get_root_properties_objects.ts @@ -6,11 +6,7 @@ * Side Public License, v 1. */ -import { - SavedObjectsComplexFieldMapping, - IndexMapping, - SavedObjectsMappingProperties, -} from '../types'; +import { SavedObjectsFieldMapping, IndexMapping, SavedObjectsMappingProperties } from '../types'; import { getRootProperties } from './get_root_properties'; /** @@ -36,7 +32,7 @@ export function getRootPropertiesObjects(mappings: IndexMapping) { // we consider the existence of the properties or type of object to designate that this is an object datatype if ( !omittedRootProps.includes(key) && - ((value as SavedObjectsComplexFieldMapping).properties || value.type === 'object') + ((value as SavedObjectsFieldMapping).properties || value.type === 'object') ) { acc[key] = value; } diff --git a/src/core/server/saved_objects/mappings/types.ts b/src/core/server/saved_objects/mappings/types.ts index 25fb61de93518..e2ad2a91fd000 100644 --- a/src/core/server/saved_objects/mappings/types.ts +++ b/src/core/server/saved_objects/mappings/types.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import type { estypes } from '@elastic/elasticsearch'; /** * Describe a saved object type mapping. * @@ -96,9 +97,17 @@ export interface SavedObjectsMappingProperties { * * @public */ -export type SavedObjectsFieldMapping = - | SavedObjectsCoreFieldMapping - | SavedObjectsComplexFieldMapping; +export type SavedObjectsFieldMapping = estypes.MappingProperty & { + /** + * The dynamic property of the mapping, either `false` or `'strict'`. If + * unspecified `dynamic: 'strict'` will be inherited from the top-level + * index mappings. + * + * Note: To limit the number of mapping fields Saved Object types should + * *never* use `dynamic: true`. + */ + dynamic?: false | 'strict'; +}; /** @internal */ export interface IndexMapping { @@ -114,42 +123,3 @@ export interface IndexMappingMeta { // the md5 hash of that mapping's value when the index was created. migrationMappingPropertyHashes?: { [k: string]: string }; } - -/** - * See {@link SavedObjectsFieldMapping} for documentation. - * - * @public - */ -export interface SavedObjectsCoreFieldMapping { - type: string; - null_value?: number | boolean | string; - index?: boolean; - doc_values?: boolean; - fields?: { - [subfield: string]: { - type: string; - ignore_above?: number; - }; - }; -} - -/** - * See {@link SavedObjectsFieldMapping} for documentation. - * - * @public - */ -export interface SavedObjectsComplexFieldMapping { - /** - * The dynamic property of the mapping, either `false` or `'strict'`. If - * unspecified `dynamic: 'strict'` will be inherited from the top-level - * index mappings. - * - * Note: To limit the number of mapping fields Saved Object types should - * *never* use `dynamic: true`. - */ - dynamic?: false | 'strict'; - enabled?: boolean; - doc_values?: boolean; - type?: string; - properties: SavedObjectsMappingProperties; -} diff --git a/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts b/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts index 5465da2f620ad..a39fff20abbe7 100644 --- a/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts +++ b/src/core/server/saved_objects/migrations/core/build_active_mappings.test.ts @@ -19,19 +19,19 @@ describe('buildActiveMappings', () => { const properties = { aaa: { type: 'text' }, bbb: { type: 'long' }, - }; + } as const; expect(buildActiveMappings(properties)).toMatchSnapshot(); }); test('disallows duplicate mappings', () => { - const properties = { type: { type: 'long' } }; + const properties = { type: { type: 'long' } } as const; expect(() => buildActiveMappings(properties)).toThrow(/Cannot redefine core mapping \"type\"/); }); test('disallows mappings with leading underscore', () => { - const properties = { _hm: { type: 'keyword' } }; + const properties = { _hm: { type: 'keyword' } } as const; expect(() => buildActiveMappings(properties)).toThrow( /Invalid mapping \"_hm\"\. Mappings cannot start with _/ @@ -60,7 +60,7 @@ describe('buildActiveMappings', () => { aaa: { type: 'keyword', fields: { a: { type: 'keyword' }, b: { type: 'text' } } }, bbb: { fields: { b: { type: 'text' }, a: { type: 'keyword' } }, type: 'keyword' }, ccc: { fields: { b: { type: 'text' }, a: { type: 'text' } }, type: 'keyword' }, - }; + } as const; const mappings = buildActiveMappings(properties); const hashes = mappings._meta!.migrationMappingPropertyHashes!; diff --git a/src/core/server/saved_objects/migrations/core/build_index_map.test.ts b/src/core/server/saved_objects/migrations/core/build_index_map.test.ts index c7a3251e33ab1..731b7f8c029c2 100644 --- a/src/core/server/saved_objects/migrations/core/build_index_map.test.ts +++ b/src/core/server/saved_objects/migrations/core/build_index_map.test.ts @@ -36,7 +36,7 @@ test('mappings without index pattern goes to default index', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -48,7 +48,7 @@ test('mappings without index pattern goes to default index', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -69,7 +69,7 @@ test(`mappings with custom index pattern doesn't go to default index`, () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -81,7 +81,7 @@ test(`mappings with custom index pattern doesn't go to default index`, () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -103,7 +103,7 @@ test('creating a script gets added to the index pattern', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -116,7 +116,7 @@ test('creating a script gets added to the index pattern', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, @@ -144,18 +144,18 @@ test('throws when two scripts are defined for an index pattern', () => { type1: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, type2: { properties: { field1: { - type: 'string', + type: 'text', }, }, }, - }; + } as const; expect(() => createIndexMap({ kibanaIndexName: defaultIndex, diff --git a/src/core/server/saved_objects/migrations/core/elastic_index.test.ts b/src/core/server/saved_objects/migrations/core/elastic_index.test.ts index 1d2ec6abc0dd1..c9c24cc85a452 100644 --- a/src/core/server/saved_objects/migrations/core/elastic_index.test.ts +++ b/src/core/server/saved_objects/migrations/core/elastic_index.test.ts @@ -40,10 +40,10 @@ describe('ElasticIndex', () => { return elasticsearchClientMock.createSuccessTransportRequestPromise({ [index]: { aliases: { foo: index }, - mappings: { dynamic: 'strict', properties: { a: 'b' } }, + mappings: { dynamic: 'strict', properties: { a: 'b' } as any }, settings: {}, }, - } as estypes.GetIndexResponse); + } as estypes.IndicesGetResponse); }); const info = await Index.fetchInfo(client, '.baz'); @@ -164,7 +164,7 @@ describe('ElasticIndex', () => { client.tasks.get.mockResolvedValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ completed: true, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); const info = { @@ -175,7 +175,7 @@ describe('ElasticIndex', () => { dynamic: 'strict' as const, properties: { foo: { type: 'keyword' } }, }, - }; + } as const; await Index.convertToAlias( client, @@ -248,7 +248,7 @@ describe('ElasticIndex', () => { reason: 'all shards failed', failed_shards: [], }, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); const info = { diff --git a/src/core/server/saved_objects/migrations/core/elastic_index.ts b/src/core/server/saved_objects/migrations/core/elastic_index.ts index 76fdd5e73d804..296a4cee07c11 100644 --- a/src/core/server/saved_objects/migrations/core/elastic_index.ts +++ b/src/core/server/saved_objects/migrations/core/elastic_index.ts @@ -32,7 +32,7 @@ export interface FullIndexInfo { // saved objects which are no longer used. These saved objects will still be // kept in the outdated index for backup purposes, but won't be available in // the upgraded index. -export const excludeUnusedTypesQuery: estypes.QueryContainer = { +export const excludeUnusedTypesQuery: estypes.QueryDslQueryContainer = { bool: { must_not: [ // https://github.com/elastic/kibana/issues/91869 @@ -401,7 +401,6 @@ async function reindex( task_id: String(task), }); - // @ts-expect-error @elastic/elasticsearch GetTaskResponse doesn't contain `error` property const e = body.error; if (e) { throw new Error(`Re-index failed [${e.type}] ${e.reason} :: ${JSON.stringify(e)}`); diff --git a/src/core/server/saved_objects/migrations/core/index_migrator.test.ts b/src/core/server/saved_objects/migrations/core/index_migrator.test.ts index fcc03f363139b..64d4fa3609e90 100644 --- a/src/core/server/saved_objects/migrations/core/index_migrator.test.ts +++ b/src/core/server/saved_objects/migrations/core/index_migrator.test.ts @@ -450,7 +450,7 @@ function withIndex( client.tasks.get.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ completed: true, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); client.search.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise(searchResult(0) as any) diff --git a/src/core/server/saved_objects/migrations/core/migration_context.test.ts b/src/core/server/saved_objects/migrations/core/migration_context.test.ts index 5f2e8a37ec427..240b41266abb6 100644 --- a/src/core/server/saved_objects/migrations/core/migration_context.test.ts +++ b/src/core/server/saved_objects/migrations/core/migration_context.test.ts @@ -31,7 +31,7 @@ describe('disableUnknownTypeMappingFields', () => { }, }, }, - }; + } as const; const activeMappings = { _meta: { migrationMappingPropertyHashes: { @@ -46,7 +46,7 @@ describe('disableUnknownTypeMappingFields', () => { }, }, }, - }; + } as const; const targetMappings = disableUnknownTypeMappingFields(activeMappings, sourceMappings); it('disables complex field mappings from unknown types in the source mappings', () => { diff --git a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts index 37cea5d2de3d2..d0cc52f2dd9bd 100644 --- a/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts +++ b/src/core/server/saved_objects/migrations/kibana/kibana_migrator.test.ts @@ -320,7 +320,11 @@ const mockV2MigrationOptions = () => { ) ); options.client.indices.addBlock.mockReturnValue( - elasticsearchClientMock.createSuccessTransportRequestPromise({ acknowledged: true }) + elasticsearchClientMock.createSuccessTransportRequestPromise({ + acknowledged: true, + shards_acknowledged: true, + indices: [], + }) ); options.client.reindex.mockReturnValue( elasticsearchClientMock.createSuccessTransportRequestPromise({ @@ -333,7 +337,7 @@ const mockV2MigrationOptions = () => { error: undefined, failures: [], task: { description: 'task description' } as any, - } as estypes.GetTaskResponse) + } as estypes.TaskGetResponse) ); options.client.search = jest diff --git a/src/core/server/saved_objects/migrationsv2/actions/bulk_overwrite_transformed_documents.test.ts b/src/core/server/saved_objects/migrationsv2/actions/bulk_overwrite_transformed_documents.test.ts new file mode 100644 index 0000000000000..8ff9591798fd4 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/bulk_overwrite_transformed_documents.test.ts @@ -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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { bulkOverwriteTransformedDocuments } from './bulk_overwrite_transformed_documents'; + +describe('bulkOverwriteTransformedDocuments', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = bulkOverwriteTransformedDocuments({ + client, + index: 'new_index', + transformedDocs: [], + refresh: 'wait_for', + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/bulk_overwrite_transformed_documents.ts b/src/core/server/saved_objects/migrationsv2/actions/bulk_overwrite_transformed_documents.ts new file mode 100644 index 0000000000000..830a8efccc7eb --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/bulk_overwrite_transformed_documents.ts @@ -0,0 +1,84 @@ +/* + * Copyright 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import type { estypes } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import type { SavedObjectsRawDoc } from '../../serialization'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE } from './constants'; + +/** @internal */ +export interface BulkOverwriteTransformedDocumentsParams { + client: ElasticsearchClient; + index: string; + transformedDocs: SavedObjectsRawDoc[]; + refresh?: estypes.Refresh; +} +/** + * Write the up-to-date transformed documents to the index, overwriting any + * documents that are still on their outdated version. + */ +export const bulkOverwriteTransformedDocuments = ({ + client, + index, + transformedDocs, + refresh = false, +}: BulkOverwriteTransformedDocumentsParams): TaskEither.TaskEither< + RetryableEsClientError, + 'bulk_index_succeeded' +> => () => { + return client + .bulk({ + // Because we only add aliases in the MARK_VERSION_INDEX_READY step we + // can't bulkIndex to an alias with require_alias=true. This means if + // users tamper during this operation (delete indices or restore a + // snapshot), we could end up auto-creating an index without the correct + // mappings. Such tampering could lead to many other problems and is + // probably unlikely so for now we'll accept this risk and wait till + // system indices puts in place a hard control. + require_alias: false, + wait_for_active_shards: WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, + refresh, + filter_path: ['items.*.error'], + body: transformedDocs.flatMap((doc) => { + return [ + { + index: { + _index: index, + _id: doc._id, + // overwrite existing documents + op_type: 'index', + // use optimistic concurrency control to ensure that outdated + // documents are only overwritten once with the latest version + if_seq_no: doc._seq_no, + if_primary_term: doc._primary_term, + }, + }, + doc._source, + ]; + }), + }) + .then((res) => { + // Filter out version_conflict_engine_exception since these just mean + // that another instance already updated these documents + const errors = (res.body.items ?? []).filter( + (item) => item.index?.error?.type !== 'version_conflict_engine_exception' + ); + if (errors.length === 0) { + return Either.right('bulk_index_succeeded' as const); + } else { + throw new Error(JSON.stringify(errors)); + } + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/clone_index.test.ts b/src/core/server/saved_objects/migrationsv2/actions/clone_index.test.ts new file mode 100644 index 0000000000000..84b4b00bc7e7f --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/clone_index.test.ts @@ -0,0 +1,60 @@ +/* + * Copyright 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 { errors as EsErrors } from '@elastic/elasticsearch'; +import { cloneIndex } from './clone_index'; +import { setWriteBlock } from './set_write_block'; +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +jest.mock('./catch_retryable_es_client_errors'); + +describe('cloneIndex', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = cloneIndex({ + client, + source: 'my_source_index', + target: 'my_target_index', + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + + it('re-throws non retry-able errors', async () => { + const task = setWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/clone_index.ts b/src/core/server/saved_objects/migrationsv2/actions/clone_index.ts new file mode 100644 index 0000000000000..5674535c80328 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/clone_index.ts @@ -0,0 +1,141 @@ +/* + * Copyright 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import type { IndexNotFound, AcknowledgeResponse } from './'; +import { waitForIndexStatusYellow } from './wait_for_index_status_yellow'; +import { + DEFAULT_TIMEOUT, + INDEX_AUTO_EXPAND_REPLICAS, + INDEX_NUMBER_OF_SHARDS, + WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, +} from './constants'; +export type CloneIndexResponse = AcknowledgeResponse; + +/** @internal */ +export interface CloneIndexParams { + client: ElasticsearchClient; + source: string; + target: string; + /** only used for testing */ + timeout?: string; +} +/** + * Makes a clone of the source index into the target. + * + * @remarks + * This method adds some additional logic to the ES clone index API: + * - it is idempotent, if it gets called multiple times subsequent calls will + * wait for the first clone operation to complete (up to 60s) + * - the first call will wait up to 120s for the cluster state and all shards + * to be updated. + */ +export const cloneIndex = ({ + client, + source, + target, + timeout = DEFAULT_TIMEOUT, +}: CloneIndexParams): TaskEither.TaskEither< + RetryableEsClientError | IndexNotFound, + CloneIndexResponse +> => { + const cloneTask: TaskEither.TaskEither< + RetryableEsClientError | IndexNotFound, + AcknowledgeResponse + > = () => { + return client.indices + .clone( + { + index: source, + target, + wait_for_active_shards: WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, + body: { + settings: { + index: { + // The source we're cloning from will have a write block set, so + // we need to remove it to allow writes to our newly cloned index + 'blocks.write': false, + number_of_shards: INDEX_NUMBER_OF_SHARDS, + auto_expand_replicas: INDEX_AUTO_EXPAND_REPLICAS, + // Set an explicit refresh interval so that we don't inherit the + // value from incorrectly configured index templates (not required + // after we adopt system indices) + refresh_interval: '1s', + // Bump priority so that recovery happens before newer indices + priority: 10, + }, + }, + }, + timeout, + }, + { maxRetries: 0 /** handle retry ourselves for now */ } + ) + .then((res) => { + /** + * - acknowledged=false, we timed out before the cluster state was + * updated with the newly created index, but it probably will be + * created sometime soon. + * - shards_acknowledged=false, we timed out before all shards were + * started + * - acknowledged=true, shards_acknowledged=true, cloning complete + */ + return Either.right({ + acknowledged: res.body.acknowledged, + shardsAcknowledged: res.body.shards_acknowledged, + }); + }) + .catch((error: EsErrors.ResponseError) => { + if (error?.body?.error?.type === 'index_not_found_exception') { + return Either.left({ + type: 'index_not_found_exception' as const, + index: error.body.error.index, + }); + } else if (error?.body?.error?.type === 'resource_already_exists_exception') { + /** + * If the target index already exists it means a previous clone + * operation had already been started. However, we can't be sure + * that all shards were started so return shardsAcknowledged: false + */ + return Either.right({ + acknowledged: true, + shardsAcknowledged: false, + }); + } else { + throw error; + } + }) + .catch(catchRetryableEsClientErrors); + }; + + return pipe( + cloneTask, + TaskEither.chain((res) => { + if (res.acknowledged && res.shardsAcknowledged) { + // If the cluster state was updated and all shards ackd we're done + return TaskEither.right(res); + } else { + // Otherwise, wait until the target index has a 'green' status. + return pipe( + waitForIndexStatusYellow({ client, index: target, timeout }), + TaskEither.map((value) => { + /** When the index status is 'green' we know that all shards were started */ + return { acknowledged: true, shardsAcknowledged: true }; + }) + ); + } + }) + ); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/close_pit.test.ts b/src/core/server/saved_objects/migrationsv2/actions/close_pit.test.ts new file mode 100644 index 0000000000000..5d9696239a61e --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/close_pit.test.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +jest.mock('./catch_retryable_es_client_errors'); +import { errors as EsErrors } from '@elastic/elasticsearch'; +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { closePit } from './close_pit'; + +describe('closePit', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = closePit({ client, pitId: 'pitId' }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/close_pit.ts b/src/core/server/saved_objects/migrationsv2/actions/close_pit.ts new file mode 100644 index 0000000000000..d421950c839e2 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/close_pit.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 * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; + +/** @internal */ +export interface ClosePitParams { + client: ElasticsearchClient; + pitId: string; +} +/* + * Closes PIT. + * See https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html + * */ +export const closePit = ({ + client, + pitId, +}: ClosePitParams): TaskEither.TaskEither => () => { + return client + .closePointInTime({ + body: { id: pitId }, + }) + .then((response) => { + if (!response.body.succeeded) { + throw new Error(`Failed to close PointInTime with id: ${pitId}`); + } + return Either.right({}); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/constants.ts b/src/core/server/saved_objects/migrationsv2/actions/constants.ts new file mode 100644 index 0000000000000..5d0d2ffe5d695 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/constants.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 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. + */ + +/** + * Batch size for updateByQuery and reindex operations. + * Uses the default value of 1000 for Elasticsearch reindex operation. + */ +export const BATCH_SIZE = 1_000; +export const DEFAULT_TIMEOUT = '60s'; +/** Allocate 1 replica if there are enough data nodes, otherwise continue with 0 */ +export const INDEX_AUTO_EXPAND_REPLICAS = '0-1'; +/** ES rule of thumb: shards should be several GB to 10's of GB, so Kibana is unlikely to cross that limit */ +export const INDEX_NUMBER_OF_SHARDS = 1; +/** Wait for all shards to be active before starting an operation */ +export const WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE = 'all'; diff --git a/src/core/server/saved_objects/migrationsv2/actions/create_index.test.ts b/src/core/server/saved_objects/migrationsv2/actions/create_index.test.ts new file mode 100644 index 0000000000000..d5d906898943c --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/create_index.test.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { createIndex } from './create_index'; +import { setWriteBlock } from './set_write_block'; + +describe('createIndex', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = createIndex({ + client, + indexName: 'new_index', + mappings: { properties: {} }, + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + it('re-throws non retry-able errors', async () => { + const task = setWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/create_index.ts b/src/core/server/saved_objects/migrationsv2/actions/create_index.ts new file mode 100644 index 0000000000000..8e5042a5ff8fe --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/create_index.ts @@ -0,0 +1,145 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { pipe } from 'fp-ts/lib/pipeable'; +import type { estypes } from '@elastic/elasticsearch'; +import { AcknowledgeResponse } from './index'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { IndexMapping } from '../../mappings'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { + DEFAULT_TIMEOUT, + INDEX_AUTO_EXPAND_REPLICAS, + WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, +} from './constants'; +import { waitForIndexStatusYellow } from './wait_for_index_status_yellow'; + +function aliasArrayToRecord(aliases: string[]): Record { + const result: Record = {}; + for (const alias of aliases) { + result[alias] = {}; + } + return result; +} + +/** @internal */ +export interface CreateIndexParams { + client: ElasticsearchClient; + indexName: string; + mappings: IndexMapping; + aliases?: string[]; +} +/** + * Creates an index with the given mappings + * + * @remarks + * This method adds some additional logic to the ES create index API: + * - it is idempotent, if it gets called multiple times subsequent calls will + * wait for the first create operation to complete (up to 60s) + * - the first call will wait up to 120s for the cluster state and all shards + * to be updated. + */ +export const createIndex = ({ + client, + indexName, + mappings, + aliases = [], +}: CreateIndexParams): TaskEither.TaskEither => { + const createIndexTask: TaskEither.TaskEither< + RetryableEsClientError, + AcknowledgeResponse + > = () => { + const aliasesObject = aliasArrayToRecord(aliases); + + return client.indices + .create( + { + index: indexName, + // wait until all shards are available before creating the index + // (since number_of_shards=1 this does not have any effect atm) + wait_for_active_shards: WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, + // Wait up to 60s for the cluster state to update and all shards to be + // started + timeout: DEFAULT_TIMEOUT, + body: { + mappings, + aliases: aliasesObject, + settings: { + index: { + // ES rule of thumb: shards should be several GB to 10's of GB, so + // Kibana is unlikely to cross that limit. + number_of_shards: 1, + auto_expand_replicas: INDEX_AUTO_EXPAND_REPLICAS, + // Set an explicit refresh interval so that we don't inherit the + // value from incorrectly configured index templates (not required + // after we adopt system indices) + refresh_interval: '1s', + // Bump priority so that recovery happens before newer indices + priority: 10, + }, + }, + }, + }, + { maxRetries: 0 /** handle retry ourselves for now */ } + ) + .then((res) => { + /** + * - acknowledged=false, we timed out before the cluster state was + * updated on all nodes with the newly created index, but it + * probably will be created sometime soon. + * - shards_acknowledged=false, we timed out before all shards were + * started + * - acknowledged=true, shards_acknowledged=true, index creation complete + */ + return Either.right({ + acknowledged: res.body.acknowledged, + shardsAcknowledged: res.body.shards_acknowledged, + }); + }) + .catch((error) => { + if (error?.body?.error?.type === 'resource_already_exists_exception') { + /** + * If the target index already exists it means a previous create + * operation had already been started. However, we can't be sure + * that all shards were started so return shardsAcknowledged: false + */ + return Either.right({ + acknowledged: true, + shardsAcknowledged: false, + }); + } else { + throw error; + } + }) + .catch(catchRetryableEsClientErrors); + }; + + return pipe( + createIndexTask, + TaskEither.chain((res) => { + if (res.acknowledged && res.shardsAcknowledged) { + // If the cluster state was updated and all shards ackd we're done + return TaskEither.right('create_index_succeeded'); + } else { + // Otherwise, wait until the target index has a 'yellow' status. + return pipe( + waitForIndexStatusYellow({ client, index: indexName, timeout: DEFAULT_TIMEOUT }), + TaskEither.map(() => { + /** When the index status is 'yellow' we know that all shards were started */ + return 'create_index_succeeded'; + }) + ); + } + }) + ); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/fetch_indices.test.ts b/src/core/server/saved_objects/migrationsv2/actions/fetch_indices.test.ts new file mode 100644 index 0000000000000..0dab1728b6ef2 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/fetch_indices.test.ts @@ -0,0 +1,37 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { fetchIndices } from './fetch_indices'; + +describe('fetchIndices', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = fetchIndices({ client, indices: ['my_index'] }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/fetch_indices.ts b/src/core/server/saved_objects/migrationsv2/actions/fetch_indices.ts new file mode 100644 index 0000000000000..3847252eb6db1 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/fetch_indices.ts @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 TaskEither from 'fp-ts/lib/TaskEither'; +import * as Either from 'fp-ts/lib/Either'; +import { IndexMapping } from '../../mappings'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +export type FetchIndexResponse = Record< + string, + { aliases: Record; mappings: IndexMapping; settings: unknown } +>; + +/** @internal */ +export interface FetchIndicesParams { + client: ElasticsearchClient; + indices: string[]; +} + +/** + * Fetches information about the given indices including aliases, mappings and + * settings. + */ +export const fetchIndices = ({ + client, + indices, +}: FetchIndicesParams): TaskEither.TaskEither => + // @ts-expect-error @elastic/elasticsearch IndexState.alias and IndexState.mappings should be required + () => { + return client.indices + .get( + { + index: indices, + ignore_unavailable: true, // Don't return an error for missing indices. Note this *will* include closed indices, the docs are misleading https://github.com/elastic/elasticsearch/issues/63607 + }, + { ignore: [404], maxRetries: 0 } + ) + .then(({ body }) => { + return Either.right(body); + }) + .catch(catchRetryableEsClientErrors); + }; diff --git a/src/core/server/saved_objects/migrationsv2/actions/index.test.ts b/src/core/server/saved_objects/migrationsv2/actions/index.test.ts deleted file mode 100644 index df74a4e1282e4..0000000000000 --- a/src/core/server/saved_objects/migrationsv2/actions/index.test.ts +++ /dev/null @@ -1,302 +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 * as Actions from './'; -import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; -import { errors as EsErrors } from '@elastic/elasticsearch'; -jest.mock('./catch_retryable_es_client_errors'); -import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; -import * as Option from 'fp-ts/lib/Option'; - -describe('actions', () => { - beforeEach(() => { - jest.clearAllMocks(); - }); - - // Create a mock client that rejects all methods with a 503 status code - // response. - const retryableError = new EsErrors.ResponseError( - elasticsearchClientMock.createApiResponse({ - statusCode: 503, - body: { error: { type: 'es_type', reason: 'es_reason' } }, - }) - ); - const client = elasticsearchClientMock.createInternalClient( - elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) - ); - - const nonRetryableError = new Error('crash'); - const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( - elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) - ); - - describe('fetchIndices', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.fetchIndices(client, ['my_index']); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('setWriteBlock', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.setWriteBlock(client, 'my_index'); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - it('re-throws non retry-able errors', async () => { - const task = Actions.setWriteBlock(clientWithNonRetryableError, 'my_index'); - await task(); - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); - }); - }); - - describe('cloneIndex', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.cloneIndex(client, 'my_source_index', 'my_target_index'); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - it('re-throws non retry-able errors', async () => { - const task = Actions.setWriteBlock(clientWithNonRetryableError, 'my_index'); - await task(); - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); - }); - }); - - describe('pickupUpdatedMappings', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.pickupUpdatedMappings(client, 'my_index'); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('openPit', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.openPit(client, 'my_index'); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('readWithPit', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.readWithPit(client, 'pitId', { match_all: {} }, 10_000); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('closePit', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.closePit(client, 'pitId'); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('reindex', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.reindex( - client, - 'my_source_index', - 'my_target_index', - Option.none, - false, - {} - ); - try { - await task(); - } catch (e) { - /** ignore */ - } - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('waitForReindexTask', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.waitForReindexTask(client, 'my task id', '60s'); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - it('re-throws non retry-able errors', async () => { - const task = Actions.setWriteBlock(clientWithNonRetryableError, 'my_index'); - await task(); - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); - }); - }); - - describe('waitForPickupUpdatedMappingsTask', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.waitForPickupUpdatedMappingsTask(client, 'my task id', '60s'); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - it('re-throws non retry-able errors', async () => { - const task = Actions.setWriteBlock(clientWithNonRetryableError, 'my_index'); - await task(); - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); - }); - }); - - describe('updateAliases', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.updateAliases(client, []); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - it('re-throws non retry-able errors', async () => { - const task = Actions.setWriteBlock(clientWithNonRetryableError, 'my_index'); - await task(); - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); - }); - }); - - describe('createIndex', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.createIndex(client, 'new_index', { properties: {} }); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - it('re-throws non retry-able errors', async () => { - const task = Actions.setWriteBlock(clientWithNonRetryableError, 'my_index'); - await task(); - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); - }); - }); - - describe('updateAndPickupMappings', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.updateAndPickupMappings(client, 'new_index', { properties: {} }); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('searchForOutdatedDocuments', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'new_index', - outdatedDocumentsQuery: {}, - }); - - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - - it('configures request according to given parameters', async () => { - const esClient = elasticsearchClientMock.createInternalClient(); - const query = {}; - const targetIndex = 'new_index'; - const batchSize = 1000; - const task = Actions.searchForOutdatedDocuments(esClient, { - batchSize, - targetIndex, - outdatedDocumentsQuery: query, - }); - - await task(); - - expect(esClient.search).toHaveBeenCalledTimes(1); - expect(esClient.search).toHaveBeenCalledWith( - expect.objectContaining({ - index: targetIndex, - size: batchSize, - body: expect.objectContaining({ query }), - }) - ); - }); - }); - - describe('bulkOverwriteTransformedDocuments', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.bulkOverwriteTransformedDocuments(client, 'new_index', [], 'wait_for'); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); - - describe('refreshIndex', () => { - it('calls catchRetryableEsClientErrors when the promise rejects', async () => { - const task = Actions.refreshIndex(client, 'target_index'); - try { - await task(); - } catch (e) { - /** ignore */ - } - - expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); - }); - }); -}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/index.ts b/src/core/server/saved_objects/migrationsv2/actions/index.ts index c2e0476960c3b..98d7167ffc31a 100644 --- a/src/core/server/saved_objects/migrationsv2/actions/index.ts +++ b/src/core/server/saved_objects/migrationsv2/actions/index.ts @@ -6,1105 +6,126 @@ * Side Public License, v 1. */ -import * as Either from 'fp-ts/lib/Either'; -import * as TaskEither from 'fp-ts/lib/TaskEither'; -import * as Option from 'fp-ts/lib/Option'; -import type { estypes } from '@elastic/elasticsearch'; -import { errors as EsErrors } from '@elastic/elasticsearch'; -import type { ElasticsearchClientError, ResponseError } from '@elastic/elasticsearch/lib/errors'; -import { pipe } from 'fp-ts/lib/pipeable'; -import { flow } from 'fp-ts/lib/function'; -import { ElasticsearchClient } from '../../../elasticsearch'; -import { IndexMapping } from '../../mappings'; -import type { SavedObjectsRawDoc, SavedObjectsRawDocSource } from '../../serialization'; -import type { TransformRawDocs } from '../types'; -import { - catchRetryableEsClientErrors, - RetryableEsClientError, -} from './catch_retryable_es_client_errors'; -import { - DocumentsTransformFailed, - DocumentsTransformSuccess, -} from '../../migrations/core/migrate_raw_docs'; -export type { RetryableEsClientError }; +import { RetryableEsClientError } from './catch_retryable_es_client_errors'; +import { DocumentsTransformFailed } from '../../migrations/core/migrate_raw_docs'; -/** - * Batch size for updateByQuery and reindex operations. - * Uses the default value of 1000 for Elasticsearch reindex operation. - */ -const BATCH_SIZE = 1_000; -const DEFAULT_TIMEOUT = '60s'; -/** Allocate 1 replica if there are enough data nodes, otherwise continue with 0 */ -const INDEX_AUTO_EXPAND_REPLICAS = '0-1'; -/** ES rule of thumb: shards should be several GB to 10's of GB, so Kibana is unlikely to cross that limit */ -const INDEX_NUMBER_OF_SHARDS = 1; -/** Wait for all shards to be active before starting an operation */ -const WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE = 'all'; +export { + BATCH_SIZE, + DEFAULT_TIMEOUT, + INDEX_AUTO_EXPAND_REPLICAS, + INDEX_NUMBER_OF_SHARDS, + WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, +} from './constants'; -// Map of left response 'type' string -> response interface -export interface ActionErrorTypeMap { - wait_for_task_completion_timeout: WaitForTaskCompletionTimeout; - retryable_es_client_error: RetryableEsClientError; - index_not_found_exception: IndexNotFound; - target_index_had_write_block: TargetIndexHadWriteBlock; - incompatible_mapping_exception: IncompatibleMappingException; - alias_not_found_exception: AliasNotFound; - remove_index_not_a_concrete_index: RemoveIndexNotAConcreteIndex; - documents_transform_failed: DocumentsTransformFailed; -} +export type { RetryableEsClientError }; -/** - * Type guard for narrowing the type of a left - */ -export function isLeftTypeof( - res: any, - typeString: T -): res is ActionErrorTypeMap[T] { - return res.type === typeString; -} +// actions/* imports +export type { FetchIndexResponse, FetchIndicesParams } from './fetch_indices'; +export { fetchIndices } from './fetch_indices'; -export type FetchIndexResponse = Record< - string, - { aliases: Record; mappings: IndexMapping; settings: unknown } ->; +export type { SetWriteBlockParams } from './set_write_block'; +export { setWriteBlock } from './set_write_block'; -/** - * Fetches information about the given indices including aliases, mappings and - * settings. - */ -export const fetchIndices = ( - client: ElasticsearchClient, - indicesToFetch: string[] -): TaskEither.TaskEither => - // @ts-expect-error @elastic/elasticsearch IndexState.alias and IndexState.mappings should be required - () => { - return client.indices - .get( - { - index: indicesToFetch, - ignore_unavailable: true, // Don't return an error for missing indices. Note this *will* include closed indices, the docs are misleading https://github.com/elastic/elasticsearch/issues/63607 - }, - { ignore: [404], maxRetries: 0 } - ) - .then(({ body }) => { - return Either.right(body); - }) - .catch(catchRetryableEsClientErrors); - }; +export type { RemoveWriteBlockParams } from './remove_write_block'; +export { removeWriteBlock } from './remove_write_block'; -export interface IndexNotFound { - type: 'index_not_found_exception'; - index: string; -} -/** - * Sets a write block in place for the given index. If the response includes - * `acknowledged: true` all in-progress writes have drained and no further - * writes to this index will be possible. - * - * The first time the write block is added to an index the response will - * include `shards_acknowledged: true` but once the block is in place, - * subsequent calls return `shards_acknowledged: false` - */ -export const setWriteBlock = ( - client: ElasticsearchClient, - index: string -): TaskEither.TaskEither< - IndexNotFound | RetryableEsClientError, - 'set_write_block_succeeded' -> => () => { - return ( - client.indices - .addBlock<{ - acknowledged: boolean; - shards_acknowledged: boolean; - }>( - { - index, - block: 'write', - }, - { maxRetries: 0 /** handle retry ourselves for now */ } - ) - // not typed yet - .then((res: any) => { - return res.body.acknowledged === true - ? Either.right('set_write_block_succeeded' as const) - : Either.left({ - type: 'retryable_es_client_error' as const, - message: 'set_write_block_failed', - }); - }) - .catch((e: ElasticsearchClientError) => { - if (e instanceof EsErrors.ResponseError) { - if (e.body?.error?.type === 'index_not_found_exception') { - return Either.left({ type: 'index_not_found_exception' as const, index }); - } - } - throw e; - }) - .catch(catchRetryableEsClientErrors) - ); -}; +export type { CloneIndexResponse, CloneIndexParams } from './clone_index'; +export { cloneIndex } from './clone_index'; -/** - * Removes a write block from an index - */ -export const removeWriteBlock = ( - client: ElasticsearchClient, - index: string -): TaskEither.TaskEither => () => { - return client.indices - .putSettings<{ - acknowledged: boolean; - shards_acknowledged: boolean; - }>( - { - index, - // Don't change any existing settings - preserve_existing: true, - body: { - index: { - blocks: { - write: false, - }, - }, - }, - }, - { maxRetries: 0 /** handle retry ourselves for now */ } - ) - .then((res) => { - return res.body.acknowledged === true - ? Either.right('remove_write_block_succeeded' as const) - : Either.left({ - type: 'retryable_es_client_error' as const, - message: 'remove_write_block_failed', - }); - }) - .catch(catchRetryableEsClientErrors); -}; +export type { WaitForIndexStatusYellowParams } from './wait_for_index_status_yellow'; +import { waitForIndexStatusYellow } from './wait_for_index_status_yellow'; -/** - * A yellow index status means the index's primary shard is allocated and the - * index is ready for searching/indexing documents, but ES wasn't able to - * allocate the replicas. When migrations proceed with a yellow index it means - * we don't have as much data-redundancy as we could have, but waiting for - * replicas would mean that v2 migrations fail where v1 migrations would have - * succeeded. It doesn't feel like it's Kibana's job to force users to keep - * their clusters green and even if it's green when we migrate it can turn - * yellow at any point in the future. So ultimately data-redundancy is up to - * users to maintain. - */ -export const waitForIndexStatusYellow = ( - client: ElasticsearchClient, - index: string, - timeout = DEFAULT_TIMEOUT -): TaskEither.TaskEither => () => { - return client.cluster - .health({ index, wait_for_status: 'yellow', timeout }) - .then(() => { - return Either.right({}); - }) - .catch(catchRetryableEsClientErrors); -}; +export type { WaitForTaskResponse, WaitForTaskCompletionTimeout } from './wait_for_task'; +import { waitForTask, WaitForTaskCompletionTimeout } from './wait_for_task'; -export type CloneIndexResponse = AcknowledgeResponse; +export type { UpdateByQueryResponse } from './pickup_updated_mappings'; +import { pickupUpdatedMappings } from './pickup_updated_mappings'; -/** - * Makes a clone of the source index into the target. - * - * @remarks - * This method adds some additional logic to the ES clone index API: - * - it is idempotent, if it gets called multiple times subsequent calls will - * wait for the first clone operation to complete (up to 60s) - * - the first call will wait up to 120s for the cluster state and all shards - * to be updated. - */ -export const cloneIndex = ( - client: ElasticsearchClient, - source: string, - target: string, - /** only used for testing */ - timeout = DEFAULT_TIMEOUT -): TaskEither.TaskEither => { - const cloneTask: TaskEither.TaskEither< - RetryableEsClientError | IndexNotFound, - AcknowledgeResponse - > = () => { - return client.indices - .clone( - { - index: source, - target, - wait_for_active_shards: WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, - body: { - settings: { - index: { - // The source we're cloning from will have a write block set, so - // we need to remove it to allow writes to our newly cloned index - 'blocks.write': false, - number_of_shards: INDEX_NUMBER_OF_SHARDS, - auto_expand_replicas: INDEX_AUTO_EXPAND_REPLICAS, - // Set an explicit refresh interval so that we don't inherit the - // value from incorrectly configured index templates (not required - // after we adopt system indices) - refresh_interval: '1s', - // Bump priority so that recovery happens before newer indices - priority: 10, - }, - }, - }, - timeout, - }, - { maxRetries: 0 /** handle retry ourselves for now */ } - ) - .then((res) => { - /** - * - acknowledged=false, we timed out before the cluster state was - * updated with the newly created index, but it probably will be - * created sometime soon. - * - shards_acknowledged=false, we timed out before all shards were - * started - * - acknowledged=true, shards_acknowledged=true, cloning complete - */ - return Either.right({ - acknowledged: res.body.acknowledged, - shardsAcknowledged: res.body.shards_acknowledged, - }); - }) - .catch((error: EsErrors.ResponseError) => { - if (error?.body?.error?.type === 'index_not_found_exception') { - return Either.left({ - type: 'index_not_found_exception' as const, - index: error.body.error.index, - }); - } else if (error?.body?.error?.type === 'resource_already_exists_exception') { - /** - * If the target index already exists it means a previous clone - * operation had already been started. However, we can't be sure - * that all shards were started so return shardsAcknowledged: false - */ - return Either.right({ - acknowledged: true, - shardsAcknowledged: false, - }); - } else { - throw error; - } - }) - .catch(catchRetryableEsClientErrors); - }; +export type { OpenPitResponse, OpenPitParams } from './open_pit'; +export { openPit, pitKeepAlive } from './open_pit'; - return pipe( - cloneTask, - TaskEither.chain((res) => { - if (res.acknowledged && res.shardsAcknowledged) { - // If the cluster state was updated and all shards ackd we're done - return TaskEither.right(res); - } else { - // Otherwise, wait until the target index has a 'green' status. - return pipe( - waitForIndexStatusYellow(client, target, timeout), - TaskEither.map((value) => { - /** When the index status is 'green' we know that all shards were started */ - return { acknowledged: true, shardsAcknowledged: true }; - }) - ); - } - }) - ); -}; +export type { ReadWithPit, ReadWithPitParams } from './read_with_pit'; +export { readWithPit } from './read_with_pit'; -interface WaitForTaskResponse { - error: Option.Option<{ type: string; reason: string; index: string }>; - completed: boolean; - failures: Option.Option; - description?: string; -} +export type { ClosePitParams } from './close_pit'; +export { closePit } from './close_pit'; -/** - * After waiting for the specificed timeout, the task has not yet completed. - * - * When querying the tasks API we use `wait_for_completion=true` to block the - * request until the task completes. If after the `timeout`, the task still has - * not completed we return this error. This does not mean that the task itelf - * has reached a timeout, Elasticsearch will continue to run the task. - */ -export interface WaitForTaskCompletionTimeout { - /** After waiting for the specificed timeout, the task has not yet completed. */ - readonly type: 'wait_for_task_completion_timeout'; - readonly message: string; - readonly error?: Error; -} +export type { TransformDocsParams } from './transform_docs'; +export { transformDocs } from './transform_docs'; -const catchWaitForTaskCompletionTimeout = ( - e: ResponseError -): Either.Either => { - if ( - e.body?.error?.type === 'timeout_exception' || - e.body?.error?.type === 'receive_timeout_transport_exception' - ) { - return Either.left({ - type: 'wait_for_task_completion_timeout' as const, - message: `[${e.body.error.type}] ${e.body.error.reason}`, - error: e, - }); - } else { - throw e; - } -}; +export type { RefreshIndexParams } from './refresh_index'; +export { refreshIndex } from './refresh_index'; -/** - * Blocks for up to 60s or until a task completes. - * - * TODO: delete completed tasks - */ -const waitForTask = ( - client: ElasticsearchClient, - taskId: string, - timeout: string -): TaskEither.TaskEither< - RetryableEsClientError | WaitForTaskCompletionTimeout, - WaitForTaskResponse -> => () => { - return client.tasks - .get({ - task_id: taskId, - wait_for_completion: true, - timeout, - }) - .then((res) => { - const body = res.body; - const failures = body.response?.failures ?? []; - return Either.right({ - completed: body.completed, - // @ts-expect-error @elastic/elasticsearch GetTaskResponse doesn't declare `error` property - error: Option.fromNullable(body.error), - failures: failures.length > 0 ? Option.some(failures) : Option.none, - description: body.task.description, - }); - }) - .catch(catchWaitForTaskCompletionTimeout) - .catch(catchRetryableEsClientErrors); -}; - -export interface UpdateByQueryResponse { - taskId: string; -} +export type { ReindexResponse, ReindexParams } from './reindex'; +export { reindex } from './reindex'; -/** - * Pickup updated mappings by performing an update by query operation on all - * documents in the index. Returns a task ID which can be - * tracked for progress. - * - * @remarks When mappings are updated to add a field which previously wasn't - * mapped Elasticsearch won't automatically add existing documents to it's - * internal search indices. So search results on this field won't return any - * existing documents. By running an update by query we essentially refresh - * these the internal search indices for all existing documents. - * This action uses `conflicts: 'proceed'` allowing several Kibana instances - * to run this in parallel. - */ -export const pickupUpdatedMappings = ( - client: ElasticsearchClient, - index: string -): TaskEither.TaskEither => () => { - return client - .updateByQuery({ - // Ignore version conflicts that can occur from parallel update by query operations - conflicts: 'proceed', - // Return an error when targeting missing or closed indices - allow_no_indices: false, - index, - // How many documents to update per batch - scroll_size: BATCH_SIZE, - // force a refresh so that we can query the updated index immediately - // after the operation completes - refresh: true, - // Create a task and return task id instead of blocking until complete - wait_for_completion: false, - }) - .then(({ body: { task: taskId } }) => { - return Either.right({ taskId: String(taskId!) }); - }) - .catch(catchRetryableEsClientErrors); -}; +import type { IncompatibleMappingException } from './wait_for_reindex_task'; +export { waitForReindexTask } from './wait_for_reindex_task'; -/** @internal */ -export interface OpenPitResponse { - pitId: string; -} +export type { VerifyReindexParams } from './verify_reindex'; +export { verifyReindex } from './verify_reindex'; -// how long ES should keep PIT alive -const pitKeepAlive = '10m'; -/* - * Creates a lightweight view of data when the request has been initiated. - * See https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html - * */ -export const openPit = ( - client: ElasticsearchClient, - index: string -): TaskEither.TaskEither => () => { - return client - .openPointInTime({ - index, - keep_alive: pitKeepAlive, - }) - .then((response) => Either.right({ pitId: response.body.id })) - .catch(catchRetryableEsClientErrors); -}; +import type { AliasNotFound, RemoveIndexNotAConcreteIndex } from './update_aliases'; +export type { AliasAction, UpdateAliasesParams } from './update_aliases'; +export { updateAliases } from './update_aliases'; -/** @internal */ -export interface ReadWithPit { - outdatedDocuments: SavedObjectsRawDoc[]; - readonly lastHitSortValue: number[] | undefined; - readonly totalHits: number | undefined; -} +export type { CreateIndexParams } from './create_index'; +export { createIndex } from './create_index'; -/* - * Requests documents from the index using PIT mechanism. - * */ -export const readWithPit = ( - client: ElasticsearchClient, - pitId: string, - query: estypes.QueryContainer, - batchSize: number, - searchAfter?: number[], - seqNoPrimaryTerm?: boolean -): TaskEither.TaskEither => () => { - return client - .search({ - seq_no_primary_term: seqNoPrimaryTerm, - body: { - // Sort fields are required to use searchAfter - sort: { - // the most efficient option as order is not important for the migration - _shard_doc: { order: 'asc' }, - }, - pit: { id: pitId, keep_alive: pitKeepAlive }, - size: batchSize, - search_after: searchAfter, - /** - * We want to know how many documents we need to process so we can log the progress. - * But we also want to increase the performance of these requests, - * so we ask ES to report the total count only on the first request (when searchAfter does not exist) - */ - track_total_hits: typeof searchAfter === 'undefined', - query, - }, - }) - .then((response) => { - const totalHits = - typeof response.body.hits.total === 'number' - ? response.body.hits.total // This format is to be removed in 8.0 - : response.body.hits.total?.value; - const hits = response.body.hits.hits; +export type { + UpdateAndPickupMappingsResponse, + UpdateAndPickupMappingsParams, +} from './update_and_pickup_mappings'; +export { updateAndPickupMappings } from './update_and_pickup_mappings'; - if (hits.length > 0) { - return Either.right({ - // @ts-expect-error @elastic/elasticsearch _source is optional - outdatedDocuments: hits as SavedObjectsRawDoc[], - lastHitSortValue: hits[hits.length - 1].sort as number[], - totalHits, - }); - } +export { waitForPickupUpdatedMappingsTask } from './wait_for_pickup_updated_mappings_task'; - return Either.right({ - outdatedDocuments: [], - lastHitSortValue: undefined, - totalHits, - }); - }) - .catch(catchRetryableEsClientErrors); -}; +export type { + SearchResponse, + SearchForOutdatedDocumentsOptions, +} from './search_for_outdated_documents'; +export { searchForOutdatedDocuments } from './search_for_outdated_documents'; -/* - * Closes PIT. - * See https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html - * */ -export const closePit = ( - client: ElasticsearchClient, - pitId: string -): TaskEither.TaskEither => () => { - return client - .closePointInTime({ - body: { id: pitId }, - }) - .then((response) => { - if (!response.body.succeeded) { - throw new Error(`Failed to close PointInTime with id: ${pitId}`); - } - return Either.right({}); - }) - .catch(catchRetryableEsClientErrors); -}; +export type { BulkOverwriteTransformedDocumentsParams } from './bulk_overwrite_transformed_documents'; +export { bulkOverwriteTransformedDocuments } from './bulk_overwrite_transformed_documents'; -/* - * Transform outdated docs - * */ -export const transformDocs = ( - transformRawDocs: TransformRawDocs, - outdatedDocuments: SavedObjectsRawDoc[] -): TaskEither.TaskEither => - transformRawDocs(outdatedDocuments); +export { pickupUpdatedMappings, waitForTask, waitForIndexStatusYellow }; +export type { AliasNotFound, RemoveIndexNotAConcreteIndex }; -/** @internal */ -export interface ReindexResponse { - taskId: string; +export interface IndexNotFound { + type: 'index_not_found_exception'; + index: string; } - -/** - * Wait for Elasticsearch to reindex all the changes. - */ -export const refreshIndex = ( - client: ElasticsearchClient, - targetIndex: string -): TaskEither.TaskEither => () => { - return client.indices - .refresh({ - index: targetIndex, - }) - .then(() => { - return Either.right({ refreshed: true }); - }) - .catch(catchRetryableEsClientErrors); -}; -/** - * Reindex documents from the `sourceIndex` into the `targetIndex`. Returns a - * task ID which can be tracked for progress. - * - * @remarks This action is idempotent allowing several Kibana instances to run - * this in parallel. By using `op_type: 'create', conflicts: 'proceed'` there - * will be only one write per reindexed document. - */ -export const reindex = ( - client: ElasticsearchClient, - sourceIndex: string, - targetIndex: string, - reindexScript: Option.Option, - requireAlias: boolean, - /* When reindexing we use a source query to exclude saved objects types which - * are no longer used. These saved objects will still be kept in the outdated - * index for backup purposes, but won't be available in the upgraded index. - */ - unusedTypesQuery: estypes.QueryContainer -): TaskEither.TaskEither => () => { - return client - .reindex({ - // Require targetIndex to be an alias. Prevents a new index from being - // created if targetIndex doesn't exist. - require_alias: requireAlias, - body: { - // Ignore version conflicts from existing documents - conflicts: 'proceed', - source: { - index: sourceIndex, - // Set reindex batch size - size: BATCH_SIZE, - // Exclude saved object types - query: unusedTypesQuery, - }, - dest: { - index: targetIndex, - // Don't override existing documents, only create if missing - op_type: 'create', - }, - script: Option.fold( - () => undefined, - (script) => ({ - source: script, - lang: 'painless', - }) - )(reindexScript), - }, - // force a refresh so that we can query the target index - refresh: true, - // Create a task and return task id instead of blocking until complete - wait_for_completion: false, - }) - .then(({ body: { task: taskId } }) => { - return Either.right({ taskId: String(taskId) }); - }) - .catch(catchRetryableEsClientErrors); -}; - -interface WaitForReindexTaskFailure { +export interface WaitForReindexTaskFailure { readonly cause: { type: string; reason: string }; } - -/** @internal */ export interface TargetIndexHadWriteBlock { type: 'target_index_had_write_block'; } -/** @internal */ -export interface IncompatibleMappingException { - type: 'incompatible_mapping_exception'; -} - -export const waitForReindexTask = flow( - waitForTask, - TaskEither.chain( - ( - res - ): TaskEither.TaskEither< - | IndexNotFound - | TargetIndexHadWriteBlock - | IncompatibleMappingException - | RetryableEsClientError - | WaitForTaskCompletionTimeout, - 'reindex_succeeded' - > => { - const failureIsAWriteBlock = ({ cause: { type, reason } }: WaitForReindexTaskFailure) => - type === 'cluster_block_exception' && - reason.match(/index \[.+] blocked by: \[FORBIDDEN\/8\/index write \(api\)\]/); - - const failureIsIncompatibleMappingException = ({ - cause: { type, reason }, - }: WaitForReindexTaskFailure) => - type === 'strict_dynamic_mapping_exception' || type === 'mapper_parsing_exception'; - - if (Option.isSome(res.error)) { - if (res.error.value.type === 'index_not_found_exception') { - return TaskEither.left({ - type: 'index_not_found_exception' as const, - index: res.error.value.index, - }); - } else { - throw new Error('Reindex failed with the following error:\n' + JSON.stringify(res.error)); - } - } else if (Option.isSome(res.failures)) { - if (res.failures.value.every(failureIsAWriteBlock)) { - return TaskEither.left({ type: 'target_index_had_write_block' as const }); - } else if (res.failures.value.every(failureIsIncompatibleMappingException)) { - return TaskEither.left({ type: 'incompatible_mapping_exception' as const }); - } else { - throw new Error( - 'Reindex failed with the following failures:\n' + JSON.stringify(res.failures.value) - ); - } - } else { - return TaskEither.right('reindex_succeeded' as const); - } - } - ) -); - -export const verifyReindex = ( - client: ElasticsearchClient, - sourceIndex: string, - targetIndex: string -): TaskEither.TaskEither< - RetryableEsClientError | { type: 'verify_reindex_failed' }, - 'verify_reindex_succeeded' -> => () => { - const count = (index: string) => - client - .count<{ count: number }>({ - index, - // Return an error when targeting missing or closed indices - allow_no_indices: false, - }) - .then((res) => { - return res.body.count; - }); - - return Promise.all([count(sourceIndex), count(targetIndex)]) - .then(([sourceCount, targetCount]) => { - if (targetCount >= sourceCount) { - return Either.right('verify_reindex_succeeded' as const); - } else { - return Either.left({ type: 'verify_reindex_failed' as const }); - } - }) - .catch(catchRetryableEsClientErrors); -}; - -export const waitForPickupUpdatedMappingsTask = flow( - waitForTask, - TaskEither.chain( - ( - res - ): TaskEither.TaskEither< - RetryableEsClientError | WaitForTaskCompletionTimeout, - 'pickup_updated_mappings_succeeded' - > => { - // We don't catch or type failures/errors because they should never - // occur in our migration algorithm and we don't have any business logic - // for dealing with it. If something happens we'll just crash and try - // again. - if (Option.isSome(res.failures)) { - throw new Error( - 'pickupUpdatedMappings task failed with the following failures:\n' + - JSON.stringify(res.failures.value) - ); - } else if (Option.isSome(res.error)) { - throw new Error( - 'pickupUpdatedMappings task failed with the following error:\n' + - JSON.stringify(res.error.value) - ); - } else { - return TaskEither.right('pickup_updated_mappings_succeeded' as const); - } - } - ) -); -export interface AliasNotFound { - type: 'alias_not_found_exception'; -} - -/** @internal */ -export interface RemoveIndexNotAConcreteIndex { - type: 'remove_index_not_a_concrete_index'; -} - -/** @internal */ -export type AliasAction = - | { remove_index: { index: string } } - | { remove: { index: string; alias: string; must_exist: boolean } } - | { add: { index: string; alias: string } }; - -/** - * Calls the Update index alias API `_alias` with the provided alias actions. - */ -export const updateAliases = ( - client: ElasticsearchClient, - aliasActions: AliasAction[] -): TaskEither.TaskEither< - IndexNotFound | AliasNotFound | RemoveIndexNotAConcreteIndex | RetryableEsClientError, - 'update_aliases_succeeded' -> => () => { - return client.indices - .updateAliases( - { - body: { - actions: aliasActions, - }, - }, - { maxRetries: 0 } - ) - .then(() => { - // Ignore `acknowledged: false`. When the coordinating node accepts - // the new cluster state update but not all nodes have applied the - // update within the timeout `acknowledged` will be false. However, - // retrying this update will always immediately result in `acknowledged: - // true` even if there are still nodes which are falling behind with - // cluster state updates. - // The only impact for using `updateAliases` to mark the version index - // as ready is that it could take longer for other Kibana instances to - // see that the version index is ready so they are more likely to - // perform unecessary duplicate work. - return Either.right('update_aliases_succeeded' as const); - }) - .catch((err: EsErrors.ElasticsearchClientError) => { - if (err instanceof EsErrors.ResponseError) { - if (err?.body?.error?.type === 'index_not_found_exception') { - return Either.left({ - type: 'index_not_found_exception' as const, - index: err.body.error.index, - }); - } else if ( - err?.body?.error?.type === 'illegal_argument_exception' && - err?.body?.error?.reason?.match( - /The provided expression \[.+\] matches an alias, specify the corresponding concrete indices instead./ - ) - ) { - return Either.left({ type: 'remove_index_not_a_concrete_index' as const }); - } else if ( - err?.body?.error?.type === 'aliases_not_found_exception' || - (err?.body?.error?.type === 'resource_not_found_exception' && - err?.body?.error?.reason?.match(/required alias \[.+\] does not exist/)) - ) { - return Either.left({ - type: 'alias_not_found_exception' as const, - }); - } - } - throw err; - }) - .catch(catchRetryableEsClientErrors); -}; - /** @internal */ export interface AcknowledgeResponse { acknowledged: boolean; shardsAcknowledged: boolean; } - -function aliasArrayToRecord(aliases: string[]): Record { - const result: Record = {}; - for (const alias of aliases) { - result[alias] = {}; - } - return result; -} -/** - * Creates an index with the given mappings - * - * @remarks - * This method adds some additional logic to the ES create index API: - * - it is idempotent, if it gets called multiple times subsequent calls will - * wait for the first create operation to complete (up to 60s) - * - the first call will wait up to 120s for the cluster state and all shards - * to be updated. - */ -export const createIndex = ( - client: ElasticsearchClient, - indexName: string, - mappings: IndexMapping, - aliases: string[] = [] -): TaskEither.TaskEither => { - const createIndexTask: TaskEither.TaskEither< - RetryableEsClientError, - AcknowledgeResponse - > = () => { - const aliasesObject = aliasArrayToRecord(aliases); - - return client.indices - .create( - { - index: indexName, - // wait until all shards are available before creating the index - // (since number_of_shards=1 this does not have any effect atm) - wait_for_active_shards: WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, - // Wait up to 60s for the cluster state to update and all shards to be - // started - timeout: DEFAULT_TIMEOUT, - body: { - mappings, - aliases: aliasesObject, - settings: { - index: { - // ES rule of thumb: shards should be several GB to 10's of GB, so - // Kibana is unlikely to cross that limit. - number_of_shards: 1, - auto_expand_replicas: INDEX_AUTO_EXPAND_REPLICAS, - // Set an explicit refresh interval so that we don't inherit the - // value from incorrectly configured index templates (not required - // after we adopt system indices) - refresh_interval: '1s', - // Bump priority so that recovery happens before newer indices - priority: 10, - }, - }, - }, - }, - { maxRetries: 0 /** handle retry ourselves for now */ } - ) - .then((res) => { - /** - * - acknowledged=false, we timed out before the cluster state was - * updated on all nodes with the newly created index, but it - * probably will be created sometime soon. - * - shards_acknowledged=false, we timed out before all shards were - * started - * - acknowledged=true, shards_acknowledged=true, index creation complete - */ - return Either.right({ - acknowledged: res.body.acknowledged, - shardsAcknowledged: res.body.shards_acknowledged, - }); - }) - .catch((error) => { - if (error?.body?.error?.type === 'resource_already_exists_exception') { - /** - * If the target index already exists it means a previous create - * operation had already been started. However, we can't be sure - * that all shards were started so return shardsAcknowledged: false - */ - return Either.right({ - acknowledged: true, - shardsAcknowledged: false, - }); - } else { - throw error; - } - }) - .catch(catchRetryableEsClientErrors); - }; - - return pipe( - createIndexTask, - TaskEither.chain((res) => { - if (res.acknowledged && res.shardsAcknowledged) { - // If the cluster state was updated and all shards ackd we're done - return TaskEither.right('create_index_succeeded'); - } else { - // Otherwise, wait until the target index has a 'yellow' status. - return pipe( - waitForIndexStatusYellow(client, indexName, DEFAULT_TIMEOUT), - TaskEither.map(() => { - /** When the index status is 'yellow' we know that all shards were started */ - return 'create_index_succeeded'; - }) - ); - } - }) - ); -}; - -/** @internal */ -export interface UpdateAndPickupMappingsResponse { - taskId: string; +// Map of left response 'type' string -> response interface +export interface ActionErrorTypeMap { + wait_for_task_completion_timeout: WaitForTaskCompletionTimeout; + retryable_es_client_error: RetryableEsClientError; + index_not_found_exception: IndexNotFound; + target_index_had_write_block: TargetIndexHadWriteBlock; + incompatible_mapping_exception: IncompatibleMappingException; + alias_not_found_exception: AliasNotFound; + remove_index_not_a_concrete_index: RemoveIndexNotAConcreteIndex; + documents_transform_failed: DocumentsTransformFailed; } /** - * Updates an index's mappings and runs an pickupUpdatedMappings task so that the mapping - * changes are "picked up". Returns a taskId to track progress. + * Type guard for narrowing the type of a left */ -export const updateAndPickupMappings = ( - client: ElasticsearchClient, - index: string, - mappings: IndexMapping -): TaskEither.TaskEither => { - const putMappingTask: TaskEither.TaskEither< - RetryableEsClientError, - 'update_mappings_succeeded' - > = () => { - return client.indices - .putMapping({ - index, - timeout: DEFAULT_TIMEOUT, - body: mappings, - }) - .then((res) => { - // Ignore `acknowledged: false`. When the coordinating node accepts - // the new cluster state update but not all nodes have applied the - // update within the timeout `acknowledged` will be false. However, - // retrying this update will always immediately result in `acknowledged: - // true` even if there are still nodes which are falling behind with - // cluster state updates. - // For updateAndPickupMappings this means that there is the potential - // that some existing document's fields won't be picked up if the node - // on which the Kibana shard is running has fallen behind with cluster - // state updates and the mapping update wasn't applied before we run - // `pickupUpdatedMappings`. ES tries to limit this risk by blocking - // index operations (including update_by_query used by - // updateAndPickupMappings) if there are pending mappings changes. But - // not all mapping changes will prevent this. - return Either.right('update_mappings_succeeded' as const); - }) - .catch(catchRetryableEsClientErrors); - }; - - return pipe( - putMappingTask, - TaskEither.chain((res) => { - return pickupUpdatedMappings(client, index); - }) - ); -}; - -/** @internal */ -export interface SearchResponse { - outdatedDocuments: SavedObjectsRawDoc[]; -} - -interface SearchForOutdatedDocumentsOptions { - batchSize: number; - targetIndex: string; - outdatedDocumentsQuery?: estypes.QueryContainer; +export function isLeftTypeof( + res: any, + typeString: T +): res is ActionErrorTypeMap[T] { + return res.type === typeString; } - -/** - * Search for outdated saved object documents with the provided query. Will - * return one batch of documents. Searching should be repeated until no more - * outdated documents can be found. - * - * Used for testing only - */ -export const searchForOutdatedDocuments = ( - client: ElasticsearchClient, - options: SearchForOutdatedDocumentsOptions -): TaskEither.TaskEither => () => { - return client - .search({ - index: options.targetIndex, - // Return the _seq_no and _primary_term so we can use optimistic - // concurrency control for updates - seq_no_primary_term: true, - size: options.batchSize, - body: { - query: options.outdatedDocumentsQuery, - // Optimize search performance by sorting by the "natural" index order - sort: ['_doc'], - }, - // Return an error when targeting missing or closed indices - allow_no_indices: false, - // Don't return partial results if timeouts or shard failures are - // encountered. This is important because 0 search hits is interpreted as - // there being no more outdated documents left that require - // transformation. Although the default is `false`, we set this - // explicitly to avoid users overriding the - // search.default_allow_partial_results cluster setting to true. - allow_partial_search_results: false, - // Improve performance by not calculating the total number of hits - // matching the query. - track_total_hits: false, - // Reduce the response payload size by only returning the data we care about - filter_path: [ - 'hits.hits._id', - 'hits.hits._source', - 'hits.hits._seq_no', - 'hits.hits._primary_term', - ], - }) - .then((res) => - Either.right({ outdatedDocuments: (res.body.hits?.hits as SavedObjectsRawDoc[]) ?? [] }) - ) - .catch(catchRetryableEsClientErrors); -}; - -/** - * Write the up-to-date transformed documents to the index, overwriting any - * documents that are still on their outdated version. - */ -export const bulkOverwriteTransformedDocuments = ( - client: ElasticsearchClient, - index: string, - transformedDocs: SavedObjectsRawDoc[], - refresh: estypes.Refresh -): TaskEither.TaskEither => () => { - return client - .bulk({ - // Because we only add aliases in the MARK_VERSION_INDEX_READY step we - // can't bulkIndex to an alias with require_alias=true. This means if - // users tamper during this operation (delete indices or restore a - // snapshot), we could end up auto-creating an index without the correct - // mappings. Such tampering could lead to many other problems and is - // probably unlikely so for now we'll accept this risk and wait till - // system indices puts in place a hard control. - require_alias: false, - wait_for_active_shards: WAIT_FOR_ALL_SHARDS_TO_BE_ACTIVE, - refresh, - filter_path: ['items.*.error'], - body: transformedDocs.flatMap((doc) => { - return [ - { - index: { - _index: index, - _id: doc._id, - // overwrite existing documents - op_type: 'index', - // use optimistic concurrency control to ensure that outdated - // documents are only overwritten once with the latest version - if_seq_no: doc._seq_no, - if_primary_term: doc._primary_term, - }, - }, - doc._source, - ]; - }), - }) - .then((res) => { - // Filter out version_conflict_engine_exception since these just mean - // that another instance already updated these documents - const errors = (res.body.items ?? []).filter( - (item) => item.index?.error?.type !== 'version_conflict_engine_exception' - ); - if (errors.length === 0) { - return Either.right('bulk_index_succeeded' as const); - } else { - throw new Error(JSON.stringify(errors)); - } - }) - .catch(catchRetryableEsClientErrors); -}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts new file mode 100644 index 0000000000000..3fa4d59e383bf --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts @@ -0,0 +1,1515 @@ +/* + * Copyright 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 { ElasticsearchClient } from '../../../../'; +import { InternalCoreStart } from '../../../../internal_types'; +import * as kbnTestServer from '../../../../../test_helpers/kbn_server'; +import { Root } from '../../../../root'; +import { SavedObjectsRawDoc } from '../../../serialization'; +import { + bulkOverwriteTransformedDocuments, + cloneIndex, + closePit, + createIndex, + fetchIndices, + openPit, + OpenPitResponse, + reindex, + readWithPit, + ReadWithPit, + searchForOutdatedDocuments, + SearchResponse, + setWriteBlock, + updateAliases, + waitForReindexTask, + ReindexResponse, + waitForPickupUpdatedMappingsTask, + pickupUpdatedMappings, + UpdateByQueryResponse, + updateAndPickupMappings, + UpdateAndPickupMappingsResponse, + verifyReindex, + removeWriteBlock, + transformDocs, + waitForIndexStatusYellow, +} from '../../actions'; +import * as Either from 'fp-ts/lib/Either'; +import * as Option from 'fp-ts/lib/Option'; +import { ResponseError } from '@elastic/elasticsearch/lib/errors'; +import { DocumentsTransformFailed, DocumentsTransformSuccess } from '../../../migrations/core'; +import { TaskEither } from 'fp-ts/lib/TaskEither'; + +const { startES } = kbnTestServer.createTestServers({ + adjustTimeout: (t: number) => jest.setTimeout(t), +}); +let esServer: kbnTestServer.TestElasticsearchUtils; + +describe('migration actions', () => { + let root: Root; + let start: InternalCoreStart; + let client: ElasticsearchClient; + + beforeAll(async () => { + esServer = await startES(); + root = kbnTestServer.createRootWithCorePlugins({ + server: { + basePath: '/hello', + }, + }); + + await root.setup(); + start = await root.start(); + client = start.elasticsearch.client.asInternalUser; + + // Create test fixture data: + await createIndex({ + client, + indexName: 'existing_index_with_docs', + mappings: { + dynamic: true, + properties: {}, + }, + })(); + const sourceDocs = ([ + { _source: { title: 'doc 1' } }, + { _source: { title: 'doc 2' } }, + { _source: { title: 'doc 3' } }, + { _source: { title: 'saved object 4', type: 'another_unused_type' } }, + { _source: { title: 'f-agent-event 5', type: 'f_agent_event' } }, + ] as unknown) as SavedObjectsRawDoc[]; + await bulkOverwriteTransformedDocuments({ + client, + index: 'existing_index_with_docs', + transformedDocs: sourceDocs, + refresh: 'wait_for', + })(); + + await createIndex({ client, indexName: 'existing_index_2', mappings: { properties: {} } })(); + await createIndex({ + client, + indexName: 'existing_index_with_write_block', + mappings: { properties: {} }, + })(); + await bulkOverwriteTransformedDocuments({ + client, + index: 'existing_index_with_write_block', + transformedDocs: sourceDocs, + refresh: 'wait_for', + })(); + await setWriteBlock({ client, index: 'existing_index_with_write_block' })(); + await updateAliases({ + client, + aliasActions: [{ add: { index: 'existing_index_2', alias: 'existing_index_2_alias' } }], + })(); + }); + + afterAll(async () => { + await esServer.stop(); + await root.shutdown(); + }); + + describe('fetchIndices', () => { + it('resolves right empty record if no indices were found', async () => { + expect.assertions(1); + const task = fetchIndices({ client, indices: ['no_such_index'] }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": Object {}, + } + `); + }); + it('resolves right record with found indices', async () => { + expect.assertions(1); + const res = (await fetchIndices({ + client, + indices: ['no_such_index', 'existing_index_with_docs'], + })()) as Either.Right; + + expect(res.right).toEqual( + expect.objectContaining({ + existing_index_with_docs: { + aliases: {}, + mappings: expect.anything(), + settings: expect.anything(), + }, + }) + ); + }); + }); + + describe('setWriteBlock', () => { + beforeAll(async () => { + await createIndex({ + client, + indexName: 'new_index_without_write_block', + mappings: { properties: {} }, + })(); + }); + it('resolves right when setting the write block succeeds', async () => { + expect.assertions(1); + const task = setWriteBlock({ client, index: 'new_index_without_write_block' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "set_write_block_succeeded", + } + `); + }); + it('resolves right when setting a write block on an index that already has one', async () => { + expect.assertions(1); + const task = setWriteBlock({ client, index: 'existing_index_with_write_block' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "set_write_block_succeeded", + } + `); + }); + it('once resolved, prevents further writes to the index', async () => { + expect.assertions(1); + const task = setWriteBlock({ client, index: 'new_index_without_write_block' }); + await task(); + const sourceDocs = ([ + { _source: { title: 'doc 1' } }, + { _source: { title: 'doc 2' } }, + { _source: { title: 'doc 3' } }, + { _source: { title: 'doc 4' } }, + ] as unknown) as SavedObjectsRawDoc[]; + await expect( + bulkOverwriteTransformedDocuments({ + client, + index: 'new_index_without_write_block', + transformedDocs: sourceDocs, + refresh: 'wait_for', + })() + ).rejects.toMatchObject(expect.anything()); + }); + it('resolves left index_not_found_exception when the index does not exist', async () => { + expect.assertions(1); + const task = setWriteBlock({ client, index: 'no_such_index' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "index": "no_such_index", + "type": "index_not_found_exception", + }, + } + `); + }); + }); + + describe('removeWriteBlock', () => { + beforeAll(async () => { + await createIndex({ + client, + indexName: 'existing_index_without_write_block_2', + mappings: { properties: {} }, + })(); + await createIndex({ + client, + indexName: 'existing_index_with_write_block_2', + mappings: { properties: {} }, + })(); + await setWriteBlock({ client, index: 'existing_index_with_write_block_2' })(); + }); + it('resolves right if successful when an index already has a write block', async () => { + expect.assertions(1); + const task = removeWriteBlock({ client, index: 'existing_index_with_write_block_2' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "remove_write_block_succeeded", + } + `); + }); + it('resolves right if successful when an index does not have a write block', async () => { + expect.assertions(1); + const task = removeWriteBlock({ client, index: 'existing_index_without_write_block_2' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "remove_write_block_succeeded", + } + `); + }); + it('rejects if there is a non-retryable error', async () => { + expect.assertions(1); + const task = removeWriteBlock({ client, index: 'no_such_index' }); + await expect(task()).rejects.toThrow('index_not_found_exception'); + }); + }); + + describe('waitForIndexStatusYellow', () => { + afterAll(async () => { + await client.indices.delete({ index: 'red_then_yellow_index' }); + }); + it('resolves right after waiting for an index status to be yellow if the index already existed', async () => { + // Create a red index + await client.indices.create( + { + index: 'red_then_yellow_index', + timeout: '5s', + body: { + mappings: { properties: {} }, + settings: { + // Allocate 1 replica so that this index stays yellow + number_of_replicas: '1', + // Disable all shard allocation so that the index status is red + routing: { allocation: { enable: 'none' } }, + }, + }, + }, + { maxRetries: 0 /** handle retry ourselves for now */ } + ); + + // Start tracking the index status + const indexStatusPromise = waitForIndexStatusYellow({ + client, + index: 'red_then_yellow_index', + })(); + + const redStatusResponse = await client.cluster.health({ index: 'red_then_yellow_index' }); + expect(redStatusResponse.body.status).toBe('red'); + + client.indices.putSettings({ + index: 'red_then_yellow_index', + body: { + // Enable all shard allocation so that the index status turns yellow + settings: { routing: { allocation: { enable: 'all' } } }, + }, + }); + + await indexStatusPromise; + // Assert that the promise didn't resolve before the index became yellow + + const yellowStatusResponse = await client.cluster.health({ index: 'red_then_yellow_index' }); + expect(yellowStatusResponse.body.status).toBe('yellow'); + }); + }); + + describe('cloneIndex', () => { + afterAll(async () => { + try { + await client.indices.delete({ index: 'clone_*' }); + } catch (e) { + /** ignore */ + } + }); + it('resolves right if cloning into a new target index', async () => { + const task = cloneIndex({ + client, + source: 'existing_index_with_write_block', + target: 'clone_target_1', + }); + expect.assertions(1); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": Object { + "acknowledged": true, + "shardsAcknowledged": true, + }, + } + `); + }); + it('resolves right after waiting for index status to be yellow if clone target already existed', async () => { + expect.assertions(2); + + // Create a yellow index + await client.indices + .create({ + index: 'clone_red_then_yellow_index', + timeout: '5s', + body: { + mappings: { properties: {} }, + settings: { + // Allocate 1 replica so that this index stays yellow + number_of_replicas: '1', + // Disable all shard allocation so that the index status is red + 'index.routing.allocation.enable': 'none', + }, + }, + }) + .catch((e) => {}); + + // Call clone even though the index already exists + const cloneIndexPromise = cloneIndex({ + client, + source: 'existing_index_with_write_block', + target: 'clone_red_then_yellow_index', + })(); + + let indexYellow = false; + setTimeout(() => { + client.indices.putSettings({ + index: 'clone_red_then_yellow_index', + body: { + // Enable all shard allocation so that the index status goes yellow + settings: { routing: { allocation: { enable: 'all' } } }, + }, + }); + indexYellow = true; + }, 10); + + await cloneIndexPromise.then((res) => { + // Assert that the promise didn't resolve before the index became green + expect(indexYellow).toBe(true); + expect(res).toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": Object { + "acknowledged": true, + "shardsAcknowledged": true, + }, + } + `); + }); + }); + it('resolves left index_not_found_exception if the source index does not exist', async () => { + expect.assertions(1); + const task = cloneIndex({ client, source: 'no_such_index', target: 'clone_target_3' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "index": "no_such_index", + "type": "index_not_found_exception", + }, + } + `); + }); + it('resolves left with a retryable_es_client_error if clone target already exists but takes longer than the specified timeout before turning yellow', async () => { + // Create a red index + await client.indices + .create({ + index: 'clone_red_index', + timeout: '5s', + body: { + mappings: { properties: {} }, + settings: { + // Allocate 1 replica so that this index stays yellow + number_of_replicas: '1', + // Disable all shard allocation so that the index status is red + 'index.routing.allocation.enable': 'none', + }, + }, + }) + .catch((e) => {}); + + // Call clone even though the index already exists + const cloneIndexPromise = cloneIndex({ + client, + source: 'existing_index_with_write_block', + target: 'clone_red_index', + timeout: '0s', + })(); + + await cloneIndexPromise.then((res) => { + expect(res).toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "error": [ResponseError: Response Error], + "message": "Response Error", + "type": "retryable_es_client_error", + }, + } + `); + }); + }); + }); + + // Reindex doesn't return any errors on it's own, so we have to test + // together with waitForReindexTask + describe('reindex & waitForReindexTask', () => { + it('resolves right when reindex succeeds without reindex script', async () => { + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "reindex_succeeded", + } + `); + + const results = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'reindex_target', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments; + expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` + Array [ + "doc 1", + "doc 2", + "doc 3", + "f-agent-event 5", + "saved object 4", + ] + `); + }); + it('resolves right and excludes all documents not matching the unusedTypesQuery', async () => { + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_excluded_docs', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { + bool: { + must_not: ['f_agent_event', 'another_unused_type'].map((type) => ({ + term: { type }, + })), + }, + }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "reindex_succeeded", + } + `); + + const results = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'reindex_target_excluded_docs', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments; + expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` + Array [ + "doc 1", + "doc 2", + "doc 3", + ] + `); + }); + it('resolves right when reindex succeeds with reindex script', async () => { + expect.assertions(2); + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_2', + reindexScript: Option.some(`ctx._source.title = ctx._source.title + '_updated'`), + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "reindex_succeeded", + } + `); + const results = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'reindex_target_2', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments; + expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` + Array [ + "doc 1_updated", + "doc 2_updated", + "doc 3_updated", + "f-agent-event 5_updated", + "saved object 4_updated", + ] + `); + }); + it('resolves right, ignores version conflicts and does not update existing docs when reindex multiple times', async () => { + expect.assertions(3); + // Reindex with a script + let res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_3', + reindexScript: Option.some(`ctx._source.title = ctx._source.title + '_updated'`), + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + let task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "reindex_succeeded", + } + `); + + // reindex without a script + res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_3', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "reindex_succeeded", + } + `); + + // Assert that documents weren't overridden by the second, unscripted reindex + const results = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'reindex_target_3', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments; + expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` + Array [ + "doc 1_updated", + "doc 2_updated", + "doc 3_updated", + "f-agent-event 5_updated", + "saved object 4_updated", + ] + `); + }); + it('resolves right and proceeds to add missing documents if there are some existing docs conflicts', async () => { + expect.assertions(2); + // Simulate a reindex that only adds some of the documents from the + // source index into the target index + await createIndex({ client, indexName: 'reindex_target_4', mappings: { properties: {} } })(); + const sourceDocs = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'existing_index_with_docs', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments + .slice(0, 2) + .map(({ _id, _source }) => ({ + _id, + _source, + })); + await bulkOverwriteTransformedDocuments({ + client, + index: 'reindex_target_4', + transformedDocs: sourceDocs, + refresh: 'wait_for', + })(); + + // Now do a real reindex + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_4', + reindexScript: Option.some(`ctx._source.title = ctx._source.title + '_updated'`), + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "reindex_succeeded", + } + `); + // Assert that existing documents weren't overridden, but that missing + // documents were added by the reindex + const results = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'reindex_target_4', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments; + expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` + Array [ + "doc 1", + "doc 2", + "doc 3_updated", + "f-agent-event 5_updated", + "saved object 4_updated", + ] + `); + }); + it('resolves left incompatible_mapping_exception if all reindex failures are due to a strict_dynamic_mapping_exception', async () => { + expect.assertions(1); + // Simulates one instance having completed the UPDATE_TARGET_MAPPINGS + // step which makes the mappings incompatible with outdated documents. + // If another instance then tries a reindex it will get a + // strict_dynamic_mapping_exception even if the documents already exist + // and should ignore this error. + + // Create an index with incompatible mappings + await createIndex({ + client, + indexName: 'reindex_target_5', + mappings: { + dynamic: 'strict', + properties: { + /** no title field */ + }, + }, + })(); + + const { + right: { taskId: reindexTaskId }, + } = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_5', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: reindexTaskId, timeout: '10s' }); + + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "incompatible_mapping_exception", + }, + } + `); + }); + it('resolves left incompatible_mapping_exception if all reindex failures are due to a mapper_parsing_exception', async () => { + expect.assertions(1); + // Simulates one instance having completed the UPDATE_TARGET_MAPPINGS + // step which makes the mappings incompatible with outdated documents. + // If another instance then tries a reindex it will get a + // strict_dynamic_mapping_exception even if the documents already exist + // and should ignore this error. + + // Create an index with incompatible mappings + await createIndex({ + client, + indexName: 'reindex_target_6', + mappings: { + dynamic: false, + properties: { title: { type: 'integer' } }, // integer is incompatible with string title + }, + })(); + + const { + right: { taskId: reindexTaskId }, + } = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_6', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: reindexTaskId, timeout: '10s' }); + + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "incompatible_mapping_exception", + }, + } + `); + }); + it('resolves left index_not_found_exception if source index does not exist', async () => { + expect.assertions(1); + const res = (await reindex({ + client, + sourceIndex: 'no_such_index', + targetIndex: 'reindex_target', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { + match_all: {}, + }, + })()) as Either.Right; + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "index": "no_such_index", + "type": "index_not_found_exception", + }, + } + `); + }); + it('resolves left target_index_had_write_block if all failures are due to a write block', async () => { + expect.assertions(1); + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'existing_index_with_write_block', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "target_index_had_write_block", + }, + } + `); + }); + it('resolves left if requireAlias=true and the target is not an alias', async () => { + expect.assertions(1); + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'existing_index_with_write_block', + reindexScript: Option.none, + requireAlias: true, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' }); + + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "index": "existing_index_with_write_block", + "type": "index_not_found_exception", + }, + } + `); + }); + it('resolves left wait_for_task_completion_timeout when the task does not finish within the timeout', async () => { + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + + const task = waitForReindexTask({ client, taskId: res.right.taskId, timeout: '0s' }); + + await expect(task()).resolves.toMatchObject({ + _tag: 'Left', + left: { + error: expect.any(ResponseError), + message: expect.stringMatching( + /\[timeout_exception\] Timed out waiting for completion of \[org.elasticsearch.index.reindex.BulkByScrollTask/ + ), + type: 'wait_for_task_completion_timeout', + }, + }); + }); + }); + + describe('verifyReindex', () => { + it('resolves right if source and target indices have the same amount of documents', async () => { + expect.assertions(1); + const res = (await reindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_7', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: { match_all: {} }, + })()) as Either.Right; + await waitForReindexTask({ client, taskId: res.right.taskId, timeout: '10s' })(); + + const task = verifyReindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'reindex_target_7', + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "verify_reindex_succeeded", + } + `); + }); + it('resolves left if source and target indices have different amount of documents', async () => { + expect.assertions(1); + const task = verifyReindex({ + client, + sourceIndex: 'existing_index_with_docs', + targetIndex: 'existing_index_2', + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "verify_reindex_failed", + }, + } + `); + }); + it('rejects if source or target index does not exist', async () => { + expect.assertions(2); + let task = verifyReindex({ + client, + sourceIndex: 'no_such_index', + targetIndex: 'existing_index_2', + }); + await expect(task()).rejects.toThrow('index_not_found_exception'); + + task = verifyReindex({ + client, + sourceIndex: 'existing_index_2', + targetIndex: 'no_such_index', + }); + await expect(task()).rejects.toThrow('index_not_found_exception'); + }); + }); + + describe('openPit', () => { + it('opens PointInTime for an index', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + expect(pitResponse.right.pitId).toEqual(expect.any(String)); + + const searchResponse = await client.search({ + body: { + pit: { id: pitResponse.right.pitId }, + }, + }); + + await expect(searchResponse.body.hits.hits.length).toBeGreaterThan(0); + }); + it('rejects if index does not exist', async () => { + const openPitTask = openPit({ client, index: 'no_such_index' }); + await expect(openPitTask()).rejects.toThrow('index_not_found_exception'); + }); + }); + + describe('readWithPit', () => { + it('requests documents from an index using given PIT', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const readWithPitTask = readWithPit({ + client, + pitId: pitResponse.right.pitId, + query: { match_all: {} }, + batchSize: 1000, + searchAfter: undefined, + }); + const docsResponse = (await readWithPitTask()) as Either.Right; + + await expect(docsResponse.right.outdatedDocuments.length).toBe(5); + }); + + it('requests the batchSize of documents from an index', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const readWithPitTask = readWithPit({ + client, + pitId: pitResponse.right.pitId, + query: { match_all: {} }, + batchSize: 3, + searchAfter: undefined, + }); + const docsResponse = (await readWithPitTask()) as Either.Right; + + await expect(docsResponse.right.outdatedDocuments.length).toBe(3); + }); + + it('it excludes documents not matching the provided "query"', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const readWithPitTask = readWithPit({ + client, + pitId: pitResponse.right.pitId, + query: { + bool: { + must_not: [ + { + term: { + type: 'f_agent_event', + }, + }, + { + term: { + type: 'another_unused_type', + }, + }, + ], + }, + }, + batchSize: 1000, + searchAfter: undefined, + }); + + const docsResponse = (await readWithPitTask()) as Either.Right; + + expect(docsResponse.right.outdatedDocuments.map((doc) => doc._source.title).sort()) + .toMatchInlineSnapshot(` + Array [ + "doc 1", + "doc 2", + "doc 3", + ] + `); + }); + + it('only returns documents that match the provided "query"', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const readWithPitTask = readWithPit({ + client, + pitId: pitResponse.right.pitId, + query: { + match: { title: { query: 'doc' } }, + }, + batchSize: 1000, + searchAfter: undefined, + }); + + const docsResponse = (await readWithPitTask()) as Either.Right; + + expect(docsResponse.right.outdatedDocuments.map((doc) => doc._source.title).sort()) + .toMatchInlineSnapshot(` + Array [ + "doc 1", + "doc 2", + "doc 3", + ] + `); + }); + + it('returns docs with _seq_no and _primary_term when specified', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const readWithPitTask = readWithPit({ + client, + pitId: pitResponse.right.pitId, + query: { + match: { title: { query: 'doc' } }, + }, + batchSize: 1000, + searchAfter: undefined, + seqNoPrimaryTerm: true, + }); + + const docsResponse = (await readWithPitTask()) as Either.Right; + + expect(docsResponse.right.outdatedDocuments).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + _seq_no: expect.any(Number), + _primary_term: expect.any(Number), + }), + ]) + ); + }); + + it('does not return docs with _seq_no and _primary_term if not specified', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const readWithPitTask = readWithPit({ + client, + pitId: pitResponse.right.pitId, + query: { + match: { title: { query: 'doc' } }, + }, + batchSize: 1000, + searchAfter: undefined, + }); + + const docsResponse = (await readWithPitTask()) as Either.Right; + + expect(docsResponse.right.outdatedDocuments).toEqual( + expect.arrayContaining([ + expect.not.objectContaining({ + _seq_no: expect.any(Number), + _primary_term: expect.any(Number), + }), + ]) + ); + }); + + it('rejects if PIT does not exist', async () => { + const readWithPitTask = readWithPit({ + client, + pitId: 'no_such_pit', + query: { match_all: {} }, + batchSize: 1000, + searchAfter: undefined, + }); + await expect(readWithPitTask()).rejects.toThrow('illegal_argument_exception'); + }); + }); + + describe('closePit', () => { + it('closes PointInTime', async () => { + const openPitTask = openPit({ client, index: 'existing_index_with_docs' }); + const pitResponse = (await openPitTask()) as Either.Right; + + const pitId = pitResponse.right.pitId; + await closePit({ client, pitId })(); + + const searchTask = client.search({ + body: { + pit: { id: pitId }, + }, + }); + + await expect(searchTask).rejects.toThrow('search_phase_execution_exception'); + }); + + it('rejects if PIT does not exist', async () => { + const closePitTask = closePit({ client, pitId: 'no_such_pit' }); + await expect(closePitTask()).rejects.toThrow('illegal_argument_exception'); + }); + }); + + describe('transformDocs', () => { + it('applies "transformRawDocs" and returns the transformed documents', async () => { + const originalDocs = [ + { _id: 'foo:1', _source: { type: 'dashboard', value: 1 } }, + { _id: 'foo:2', _source: { type: 'dashboard', value: 2 } }, + ]; + + function innerTransformRawDocs( + docs: SavedObjectsRawDoc[] + ): TaskEither { + return async () => { + const processedDocs: SavedObjectsRawDoc[] = []; + for (const doc of docs) { + doc._source.value += 1; + processedDocs.push(doc); + } + return Either.right({ processedDocs }); + }; + } + const transformTask = transformDocs({ + transformRawDocs: innerTransformRawDocs, + outdatedDocuments: originalDocs, + }); + + const resultsWithProcessDocs = ((await transformTask()) as Either.Right) + .right.processedDocs; + expect(resultsWithProcessDocs.length).toEqual(2); + const foo2 = resultsWithProcessDocs.find((h) => h._id === 'foo:2'); + expect(foo2?._source?.value).toBe(3); + }); + }); + + describe('waitForPickupUpdatedMappingsTask', () => { + it('rejects if there are failures', async () => { + const res = (await pickupUpdatedMappings( + client, + 'existing_index_with_write_block' + )()) as Either.Right; + + const task = waitForPickupUpdatedMappingsTask({ + client, + taskId: res.right.taskId, + timeout: '10s', + }); + + // We can't do a snapshot match because the response includes an index + // id which ES assigns dynamically + await expect(task()).rejects.toMatchObject({ + message: /pickupUpdatedMappings task failed with the following failures:\n\[\{\"index\":\"existing_index_with_write_block\"/, + }); + }); + it('rejects if there is an error', async () => { + const res = (await pickupUpdatedMappings( + client, + 'no_such_index' + )()) as Either.Right; + + const task = waitForPickupUpdatedMappingsTask({ + client, + taskId: res.right.taskId, + timeout: '10s', + }); + + await expect(task()).rejects.toThrow('index_not_found_exception'); + }); + it('resolves left wait_for_task_completion_timeout when the task does not complete within the timeout', async () => { + const res = (await pickupUpdatedMappings( + client, + 'existing_index_with_docs' + )()) as Either.Right; + + const task = waitForPickupUpdatedMappingsTask({ + client, + taskId: res.right.taskId, + timeout: '0s', + }); + + await expect(task()).resolves.toMatchObject({ + _tag: 'Left', + left: { + error: expect.any(ResponseError), + message: expect.stringMatching( + /\[timeout_exception\] Timed out waiting for completion of \[org.elasticsearch.index.reindex.BulkByScrollTask/ + ), + type: 'wait_for_task_completion_timeout', + }, + }); + }); + it('resolves right when successful', async () => { + const res = (await pickupUpdatedMappings( + client, + 'existing_index_with_docs' + )()) as Either.Right; + + const task = waitForPickupUpdatedMappingsTask({ + client, + taskId: res.right.taskId, + timeout: '10s', + }); + + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "pickup_updated_mappings_succeeded", + } + `); + }); + }); + + describe('updateAndPickupMappings', () => { + it('resolves right when mappings were updated and picked up', async () => { + // Create an index without any mappings and insert documents into it + await createIndex({ + client, + indexName: 'existing_index_without_mappings', + mappings: { + dynamic: false, + properties: {}, + }, + })(); + const sourceDocs = ([ + { _source: { title: 'doc 1' } }, + { _source: { title: 'doc 2' } }, + { _source: { title: 'doc 3' } }, + { _source: { title: 'doc 4' } }, + ] as unknown) as SavedObjectsRawDoc[]; + await bulkOverwriteTransformedDocuments({ + client, + index: 'existing_index_without_mappings', + transformedDocs: sourceDocs, + refresh: 'wait_for', + })(); + + // Assert that we can't search over the unmapped fields of the document + const originalSearchResults = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'existing_index_without_mappings', + outdatedDocumentsQuery: { + match: { title: { query: 'doc' } }, + }, + })()) as Either.Right).right.outdatedDocuments; + expect(originalSearchResults.length).toBe(0); + + // Update and pickup mappings so that the title field is searchable + const res = await updateAndPickupMappings({ + client, + index: 'existing_index_without_mappings', + mappings: { + properties: { + title: { type: 'text' }, + }, + }, + })(); + expect(Either.isRight(res)).toBe(true); + const taskId = (res as Either.Right).right.taskId; + await waitForPickupUpdatedMappingsTask({ client, taskId, timeout: '60s' })(); + + // Repeat the search expecting to be able to find the existing documents + const pickedUpSearchResults = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'existing_index_without_mappings', + outdatedDocumentsQuery: { + match: { title: { query: 'doc' } }, + }, + })()) as Either.Right).right.outdatedDocuments; + expect(pickedUpSearchResults.length).toBe(4); + }); + }); + + describe('updateAliases', () => { + describe('remove', () => { + it('resolves left index_not_found_exception when the index does not exist', async () => { + const task = updateAliases({ + client, + aliasActions: [ + { + remove: { + alias: 'no_such_alias', + index: 'no_such_index', + must_exist: false, + }, + }, + ], + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "index": "no_such_index", + "type": "index_not_found_exception", + }, + } + `); + }); + describe('with must_exist=false', () => { + it('resolves left alias_not_found_exception when alias does not exist', async () => { + const task = updateAliases({ + client, + aliasActions: [ + { + remove: { + alias: 'no_such_alias', + index: 'existing_index_with_docs', + must_exist: false, + }, + }, + ], + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "alias_not_found_exception", + }, + } + `); + }); + }); + describe('with must_exist=true', () => { + it('resolves left alias_not_found_exception when alias does not exist on specified index', async () => { + const task = updateAliases({ + client, + aliasActions: [ + { + remove: { + alias: 'existing_index_2_alias', + index: 'existing_index_with_docs', + must_exist: true, + }, + }, + ], + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "alias_not_found_exception", + }, + } + `); + }); + it('resolves left alias_not_found_exception when alias does not exist', async () => { + const task = updateAliases({ + client, + aliasActions: [ + { + remove: { + alias: 'no_such_alias', + index: 'existing_index_with_docs', + must_exist: true, + }, + }, + ], + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "alias_not_found_exception", + }, + } + `); + }); + }); + }); + describe('remove_index', () => { + it('left index_not_found_exception if index does not exist', async () => { + const task = updateAliases({ + client, + aliasActions: [ + { + remove_index: { + index: 'no_such_index', + }, + }, + ], + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "index": "no_such_index", + "type": "index_not_found_exception", + }, + } + `); + }); + it('left remove_index_not_a_concrete_index when remove_index targets an alias', async () => { + const task = updateAliases({ + client, + aliasActions: [ + { + remove_index: { + index: 'existing_index_2_alias', + }, + }, + ], + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Left", + "left": Object { + "type": "remove_index_not_a_concrete_index", + }, + } + `); + }); + }); + }); + + describe('createIndex', () => { + afterAll(async () => { + await client.indices.delete({ index: 'red_then_yellow_index' }); + }); + it('resolves right after waiting for an index status to be yellow if the index already existed', async () => { + expect.assertions(2); + // Create a red index + await client.indices + .create( + { + index: 'red_then_yellow_index', + timeout: '5s', + body: { + mappings: { properties: {} }, + settings: { + // Allocate 1 replica so that this index stays yellow + number_of_replicas: '1', + // Disable all shard allocation so that the index status is red + 'index.routing.allocation.enable': 'none', + }, + }, + }, + { maxRetries: 0 /** handle retry ourselves for now */ } + ) + .catch((e) => { + /** ignore */ + }); + + // Call createIndex even though the index already exists + const createIndexPromise = createIndex({ + client, + indexName: 'red_then_yellow_index', + mappings: undefined as any, + })(); + let indexYellow = false; + + setTimeout(() => { + client.indices.putSettings({ + index: 'red_then_yellow_index', + body: { + // Disable all shard allocation so that the index status is red + settings: { routing: { allocation: { enable: 'all' } } }, + }, + }); + indexYellow = true; + }, 10); + + await createIndexPromise.then((res) => { + // Assert that the promise didn't resolve before the index became green + expect(indexYellow).toBe(true); + expect(res).toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "create_index_succeeded", + } + `); + }); + }); + it('rejects when there is an unexpected error creating the index', async () => { + // Creating an index with the same name as an existing alias to induce + // failure + await expect( + createIndex({ client, indexName: 'existing_index_2_alias', mappings: undefined as any })() + ).rejects.toThrow('invalid_index_name_exception'); + }); + }); + + describe('bulkOverwriteTransformedDocuments', () => { + it('resolves right when documents do not yet exist in the index', async () => { + const newDocs = ([ + { _source: { title: 'doc 5' } }, + { _source: { title: 'doc 6' } }, + { _source: { title: 'doc 7' } }, + ] as unknown) as SavedObjectsRawDoc[]; + const task = bulkOverwriteTransformedDocuments({ + client, + index: 'existing_index_with_docs', + transformedDocs: newDocs, + refresh: 'wait_for', + }); + + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "bulk_index_succeeded", + } + `); + }); + it('resolves right even if there were some version_conflict_engine_exception', async () => { + const existingDocs = ((await searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'existing_index_with_docs', + outdatedDocumentsQuery: undefined, + })()) as Either.Right).right.outdatedDocuments; + + const task = bulkOverwriteTransformedDocuments({ + client, + index: 'existing_index_with_docs', + transformedDocs: [ + ...existingDocs, + ({ _source: { title: 'doc 8' } } as unknown) as SavedObjectsRawDoc, + ], + refresh: 'wait_for', + }); + await expect(task()).resolves.toMatchInlineSnapshot(` + Object { + "_tag": "Right", + "right": "bulk_index_succeeded", + } + `); + }); + it('rejects if there are errors', async () => { + const newDocs = ([ + { _source: { title: 'doc 5' } }, + { _source: { title: 'doc 6' } }, + { _source: { title: 'doc 7' } }, + ] as unknown) as SavedObjectsRawDoc[]; + await expect( + bulkOverwriteTransformedDocuments({ + client, + index: 'existing_index_with_write_block', + transformedDocs: newDocs, + refresh: 'wait_for', + })() + ).rejects.toMatchObject(expect.anything()); + }); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/open_pit.test.ts b/src/core/server/saved_objects/migrationsv2/actions/open_pit.test.ts new file mode 100644 index 0000000000000..c8fc29d06f42f --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/open_pit.test.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { openPit } from './open_pit'; + +describe('openPit', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = openPit({ client, index: 'my_index' }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/open_pit.ts b/src/core/server/saved_objects/migrationsv2/actions/open_pit.ts new file mode 100644 index 0000000000000..e740dc00ac27e --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/open_pit.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 * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +/** @internal */ +export interface OpenPitResponse { + pitId: string; +} + +/** @internal */ +export interface OpenPitParams { + client: ElasticsearchClient; + index: string; +} +// how long ES should keep PIT alive +export const pitKeepAlive = '10m'; +/* + * Creates a lightweight view of data when the request has been initiated. + * See https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html + * */ +export const openPit = ({ + client, + index, +}: OpenPitParams): TaskEither.TaskEither => () => { + return client + .openPointInTime({ + index, + keep_alive: pitKeepAlive, + }) + .then((response) => Either.right({ pitId: response.body.id })) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/pickup_updated_mappings.test.ts b/src/core/server/saved_objects/migrationsv2/actions/pickup_updated_mappings.test.ts new file mode 100644 index 0000000000000..e319d4149dd1a --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/pickup_updated_mappings.test.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 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 { errors as EsErrors } from '@elastic/elasticsearch'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { pickupUpdatedMappings } from './pickup_updated_mappings'; + +describe('pickupUpdatedMappings', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = pickupUpdatedMappings(client, 'my_index'); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/pickup_updated_mappings.ts b/src/core/server/saved_objects/migrationsv2/actions/pickup_updated_mappings.ts new file mode 100644 index 0000000000000..8cc609e5277bc --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/pickup_updated_mappings.ts @@ -0,0 +1,57 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { BATCH_SIZE } from './constants'; +export interface UpdateByQueryResponse { + taskId: string; +} + +/** + * Pickup updated mappings by performing an update by query operation on all + * documents in the index. Returns a task ID which can be + * tracked for progress. + * + * @remarks When mappings are updated to add a field which previously wasn't + * mapped Elasticsearch won't automatically add existing documents to it's + * internal search indices. So search results on this field won't return any + * existing documents. By running an update by query we essentially refresh + * these the internal search indices for all existing documents. + * This action uses `conflicts: 'proceed'` allowing several Kibana instances + * to run this in parallel. + */ +export const pickupUpdatedMappings = ( + client: ElasticsearchClient, + index: string +): TaskEither.TaskEither => () => { + return client + .updateByQuery({ + // Ignore version conflicts that can occur from parallel update by query operations + conflicts: 'proceed', + // Return an error when targeting missing or closed indices + allow_no_indices: false, + index, + // How many documents to update per batch + scroll_size: BATCH_SIZE, + // force a refresh so that we can query the updated index immediately + // after the operation completes + refresh: true, + // Create a task and return task id instead of blocking until complete + wait_for_completion: false, + }) + .then(({ body: { task: taskId } }) => { + return Either.right({ taskId: String(taskId!) }); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.test.ts b/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.test.ts new file mode 100644 index 0000000000000..0d8d76b45a57b --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.test.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 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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { readWithPit } from './read_with_pit'; + +describe('readWithPit', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = readWithPit({ + client, + pitId: 'pitId', + query: { match_all: {} }, + batchSize: 10_000, + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.ts b/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.ts new file mode 100644 index 0000000000000..b101e7db0141c --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/read_with_pit.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 * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import type { estypes } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import type { SavedObjectsRawDoc } from '../../serialization'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { pitKeepAlive } from './open_pit'; + +/** @internal */ +export interface ReadWithPit { + outdatedDocuments: SavedObjectsRawDoc[]; + readonly lastHitSortValue: number[] | undefined; + readonly totalHits: number | undefined; +} + +/** @internal */ +export interface ReadWithPitParams { + client: ElasticsearchClient; + pitId: string; + query: estypes.QueryDslQueryContainer; + batchSize: number; + searchAfter?: number[]; + seqNoPrimaryTerm?: boolean; +} + +/* + * Requests documents from the index using PIT mechanism. + * */ +export const readWithPit = ({ + client, + pitId, + query, + batchSize, + searchAfter, + seqNoPrimaryTerm, +}: ReadWithPitParams): TaskEither.TaskEither => () => { + return client + .search({ + seq_no_primary_term: seqNoPrimaryTerm, + body: { + // Sort fields are required to use searchAfter + sort: { + // the most efficient option as order is not important for the migration + _shard_doc: { order: 'asc' }, + }, + pit: { id: pitId, keep_alive: pitKeepAlive }, + size: batchSize, + search_after: searchAfter, + /** + * We want to know how many documents we need to process so we can log the progress. + * But we also want to increase the performance of these requests, + * so we ask ES to report the total count only on the first request (when searchAfter does not exist) + */ + track_total_hits: typeof searchAfter === 'undefined', + query, + }, + }) + .then((response) => { + const totalHits = + typeof response.body.hits.total === 'number' + ? response.body.hits.total // This format is to be removed in 8.0 + : response.body.hits.total?.value; + const hits = response.body.hits.hits; + + if (hits.length > 0) { + return Either.right({ + // @ts-expect-error @elastic/elasticsearch _source is optional + outdatedDocuments: hits as SavedObjectsRawDoc[], + lastHitSortValue: hits[hits.length - 1].sort as number[], + totalHits, + }); + } + + return Either.right({ + outdatedDocuments: [], + lastHitSortValue: undefined, + totalHits, + }); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/refresh_index.test.ts b/src/core/server/saved_objects/migrationsv2/actions/refresh_index.test.ts new file mode 100644 index 0000000000000..0ebdb2b2b1851 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/refresh_index.test.ts @@ -0,0 +1,42 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { refreshIndex } from './refresh_index'; + +describe('refreshIndex', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = refreshIndex({ client, targetIndex: 'target_index' }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/refresh_index.ts b/src/core/server/saved_objects/migrationsv2/actions/refresh_index.ts new file mode 100644 index 0000000000000..e7bcbfb7d2d53 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/refresh_index.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; + +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; + +/** @internal */ +export interface RefreshIndexParams { + client: ElasticsearchClient; + targetIndex: string; +} +/** + * Wait for Elasticsearch to reindex all the changes. + */ +export const refreshIndex = ({ + client, + targetIndex, +}: RefreshIndexParams): TaskEither.TaskEither< + RetryableEsClientError, + { refreshed: boolean } +> => () => { + return client.indices + .refresh({ + index: targetIndex, + }) + .then(() => { + return Either.right({ refreshed: true }); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/reindex.test.ts b/src/core/server/saved_objects/migrationsv2/actions/reindex.test.ts new file mode 100644 index 0000000000000..f53368bd9321b --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/reindex.test.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import * as Option from 'fp-ts/lib/Option'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { reindex } from './reindex'; + +describe('reindex', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = reindex({ + client, + sourceIndex: 'my_source_index', + targetIndex: 'my_target_index', + reindexScript: Option.none, + requireAlias: false, + unusedTypesQuery: {}, + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/reindex.ts b/src/core/server/saved_objects/migrationsv2/actions/reindex.ts new file mode 100644 index 0000000000000..e9cfb4b61dace --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/reindex.ts @@ -0,0 +1,90 @@ +/* + * Copyright 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import * as Option from 'fp-ts/lib/Option'; +import type { estypes } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { BATCH_SIZE } from './constants'; + +/** @internal */ +export interface ReindexResponse { + taskId: string; +} +/** @internal */ +export interface ReindexParams { + client: ElasticsearchClient; + sourceIndex: string; + targetIndex: string; + reindexScript: Option.Option; + requireAlias: boolean; + /* When reindexing we use a source query to exclude saved objects types which + * are no longer used. These saved objects will still be kept in the outdated + * index for backup purposes, but won't be available in the upgraded index. + */ + unusedTypesQuery: estypes.QueryDslQueryContainer; +} +/** + * Reindex documents from the `sourceIndex` into the `targetIndex`. Returns a + * task ID which can be tracked for progress. + * + * @remarks This action is idempotent allowing several Kibana instances to run + * this in parallel. By using `op_type: 'create', conflicts: 'proceed'` there + * will be only one write per reindexed document. + */ +export const reindex = ({ + client, + sourceIndex, + targetIndex, + reindexScript, + requireAlias, + unusedTypesQuery, +}: ReindexParams): TaskEither.TaskEither => () => { + return client + .reindex({ + // Require targetIndex to be an alias. Prevents a new index from being + // created if targetIndex doesn't exist. + require_alias: requireAlias, + body: { + // Ignore version conflicts from existing documents + conflicts: 'proceed', + source: { + index: sourceIndex, + // Set reindex batch size + size: BATCH_SIZE, + // Exclude saved object types + query: unusedTypesQuery, + }, + dest: { + index: targetIndex, + // Don't override existing documents, only create if missing + op_type: 'create', + }, + script: Option.fold( + () => undefined, + (script) => ({ + source: script, + lang: 'painless', + }) + )(reindexScript), + }, + // force a refresh so that we can query the target index + refresh: true, + // Create a task and return task id instead of blocking until complete + wait_for_completion: false, + }) + .then(({ body: { task: taskId } }) => { + return Either.right({ taskId: String(taskId) }); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.test.ts b/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.test.ts new file mode 100644 index 0000000000000..497211cb693ab --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.test.ts @@ -0,0 +1,53 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { removeWriteBlock } from './remove_write_block'; +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); + +describe('removeWriteBlock', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = removeWriteBlock({ client, index: 'my_index' }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + it('re-throws non retry-able errors', async () => { + const task = removeWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts b/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts new file mode 100644 index 0000000000000..b5bf64d5c29f7 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/remove_write_block.ts @@ -0,0 +1,60 @@ +/* + * Copyright 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; + +/** @internal */ +export interface RemoveWriteBlockParams { + client: ElasticsearchClient; + index: string; +} +/** + * Removes a write block from an index + */ +export const removeWriteBlock = ({ + client, + index, +}: RemoveWriteBlockParams): TaskEither.TaskEither< + RetryableEsClientError, + 'remove_write_block_succeeded' +> => () => { + return client.indices + .putSettings<{ + acknowledged: boolean; + shards_acknowledged: boolean; + }>( + { + index, + // Don't change any existing settings + preserve_existing: true, + body: { + settings: { + blocks: { + write: false, + }, + }, + }, + }, + { maxRetries: 0 /** handle retry ourselves for now */ } + ) + .then((res) => { + return res.body.acknowledged === true + ? Either.right('remove_write_block_succeeded' as const) + : Either.left({ + type: 'retryable_es_client_error' as const, + message: 'remove_write_block_failed', + }); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.test.ts b/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.test.ts new file mode 100644 index 0000000000000..ab133e9a564be --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.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 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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { searchForOutdatedDocuments } from './search_for_outdated_documents'; + +describe('searchForOutdatedDocuments', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = searchForOutdatedDocuments(client, { + batchSize: 1000, + targetIndex: 'new_index', + outdatedDocumentsQuery: {}, + }); + + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + + it('configures request according to given parameters', async () => { + const esClient = elasticsearchClientMock.createInternalClient(); + const query = {}; + const targetIndex = 'new_index'; + const batchSize = 1000; + const task = searchForOutdatedDocuments(esClient, { + batchSize, + targetIndex, + outdatedDocumentsQuery: query, + }); + + await task(); + + expect(esClient.search).toHaveBeenCalledTimes(1); + expect(esClient.search).toHaveBeenCalledWith( + expect.objectContaining({ + index: targetIndex, + size: batchSize, + body: expect.objectContaining({ query }), + }) + ); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts b/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts new file mode 100644 index 0000000000000..c27170a78245b --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/search_for_outdated_documents.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import type { estypes } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import type { SavedObjectsRawDoc, SavedObjectsRawDocSource } from '../../serialization'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; + +/** @internal */ +export interface SearchResponse { + outdatedDocuments: SavedObjectsRawDoc[]; +} + +export interface SearchForOutdatedDocumentsOptions { + batchSize: number; + targetIndex: string; + outdatedDocumentsQuery?: estypes.QueryDslQueryContainer; +} + +/** + * Search for outdated saved object documents with the provided query. Will + * return one batch of documents. Searching should be repeated until no more + * outdated documents can be found. + * + * Used for testing only + */ +export const searchForOutdatedDocuments = ( + client: ElasticsearchClient, + options: SearchForOutdatedDocumentsOptions +): TaskEither.TaskEither => () => { + return client + .search({ + index: options.targetIndex, + // Return the _seq_no and _primary_term so we can use optimistic + // concurrency control for updates + seq_no_primary_term: true, + size: options.batchSize, + body: { + query: options.outdatedDocumentsQuery, + // Optimize search performance by sorting by the "natural" index order + sort: ['_doc'], + }, + // Return an error when targeting missing or closed indices + allow_no_indices: false, + // Don't return partial results if timeouts or shard failures are + // encountered. This is important because 0 search hits is interpreted as + // there being no more outdated documents left that require + // transformation. Although the default is `false`, we set this + // explicitly to avoid users overriding the + // search.default_allow_partial_results cluster setting to true. + allow_partial_search_results: false, + // Improve performance by not calculating the total number of hits + // matching the query. + track_total_hits: false, + // Reduce the response payload size by only returning the data we care about + filter_path: [ + 'hits.hits._id', + 'hits.hits._source', + 'hits.hits._seq_no', + 'hits.hits._primary_term', + ], + }) + .then((res) => + Either.right({ outdatedDocuments: (res.body.hits?.hits as SavedObjectsRawDoc[]) ?? [] }) + ) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/set_write_block.test.ts b/src/core/server/saved_objects/migrationsv2/actions/set_write_block.test.ts new file mode 100644 index 0000000000000..cf7b3091f38ff --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/set_write_block.test.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 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 { setWriteBlock } from './set_write_block'; +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); + +describe('setWriteBlock', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = setWriteBlock({ client, index: 'my_index' }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + it('re-throws non retry-able errors', async () => { + const task = setWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/set_write_block.ts b/src/core/server/saved_objects/migrationsv2/actions/set_write_block.ts new file mode 100644 index 0000000000000..5aed316306cf9 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/set_write_block.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 { ElasticsearchClientError } from '@elastic/elasticsearch/lib/errors'; +import * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import type { IndexNotFound } from './'; + +/** @internal */ +export interface SetWriteBlockParams { + client: ElasticsearchClient; + index: string; +} +/** + * Sets a write block in place for the given index. If the response includes + * `acknowledged: true` all in-progress writes have drained and no further + * writes to this index will be possible. + * + * The first time the write block is added to an index the response will + * include `shards_acknowledged: true` but once the block is in place, + * subsequent calls return `shards_acknowledged: false` + */ +export const setWriteBlock = ({ + client, + index, +}: SetWriteBlockParams): TaskEither.TaskEither< + IndexNotFound | RetryableEsClientError, + 'set_write_block_succeeded' +> => () => { + return ( + client.indices + .addBlock<{ + acknowledged: boolean; + shards_acknowledged: boolean; + }>( + { + index, + block: 'write', + }, + { maxRetries: 0 /** handle retry ourselves for now */ } + ) + // not typed yet + .then((res: any) => { + return res.body.acknowledged === true + ? Either.right('set_write_block_succeeded' as const) + : Either.left({ + type: 'retryable_es_client_error' as const, + message: 'set_write_block_failed', + }); + }) + .catch((e: ElasticsearchClientError) => { + if (e instanceof EsErrors.ResponseError) { + if (e.body?.error?.type === 'index_not_found_exception') { + return Either.left({ type: 'index_not_found_exception' as const, index }); + } + } + throw e; + }) + .catch(catchRetryableEsClientErrors) + ); +}; +// diff --git a/src/core/server/saved_objects/migrationsv2/actions/transform_docs.ts b/src/core/server/saved_objects/migrationsv2/actions/transform_docs.ts new file mode 100644 index 0000000000000..4c712afcff3a4 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/transform_docs.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 TaskEither from 'fp-ts/lib/TaskEither'; +import type { TransformRawDocs } from '../types'; +import type { SavedObjectsRawDoc } from '../../serialization'; +import { + DocumentsTransformFailed, + DocumentsTransformSuccess, +} from '../../migrations/core/migrate_raw_docs'; + +/** @internal */ +export interface TransformDocsParams { + transformRawDocs: TransformRawDocs; + outdatedDocuments: SavedObjectsRawDoc[]; +} +/* + * Transform outdated docs + * */ +export const transformDocs = ({ + transformRawDocs, + outdatedDocuments, +}: TransformDocsParams): TaskEither.TaskEither< + DocumentsTransformFailed, + DocumentsTransformSuccess +> => transformRawDocs(outdatedDocuments); diff --git a/src/core/server/saved_objects/migrationsv2/actions/update_aliases.test.ts b/src/core/server/saved_objects/migrationsv2/actions/update_aliases.test.ts new file mode 100644 index 0000000000000..e2ea07d40281b --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/update_aliases.test.ts @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { updateAliases } from './update_aliases'; +import { setWriteBlock } from './set_write_block'; + +describe('updateAliases', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = updateAliases({ client, aliasActions: [] }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + it('re-throws non retry-able errors', async () => { + const task = setWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/update_aliases.ts b/src/core/server/saved_objects/migrationsv2/actions/update_aliases.ts new file mode 100644 index 0000000000000..ffb8002f09212 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/update_aliases.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 * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { IndexNotFound } from './index'; + +export interface AliasNotFound { + type: 'alias_not_found_exception'; +} + +/** @internal */ +export interface RemoveIndexNotAConcreteIndex { + type: 'remove_index_not_a_concrete_index'; +} + +/** @internal */ +export type AliasAction = + | { remove_index: { index: string } } + | { remove: { index: string; alias: string; must_exist: boolean } } + | { add: { index: string; alias: string } }; + +/** @internal */ +export interface UpdateAliasesParams { + client: ElasticsearchClient; + aliasActions: AliasAction[]; +} +/** + * Calls the Update index alias API `_alias` with the provided alias actions. + */ +export const updateAliases = ({ + client, + aliasActions, +}: UpdateAliasesParams): TaskEither.TaskEither< + IndexNotFound | AliasNotFound | RemoveIndexNotAConcreteIndex | RetryableEsClientError, + 'update_aliases_succeeded' +> => () => { + return client.indices + .updateAliases( + { + body: { + actions: aliasActions, + }, + }, + { maxRetries: 0 } + ) + .then(() => { + // Ignore `acknowledged: false`. When the coordinating node accepts + // the new cluster state update but not all nodes have applied the + // update within the timeout `acknowledged` will be false. However, + // retrying this update will always immediately result in `acknowledged: + // true` even if there are still nodes which are falling behind with + // cluster state updates. + // The only impact for using `updateAliases` to mark the version index + // as ready is that it could take longer for other Kibana instances to + // see that the version index is ready so they are more likely to + // perform unecessary duplicate work. + return Either.right('update_aliases_succeeded' as const); + }) + .catch((err: EsErrors.ElasticsearchClientError) => { + if (err instanceof EsErrors.ResponseError) { + if (err?.body?.error?.type === 'index_not_found_exception') { + return Either.left({ + type: 'index_not_found_exception' as const, + index: err.body.error.index, + }); + } else if ( + err?.body?.error?.type === 'illegal_argument_exception' && + err?.body?.error?.reason?.match( + /The provided expression \[.+\] matches an alias, specify the corresponding concrete indices instead./ + ) + ) { + return Either.left({ type: 'remove_index_not_a_concrete_index' as const }); + } else if ( + err?.body?.error?.type === 'aliases_not_found_exception' || + (err?.body?.error?.type === 'resource_not_found_exception' && + err?.body?.error?.reason?.match(/required alias \[.+\] does not exist/)) + ) { + return Either.left({ + type: 'alias_not_found_exception' as const, + }); + } + } + throw err; + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/update_and_pickup_mappings.test.ts b/src/core/server/saved_objects/migrationsv2/actions/update_and_pickup_mappings.test.ts new file mode 100644 index 0000000000000..3ecb990cd9e82 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/update_and_pickup_mappings.test.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 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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { updateAndPickupMappings } from './update_and_pickup_mappings'; + +describe('updateAndPickupMappings', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = updateAndPickupMappings({ + client, + index: 'new_index', + mappings: { properties: {} }, + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/update_and_pickup_mappings.ts b/src/core/server/saved_objects/migrationsv2/actions/update_and_pickup_mappings.ts new file mode 100644 index 0000000000000..8c742005a01ce --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/update_and_pickup_mappings.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { pipe } from 'fp-ts/lib/pipeable'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { IndexMapping } from '../../mappings'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { pickupUpdatedMappings } from './pickup_updated_mappings'; +import { DEFAULT_TIMEOUT } from './constants'; + +/** @internal */ +export interface UpdateAndPickupMappingsResponse { + taskId: string; +} + +/** @internal */ +export interface UpdateAndPickupMappingsParams { + client: ElasticsearchClient; + index: string; + mappings: IndexMapping; +} +/** + * Updates an index's mappings and runs an pickupUpdatedMappings task so that the mapping + * changes are "picked up". Returns a taskId to track progress. + */ +export const updateAndPickupMappings = ({ + client, + index, + mappings, +}: UpdateAndPickupMappingsParams): TaskEither.TaskEither< + RetryableEsClientError, + UpdateAndPickupMappingsResponse +> => { + const putMappingTask: TaskEither.TaskEither< + RetryableEsClientError, + 'update_mappings_succeeded' + > = () => { + return client.indices + .putMapping({ + index, + timeout: DEFAULT_TIMEOUT, + body: mappings, + }) + .then((res) => { + // Ignore `acknowledged: false`. When the coordinating node accepts + // the new cluster state update but not all nodes have applied the + // update within the timeout `acknowledged` will be false. However, + // retrying this update will always immediately result in `acknowledged: + // true` even if there are still nodes which are falling behind with + // cluster state updates. + // For updateAndPickupMappings this means that there is the potential + // that some existing document's fields won't be picked up if the node + // on which the Kibana shard is running has fallen behind with cluster + // state updates and the mapping update wasn't applied before we run + // `pickupUpdatedMappings`. ES tries to limit this risk by blocking + // index operations (including update_by_query used by + // updateAndPickupMappings) if there are pending mappings changes. But + // not all mapping changes will prevent this. + return Either.right('update_mappings_succeeded' as const); + }) + .catch(catchRetryableEsClientErrors); + }; + + return pipe( + putMappingTask, + TaskEither.chain((res) => { + return pickupUpdatedMappings(client, index); + }) + ); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/verify_reindex.ts b/src/core/server/saved_objects/migrationsv2/actions/verify_reindex.ts new file mode 100644 index 0000000000000..4db599d8fbadf --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/verify_reindex.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 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; + +/** @internal */ +export interface VerifyReindexParams { + client: ElasticsearchClient; + sourceIndex: string; + targetIndex: string; +} + +export const verifyReindex = ({ + client, + sourceIndex, + targetIndex, +}: VerifyReindexParams): TaskEither.TaskEither< + RetryableEsClientError | { type: 'verify_reindex_failed' }, + 'verify_reindex_succeeded' +> => () => { + const count = (index: string) => + client + .count<{ count: number }>({ + index, + // Return an error when targeting missing or closed indices + allow_no_indices: false, + }) + .then((res) => { + return res.body.count; + }); + + return Promise.all([count(sourceIndex), count(targetIndex)]) + .then(([sourceCount, targetCount]) => { + if (targetCount >= sourceCount) { + return Either.right('verify_reindex_succeeded' as const); + } else { + return Either.left({ type: 'verify_reindex_failed' as const }); + } + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_index_status_yellow.test.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_index_status_yellow.test.ts new file mode 100644 index 0000000000000..8cea34b80ffad --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_index_status_yellow.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 { errors as EsErrors } from '@elastic/elasticsearch'; +import { waitForIndexStatusYellow } from './wait_for_index_status_yellow'; +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +jest.mock('./catch_retryable_es_client_errors'); + +describe('waitForIndexStatusYellow', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = waitForIndexStatusYellow({ + client, + index: 'my_index', + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_index_status_yellow.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_index_status_yellow.ts new file mode 100644 index 0000000000000..307c77ee5b89c --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_index_status_yellow.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 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 Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +import { DEFAULT_TIMEOUT } from './constants'; + +/** @internal */ +export interface WaitForIndexStatusYellowParams { + client: ElasticsearchClient; + index: string; + timeout?: string; +} +/** + * A yellow index status means the index's primary shard is allocated and the + * index is ready for searching/indexing documents, but ES wasn't able to + * allocate the replicas. When migrations proceed with a yellow index it means + * we don't have as much data-redundancy as we could have, but waiting for + * replicas would mean that v2 migrations fail where v1 migrations would have + * succeeded. It doesn't feel like it's Kibana's job to force users to keep + * their clusters green and even if it's green when we migrate it can turn + * yellow at any point in the future. So ultimately data-redundancy is up to + * users to maintain. + */ +export const waitForIndexStatusYellow = ({ + client, + index, + timeout = DEFAULT_TIMEOUT, +}: WaitForIndexStatusYellowParams): TaskEither.TaskEither => () => { + return client.cluster + .health({ index, wait_for_status: 'yellow', timeout }) + .then(() => { + return Either.right({}); + }) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_pickup_updated_mappings_task.test.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_pickup_updated_mappings_task.test.ts new file mode 100644 index 0000000000000..f7c380be9427c --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_pickup_updated_mappings_task.test.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { waitForPickupUpdatedMappingsTask } from './wait_for_pickup_updated_mappings_task'; +import { setWriteBlock } from './set_write_block'; + +describe('waitForPickupUpdatedMappingsTask', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = waitForPickupUpdatedMappingsTask({ + client, + taskId: 'my task id', + timeout: '60s', + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + it('re-throws non retry-able errors', async () => { + const task = setWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_pickup_updated_mappings_task.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_pickup_updated_mappings_task.ts new file mode 100644 index 0000000000000..02f7c3455cec9 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_pickup_updated_mappings_task.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 * as TaskEither from 'fp-ts/lib/TaskEither'; +import * as Option from 'fp-ts/lib/Option'; +import { flow } from 'fp-ts/lib/function'; +import { waitForTask, WaitForTaskCompletionTimeout } from './wait_for_task'; +import { RetryableEsClientError } from './catch_retryable_es_client_errors'; + +export const waitForPickupUpdatedMappingsTask = flow( + waitForTask, + TaskEither.chain( + ( + res + ): TaskEither.TaskEither< + RetryableEsClientError | WaitForTaskCompletionTimeout, + 'pickup_updated_mappings_succeeded' + > => { + // We don't catch or type failures/errors because they should never + // occur in our migration algorithm and we don't have any business logic + // for dealing with it. If something happens we'll just crash and try + // again. + if (Option.isSome(res.failures)) { + throw new Error( + 'pickupUpdatedMappings task failed with the following failures:\n' + + JSON.stringify(res.failures.value) + ); + } else if (Option.isSome(res.error)) { + throw new Error( + 'pickupUpdatedMappings task failed with the following error:\n' + + JSON.stringify(res.error.value) + ); + } else { + return TaskEither.right('pickup_updated_mappings_succeeded' as const); + } + } + ) +); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.test.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.test.ts new file mode 100644 index 0000000000000..f6a236aab5c85 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.test.ts @@ -0,0 +1,56 @@ +/* + * Copyright 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 { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +jest.mock('./catch_retryable_es_client_errors'); +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { waitForReindexTask } from './wait_for_reindex_task'; +import { setWriteBlock } from './set_write_block'; + +describe('waitForReindexTask', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + const nonRetryableError = new Error('crash'); + const clientWithNonRetryableError = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(nonRetryableError) + ); + + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = waitForReindexTask({ client, taskId: 'my task id', timeout: '60s' }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + it('re-throws non retry-able errors', async () => { + const task = setWriteBlock({ + client: clientWithNonRetryableError, + index: 'my_index', + }); + await task(); + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(nonRetryableError); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts new file mode 100644 index 0000000000000..18cf3350292b5 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_reindex_task.ts @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 TaskEither from 'fp-ts/lib/TaskEither'; +import * as Option from 'fp-ts/lib/Option'; +import { flow } from 'fp-ts/lib/function'; +import { RetryableEsClientError } from './catch_retryable_es_client_errors'; +import type { IndexNotFound, WaitForReindexTaskFailure, TargetIndexHadWriteBlock } from './index'; +import { waitForTask, WaitForTaskCompletionTimeout } from './wait_for_task'; + +export interface IncompatibleMappingException { + type: 'incompatible_mapping_exception'; +} +export const waitForReindexTask = flow( + waitForTask, + TaskEither.chain( + ( + res + ): TaskEither.TaskEither< + | IndexNotFound + | TargetIndexHadWriteBlock + | IncompatibleMappingException + | RetryableEsClientError + | WaitForTaskCompletionTimeout, + 'reindex_succeeded' + > => { + const failureIsAWriteBlock = ({ cause: { type, reason } }: WaitForReindexTaskFailure) => + type === 'cluster_block_exception' && + reason.match(/index \[.+] blocked by: \[FORBIDDEN\/8\/index write \(api\)\]/); + + const failureIsIncompatibleMappingException = ({ + cause: { type, reason }, + }: WaitForReindexTaskFailure) => + type === 'strict_dynamic_mapping_exception' || type === 'mapper_parsing_exception'; + + if (Option.isSome(res.error)) { + if (res.error.value.type === 'index_not_found_exception') { + return TaskEither.left({ + type: 'index_not_found_exception' as const, + index: res.error.value.index!, + }); + } else { + throw new Error('Reindex failed with the following error:\n' + JSON.stringify(res.error)); + } + } else if (Option.isSome(res.failures)) { + if (res.failures.value.every(failureIsAWriteBlock)) { + return TaskEither.left({ type: 'target_index_had_write_block' as const }); + } else if (res.failures.value.every(failureIsIncompatibleMappingException)) { + return TaskEither.left({ type: 'incompatible_mapping_exception' as const }); + } else { + throw new Error( + 'Reindex failed with the following failures:\n' + JSON.stringify(res.failures.value) + ); + } + } else { + return TaskEither.right('reindex_succeeded' as const); + } + } + ) +); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.test.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.test.ts new file mode 100644 index 0000000000000..c7ca9bf36a2c6 --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.test.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { errors as EsErrors } from '@elastic/elasticsearch'; +import { waitForTask } from './wait_for_task'; +import { elasticsearchClientMock } from '../../../elasticsearch/client/mocks'; +import { catchRetryableEsClientErrors } from './catch_retryable_es_client_errors'; +jest.mock('./catch_retryable_es_client_errors'); + +describe('waitForTask', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + // Create a mock client that rejects all methods with a 503 status code + // response. + const retryableError = new EsErrors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 503, + body: { error: { type: 'es_type', reason: 'es_reason' } }, + }) + ); + const client = elasticsearchClientMock.createInternalClient( + elasticsearchClientMock.createErrorTransportRequestPromise(retryableError) + ); + + describe('waitForPickupUpdatedMappingsTask', () => { + it('calls catchRetryableEsClientErrors when the promise rejects', async () => { + const task = waitForTask({ + client, + taskId: 'my task id', + timeout: '60s', + }); + try { + await task(); + } catch (e) { + /** ignore */ + } + + expect(catchRetryableEsClientErrors).toHaveBeenCalledWith(retryableError); + }); + }); +}); diff --git a/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts b/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts new file mode 100644 index 0000000000000..0cdaa88c535ab --- /dev/null +++ b/src/core/server/saved_objects/migrationsv2/actions/wait_for_task.ts @@ -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 * as Either from 'fp-ts/lib/Either'; +import * as TaskEither from 'fp-ts/lib/TaskEither'; +import * as Option from 'fp-ts/lib/Option'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +import { ElasticsearchClient } from '../../../elasticsearch'; +import { + catchRetryableEsClientErrors, + RetryableEsClientError, +} from './catch_retryable_es_client_errors'; +/** @internal */ +export interface WaitForTaskResponse { + error: Option.Option<{ type: string; reason: string; index?: string }>; + completed: boolean; + failures: Option.Option; + description?: string; +} + +/** + * After waiting for the specificed timeout, the task has not yet completed. + * + * When querying the tasks API we use `wait_for_completion=true` to block the + * request until the task completes. If after the `timeout`, the task still has + * not completed we return this error. This does not mean that the task itelf + * has reached a timeout, Elasticsearch will continue to run the task. + */ +export interface WaitForTaskCompletionTimeout { + /** After waiting for the specificed timeout, the task has not yet completed. */ + readonly type: 'wait_for_task_completion_timeout'; + readonly message: string; + readonly error?: Error; +} + +const catchWaitForTaskCompletionTimeout = ( + e: EsErrors.ResponseError +): Either.Either => { + if ( + e.body?.error?.type === 'timeout_exception' || + e.body?.error?.type === 'receive_timeout_transport_exception' + ) { + return Either.left({ + type: 'wait_for_task_completion_timeout' as const, + message: `[${e.body.error.type}] ${e.body.error.reason}`, + error: e, + }); + } else { + throw e; + } +}; + +/** @internal */ +export interface WaitForTaskParams { + client: ElasticsearchClient; + taskId: string; + timeout: string; +} +/** + * Blocks for up to 60s or until a task completes. + * + * TODO: delete completed tasks + */ +export const waitForTask = ({ + client, + taskId, + timeout, +}: WaitForTaskParams): TaskEither.TaskEither< + RetryableEsClientError | WaitForTaskCompletionTimeout, + WaitForTaskResponse +> => () => { + return client.tasks + .get({ + task_id: taskId, + wait_for_completion: true, + timeout, + }) + .then((res) => { + const body = res.body; + const failures = body.response?.failures ?? []; + return Either.right({ + completed: body.completed, + error: Option.fromNullable(body.error), + failures: failures.length > 0 ? Option.some(failures) : Option.none, + description: body.task.description, + }); + }) + .catch(catchWaitForTaskCompletionTimeout) + .catch(catchRetryableEsClientErrors); +}; diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/actions.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/actions.test.ts deleted file mode 100644 index d0158a4c68f24..0000000000000 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/actions.test.ts +++ /dev/null @@ -1,1406 +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 { ElasticsearchClient } from '../../../'; -import { InternalCoreStart } from '../../../internal_types'; -import * as kbnTestServer from '../../../../test_helpers/kbn_server'; -import { Root } from '../../../root'; -import { SavedObjectsRawDoc } from '../../serialization'; -import { - bulkOverwriteTransformedDocuments, - cloneIndex, - closePit, - createIndex, - fetchIndices, - openPit, - OpenPitResponse, - reindex, - readWithPit, - ReadWithPit, - searchForOutdatedDocuments, - SearchResponse, - setWriteBlock, - updateAliases, - waitForReindexTask, - ReindexResponse, - waitForPickupUpdatedMappingsTask, - pickupUpdatedMappings, - UpdateByQueryResponse, - updateAndPickupMappings, - UpdateAndPickupMappingsResponse, - verifyReindex, - removeWriteBlock, - transformDocs, - waitForIndexStatusYellow, -} from '../actions'; -import * as Either from 'fp-ts/lib/Either'; -import * as Option from 'fp-ts/lib/Option'; -import { ResponseError } from '@elastic/elasticsearch/lib/errors'; -import { DocumentsTransformFailed, DocumentsTransformSuccess } from '../../migrations/core'; -import { TaskEither } from 'fp-ts/lib/TaskEither'; - -const { startES } = kbnTestServer.createTestServers({ - adjustTimeout: (t: number) => jest.setTimeout(t), -}); -let esServer: kbnTestServer.TestElasticsearchUtils; - -describe('migration actions', () => { - let root: Root; - let start: InternalCoreStart; - let client: ElasticsearchClient; - - beforeAll(async () => { - esServer = await startES(); - root = kbnTestServer.createRootWithCorePlugins({ - server: { - basePath: '/hello', - }, - }); - - await root.setup(); - start = await root.start(); - client = start.elasticsearch.client.asInternalUser; - - // Create test fixture data: - await createIndex(client, 'existing_index_with_docs', { - dynamic: true, - properties: {}, - })(); - const sourceDocs = ([ - { _source: { title: 'doc 1' } }, - { _source: { title: 'doc 2' } }, - { _source: { title: 'doc 3' } }, - { _source: { title: 'saved object 4', type: 'another_unused_type' } }, - { _source: { title: 'f-agent-event 5', type: 'f_agent_event' } }, - ] as unknown) as SavedObjectsRawDoc[]; - await bulkOverwriteTransformedDocuments( - client, - 'existing_index_with_docs', - sourceDocs, - 'wait_for' - )(); - - await createIndex(client, 'existing_index_2', { properties: {} })(); - await createIndex(client, 'existing_index_with_write_block', { properties: {} })(); - await bulkOverwriteTransformedDocuments( - client, - 'existing_index_with_write_block', - sourceDocs, - 'wait_for' - )(); - await setWriteBlock(client, 'existing_index_with_write_block')(); - await updateAliases(client, [ - { add: { index: 'existing_index_2', alias: 'existing_index_2_alias' } }, - ])(); - }); - - afterAll(async () => { - await esServer.stop(); - await root.shutdown(); - }); - - describe('fetchIndices', () => { - it('resolves right empty record if no indices were found', async () => { - expect.assertions(1); - const task = fetchIndices(client, ['no_such_index']); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": Object {}, - } - `); - }); - it('resolves right record with found indices', async () => { - expect.assertions(1); - const res = (await fetchIndices(client, [ - 'no_such_index', - 'existing_index_with_docs', - ])()) as Either.Right; - - expect(res.right).toEqual( - expect.objectContaining({ - existing_index_with_docs: { - aliases: {}, - mappings: expect.anything(), - settings: expect.anything(), - }, - }) - ); - }); - }); - - describe('setWriteBlock', () => { - beforeAll(async () => { - await createIndex(client, 'new_index_without_write_block', { properties: {} })(); - }); - it('resolves right when setting the write block succeeds', async () => { - expect.assertions(1); - const task = setWriteBlock(client, 'new_index_without_write_block'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "set_write_block_succeeded", - } - `); - }); - it('resolves right when setting a write block on an index that already has one', async () => { - expect.assertions(1); - const task = setWriteBlock(client, 'existing_index_with_write_block'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "set_write_block_succeeded", - } - `); - }); - it('once resolved, prevents further writes to the index', async () => { - expect.assertions(1); - const task = setWriteBlock(client, 'new_index_without_write_block'); - await task(); - const sourceDocs = ([ - { _source: { title: 'doc 1' } }, - { _source: { title: 'doc 2' } }, - { _source: { title: 'doc 3' } }, - { _source: { title: 'doc 4' } }, - ] as unknown) as SavedObjectsRawDoc[]; - await expect( - bulkOverwriteTransformedDocuments( - client, - 'new_index_without_write_block', - sourceDocs, - 'wait_for' - )() - ).rejects.toMatchObject(expect.anything()); - }); - it('resolves left index_not_found_exception when the index does not exist', async () => { - expect.assertions(1); - const task = setWriteBlock(client, 'no_such_index'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "index": "no_such_index", - "type": "index_not_found_exception", - }, - } - `); - }); - }); - - describe('removeWriteBlock', () => { - beforeAll(async () => { - await createIndex(client, 'existing_index_without_write_block_2', { properties: {} })(); - await createIndex(client, 'existing_index_with_write_block_2', { properties: {} })(); - await setWriteBlock(client, 'existing_index_with_write_block_2')(); - }); - it('resolves right if successful when an index already has a write block', async () => { - expect.assertions(1); - const task = removeWriteBlock(client, 'existing_index_with_write_block_2'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "remove_write_block_succeeded", - } - `); - }); - it('resolves right if successful when an index does not have a write block', async () => { - expect.assertions(1); - const task = removeWriteBlock(client, 'existing_index_without_write_block_2'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "remove_write_block_succeeded", - } - `); - }); - it('rejects if there is a non-retryable error', async () => { - expect.assertions(1); - const task = removeWriteBlock(client, 'no_such_index'); - await expect(task()).rejects.toMatchInlineSnapshot( - `[ResponseError: index_not_found_exception]` - ); - }); - }); - - describe('waitForIndexStatusYellow', () => { - afterAll(async () => { - await client.indices.delete({ index: 'red_then_yellow_index' }); - }); - it('resolves right after waiting for an index status to be yellow if the index already existed', async () => { - // Create a red index - await client.indices.create( - { - index: 'red_then_yellow_index', - timeout: '5s', - body: { - mappings: { properties: {} }, - settings: { - // Allocate 1 replica so that this index stays yellow - number_of_replicas: '1', - // Disable all shard allocation so that the index status is red - index: { routing: { allocation: { enable: 'none' } } }, - }, - }, - }, - { maxRetries: 0 /** handle retry ourselves for now */ } - ); - - // Start tracking the index status - const indexStatusPromise = waitForIndexStatusYellow(client, 'red_then_yellow_index')(); - - const redStatusResponse = await client.cluster.health({ index: 'red_then_yellow_index' }); - expect(redStatusResponse.body.status).toBe('red'); - - client.indices.putSettings({ - index: 'red_then_yellow_index', - body: { - // Enable all shard allocation so that the index status turns yellow - index: { routing: { allocation: { enable: 'all' } } }, - }, - }); - - await indexStatusPromise; - // Assert that the promise didn't resolve before the index became yellow - - const yellowStatusResponse = await client.cluster.health({ index: 'red_then_yellow_index' }); - expect(yellowStatusResponse.body.status).toBe('yellow'); - }); - }); - - describe('cloneIndex', () => { - afterAll(async () => { - try { - await client.indices.delete({ index: 'clone_*' }); - } catch (e) { - /** ignore */ - } - }); - it('resolves right if cloning into a new target index', async () => { - const task = cloneIndex(client, 'existing_index_with_write_block', 'clone_target_1'); - expect.assertions(1); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": Object { - "acknowledged": true, - "shardsAcknowledged": true, - }, - } - `); - }); - it('resolves right after waiting for index status to be yellow if clone target already existed', async () => { - expect.assertions(2); - - // Create a yellow index - await client.indices - .create({ - index: 'clone_red_then_yellow_index', - timeout: '5s', - body: { - mappings: { properties: {} }, - settings: { - // Allocate 1 replica so that this index stays yellow - number_of_replicas: '1', - // Disable all shard allocation so that the index status is red - 'index.routing.allocation.enable': 'none', - }, - }, - }) - .catch((e) => {}); - - // Call clone even though the index already exists - const cloneIndexPromise = cloneIndex( - client, - 'existing_index_with_write_block', - 'clone_red_then_yellow_index' - )(); - - let indexYellow = false; - setTimeout(() => { - client.indices.putSettings({ - index: 'clone_red_then_yellow_index', - body: { - // Enable all shard allocation so that the index status goes yellow - index: { routing: { allocation: { enable: 'all' } } }, - }, - }); - indexYellow = true; - }, 10); - - await cloneIndexPromise.then((res) => { - // Assert that the promise didn't resolve before the index became green - expect(indexYellow).toBe(true); - expect(res).toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": Object { - "acknowledged": true, - "shardsAcknowledged": true, - }, - } - `); - }); - }); - it('resolves left index_not_found_exception if the source index does not exist', async () => { - expect.assertions(1); - const task = cloneIndex(client, 'no_such_index', 'clone_target_3'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "index": "no_such_index", - "type": "index_not_found_exception", - }, - } - `); - }); - it('resolves left with a retryable_es_client_error if clone target already exists but takes longer than the specified timeout before turning yellow', async () => { - // Create a red index - await client.indices - .create({ - index: 'clone_red_index', - timeout: '5s', - body: { - mappings: { properties: {} }, - settings: { - // Allocate 1 replica so that this index stays yellow - number_of_replicas: '1', - // Disable all shard allocation so that the index status is red - 'index.routing.allocation.enable': 'none', - }, - }, - }) - .catch((e) => {}); - - // Call clone even though the index already exists - const cloneIndexPromise = cloneIndex( - client, - 'existing_index_with_write_block', - 'clone_red_index', - '0s' - )(); - - await cloneIndexPromise.then((res) => { - expect(res).toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "error": [ResponseError: Response Error], - "message": "Response Error", - "type": "retryable_es_client_error", - }, - } - `); - }); - }); - }); - - // Reindex doesn't return any errors on it's own, so we have to test - // together with waitForReindexTask - describe('reindex & waitForReindexTask', () => { - it('resolves right when reindex succeeds without reindex script', async () => { - const res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - const task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "reindex_succeeded", - } - `); - - const results = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'reindex_target', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments; - expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` - Array [ - "doc 1", - "doc 2", - "doc 3", - "f-agent-event 5", - "saved object 4", - ] - `); - }); - it('resolves right and excludes all documents not matching the unusedTypesQuery', async () => { - const res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_excluded_docs', - Option.none, - false, - { - bool: { - must_not: ['f_agent_event', 'another_unused_type'].map((type) => ({ - term: { type }, - })), - }, - } - )()) as Either.Right; - const task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "reindex_succeeded", - } - `); - - const results = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'reindex_target_excluded_docs', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments; - expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` - Array [ - "doc 1", - "doc 2", - "doc 3", - ] - `); - }); - it('resolves right when reindex succeeds with reindex script', async () => { - expect.assertions(2); - const res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_2', - Option.some(`ctx._source.title = ctx._source.title + '_updated'`), - false, - { match_all: {} } - )()) as Either.Right; - const task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "reindex_succeeded", - } - `); - const results = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'reindex_target_2', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments; - expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` - Array [ - "doc 1_updated", - "doc 2_updated", - "doc 3_updated", - "f-agent-event 5_updated", - "saved object 4_updated", - ] - `); - }); - it('resolves right, ignores version conflicts and does not update existing docs when reindex multiple times', async () => { - expect.assertions(3); - // Reindex with a script - let res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_3', - Option.some(`ctx._source.title = ctx._source.title + '_updated'`), - false, - { match_all: {} } - )()) as Either.Right; - let task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "reindex_succeeded", - } - `); - - // reindex without a script - res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_3', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "reindex_succeeded", - } - `); - - // Assert that documents weren't overridden by the second, unscripted reindex - const results = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'reindex_target_3', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments; - expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` - Array [ - "doc 1_updated", - "doc 2_updated", - "doc 3_updated", - "f-agent-event 5_updated", - "saved object 4_updated", - ] - `); - }); - it('resolves right and proceeds to add missing documents if there are some existing docs conflicts', async () => { - expect.assertions(2); - // Simulate a reindex that only adds some of the documents from the - // source index into the target index - await createIndex(client, 'reindex_target_4', { properties: {} })(); - const sourceDocs = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'existing_index_with_docs', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments - .slice(0, 2) - .map(({ _id, _source }) => ({ - _id, - _source, - })); - await bulkOverwriteTransformedDocuments(client, 'reindex_target_4', sourceDocs, 'wait_for')(); - - // Now do a real reindex - const res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_4', - Option.some(`ctx._source.title = ctx._source.title + '_updated'`), - false, - { match_all: {} } - )()) as Either.Right; - const task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "reindex_succeeded", - } - `); - // Assert that existing documents weren't overridden, but that missing - // documents were added by the reindex - const results = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'reindex_target_4', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments; - expect(results.map((doc) => doc._source.title).sort()).toMatchInlineSnapshot(` - Array [ - "doc 1", - "doc 2", - "doc 3_updated", - "f-agent-event 5_updated", - "saved object 4_updated", - ] - `); - }); - it('resolves left incompatible_mapping_exception if all reindex failures are due to a strict_dynamic_mapping_exception', async () => { - expect.assertions(1); - // Simulates one instance having completed the UPDATE_TARGET_MAPPINGS - // step which makes the mappings incompatible with outdated documents. - // If another instance then tries a reindex it will get a - // strict_dynamic_mapping_exception even if the documents already exist - // and should ignore this error. - - // Create an index with incompatible mappings - await createIndex(client, 'reindex_target_5', { - dynamic: 'strict', - properties: { - /** no title field */ - }, - })(); - - const { - right: { taskId: reindexTaskId }, - } = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_5', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - const task = waitForReindexTask(client, reindexTaskId, '10s'); - - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "incompatible_mapping_exception", - }, - } - `); - }); - it('resolves left incompatible_mapping_exception if all reindex failures are due to a mapper_parsing_exception', async () => { - expect.assertions(1); - // Simulates one instance having completed the UPDATE_TARGET_MAPPINGS - // step which makes the mappings incompatible with outdated documents. - // If another instance then tries a reindex it will get a - // strict_dynamic_mapping_exception even if the documents already exist - // and should ignore this error. - - // Create an index with incompatible mappings - await createIndex(client, 'reindex_target_6', { - dynamic: false, - properties: { title: { type: 'integer' } }, // integer is incompatible with string title - })(); - - const { - right: { taskId: reindexTaskId }, - } = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_6', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - const task = waitForReindexTask(client, reindexTaskId, '10s'); - - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "incompatible_mapping_exception", - }, - } - `); - }); - it('resolves left index_not_found_exception if source index does not exist', async () => { - expect.assertions(1); - const res = (await reindex(client, 'no_such_index', 'reindex_target', Option.none, false, { - match_all: {}, - })()) as Either.Right; - const task = waitForReindexTask(client, res.right.taskId, '10s'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "index": "no_such_index", - "type": "index_not_found_exception", - }, - } - `); - }); - it('resolves left target_index_had_write_block if all failures are due to a write block', async () => { - expect.assertions(1); - const res = (await reindex( - client, - 'existing_index_with_docs', - 'existing_index_with_write_block', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - - const task = waitForReindexTask(client, res.right.taskId, '10s'); - - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "target_index_had_write_block", - }, - } - `); - }); - it('resolves left if requireAlias=true and the target is not an alias', async () => { - expect.assertions(1); - const res = (await reindex( - client, - 'existing_index_with_docs', - 'existing_index_with_write_block', - Option.none, - true, - { match_all: {} } - )()) as Either.Right; - - const task = waitForReindexTask(client, res.right.taskId, '10s'); - - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "index": "existing_index_with_write_block", - "type": "index_not_found_exception", - }, - } - `); - }); - it('resolves left wait_for_task_completion_timeout when the task does not finish within the timeout', async () => { - const res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - - const task = waitForReindexTask(client, res.right.taskId, '0s'); - - await expect(task()).resolves.toMatchObject({ - _tag: 'Left', - left: { - error: expect.any(ResponseError), - message: expect.stringMatching( - /\[timeout_exception\] Timed out waiting for completion of \[org.elasticsearch.index.reindex.BulkByScrollTask/ - ), - type: 'wait_for_task_completion_timeout', - }, - }); - }); - }); - - describe('verifyReindex', () => { - it('resolves right if source and target indices have the same amount of documents', async () => { - expect.assertions(1); - const res = (await reindex( - client, - 'existing_index_with_docs', - 'reindex_target_7', - Option.none, - false, - { match_all: {} } - )()) as Either.Right; - await waitForReindexTask(client, res.right.taskId, '10s')(); - - const task = verifyReindex(client, 'existing_index_with_docs', 'reindex_target_7'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "verify_reindex_succeeded", - } - `); - }); - it('resolves left if source and target indices have different amount of documents', async () => { - expect.assertions(1); - const task = verifyReindex(client, 'existing_index_with_docs', 'existing_index_2'); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "verify_reindex_failed", - }, - } - `); - }); - it('rejects if source or target index does not exist', async () => { - expect.assertions(2); - let task = verifyReindex(client, 'no_such_index', 'existing_index_2'); - await expect(task()).rejects.toMatchInlineSnapshot( - `[ResponseError: index_not_found_exception]` - ); - - task = verifyReindex(client, 'existing_index_2', 'no_such_index'); - await expect(task()).rejects.toThrow('index_not_found_exception'); - }); - }); - - describe('openPit', () => { - it('opens PointInTime for an index', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - expect(pitResponse.right.pitId).toEqual(expect.any(String)); - - const searchResponse = await client.search({ - body: { - pit: { id: pitResponse.right.pitId }, - }, - }); - - await expect(searchResponse.body.hits.hits.length).toBeGreaterThan(0); - }); - it('rejects if index does not exist', async () => { - const openPitTask = openPit(client, 'no_such_index'); - await expect(openPitTask()).rejects.toThrow('index_not_found_exception'); - }); - }); - - describe('readWithPit', () => { - it('requests documents from an index using given PIT', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const readWithPitTask = readWithPit( - client, - pitResponse.right.pitId, - { match_all: {} }, - 1000, - undefined - ); - const docsResponse = (await readWithPitTask()) as Either.Right; - - await expect(docsResponse.right.outdatedDocuments.length).toBe(5); - }); - - it('requests the batchSize of documents from an index', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const readWithPitTask = readWithPit( - client, - pitResponse.right.pitId, - { match_all: {} }, - 3, - undefined - ); - const docsResponse = (await readWithPitTask()) as Either.Right; - - await expect(docsResponse.right.outdatedDocuments.length).toBe(3); - }); - - it('it excludes documents not matching the provided "query"', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const readWithPitTask = readWithPit( - client, - pitResponse.right.pitId, - { - bool: { - must_not: [ - { - term: { - type: 'f_agent_event', - }, - }, - { - term: { - type: 'another_unused_type', - }, - }, - ], - }, - }, - 1000, - undefined - ); - - const docsResponse = (await readWithPitTask()) as Either.Right; - - expect(docsResponse.right.outdatedDocuments.map((doc) => doc._source.title).sort()) - .toMatchInlineSnapshot(` - Array [ - "doc 1", - "doc 2", - "doc 3", - ] - `); - }); - - it('only returns documents that match the provided "query"', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const readWithPitTask = readWithPit( - client, - pitResponse.right.pitId, - { - match: { title: { query: 'doc' } }, - }, - 1000, - undefined - ); - - const docsResponse = (await readWithPitTask()) as Either.Right; - - expect(docsResponse.right.outdatedDocuments.map((doc) => doc._source.title).sort()) - .toMatchInlineSnapshot(` - Array [ - "doc 1", - "doc 2", - "doc 3", - ] - `); - }); - - it('returns docs with _seq_no and _primary_term when specified', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const readWithPitTask = readWithPit( - client, - pitResponse.right.pitId, - { - match: { title: { query: 'doc' } }, - }, - 1000, - undefined, - true - ); - - const docsResponse = (await readWithPitTask()) as Either.Right; - - expect(docsResponse.right.outdatedDocuments).toEqual( - expect.arrayContaining([ - expect.objectContaining({ - _seq_no: expect.any(Number), - _primary_term: expect.any(Number), - }), - ]) - ); - }); - - it('does not return docs with _seq_no and _primary_term if not specified', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const readWithPitTask = readWithPit( - client, - pitResponse.right.pitId, - { - match: { title: { query: 'doc' } }, - }, - 1000, - undefined - ); - - const docsResponse = (await readWithPitTask()) as Either.Right; - - expect(docsResponse.right.outdatedDocuments).toEqual( - expect.arrayContaining([ - expect.not.objectContaining({ - _seq_no: expect.any(Number), - _primary_term: expect.any(Number), - }), - ]) - ); - }); - - it('rejects if PIT does not exist', async () => { - const readWithPitTask = readWithPit( - client, - 'no_such_pit', - { match_all: {} }, - 1000, - undefined - ); - await expect(readWithPitTask()).rejects.toThrow('illegal_argument_exception'); - }); - }); - - describe('closePit', () => { - it('closes PointInTime', async () => { - const openPitTask = openPit(client, 'existing_index_with_docs'); - const pitResponse = (await openPitTask()) as Either.Right; - - const pitId = pitResponse.right.pitId; - await closePit(client, pitId)(); - - const searchTask = client.search({ - body: { - pit: { id: pitId }, - }, - }); - - await expect(searchTask).rejects.toThrow('search_phase_execution_exception'); - }); - - it('rejects if PIT does not exist', async () => { - const closePitTask = closePit(client, 'no_such_pit'); - await expect(closePitTask()).rejects.toThrow('illegal_argument_exception'); - }); - }); - - describe('transformDocs', () => { - it('applies "transformRawDocs" and returns the transformed documents', async () => { - const originalDocs = [ - { _id: 'foo:1', _source: { type: 'dashboard', value: 1 } }, - { _id: 'foo:2', _source: { type: 'dashboard', value: 2 } }, - ]; - - function innerTransformRawDocs( - docs: SavedObjectsRawDoc[] - ): TaskEither { - return async () => { - const processedDocs: SavedObjectsRawDoc[] = []; - for (const doc of docs) { - doc._source.value += 1; - processedDocs.push(doc); - } - return Either.right({ processedDocs }); - }; - } - const transformTask = transformDocs(innerTransformRawDocs, originalDocs); - - const resultsWithProcessDocs = ((await transformTask()) as Either.Right) - .right.processedDocs; - expect(resultsWithProcessDocs.length).toEqual(2); - const foo2 = resultsWithProcessDocs.find((h) => h._id === 'foo:2'); - expect(foo2?._source?.value).toBe(3); - }); - }); - - describe('waitForPickupUpdatedMappingsTask', () => { - it('rejects if there are failures', async () => { - const res = (await pickupUpdatedMappings( - client, - 'existing_index_with_write_block' - )()) as Either.Right; - - const task = waitForPickupUpdatedMappingsTask(client, res.right.taskId, '10s'); - - // We can't do a snapshot match because the response includes an index - // id which ES assigns dynamically - await expect(task()).rejects.toMatchObject({ - message: /pickupUpdatedMappings task failed with the following failures:\n\[\{\"index\":\"existing_index_with_write_block\"/, - }); - }); - it('rejects if there is an error', async () => { - const res = (await pickupUpdatedMappings( - client, - 'no_such_index' - )()) as Either.Right; - - const task = waitForPickupUpdatedMappingsTask(client, res.right.taskId, '10s'); - - await expect(task()).rejects.toMatchInlineSnapshot(` - [Error: pickupUpdatedMappings task failed with the following error: - {"type":"index_not_found_exception","reason":"no such index [no_such_index]","resource.type":"index_or_alias","resource.id":"no_such_index","index_uuid":"_na_","index":"no_such_index"}] - `); - }); - it('resolves left wait_for_task_completion_timeout when the task does not complete within the timeout', async () => { - const res = (await pickupUpdatedMappings( - client, - 'existing_index_with_docs' - )()) as Either.Right; - - const task = waitForPickupUpdatedMappingsTask(client, res.right.taskId, '0s'); - - await expect(task()).resolves.toMatchObject({ - _tag: 'Left', - left: { - error: expect.any(ResponseError), - message: expect.stringMatching( - /\[timeout_exception\] Timed out waiting for completion of \[org.elasticsearch.index.reindex.BulkByScrollTask/ - ), - type: 'wait_for_task_completion_timeout', - }, - }); - }); - it('resolves right when successful', async () => { - const res = (await pickupUpdatedMappings( - client, - 'existing_index_with_docs' - )()) as Either.Right; - - const task = waitForPickupUpdatedMappingsTask(client, res.right.taskId, '10s'); - - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "pickup_updated_mappings_succeeded", - } - `); - }); - }); - - describe('updateAndPickupMappings', () => { - it('resolves right when mappings were updated and picked up', async () => { - // Create an index without any mappings and insert documents into it - await createIndex(client, 'existing_index_without_mappings', { - dynamic: false, - properties: {}, - })(); - const sourceDocs = ([ - { _source: { title: 'doc 1' } }, - { _source: { title: 'doc 2' } }, - { _source: { title: 'doc 3' } }, - { _source: { title: 'doc 4' } }, - ] as unknown) as SavedObjectsRawDoc[]; - await bulkOverwriteTransformedDocuments( - client, - 'existing_index_without_mappings', - sourceDocs, - 'wait_for' - )(); - - // Assert that we can't search over the unmapped fields of the document - const originalSearchResults = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'existing_index_without_mappings', - outdatedDocumentsQuery: { - match: { title: { query: 'doc' } }, - }, - })()) as Either.Right).right.outdatedDocuments; - expect(originalSearchResults.length).toBe(0); - - // Update and pickup mappings so that the title field is searchable - const res = await updateAndPickupMappings(client, 'existing_index_without_mappings', { - properties: { - title: { type: 'text' }, - }, - })(); - expect(Either.isRight(res)).toBe(true); - const taskId = (res as Either.Right).right.taskId; - await waitForPickupUpdatedMappingsTask(client, taskId, '60s')(); - - // Repeat the search expecting to be able to find the existing documents - const pickedUpSearchResults = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'existing_index_without_mappings', - outdatedDocumentsQuery: { - match: { title: { query: 'doc' } }, - }, - })()) as Either.Right).right.outdatedDocuments; - expect(pickedUpSearchResults.length).toBe(4); - }); - }); - - describe('updateAliases', () => { - describe('remove', () => { - it('resolves left index_not_found_exception when the index does not exist', async () => { - const task = updateAliases(client, [ - { - remove: { - alias: 'no_such_alias', - index: 'no_such_index', - must_exist: false, - }, - }, - ]); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "index": "no_such_index", - "type": "index_not_found_exception", - }, - } - `); - }); - describe('with must_exist=false', () => { - it('resolves left alias_not_found_exception when alias does not exist', async () => { - const task = updateAliases(client, [ - { - remove: { - alias: 'no_such_alias', - index: 'existing_index_with_docs', - must_exist: false, - }, - }, - ]); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "alias_not_found_exception", - }, - } - `); - }); - }); - describe('with must_exist=true', () => { - it('resolves left alias_not_found_exception when alias does not exist on specified index', async () => { - const task = updateAliases(client, [ - { - remove: { - alias: 'existing_index_2_alias', - index: 'existing_index_with_docs', - must_exist: true, - }, - }, - ]); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "alias_not_found_exception", - }, - } - `); - }); - it('resolves left alias_not_found_exception when alias does not exist', async () => { - const task = updateAliases(client, [ - { - remove: { - alias: 'no_such_alias', - index: 'existing_index_with_docs', - must_exist: true, - }, - }, - ]); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "alias_not_found_exception", - }, - } - `); - }); - }); - }); - describe('remove_index', () => { - it('left index_not_found_exception if index does not exist', async () => { - const task = updateAliases(client, [ - { - remove_index: { - index: 'no_such_index', - }, - }, - ]); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "index": "no_such_index", - "type": "index_not_found_exception", - }, - } - `); - }); - it('left remove_index_not_a_concrete_index when remove_index targets an alias', async () => { - const task = updateAliases(client, [ - { - remove_index: { - index: 'existing_index_2_alias', - }, - }, - ]); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Left", - "left": Object { - "type": "remove_index_not_a_concrete_index", - }, - } - `); - }); - }); - }); - - describe('createIndex', () => { - afterAll(async () => { - await client.indices.delete({ index: 'red_then_yellow_index' }); - }); - it('resolves right after waiting for an index status to be yellow if the index already existed', async () => { - expect.assertions(2); - // Create a red index - await client.indices - .create( - { - index: 'red_then_yellow_index', - timeout: '5s', - body: { - mappings: { properties: {} }, - settings: { - // Allocate 1 replica so that this index stays yellow - number_of_replicas: '1', - // Disable all shard allocation so that the index status is red - 'index.routing.allocation.enable': 'none', - }, - }, - }, - { maxRetries: 0 /** handle retry ourselves for now */ } - ) - .catch((e) => { - /** ignore */ - }); - - // Call createIndex even though the index already exists - const createIndexPromise = createIndex(client, 'red_then_yellow_index', undefined as any)(); - let indexYellow = false; - - setTimeout(() => { - client.indices.putSettings({ - index: 'red_then_yellow_index', - body: { - // Disable all shard allocation so that the index status is red - index: { routing: { allocation: { enable: 'all' } } }, - }, - }); - indexYellow = true; - }, 10); - - await createIndexPromise.then((res) => { - // Assert that the promise didn't resolve before the index became green - expect(indexYellow).toBe(true); - expect(res).toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "create_index_succeeded", - } - `); - }); - }); - it('rejects when there is an unexpected error creating the index', async () => { - // Creating an index with the same name as an existing alias to induce - // failure - await expect( - createIndex(client, 'existing_index_2_alias', undefined as any)() - ).rejects.toMatchInlineSnapshot(`[ResponseError: invalid_index_name_exception]`); - }); - }); - - describe('bulkOverwriteTransformedDocuments', () => { - it('resolves right when documents do not yet exist in the index', async () => { - const newDocs = ([ - { _source: { title: 'doc 5' } }, - { _source: { title: 'doc 6' } }, - { _source: { title: 'doc 7' } }, - ] as unknown) as SavedObjectsRawDoc[]; - const task = bulkOverwriteTransformedDocuments( - client, - 'existing_index_with_docs', - newDocs, - 'wait_for' - ); - - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "bulk_index_succeeded", - } - `); - }); - it('resolves right even if there were some version_conflict_engine_exception', async () => { - const existingDocs = ((await searchForOutdatedDocuments(client, { - batchSize: 1000, - targetIndex: 'existing_index_with_docs', - outdatedDocumentsQuery: undefined, - })()) as Either.Right).right.outdatedDocuments; - - const task = bulkOverwriteTransformedDocuments( - client, - 'existing_index_with_docs', - [...existingDocs, ({ _source: { title: 'doc 8' } } as unknown) as SavedObjectsRawDoc], - 'wait_for' - ); - await expect(task()).resolves.toMatchInlineSnapshot(` - Object { - "_tag": "Right", - "right": "bulk_index_succeeded", - } - `); - }); - it('rejects if there are errors', async () => { - const newDocs = ([ - { _source: { title: 'doc 5' } }, - { _source: { title: 'doc 6' } }, - { _source: { title: 'doc 7' } }, - ] as unknown) as SavedObjectsRawDoc[]; - await expect( - bulkOverwriteTransformedDocuments( - client, - 'existing_index_with_write_block', - newDocs, - 'wait_for' - )() - ).rejects.toMatchObject(expect.anything()); - }); - }); -}); diff --git a/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts b/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts index 5e4b8feefbd95..f9d8e7cc4fbaa 100644 --- a/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts +++ b/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts @@ -157,7 +157,10 @@ describe('migration v2', () => { const response = body[migratedIndex]; expect(response).toBeDefined(); - expect(Object.keys(response.aliases).sort()).toEqual(['.kibana', `.kibana_${kibanaVersion}`]); + expect(Object.keys(response.aliases!).sort()).toEqual([ + '.kibana', + `.kibana_${kibanaVersion}`, + ]); }); it('copies all the document of the previous index to the new one', async () => { @@ -216,7 +219,10 @@ describe('migration v2', () => { const response = body[migratedIndex]; expect(response).toBeDefined(); - expect(Object.keys(response.aliases).sort()).toEqual(['.kibana', `.kibana_${kibanaVersion}`]); + expect(Object.keys(response.aliases!).sort()).toEqual([ + '.kibana', + `.kibana_${kibanaVersion}`, + ]); }); it('copies all the document of the previous index to the new one', async () => { diff --git a/src/core/server/saved_objects/migrationsv2/migrations_state_machine_cleanup.ts b/src/core/server/saved_objects/migrationsv2/migrations_state_machine_cleanup.ts index 1881f9a712c29..e9cb33c0aa54a 100644 --- a/src/core/server/saved_objects/migrationsv2/migrations_state_machine_cleanup.ts +++ b/src/core/server/saved_objects/migrationsv2/migrations_state_machine_cleanup.ts @@ -19,7 +19,7 @@ export async function cleanup( if (!state) return; if ('sourceIndexPitId' in state) { try { - await Actions.closePit(client, state.sourceIndexPitId)(); + await Actions.closePit({ client, pitId: state.sourceIndexPitId })(); } catch (e) { executionLog.push({ type: 'cleanup', diff --git a/src/core/server/saved_objects/migrationsv2/model.test.ts b/src/core/server/saved_objects/migrationsv2/model.test.ts index 186cb24b4a34a..86dc590aabdad 100644 --- a/src/core/server/saved_objects/migrationsv2/model.test.ts +++ b/src/core/server/saved_objects/migrationsv2/model.test.ts @@ -244,7 +244,7 @@ describe('migrations v2 model', () => { disabled_saved_object_type: '7997cf5a56cc02bdc9c93361bde732b0', }, }, - }; + } as const; test('INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT if .kibana is already pointing to the target index', () => { const res: ResponseType<'INIT'> = Either.right({ @@ -683,7 +683,7 @@ describe('migrations v2 model', () => { disabled_saved_object_type: '7997cf5a56cc02bdc9c93361bde732b0', }, }, - }; + } as const; const waitForYellowSourceState: WaitForYellowSourceState = { ...baseState, diff --git a/src/core/server/saved_objects/migrationsv2/next.ts b/src/core/server/saved_objects/migrationsv2/next.ts index 07ebf80271d48..3c3e3c46a8d68 100644 --- a/src/core/server/saved_objects/migrationsv2/next.ts +++ b/src/core/server/saved_objects/migrationsv2/next.ts @@ -58,38 +58,46 @@ export type ResponseType = UnwrapPromise< export const nextActionMap = (client: ElasticsearchClient, transformRawDocs: TransformRawDocs) => { return { INIT: (state: InitState) => - Actions.fetchIndices(client, [state.currentAlias, state.versionAlias]), + Actions.fetchIndices({ client, indices: [state.currentAlias, state.versionAlias] }), WAIT_FOR_YELLOW_SOURCE: (state: WaitForYellowSourceState) => - Actions.waitForIndexStatusYellow(client, state.sourceIndex.value), + Actions.waitForIndexStatusYellow({ client, index: state.sourceIndex.value }), SET_SOURCE_WRITE_BLOCK: (state: SetSourceWriteBlockState) => - Actions.setWriteBlock(client, state.sourceIndex.value), + Actions.setWriteBlock({ client, index: state.sourceIndex.value }), CREATE_NEW_TARGET: (state: CreateNewTargetState) => - Actions.createIndex(client, state.targetIndex, state.targetIndexMappings), + Actions.createIndex({ + client, + indexName: state.targetIndex, + mappings: state.targetIndexMappings, + }), CREATE_REINDEX_TEMP: (state: CreateReindexTempState) => - Actions.createIndex(client, state.tempIndex, state.tempIndexMappings), + Actions.createIndex({ + client, + indexName: state.tempIndex, + mappings: state.tempIndexMappings, + }), REINDEX_SOURCE_TO_TEMP_OPEN_PIT: (state: ReindexSourceToTempOpenPit) => - Actions.openPit(client, state.sourceIndex.value), + Actions.openPit({ client, index: state.sourceIndex.value }), REINDEX_SOURCE_TO_TEMP_READ: (state: ReindexSourceToTempRead) => - Actions.readWithPit( + Actions.readWithPit({ client, - state.sourceIndexPitId, + pitId: state.sourceIndexPitId, /* When reading we use a source query to exclude saved objects types which * are no longer used. These saved objects will still be kept in the outdated * index for backup purposes, but won't be available in the upgraded index. */ - state.unusedTypesQuery, - state.batchSize, - state.lastHitSortValue - ), + query: state.unusedTypesQuery, + batchSize: state.batchSize, + searchAfter: state.lastHitSortValue, + }), REINDEX_SOURCE_TO_TEMP_CLOSE_PIT: (state: ReindexSourceToTempClosePit) => - Actions.closePit(client, state.sourceIndexPitId), + Actions.closePit({ client, pitId: state.sourceIndexPitId }), REINDEX_SOURCE_TO_TEMP_INDEX: (state: ReindexSourceToTempIndex) => - Actions.transformDocs(transformRawDocs, state.outdatedDocuments), + Actions.transformDocs({ transformRawDocs, outdatedDocuments: state.outdatedDocuments }), REINDEX_SOURCE_TO_TEMP_INDEX_BULK: (state: ReindexSourceToTempIndexBulk) => - Actions.bulkOverwriteTransformedDocuments( + Actions.bulkOverwriteTransformedDocuments({ client, - state.tempIndex, - state.transformedDocs, + index: state.tempIndex, + transformedDocs: state.transformedDocs, /** * Since we don't run a search against the target index, we disable "refresh" to speed up * the migration process. @@ -97,39 +105,48 @@ export const nextActionMap = (client: ElasticsearchClient, transformRawDocs: Tra * before we reach out to the OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT step. * Right now, it's performed during REFRESH_TARGET step. */ - false - ), + refresh: false, + }), SET_TEMP_WRITE_BLOCK: (state: SetTempWriteBlock) => - Actions.setWriteBlock(client, state.tempIndex), + Actions.setWriteBlock({ client, index: state.tempIndex }), CLONE_TEMP_TO_TARGET: (state: CloneTempToSource) => - Actions.cloneIndex(client, state.tempIndex, state.targetIndex), - REFRESH_TARGET: (state: RefreshTarget) => Actions.refreshIndex(client, state.targetIndex), + Actions.cloneIndex({ client, source: state.tempIndex, target: state.targetIndex }), + REFRESH_TARGET: (state: RefreshTarget) => + Actions.refreshIndex({ client, targetIndex: state.targetIndex }), UPDATE_TARGET_MAPPINGS: (state: UpdateTargetMappingsState) => - Actions.updateAndPickupMappings(client, state.targetIndex, state.targetIndexMappings), + Actions.updateAndPickupMappings({ + client, + index: state.targetIndex, + mappings: state.targetIndexMappings, + }), UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK: (state: UpdateTargetMappingsWaitForTaskState) => - Actions.waitForPickupUpdatedMappingsTask(client, state.updateTargetMappingsTaskId, '60s'), + Actions.waitForPickupUpdatedMappingsTask({ + client, + taskId: state.updateTargetMappingsTaskId, + timeout: '60s', + }), OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT: (state: OutdatedDocumentsSearchOpenPit) => - Actions.openPit(client, state.targetIndex), + Actions.openPit({ client, index: state.targetIndex }), OUTDATED_DOCUMENTS_SEARCH_READ: (state: OutdatedDocumentsSearchRead) => - Actions.readWithPit( + Actions.readWithPit({ client, - state.pitId, + pitId: state.pitId, // search for outdated documents only - state.outdatedDocumentsQuery, - state.batchSize, - state.lastHitSortValue - ), + query: state.outdatedDocumentsQuery, + batchSize: state.batchSize, + searchAfter: state.lastHitSortValue, + }), OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT: (state: OutdatedDocumentsSearchClosePit) => - Actions.closePit(client, state.pitId), + Actions.closePit({ client, pitId: state.pitId }), OUTDATED_DOCUMENTS_REFRESH: (state: OutdatedDocumentsRefresh) => - Actions.refreshIndex(client, state.targetIndex), + Actions.refreshIndex({ client, targetIndex: state.targetIndex }), OUTDATED_DOCUMENTS_TRANSFORM: (state: OutdatedDocumentsTransform) => - Actions.transformDocs(transformRawDocs, state.outdatedDocuments), + Actions.transformDocs({ transformRawDocs, outdatedDocuments: state.outdatedDocuments }), TRANSFORMED_DOCUMENTS_BULK_INDEX: (state: TransformedDocumentsBulkIndex) => - Actions.bulkOverwriteTransformedDocuments( + Actions.bulkOverwriteTransformedDocuments({ client, - state.targetIndex, - state.transformedDocs, + index: state.targetIndex, + transformedDocs: state.transformedDocs, /** * Since we don't run a search against the target index, we disable "refresh" to speed up * the migration process. @@ -137,29 +154,32 @@ export const nextActionMap = (client: ElasticsearchClient, transformRawDocs: Tra * before we reach out to the MARK_VERSION_INDEX_READY step. * Right now, it's performed during OUTDATED_DOCUMENTS_REFRESH step. */ - false - ), + }), MARK_VERSION_INDEX_READY: (state: MarkVersionIndexReady) => - Actions.updateAliases(client, state.versionIndexReadyActions.value), + Actions.updateAliases({ client, aliasActions: state.versionIndexReadyActions.value }), MARK_VERSION_INDEX_READY_CONFLICT: (state: MarkVersionIndexReadyConflict) => - Actions.fetchIndices(client, [state.currentAlias, state.versionAlias]), + Actions.fetchIndices({ client, indices: [state.currentAlias, state.versionAlias] }), LEGACY_SET_WRITE_BLOCK: (state: LegacySetWriteBlockState) => - Actions.setWriteBlock(client, state.legacyIndex), + Actions.setWriteBlock({ client, index: state.legacyIndex }), LEGACY_CREATE_REINDEX_TARGET: (state: LegacyCreateReindexTargetState) => - Actions.createIndex(client, state.sourceIndex.value, state.legacyReindexTargetMappings), + Actions.createIndex({ + client, + indexName: state.sourceIndex.value, + mappings: state.legacyReindexTargetMappings, + }), LEGACY_REINDEX: (state: LegacyReindexState) => - Actions.reindex( + Actions.reindex({ client, - state.legacyIndex, - state.sourceIndex.value, - state.preMigrationScript, - false, - state.unusedTypesQuery - ), + sourceIndex: state.legacyIndex, + targetIndex: state.sourceIndex.value, + reindexScript: state.preMigrationScript, + requireAlias: false, + unusedTypesQuery: state.unusedTypesQuery, + }), LEGACY_REINDEX_WAIT_FOR_TASK: (state: LegacyReindexWaitForTaskState) => - Actions.waitForReindexTask(client, state.legacyReindexTaskId, '60s'), + Actions.waitForReindexTask({ client, taskId: state.legacyReindexTaskId, timeout: '60s' }), LEGACY_DELETE: (state: LegacyDeleteState) => - Actions.updateAliases(client, state.legacyPreMigrationDoneActions), + Actions.updateAliases({ client, aliasActions: state.legacyPreMigrationDoneActions }), }; }; diff --git a/src/core/server/saved_objects/migrationsv2/types.ts b/src/core/server/saved_objects/migrationsv2/types.ts index adcd2ad32fd24..1151e8337d3d5 100644 --- a/src/core/server/saved_objects/migrationsv2/types.ts +++ b/src/core/server/saved_objects/migrationsv2/types.ts @@ -53,7 +53,7 @@ export interface BaseState extends ControlState { readonly tempIndexMappings: IndexMapping; /** Script to apply to a legacy index before it can be used as a migration source */ readonly preMigrationScript: Option.Option; - readonly outdatedDocumentsQuery: estypes.QueryContainer; + readonly outdatedDocumentsQuery: estypes.QueryDslQueryContainer; readonly retryCount: number; readonly retryDelay: number; /** @@ -112,7 +112,7 @@ export interface BaseState extends ControlState { * are no longer used. These saved objects will still be kept in the outdated * index for backup purposes, but won't be available in the upgraded index. */ - readonly unusedTypesQuery: estypes.QueryContainer; + readonly unusedTypesQuery: estypes.QueryDslQueryContainer; } export interface InitState extends BaseState { @@ -132,7 +132,7 @@ export interface PostInitState extends BaseState { /** The target index is the index to which the migration writes */ readonly targetIndex: string; readonly versionIndexReadyActions: Option.Option; - readonly outdatedDocumentsQuery: estypes.QueryContainer; + readonly outdatedDocumentsQuery: estypes.QueryDslQueryContainer; } export interface DoneState extends PostInitState { diff --git a/src/core/server/saved_objects/saved_objects_config.ts b/src/core/server/saved_objects/saved_objects_config.ts index 7182df74c597f..c62d322f0bf8d 100644 --- a/src/core/server/saved_objects/saved_objects_config.ts +++ b/src/core/server/saved_objects/saved_objects_config.ts @@ -29,6 +29,9 @@ const migrationDeprecations: ConfigDeprecationProvider = () => [ message: '"migrations.enableV2" is deprecated and will be removed in an upcoming release without any further notice.', documentationUrl: 'https://ela.st/kbn-so-migration-v2', + correctiveActions: { + manualSteps: [`Remove "migrations.enableV2" from your kibana configs.`], + }, }); } return settings; diff --git a/src/core/server/saved_objects/saved_objects_type_registry.ts b/src/core/server/saved_objects/saved_objects_type_registry.ts index a63837132b652..ba5960c59239d 100644 --- a/src/core/server/saved_objects/saved_objects_type_registry.ts +++ b/src/core/server/saved_objects/saved_objects_type_registry.ts @@ -33,7 +33,7 @@ export class SavedObjectTypeRegistry { throw new Error(`Type '${type.name}' is already registered`); } validateType(type); - this.types.set(type.name, deepFreeze(type)); + this.types.set(type.name, deepFreeze(type) as SavedObjectsType); } /** diff --git a/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts b/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts index 57421db76f5b6..53f1b5c9d78c5 100644 --- a/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts +++ b/src/core/server/saved_objects/service/lib/aggregations/validation.test.ts @@ -9,7 +9,7 @@ import type { estypes } from '@elastic/elasticsearch'; import { validateAndConvertAggregations } from './validation'; -type AggsMap = Record; +type AggsMap = Record; const mockMappings = { properties: { @@ -19,7 +19,9 @@ const mockMappings = { references: { type: 'nested', properties: { - id: 'keyword', + id: { + type: 'keyword', + }, }, }, foo: { @@ -31,7 +33,7 @@ const mockMappings = { type: 'text', }, bytes: { - type: 'number', + type: 'integer', }, }, }, @@ -73,7 +75,7 @@ const mockMappings = { }, }, }, -}; +} as const; describe('validateAndConvertAggregations', () => { it('validates a simple aggregations', () => { diff --git a/src/core/server/saved_objects/service/lib/aggregations/validation.ts b/src/core/server/saved_objects/service/lib/aggregations/validation.ts index cd41a23f4a28b..5ef89f297a796 100644 --- a/src/core/server/saved_objects/service/lib/aggregations/validation.ts +++ b/src/core/server/saved_objects/service/lib/aggregations/validation.ts @@ -37,9 +37,9 @@ interface ValidationContext { */ export const validateAndConvertAggregations = ( allowedTypes: string[], - aggs: Record, + aggs: Record, indexMapping: IndexMapping -): Record => { +): Record => { return validateAggregations(aggs, { allowedTypes, indexMapping, @@ -53,16 +53,15 @@ export const validateAndConvertAggregations = ( * Or a nested record of aggregation (`SearchRequest.body.aggs.myAggregation.aggs`) */ const validateAggregations = ( - aggregations: Record, + aggregations: Record, context: ValidationContext ) => { - return Object.entries(aggregations).reduce>( - (memo, [aggrName, aggrContainer]) => { - memo[aggrName] = validateAggregation(aggrContainer, childContext(context, aggrName)); - return memo; - }, - {} - ); + return Object.entries(aggregations).reduce< + Record + >((memo, [aggrName, aggrContainer]) => { + memo[aggrName] = validateAggregation(aggrContainer, childContext(context, aggrName)); + return memo; + }, {}); }; /** @@ -70,7 +69,7 @@ const validateAggregations = ( * from a nested aggregation record, including its potential nested aggregations. */ const validateAggregation = ( - aggregation: estypes.AggregationContainer, + aggregation: estypes.AggregationsAggregationContainer, context: ValidationContext ) => { const container = validateAggregationContainer(aggregation, context); @@ -93,10 +92,10 @@ const validateAggregation = ( * (ignoring its nested aggregations) */ const validateAggregationContainer = ( - container: estypes.AggregationContainer, + container: estypes.AggregationsAggregationContainer, context: ValidationContext ) => { - return Object.entries(container).reduce( + return Object.entries(container).reduce( (memo, [aggName, aggregation]) => { if (aggregationKeys.includes(aggName)) { return memo; diff --git a/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts b/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts index 25c3aea474ece..0425e46b4477e 100644 --- a/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts +++ b/src/core/server/saved_objects/service/lib/aggregations/validation_utils.test.ts @@ -6,7 +6,6 @@ * Side Public License, v 1. */ -import { IndexMapping } from '../../../mappings'; import { isRootLevelAttribute, rewriteRootLevelAttribute, @@ -14,7 +13,7 @@ import { rewriteObjectTypeAttribute, } from './validation_utils'; -const mockMappings: IndexMapping = { +const mockMappings = { properties: { updated_at: { type: 'date', @@ -28,7 +27,7 @@ const mockMappings: IndexMapping = { type: 'text', }, bytes: { - type: 'number', + type: 'integer', }, }, }, @@ -70,7 +69,7 @@ const mockMappings: IndexMapping = { }, }, }, -}; +} as const; describe('isRootLevelAttribute', () => { it('returns true when referring to a path to a valid root level field', () => { diff --git a/src/core/server/saved_objects/service/lib/filter_utils.test.ts b/src/core/server/saved_objects/service/lib/filter_utils.test.ts index 2ef5219ccfff1..e6934398862dc 100644 --- a/src/core/server/saved_objects/service/lib/filter_utils.test.ts +++ b/src/core/server/saved_objects/service/lib/filter_utils.test.ts @@ -31,7 +31,7 @@ const mockMappings = { type: 'text', }, bytes: { - type: 'number', + type: 'integer', }, }, }, @@ -90,7 +90,7 @@ const mockMappings = { }, }, }, -}; +} as const; describe('Filter Utils', () => { describe('#validateConvertFilterToKueryNode', () => { diff --git a/src/core/server/saved_objects/service/lib/repository.ts b/src/core/server/saved_objects/service/lib/repository.ts index c626a2b2acfb5..6b51bd57248a1 100644 --- a/src/core/server/saved_objects/service/lib/repository.ts +++ b/src/core/server/saved_objects/service/lib/repository.ts @@ -672,7 +672,6 @@ export class SavedObjectsRepository { } const deleteDocNotFound = body.result === 'not_found'; - // @ts-expect-error 'error' does not exist on type 'DeleteResponse' const deleteIndexNotFound = body.error && body.error.type === 'index_not_found_exception'; if (deleteDocNotFound || deleteIndexNotFound) { // see "404s from missing index" above @@ -897,7 +896,7 @@ export class SavedObjectsRepository { per_page: perPage, total: body.hits.total, saved_objects: body.hits.hits.map( - (hit: estypes.Hit): SavedObjectsFindResult => ({ + (hit: estypes.SearchHit): SavedObjectsFindResult => ({ // @ts-expect-error @elastic/elasticsearch declared Id as string | number ...this._rawToSavedObject(hit), score: hit._score!, @@ -1835,13 +1834,9 @@ export class SavedObjectsRepository { ...(preference ? { preference } : {}), }; - const { body, statusCode } = await this.client.openPointInTime( - // @ts-expect-error @elastic/elasticsearch OpenPointInTimeRequest.index expected to accept string[] - esOptions, - { - ignore: [404], - } - ); + const { body, statusCode } = await this.client.openPointInTime(esOptions, { + ignore: [404], + }); if (statusCode === 404) { throw SavedObjectsErrorHelpers.createGenericNotFoundError(); } diff --git a/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts b/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts index 64b3dd428fb8b..3196a59ca39ee 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/search_dsl.ts @@ -26,7 +26,7 @@ interface GetSearchDslOptions { rootSearchFields?: string[]; searchAfter?: estypes.Id[]; sortField?: string; - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; namespaces?: string[]; pit?: SavedObjectsPitParams; typeToNamespacesMap?: Map; diff --git a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts index 1376f0d50a9da..e2a21cc03ce3b 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.test.ts @@ -50,7 +50,7 @@ const MAPPINGS = { }, }, }, -}; +} as const; describe('searchDsl/getSortParams', () => { describe('type, no sortField', () => { diff --git a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts index 64849c308f3f0..592110a5413ec 100644 --- a/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts +++ b/src/core/server/saved_objects/service/lib/search_dsl/sorting_params.ts @@ -16,8 +16,8 @@ export function getSortingParams( mappings: IndexMapping, type: string | string[], sortField?: string, - sortOrder?: estypes.SortOrder -): { sort?: estypes.SortContainer[] } { + sortOrder?: estypes.SearchSortOrder +): { sort?: estypes.SearchSortContainer[] } { if (!sortField) { return {}; } diff --git a/src/core/server/saved_objects/service/lib/update_objects_spaces.ts b/src/core/server/saved_objects/service/lib/update_objects_spaces.ts index 079549265385c..3131d0240f96b 100644 --- a/src/core/server/saved_objects/service/lib/update_objects_spaces.ts +++ b/src/core/server/saved_objects/service/lib/update_objects_spaces.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { BulkOperationContainer, MultiGetOperation } from '@elastic/elasticsearch/api/types'; +import type { estypes } from '@elastic/elasticsearch'; import intersection from 'lodash/intersection'; import type { ISavedObjectTypeRegistry } from '../../saved_objects_type_registry'; @@ -173,7 +173,7 @@ export async function updateObjectsSpaces({ }; }); - const bulkGetDocs = expectedBulkGetResults.reduce((acc, x) => { + const bulkGetDocs = expectedBulkGetResults.reduce((acc, x) => { if (isRight(x) && x.value.esRequestIndex !== undefined) { acc.push({ _id: serializer.generateRawId(undefined, x.value.type, x.value.id), @@ -192,7 +192,7 @@ export async function updateObjectsSpaces({ const time = new Date().toISOString(); let bulkOperationRequestIndexCounter = 0; - const bulkOperationParams: BulkOperationContainer[] = []; + const bulkOperationParams: estypes.BulkOperationContainer[] = []; const expectedBulkOperationResults: Either[] = expectedBulkGetResults.map( (expectedBulkGetResult) => { if (isLeft(expectedBulkGetResult)) { diff --git a/src/core/server/saved_objects/types.ts b/src/core/server/saved_objects/types.ts index d3bfdcc6923dc..964ba671b5964 100644 --- a/src/core/server/saved_objects/types.ts +++ b/src/core/server/saved_objects/types.ts @@ -80,7 +80,7 @@ export interface SavedObjectsFindOptions { page?: number; perPage?: number; sortField?: string; - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; /** * An array of fields to include in the results * @example @@ -137,7 +137,7 @@ export interface SavedObjectsFindOptions { * * @alpha */ - aggs?: Record; + aggs?: Record; namespaces?: string[]; /** * This map defines each type to search for, and the namespace(s) to search for the type in; this is only intended to be used by a saved diff --git a/src/core/server/server.api.md b/src/core/server/server.api.md index 7f108dbeb0086..acec03902bf6a 100644 --- a/src/core/server/server.api.md +++ b/src/core/server/server.api.md @@ -872,8 +872,9 @@ export interface DeprecationsDetails { [key: string]: any; }; }; - manualSteps?: string[]; + manualSteps: string[]; }; + deprecationType?: 'config' | 'feature'; // (undocumented) documentationUrl?: string; level: 'warning' | 'critical' | 'fetch_error'; @@ -2360,38 +2361,6 @@ export interface SavedObjectsCollectMultiNamespaceReferencesResponse { objects: SavedObjectReferenceWithContext[]; } -// @public -export interface SavedObjectsComplexFieldMapping { - // (undocumented) - doc_values?: boolean; - dynamic?: false | 'strict'; - // (undocumented) - enabled?: boolean; - // (undocumented) - properties: SavedObjectsMappingProperties; - // (undocumented) - type?: string; -} - -// @public -export interface SavedObjectsCoreFieldMapping { - // (undocumented) - doc_values?: boolean; - // (undocumented) - fields?: { - [subfield: string]: { - type: string; - ignore_above?: number; - }; - }; - // (undocumented) - index?: boolean; - // (undocumented) - null_value?: number | boolean | string; - // (undocumented) - type: string; -} - // @public (undocumented) export interface SavedObjectsCreateOptions extends SavedObjectsBaseOptions { coreMigrationVersion?: string; @@ -2553,12 +2522,14 @@ export interface SavedObjectsExportTransformContext { } // @public -export type SavedObjectsFieldMapping = SavedObjectsCoreFieldMapping | SavedObjectsComplexFieldMapping; +export type SavedObjectsFieldMapping = estypes.MappingProperty & { + dynamic?: false | 'strict'; +}; // @public (undocumented) export interface SavedObjectsFindOptions { // @alpha - aggs?: Record; + aggs?: Record; defaultSearchOperator?: 'AND' | 'OR'; fields?: string[]; // Warning: (ae-forgotten-export) The symbol "KueryNode" needs to be exported by the entry point index.d.ts @@ -2582,7 +2553,7 @@ export interface SavedObjectsFindOptions { // (undocumented) sortField?: string; // (undocumented) - sortOrder?: estypes.SortOrder; + sortOrder?: estypes.SearchSortOrder; // (undocumented) type: string | string[]; typeToNamespacesMap?: Map; diff --git a/src/core/server/server.ts b/src/core/server/server.ts index 4d99368f9bf70..a31b9a061ac5d 100644 --- a/src/core/server/server.ts +++ b/src/core/server/server.ts @@ -193,8 +193,6 @@ export class Server { const deprecationsSetup = this.deprecations.setup({ http: httpSetup, - elasticsearch: elasticsearchServiceSetup, - coreUsageData: coreUsageDataSetup, }); const coreSetup: InternalCoreSetup = { diff --git a/src/dev/build/lib/version_info.ts b/src/dev/build/lib/version_info.ts index 01066cdeffc4c..9ad20b4a6935b 100644 --- a/src/dev/build/lib/version_info.ts +++ b/src/dev/build/lib/version_info.ts @@ -7,6 +7,9 @@ */ import execa from 'execa'; +import fs from 'fs'; +import { join } from 'path'; +import { REPO_ROOT } from '@kbn/utils'; import { getBuildNumber } from './get_build_number'; interface Options { @@ -27,8 +30,12 @@ export async function getVersionInfo({ isRelease, versionQualifier, pkg }: Optio isRelease ? '' : '-SNAPSHOT' ); + const buildSha = fs.existsSync(join(REPO_ROOT, '.git')) + ? (await execa('git', ['rev-parse', 'HEAD'], { cwd: REPO_ROOT })).stdout + : process.env.GIT_COMMIT || process.env.BUILDKITE_COMMIT || ''; + return { - buildSha: (await execa('git', ['rev-parse', 'HEAD'])).stdout, + buildSha, buildVersion, buildNumber: await getBuildNumber(), }; diff --git a/src/dev/precommit_hook/casing_check_config.js b/src/dev/precommit_hook/casing_check_config.js index d523f78a9f589..ba18c085b649d 100644 --- a/src/dev/precommit_hook/casing_check_config.js +++ b/src/dev/precommit_hook/casing_check_config.js @@ -41,6 +41,7 @@ export const IGNORE_FILE_GLOBS = [ '.ci/pipeline-library/**/*', 'packages/kbn-test/jest-preset.js', 'test/package/Vagrantfile', + '**/test/**/fixtures/**/*', // filename must match language code which requires capital letters '**/translations/*.json', @@ -61,12 +62,13 @@ export const IGNORE_FILE_GLOBS = [ 'x-pack/plugins/apm/e2e/**/*', 'x-pack/plugins/maps/server/fonts/**/*', - // packages for the ingest manager's api integration tests could be valid semver which has dashes - 'x-pack/test/fleet_api_integration/apis/fixtures/test_packages/**/*', // Bazel default files '**/WORKSPACE.bazel', '**/BUILD.bazel', + + // Buildkite + '.buildkite/hooks/*', ]; /** @@ -95,7 +97,6 @@ export const IGNORE_DIRECTORY_GLOBS = [ ...KEBAB_CASE_DIRECTORY_GLOBS, 'src/babel-*', 'packages/*', - 'test/functional/fixtures/es_archiver/visualize_source-filters', 'packages/kbn-pm/src/utils/__fixtures__/*', 'x-pack/dev-tools', 'packages/kbn-optimizer/src/__fixtures__/mock_repo/x-pack', diff --git a/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx b/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx index c7a8c0a6135c7..1391312df5231 100644 --- a/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx +++ b/src/plugins/advanced_settings/public/management_app/advanced_settings.tsx @@ -269,6 +269,7 @@ export class AdvancedSettings extends Component
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + @@ -269,52 +272,53 @@ exports[`Form should not render no settings message when instructed not to 1`] = exports[`Form should render no settings message when there are no settings 1`] = `
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + @@ -535,52 +541,53 @@ exports[`Form should render no settings message when there are no settings 1`] = exports[`Form should render normally 1`] = `
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + @@ -801,52 +810,53 @@ exports[`Form should render normally 1`] = ` exports[`Form should render read-only when saving is disabled 1`] = `
- - - - + + - +

General

-
- - - - - - - , - "settingsCount": -1, - } + + + + + + + + + , + "settingsCount": -1, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

Dashboard

-
-
-
- + + + + + <_EuiSplitPanelInner> -
-
+ + - - - - + + - +

X-pack

-
- - - - - - - , - "settingsCount": 9, - } + + + + + + + + + , + "settingsCount": 9, } - /> - - -
-
- + } + /> + + + + + <_EuiSplitPanelInner> -
-
+ + diff --git a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx index d953bb8f6a6f6..0b08a317e87c9 100644 --- a/src/plugins/advanced_settings/public/management_app/components/form/form.tsx +++ b/src/plugins/advanced_settings/public/management_app/components/form/form.tsx @@ -11,16 +11,16 @@ import React, { PureComponent, Fragment } from 'react'; import { EuiFlexGroup, EuiFlexItem, - EuiForm, + EuiSplitPanel, EuiLink, - EuiPanel, + EuiCallOut, EuiSpacer, - EuiText, EuiTextColor, EuiBottomBar, EuiButton, EuiToolTip, EuiButtonEmpty, + EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { isEmpty } from 'lodash'; @@ -47,6 +47,7 @@ interface FormProps { dockLinks: DocLinksStart['links']; toasts: ToastsStart; trackUiMetric?: (metricType: UiCounterMetricType, eventName: string | string[]) => void; + queryText?: string; } interface FormState { @@ -241,17 +242,18 @@ export class Form extends PureComponent { renderCategory(category: Category, settings: FieldSetting[], totalSettings: number) { return ( - - - - - + + + + +

{getCategoryName(category)}

-
- {this.renderClearQueryLink(totalSettings, settings.length)} -
-
- + + + {this.renderClearQueryLink(totalSettings, settings.length)} + + + {settings.map((setting) => { return ( { /> ); })} -
-
+ +
); @@ -276,22 +278,28 @@ export class Form extends PureComponent { maybeRenderNoSettings(clearQuery: FormProps['clearQuery']) { if (this.props.showNoResultsMessage) { return ( - - - - - ), - }} - /> - + + + + + ), + queryText: {this.props.queryText}, + }} + /> + + } + /> ); } return null; diff --git a/src/plugins/bfetch/common/batch.ts b/src/plugins/bfetch/common/batch.ts index a84d94b541ae5..59b012751c66d 100644 --- a/src/plugins/bfetch/common/batch.ts +++ b/src/plugins/bfetch/common/batch.ts @@ -19,3 +19,8 @@ export interface BatchResponseItem new Promise((resolve) => setImmediate(resolve)); const getPromiseState = (promise: Promise): Promise<'resolved' | 'rejected' | 'pending'> => Promise.race<'resolved' | 'rejected' | 'pending'>([ @@ -47,11 +49,19 @@ const setup = () => { }; describe('createStreamingBatchedFunction()', () => { + beforeAll(() => { + jest.useFakeTimers(); + }); + + afterAll(() => { + jest.useRealTimers(); + }); test('returns a function', () => { const { fetchStreaming } = setup(); const fn = createStreamingBatchedFunction({ url: '/test', fetchStreaming, + compressionDisabled$: rxof(true), }); expect(typeof fn).toBe('function'); }); @@ -61,6 +71,7 @@ describe('createStreamingBatchedFunction()', () => { const fn = createStreamingBatchedFunction({ url: '/test', fetchStreaming, + compressionDisabled$: rxof(true), }); const res = fn({}); expect(typeof res.then).toBe('function'); @@ -74,6 +85,7 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); expect(fetchStreaming).toHaveBeenCalledTimes(0); @@ -81,8 +93,8 @@ describe('createStreamingBatchedFunction()', () => { expect(fetchStreaming).toHaveBeenCalledTimes(0); fn({ baz: 'quix' }); expect(fetchStreaming).toHaveBeenCalledTimes(0); + jest.advanceTimersByTime(6); - await new Promise((r) => setTimeout(r, 6)); expect(fetchStreaming).toHaveBeenCalledTimes(1); }); @@ -93,10 +105,11 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); expect(fetchStreaming).toHaveBeenCalledTimes(0); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(fetchStreaming).toHaveBeenCalledTimes(0); }); @@ -107,10 +120,11 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); fn({ foo: 'bar' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(fetchStreaming.mock.calls[0][0]).toMatchObject({ url: '/test', @@ -125,12 +139,13 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); fn({ foo: 'bar' }); fn({ baz: 'quix' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); const { body } = fetchStreaming.mock.calls[0][0]; expect(JSON.parse(body)).toEqual({ batch: [{ foo: 'bar' }, { baz: 'quix' }], @@ -146,6 +161,7 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); expect(fetchStreaming).toHaveBeenCalledTimes(0); @@ -164,6 +180,7 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const abortController = new AbortController(); @@ -172,7 +189,7 @@ describe('createStreamingBatchedFunction()', () => { of(fn({ foo: 'bar' }, abortController.signal)); fn({ baz: 'quix' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); const { body } = fetchStreaming.mock.calls[0][0]; expect(JSON.parse(body)).toEqual({ batch: [{ baz: 'quix' }], @@ -186,6 +203,7 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); fn({ a: '1' }); @@ -209,6 +227,7 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); fn({ a: '1' }); @@ -216,7 +235,7 @@ describe('createStreamingBatchedFunction()', () => { fn({ c: '3' }); expect(fetchStreaming).toHaveBeenCalledTimes(1); fn({ d: '4' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(fetchStreaming).toHaveBeenCalledTimes(2); }); }); @@ -229,11 +248,12 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = fn({ a: '1' }); const promise2 = fn({ b: '2' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(await isPending(promise1)).toBe(true); expect(await isPending(promise2)).toBe(true); @@ -246,12 +266,15 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); + await flushPromises(); + const promise1 = fn({ a: '1' }); const promise2 = fn({ b: '2' }); const promise3 = fn({ c: '3' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(await isPending(promise1)).toBe(true); expect(await isPending(promise2)).toBe(true); @@ -287,12 +310,13 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = fn({ a: '1' }); const promise2 = fn({ b: '2' }); const promise3 = fn({ c: '3' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.next( JSON.stringify({ @@ -314,6 +338,20 @@ describe('createStreamingBatchedFunction()', () => { expect(await promise3).toEqual({ foo: 'bar 2' }); }); + test('compression is false by default', async () => { + const { fetchStreaming } = setup(); + const fn = createStreamingBatchedFunction({ + url: '/test', + flushOnMaxItems: 1, + fetchStreaming, + }); + + fn({ a: '1' }); + + const dontCompress = await fetchStreaming.mock.calls[0][0].compressionDisabled$.toPromise(); + expect(dontCompress).toBe(false); + }); + test('resolves falsy results', async () => { const { fetchStreaming, stream } = setup(); const fn = createStreamingBatchedFunction({ @@ -321,12 +359,13 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = fn({ a: '1' }); const promise2 = fn({ b: '2' }); const promise3 = fn({ c: '3' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.next( JSON.stringify({ @@ -362,10 +401,11 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise = fn({ a: '1' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(await isPending(promise)).toBe(true); @@ -390,13 +430,14 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = of(fn({ a: '1' })); const promise2 = of(fn({ a: '2' })); const promise3 = of(fn({ a: '3' })); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.next( JSON.stringify({ @@ -405,7 +446,7 @@ describe('createStreamingBatchedFunction()', () => { }) + '\n' ); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); stream.next( JSON.stringify({ @@ -414,7 +455,7 @@ describe('createStreamingBatchedFunction()', () => { }) + '\n' ); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); stream.next( JSON.stringify({ @@ -423,7 +464,7 @@ describe('createStreamingBatchedFunction()', () => { }) + '\n' ); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [result1] = await promise1; const [, error2] = await promise2; @@ -442,18 +483,20 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const abortController = new AbortController(); const promise = fn({ a: '1' }, abortController.signal); const promise2 = fn({ a: '2' }, abortController.signal); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(await isPending(promise)).toBe(true); expect(await isPending(promise2)).toBe(true); abortController.abort(); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); + await flushPromises(); expect(await isPending(promise)).toBe(false); expect(await isPending(promise2)).toBe(false); @@ -471,17 +514,19 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const abortController = new AbortController(); const promise = fn({ a: '1' }, abortController.signal); const promise2 = fn({ a: '2' }); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); expect(await isPending(promise)).toBe(true); abortController.abort(); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); + await flushPromises(); expect(await isPending(promise)).toBe(false); const [, error] = await of(promise); @@ -494,7 +539,7 @@ describe('createStreamingBatchedFunction()', () => { }) + '\n' ); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [result2] = await of(promise2); expect(result2).toEqual({ b: '2' }); @@ -509,16 +554,17 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = of(fn({ a: '1' })); const promise2 = of(fn({ a: '2' })); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.complete(); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [, error1] = await promise1; const [, error2] = await promise2; @@ -539,12 +585,13 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = of(fn({ a: '1' })); const promise2 = of(fn({ a: '2' })); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.next( JSON.stringify({ @@ -554,7 +601,7 @@ describe('createStreamingBatchedFunction()', () => { ); stream.complete(); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [, error1] = await promise1; const [result1] = await promise2; @@ -576,18 +623,19 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = of(fn({ a: '1' })); const promise2 = of(fn({ a: '2' })); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.error({ message: 'something went wrong', }); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [, error1] = await promise1; const [, error2] = await promise2; @@ -608,12 +656,13 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); const promise1 = of(fn({ a: '1' })); const promise2 = of(fn({ a: '2' })); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.next( JSON.stringify({ @@ -623,7 +672,7 @@ describe('createStreamingBatchedFunction()', () => { ); stream.error('oops'); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [, error1] = await promise1; const [result1] = await promise2; @@ -644,12 +693,14 @@ describe('createStreamingBatchedFunction()', () => { fetchStreaming, maxItemAge: 5, flushOnMaxItems: 3, + compressionDisabled$: rxof(true), }); + await flushPromises(); const promise1 = of(fn({ a: '1' })); const promise2 = of(fn({ a: '2' })); - await new Promise((r) => setTimeout(r, 6)); + jest.advanceTimersByTime(6); stream.next( JSON.stringify({ @@ -660,7 +711,7 @@ describe('createStreamingBatchedFunction()', () => { stream.next('Not a JSON\n'); - await new Promise((r) => setTimeout(r, 1)); + jest.advanceTimersByTime(1); const [, error1] = await promise1; const [result1] = await promise2; diff --git a/src/plugins/bfetch/public/batching/create_streaming_batched_function.ts b/src/plugins/bfetch/public/batching/create_streaming_batched_function.ts index 2d81331f10a88..d5f955f517d13 100644 --- a/src/plugins/bfetch/public/batching/create_streaming_batched_function.ts +++ b/src/plugins/bfetch/public/batching/create_streaming_batched_function.ts @@ -6,16 +6,16 @@ * Side Public License, v 1. */ +import { Observable, of } from 'rxjs'; import { AbortError, abortSignalToPromise, defer } from '../../../kibana_utils/public'; import { ItemBufferParams, TimedItemBufferParams, createBatchedFunction, - BatchResponseItem, ErrorLike, + normalizeError, } from '../../common'; -import { fetchStreaming, split } from '../streaming'; -import { normalizeError } from '../../common'; +import { fetchStreaming } from '../streaming'; import { BatchedFunc, BatchItem } from './types'; export interface BatchedFunctionProtocolError extends ErrorLike { @@ -47,6 +47,11 @@ export interface StreamingBatchedFunctionParams { * before sending the batch request. */ maxItemAge?: TimedItemBufferParams['maxItemAge']; + + /** + * Disabled zlib compression of response chunks. + */ + compressionDisabled$?: Observable; } /** @@ -64,6 +69,7 @@ export const createStreamingBatchedFunction = ( fetchStreaming: fetchStreamingInjected = fetchStreaming, flushOnMaxItems = 25, maxItemAge = 10, + compressionDisabled$ = of(false), } = params; const [fn] = createBatchedFunction({ onCall: (payload: Payload, signal?: AbortSignal) => { @@ -119,6 +125,7 @@ export const createStreamingBatchedFunction = ( body: JSON.stringify({ batch }), method: 'POST', signal: abortController.signal, + compressionDisabled$, }); const handleStreamError = (error: any) => { @@ -127,10 +134,10 @@ export const createStreamingBatchedFunction = ( for (const { future } of items) future.reject(normalizedError); }; - stream.pipe(split('\n')).subscribe({ + stream.subscribe({ next: (json: string) => { try { - const response = JSON.parse(json) as BatchResponseItem; + const response = JSON.parse(json); if (response.error) { items[response.id].future.reject(response.error); } else if (response.result !== undefined) { diff --git a/src/plugins/bfetch/public/batching/index.ts b/src/plugins/bfetch/public/batching/index.ts new file mode 100644 index 0000000000000..115fd84cbe979 --- /dev/null +++ b/src/plugins/bfetch/public/batching/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { + createStreamingBatchedFunction, + StreamingBatchedFunctionParams, +} from './create_streaming_batched_function'; diff --git a/src/plugins/bfetch/public/plugin.ts b/src/plugins/bfetch/public/plugin.ts index ed97d468eec0b..f97a91a0e70d3 100644 --- a/src/plugins/bfetch/public/plugin.ts +++ b/src/plugins/bfetch/public/plugin.ts @@ -7,12 +7,11 @@ */ import { CoreStart, PluginInitializerContext, CoreSetup, Plugin } from 'src/core/public'; +import { from, Observable, of } from 'rxjs'; +import { switchMap } from 'rxjs/operators'; import { fetchStreaming as fetchStreamingStatic, FetchStreamingParams } from './streaming'; -import { removeLeadingSlash } from '../common'; -import { - createStreamingBatchedFunction, - StreamingBatchedFunctionParams, -} from './batching/create_streaming_batched_function'; +import { DISABLE_BFETCH_COMPRESSION, removeLeadingSlash } from '../common'; +import { createStreamingBatchedFunction, StreamingBatchedFunctionParams } from './batching'; import { BatchedFunc } from './batching/types'; // eslint-disable-next-line @@ -43,12 +42,23 @@ export class BfetchPublicPlugin constructor(private readonly initializerContext: PluginInitializerContext) {} - public setup(core: CoreSetup, plugins: BfetchPublicSetupDependencies): BfetchPublicSetup { + public setup( + core: CoreSetup, + plugins: BfetchPublicSetupDependencies + ): BfetchPublicSetup { const { version } = this.initializerContext.env.packageInfo; const basePath = core.http.basePath.get(); - const fetchStreaming = this.fetchStreaming(version, basePath); - const batchedFunction = this.batchedFunction(fetchStreaming); + const compressionDisabled$ = from(core.getStartServices()).pipe( + switchMap((deps) => { + return of(deps[0]); + }), + switchMap((coreStart) => { + return coreStart.uiSettings.get$(DISABLE_BFETCH_COMPRESSION); + }) + ); + const fetchStreaming = this.fetchStreaming(version, basePath, compressionDisabled$); + const batchedFunction = this.batchedFunction(fetchStreaming, compressionDisabled$); this.contract = { fetchStreaming, @@ -66,7 +76,8 @@ export class BfetchPublicPlugin private fetchStreaming = ( version: string, - basePath: string + basePath: string, + compressionDisabled$: Observable ): BfetchPublicSetup['fetchStreaming'] => (params) => fetchStreamingStatic({ ...params, @@ -76,13 +87,16 @@ export class BfetchPublicPlugin 'kbn-version': version, ...(params.headers || {}), }, + compressionDisabled$, }); private batchedFunction = ( - fetchStreaming: BfetchPublicContract['fetchStreaming'] + fetchStreaming: BfetchPublicContract['fetchStreaming'], + compressionDisabled$: Observable ): BfetchPublicContract['batchedFunction'] => (params) => createStreamingBatchedFunction({ ...params, + compressionDisabled$, fetchStreaming: params.fetchStreaming || fetchStreaming, }); } diff --git a/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts b/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts index e804b3ea94227..a5d066f6d9a24 100644 --- a/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts +++ b/src/plugins/bfetch/public/streaming/fetch_streaming.test.ts @@ -8,6 +8,15 @@ import { fetchStreaming } from './fetch_streaming'; import { mockXMLHttpRequest } from '../test_helpers/xhr'; +import { of } from 'rxjs'; +import { promisify } from 'util'; +import { deflate } from 'zlib'; +const pDeflate = promisify(deflate); + +const compressResponse = async (resp: any) => { + const gzipped = await pDeflate(JSON.stringify(resp)); + return gzipped.toString('base64'); +}; const tick = () => new Promise((resolve) => setTimeout(resolve, 1)); @@ -21,6 +30,7 @@ test('returns XHR request', () => { setup(); const { xhr } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); expect(typeof xhr.readyState).toBe('number'); }); @@ -29,6 +39,7 @@ test('returns stream', () => { setup(); const { stream } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); expect(typeof stream.subscribe).toBe('function'); }); @@ -37,6 +48,7 @@ test('promise resolves when request completes', async () => { const env = setup(); const { stream } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); let resolved = false; @@ -65,10 +77,90 @@ test('promise resolves when request completes', async () => { expect(resolved).toBe(true); }); -test('streams incoming text as it comes through', async () => { +test('promise resolves when compressed request completes', async () => { + const env = setup(); + const { stream } = fetchStreaming({ + url: 'http://example.com', + compressionDisabled$: of(false), + }); + + let resolved = false; + let result; + stream.toPromise().then((r) => { + resolved = true; + result = r; + }); + + await tick(); + expect(resolved).toBe(false); + + const msg = { foo: 'bar' }; + + // Whole message in a response + (env.xhr as any).responseText = `${await compressResponse(msg)}\n`; + env.xhr.onprogress!({} as any); + + await tick(); + expect(resolved).toBe(false); + + (env.xhr as any).readyState = 4; + (env.xhr as any).status = 200; + env.xhr.onreadystatechange!({} as any); + + await tick(); + expect(resolved).toBe(true); + expect(result).toStrictEqual(JSON.stringify(msg)); +}); + +test('promise resolves when compressed chunked request completes', async () => { const env = setup(); const { stream } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(false), + }); + + let resolved = false; + let result; + stream.toPromise().then((r) => { + resolved = true; + result = r; + }); + + await tick(); + expect(resolved).toBe(false); + + const msg = { veg: 'tomato' }; + const msgToCut = await compressResponse(msg); + const part1 = msgToCut.substr(0, 3); + + // Message and a half in a response + (env.xhr as any).responseText = part1; + env.xhr.onprogress!({} as any); + + await tick(); + expect(resolved).toBe(false); + + // Half a message in a response + (env.xhr as any).responseText = `${msgToCut}\n`; + env.xhr.onprogress!({} as any); + + await tick(); + expect(resolved).toBe(false); + + (env.xhr as any).readyState = 4; + (env.xhr as any).status = 200; + env.xhr.onreadystatechange!({} as any); + + await tick(); + expect(resolved).toBe(true); + expect(result).toStrictEqual(JSON.stringify(msg)); +}); + +test('streams incoming text as it comes through, according to separators', async () => { + const env = setup(); + const { stream } = fetchStreaming({ + url: 'http://example.com', + compressionDisabled$: of(true), }); const spy = jest.fn(); @@ -80,16 +172,22 @@ test('streams incoming text as it comes through', async () => { (env.xhr as any).responseText = 'foo'; env.xhr.onprogress!({} as any); + await tick(); + expect(spy).toHaveBeenCalledTimes(0); + + (env.xhr as any).responseText = 'foo\nbar'; + env.xhr.onprogress!({} as any); + await tick(); expect(spy).toHaveBeenCalledTimes(1); expect(spy).toHaveBeenCalledWith('foo'); - (env.xhr as any).responseText = 'foo\nbar'; + (env.xhr as any).responseText = 'foo\nbar\n'; env.xhr.onprogress!({} as any); await tick(); expect(spy).toHaveBeenCalledTimes(2); - expect(spy).toHaveBeenCalledWith('\nbar'); + expect(spy).toHaveBeenCalledWith('bar'); (env.xhr as any).readyState = 4; (env.xhr as any).status = 200; @@ -103,6 +201,7 @@ test('completes stream observable when request finishes', async () => { const env = setup(); const { stream } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); const spy = jest.fn(); @@ -127,6 +226,7 @@ test('completes stream observable when aborted', async () => { const { stream } = fetchStreaming({ url: 'http://example.com', signal: abort.signal, + compressionDisabled$: of(true), }); const spy = jest.fn(); @@ -152,6 +252,7 @@ test('promise throws when request errors', async () => { const env = setup(); const { stream } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); const spy = jest.fn(); @@ -178,6 +279,7 @@ test('stream observable errors when request errors', async () => { const env = setup(); const { stream } = fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); const spy = jest.fn(); @@ -210,6 +312,7 @@ test('sets custom headers', async () => { 'Content-Type': 'text/plain', Authorization: 'Bearer 123', }, + compressionDisabled$: of(true), }); expect(env.xhr.setRequestHeader).toHaveBeenCalledWith('Content-Type', 'text/plain'); @@ -223,6 +326,7 @@ test('uses credentials', async () => { fetchStreaming({ url: 'http://example.com', + compressionDisabled$: of(true), }); expect(env.xhr.withCredentials).toBe(true); @@ -238,6 +342,7 @@ test('opens XHR request and sends specified body', async () => { url: 'http://elastic.co', method: 'GET', body: 'foobar', + compressionDisabled$: of(true), }); expect(env.xhr.open).toHaveBeenCalledTimes(1); @@ -250,6 +355,7 @@ test('uses POST request method by default', async () => { const env = setup(); fetchStreaming({ url: 'http://elastic.co', + compressionDisabled$: of(true), }); expect(env.xhr.open).toHaveBeenCalledWith('POST', 'http://elastic.co'); }); diff --git a/src/plugins/bfetch/public/streaming/fetch_streaming.ts b/src/plugins/bfetch/public/streaming/fetch_streaming.ts index d68e4d01b44f5..1af35ef68fb85 100644 --- a/src/plugins/bfetch/public/streaming/fetch_streaming.ts +++ b/src/plugins/bfetch/public/streaming/fetch_streaming.ts @@ -6,7 +6,11 @@ * Side Public License, v 1. */ +import { Observable, of } from 'rxjs'; +import { map, share, switchMap } from 'rxjs/operators'; +import { inflateResponse } from '.'; import { fromStreamingXhr } from './from_streaming_xhr'; +import { split } from './split'; export interface FetchStreamingParams { url: string; @@ -14,6 +18,7 @@ export interface FetchStreamingParams { method?: 'GET' | 'POST'; body?: string; signal?: AbortSignal; + compressionDisabled$?: Observable; } /** @@ -26,23 +31,49 @@ export function fetchStreaming({ method = 'POST', body = '', signal, + compressionDisabled$ = of(false), }: FetchStreamingParams) { const xhr = new window.XMLHttpRequest(); - // Begin the request - xhr.open(method, url); - xhr.withCredentials = true; + const msgStream = compressionDisabled$.pipe( + switchMap((compressionDisabled) => { + // Begin the request + xhr.open(method, url); + xhr.withCredentials = true; - // Set the HTTP headers - Object.entries(headers).forEach(([k, v]) => xhr.setRequestHeader(k, v)); + if (!compressionDisabled) { + headers['X-Chunk-Encoding'] = 'deflate'; + } - const stream = fromStreamingXhr(xhr, signal); + // Set the HTTP headers + Object.entries(headers).forEach(([k, v]) => xhr.setRequestHeader(k, v)); - // Send the payload to the server - xhr.send(body); + const stream = fromStreamingXhr(xhr, signal); + + // Send the payload to the server + xhr.send(body); + + // Return a stream of chunked decompressed messages + return stream.pipe( + split('\n'), + map((msg) => { + return compressionDisabled ? msg : inflateResponse(msg); + }) + ); + }), + share() + ); + + // start execution + const msgStreamSub = msgStream.subscribe({ + error: (e) => {}, + complete: () => { + msgStreamSub.unsubscribe(); + }, + }); return { xhr, - stream, + stream: msgStream, }; } diff --git a/src/plugins/bfetch/public/streaming/index.ts b/src/plugins/bfetch/public/streaming/index.ts index afb442feffb29..545cae87aa3d6 100644 --- a/src/plugins/bfetch/public/streaming/index.ts +++ b/src/plugins/bfetch/public/streaming/index.ts @@ -9,3 +9,4 @@ export * from './split'; export * from './from_streaming_xhr'; export * from './fetch_streaming'; +export { inflateResponse } from './inflate_response'; diff --git a/src/plugins/bfetch/public/streaming/inflate_response.ts b/src/plugins/bfetch/public/streaming/inflate_response.ts new file mode 100644 index 0000000000000..73cb52285987c --- /dev/null +++ b/src/plugins/bfetch/public/streaming/inflate_response.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { unzlibSync, strFromU8 } from 'fflate'; + +export function inflateResponse(response: string) { + const buff = Buffer.from(response, 'base64'); + const unzip = unzlibSync(buff); + return strFromU8(unzip); +} diff --git a/src/plugins/bfetch/server/plugin.ts b/src/plugins/bfetch/server/plugin.ts index 18f0813260f03..7fd46e2f6cc44 100644 --- a/src/plugins/bfetch/server/plugin.ts +++ b/src/plugins/bfetch/server/plugin.ts @@ -16,6 +16,7 @@ import type { RouteMethod, RequestHandler, RequestHandlerContext, + StartServicesAccessor, } from 'src/core/server'; import { schema } from '@kbn/config-schema'; import { Subject } from 'rxjs'; @@ -28,7 +29,8 @@ import { normalizeError, } from '../common'; import { StreamingRequestHandler } from './types'; -import { createNDJSONStream } from './streaming'; +import { createStream } from './streaming'; +import { getUiSettings } from './ui_settings'; // eslint-disable-next-line export interface BfetchServerSetupDependencies {} @@ -112,9 +114,19 @@ export class BfetchServerPlugin public setup(core: CoreSetup, plugins: BfetchServerSetupDependencies): BfetchServerSetup { const logger = this.initializerContext.logger.get(); const router = core.http.createRouter(); - const addStreamingResponseRoute = this.addStreamingResponseRoute({ router, logger }); + + core.uiSettings.register(getUiSettings()); + + const addStreamingResponseRoute = this.addStreamingResponseRoute({ + getStartServices: core.getStartServices, + router, + logger, + }); const addBatchProcessingRoute = this.addBatchProcessingRoute(addStreamingResponseRoute); - const createStreamingRequestHandler = this.createStreamingRequestHandler({ logger }); + const createStreamingRequestHandler = this.createStreamingRequestHandler({ + getStartServices: core.getStartServices, + logger, + }); return { addBatchProcessingRoute, @@ -129,10 +141,16 @@ export class BfetchServerPlugin public stop() {} + private getCompressionDisabled(request: KibanaRequest) { + return request.headers['x-chunk-encoding'] !== 'deflate'; + } + private addStreamingResponseRoute = ({ + getStartServices, router, logger, }: { + getStartServices: StartServicesAccessor; router: ReturnType; logger: Logger; }): BfetchServerSetup['addStreamingResponseRoute'] => (path, handler) => { @@ -146,9 +164,10 @@ export class BfetchServerPlugin async (context, request, response) => { const handlerInstance = handler(request); const data = request.body; + const compressionDisabled = this.getCompressionDisabled(request); return response.ok({ headers: streamingHeaders, - body: createNDJSONStream(handlerInstance.getResponseStream(data), logger), + body: createStream(handlerInstance.getResponseStream(data), logger, compressionDisabled), }); } ); @@ -156,17 +175,20 @@ export class BfetchServerPlugin private createStreamingRequestHandler = ({ logger, + getStartServices, }: { logger: Logger; + getStartServices: StartServicesAccessor; }): BfetchServerSetup['createStreamingRequestHandler'] => (streamHandler) => async ( context, request, response ) => { const response$ = await streamHandler(context, request); + const compressionDisabled = this.getCompressionDisabled(request); return response.ok({ headers: streamingHeaders, - body: createNDJSONStream(response$, logger), + body: createStream(response$, logger, compressionDisabled), }); }; diff --git a/src/plugins/bfetch/server/streaming/create_compressed_stream.ts b/src/plugins/bfetch/server/streaming/create_compressed_stream.ts new file mode 100644 index 0000000000000..6814ed1dd7955 --- /dev/null +++ b/src/plugins/bfetch/server/streaming/create_compressed_stream.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { promisify } from 'util'; +import { Observable } from 'rxjs'; +import { catchError, concatMap, finalize } from 'rxjs/operators'; +import { Logger } from 'src/core/server'; +import { Stream, PassThrough } from 'stream'; +import { constants, deflate } from 'zlib'; + +const delimiter = '\n'; +const pDeflate = promisify(deflate); + +async function zipMessageToStream(output: PassThrough, message: string) { + return new Promise(async (resolve, reject) => { + try { + const gzipped = await pDeflate(message, { + flush: constants.Z_SYNC_FLUSH, + }); + output.write(gzipped.toString('base64')); + output.write(delimiter); + resolve(undefined); + } catch (err) { + reject(err); + } + }); +} + +export const createCompressedStream = ( + results: Observable, + logger: Logger +): Stream => { + const output = new PassThrough(); + + const sub = results + .pipe( + concatMap((message: Response) => { + const strMessage = JSON.stringify(message); + return zipMessageToStream(output, strMessage); + }), + catchError((e) => { + logger.error('Could not serialize or stream a message.'); + logger.error(e); + throw e; + }), + finalize(() => { + output.end(); + sub.unsubscribe(); + }) + ) + .subscribe(); + + return output; +}; diff --git a/src/plugins/bfetch/server/streaming/create_stream.ts b/src/plugins/bfetch/server/streaming/create_stream.ts new file mode 100644 index 0000000000000..7d6981294341b --- /dev/null +++ b/src/plugins/bfetch/server/streaming/create_stream.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 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 { Logger } from 'kibana/server'; +import { Stream } from 'stream'; +import { Observable } from 'rxjs'; +import { createCompressedStream } from './create_compressed_stream'; +import { createNDJSONStream } from './create_ndjson_stream'; + +export function createStream( + response$: Observable, + logger: Logger, + compressionDisabled: boolean +): Stream { + return compressionDisabled + ? createNDJSONStream(response$, logger) + : createCompressedStream(response$, logger); +} diff --git a/src/plugins/bfetch/server/streaming/index.ts b/src/plugins/bfetch/server/streaming/index.ts index 2c31cc329295d..dfd472b5034a1 100644 --- a/src/plugins/bfetch/server/streaming/index.ts +++ b/src/plugins/bfetch/server/streaming/index.ts @@ -7,3 +7,5 @@ */ export * from './create_ndjson_stream'; +export * from './create_compressed_stream'; +export * from './create_stream'; diff --git a/src/plugins/bfetch/server/ui_settings.ts b/src/plugins/bfetch/server/ui_settings.ts new file mode 100644 index 0000000000000..cf7b13a9af182 --- /dev/null +++ b/src/plugins/bfetch/server/ui_settings.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 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 { UiSettingsParams } from 'src/core/server'; +import { schema } from '@kbn/config-schema'; +import { DISABLE_BFETCH_COMPRESSION } from '../common'; + +export function getUiSettings(): Record> { + return { + [DISABLE_BFETCH_COMPRESSION]: { + name: i18n.translate('bfetch.disableBfetchCompression', { + defaultMessage: 'Disable Batch Compression', + }), + value: false, + description: i18n.translate('bfetch.disableBfetchCompressionDesc', { + defaultMessage: + 'Disable batch compression. This allows you to debug individual requests, but increases response size.', + }), + schema: schema.boolean(), + category: [], + }, + }; +} diff --git a/src/plugins/charts/public/index.ts b/src/plugins/charts/public/index.ts index b42407bb10365..cc1a54c2e25b0 100644 --- a/src/plugins/charts/public/index.ts +++ b/src/plugins/charts/public/index.ts @@ -14,6 +14,7 @@ export { ChartsPluginSetup, ChartsPluginStart } from './plugin'; export * from './static'; export * from './services/palettes/types'; +export { lightenColor } from './services/palettes/lighten_color'; export { PaletteOutput, CustomPaletteArguments, diff --git a/src/plugins/charts/public/static/components/color_picker.tsx b/src/plugins/charts/public/static/components/color_picker.tsx index 4974400a3767a..813748accd8fd 100644 --- a/src/plugins/charts/public/static/components/color_picker.tsx +++ b/src/plugins/charts/public/static/components/color_picker.tsx @@ -18,7 +18,7 @@ import { EuiFlexGroup, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; - +import { lightenColor } from '../../services/palettes/lighten_color'; import './color_picker.scss'; export const legacyColors: string[] = [ @@ -105,6 +105,14 @@ interface ColorPickerProps { * Callback for onKeyPress event */ onKeyDown?: (e: React.KeyboardEvent) => void; + /** + * Optional define the series maxDepth + */ + maxDepth?: number; + /** + * Optional define the layer index + */ + layerIndex?: number; } const euiColors = euiPaletteColorBlind({ rotations: 4, order: 'group' }); @@ -115,6 +123,8 @@ export const ColorPicker = ({ useLegacyColors = true, colorIsOverwritten = true, onKeyDown, + maxDepth, + layerIndex, }: ColorPickerProps) => { const legendColors = useLegacyColors ? legacyColors : euiColors; @@ -159,13 +169,18 @@ export const ColorPicker = ({ ))} - {legendColors.some((c) => c === selectedColor) && colorIsOverwritten && ( - - onChange(null, e)}> - - - - )} + {legendColors.some( + (c) => + c === selectedColor || + (layerIndex && maxDepth && lightenColor(c, layerIndex, maxDepth) === selectedColor) + ) && + colorIsOverwritten && ( + + onChange(null, e)}> + + + + )}
); }; diff --git a/src/plugins/dashboard/common/types.ts b/src/plugins/dashboard/common/types.ts index 9a6d185ef2ac1..5851ffa045bc7 100644 --- a/src/plugins/dashboard/common/types.ts +++ b/src/plugins/dashboard/common/types.ts @@ -32,6 +32,14 @@ export interface DashboardPanelState< panelRefName?: string; } +export interface DashboardCapabilities { + showWriteControls: boolean; + saveQuery: boolean; + createNew: boolean; + show: boolean; + [key: string]: boolean; +} + /** * This should always represent the latest dashboard panel shape, after all possible migrations. */ diff --git a/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx b/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx index f90a0cef95bb8..98f7bbbee3d7c 100644 --- a/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx +++ b/src/plugins/dashboard/public/application/actions/expand_panel_action.tsx @@ -6,14 +6,11 @@ * Side Public License, v 1. */ -import { dashboardExpandPanelAction } from '../../dashboard_strings'; +import { DashboardContainerInput } from '../..'; import { IEmbeddable } from '../../services/embeddable'; +import { dashboardExpandPanelAction } from '../../dashboard_strings'; import { Action, IncompatibleActionError } from '../../services/ui_actions'; -import { - DASHBOARD_CONTAINER_TYPE, - DashboardContainer, - DashboardContainerInput, -} from '../embeddable'; +import { DASHBOARD_CONTAINER_TYPE, DashboardContainer } from '../embeddable'; export const ACTION_EXPAND_PANEL = 'togglePanel'; diff --git a/src/plugins/dashboard/public/application/dashboard_app.tsx b/src/plugins/dashboard/public/application/dashboard_app.tsx index 93310bb821361..8db6a0e8a8c7f 100644 --- a/src/plugins/dashboard/public/application/dashboard_app.tsx +++ b/src/plugins/dashboard/public/application/dashboard_app.tsx @@ -7,35 +7,20 @@ */ import { History } from 'history'; -import { merge, Subject, Subscription } from 'rxjs'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo } from 'react'; -import { debounceTime, finalize, switchMap, tap } from 'rxjs/operators'; +import { useDashboardSelector } from './state'; +import { useDashboardAppState } from './hooks'; import { useKibana } from '../../../kibana_react/public'; -import { DashboardConstants } from '../dashboard_constants'; -import { DashboardTopNav } from './top_nav/dashboard_top_nav'; -import { DashboardAppServices, DashboardEmbedSettings, DashboardRedirect } from './types'; import { - getChangesFromAppStateForContainerState, - getDashboardContainerInput, - getFiltersSubscription, - getInputSubscription, - getOutputSubscription, - getSearchSessionIdFromURL, -} from './dashboard_app_functions'; -import { - useDashboardBreadcrumbs, - useDashboardContainer, - useDashboardStateManager, - useSavedDashboard, -} from './hooks'; - -import { IndexPattern, waitUntilNextSessionCompletes$ } from '../services/data'; + getDashboardBreadcrumb, + getDashboardTitle, + leaveConfirmStrings, +} from '../dashboard_strings'; import { EmbeddableRenderer } from '../services/embeddable'; -import { DashboardContainerInput } from '.'; -import { leaveConfirmStrings } from '../dashboard_strings'; -import { createQueryParamObservable, replaceUrlHashQuery } from '../../../kibana_utils/public'; - +import { DashboardTopNav, isCompleteDashboardAppState } from './top_nav/dashboard_top_nav'; +import { DashboardAppServices, DashboardEmbedSettings, DashboardRedirect } from '../types'; +import { createKbnUrlStateStorage, withNotifyOnErrors } from '../services/kibana_utils'; export interface DashboardAppProps { history: History; savedDashboardId?: string; @@ -50,236 +35,37 @@ export function DashboardApp({ history, }: DashboardAppProps) { const { - data, core, + chrome, + embeddable, onAppLeave, uiSettings, - embeddable, - dashboardCapabilities, - indexPatterns: indexPatternService, } = useKibana().services; - const triggerRefresh$ = useMemo(() => new Subject<{ force?: boolean }>(), []); - const [indexPatterns, setIndexPatterns] = useState([]); - - const savedDashboard = useSavedDashboard(savedDashboardId, history); - - const getIncomingEmbeddable = useCallback( - (removeAfterFetch?: boolean) => { - return embeddable - .getStateTransfer() - .getIncomingEmbeddablePackage(DashboardConstants.DASHBOARDS_ID, removeAfterFetch); - }, - [embeddable] + const kbnUrlStateStorage = useMemo( + () => + createKbnUrlStateStorage({ + history, + useHash: uiSettings.get('state:storeInSessionStorage'), + ...withNotifyOnErrors(core.notifications.toasts), + }), + [core.notifications.toasts, history, uiSettings] ); - const { dashboardStateManager, viewMode, setViewMode } = useDashboardStateManager( - savedDashboard, - history, - getIncomingEmbeddable - ); - const [unsavedChanges, setUnsavedChanges] = useState(false); - const dashboardContainer = useDashboardContainer({ - timeFilter: data.query.timefilter.timefilter, - dashboardStateManager, - getIncomingEmbeddable, - setUnsavedChanges, + const dashboardState = useDashboardSelector((state) => state.dashboardStateReducer); + const dashboardAppState = useDashboardAppState({ history, + redirectTo, + savedDashboardId, + kbnUrlStateStorage, + isEmbeddedExternally: Boolean(embedSettings), }); - const searchSessionIdQuery$ = useMemo( - () => createQueryParamObservable(history, DashboardConstants.SEARCH_SESSION_ID), - [history] - ); - - const refreshDashboardContainer = useCallback( - (force?: boolean) => { - if (!dashboardContainer || !dashboardStateManager) { - return; - } - - const changes = getChangesFromAppStateForContainerState({ - dashboardContainer, - appStateDashboardInput: getDashboardContainerInput({ - isEmbeddedExternally: Boolean(embedSettings), - dashboardStateManager, - lastReloadRequestTime: force ? Date.now() : undefined, - dashboardCapabilities, - query: data.query, - }), - }); - - if (changes) { - // state keys change in which likely won't need a data fetch - const noRefetchKeys: Array = [ - 'viewMode', - 'title', - 'description', - 'expandedPanelId', - 'useMargins', - 'isEmbeddedExternally', - 'isFullScreenMode', - ]; - const shouldRefetch = Object.keys(changes).some( - (changeKey) => !noRefetchKeys.includes(changeKey as keyof DashboardContainerInput) - ); - - const newSearchSessionId: string | undefined = (() => { - // do not update session id if this is irrelevant state change to prevent excessive searches - if (!shouldRefetch) return; - - let searchSessionIdFromURL = getSearchSessionIdFromURL(history); - if (searchSessionIdFromURL) { - if ( - data.search.session.isRestore() && - data.search.session.isCurrentSession(searchSessionIdFromURL) - ) { - // navigating away from a restored session - dashboardStateManager.kbnUrlStateStorage.kbnUrlControls.updateAsync((nextUrl) => { - if (nextUrl.includes(DashboardConstants.SEARCH_SESSION_ID)) { - return replaceUrlHashQuery(nextUrl, (query) => { - delete query[DashboardConstants.SEARCH_SESSION_ID]; - return query; - }); - } - return nextUrl; - }); - searchSessionIdFromURL = undefined; - } else { - data.search.session.restore(searchSessionIdFromURL); - } - } - - return searchSessionIdFromURL ?? data.search.session.start(); - })(); - - if (changes.viewMode) { - setViewMode(changes.viewMode); - } - dashboardContainer.updateInput({ - ...changes, - ...(newSearchSessionId && { searchSessionId: newSearchSessionId }), - }); - } - }, - [ - history, - data.query, - setViewMode, - embedSettings, - dashboardContainer, - data.search.session, - dashboardCapabilities, - dashboardStateManager, - ] - ); - - // Manage dashboard container subscriptions - useEffect(() => { - if (!dashboardStateManager || !dashboardContainer) { - return; - } - const timeFilter = data.query.timefilter.timefilter; - const subscriptions = new Subscription(); - - subscriptions.add( - getInputSubscription({ - dashboardContainer, - dashboardStateManager, - filterManager: data.query.filterManager, - }) - ); - subscriptions.add( - getOutputSubscription({ - dashboardContainer, - indexPatterns: indexPatternService, - onUpdateIndexPatterns: (newIndexPatterns) => setIndexPatterns(newIndexPatterns), - }) - ); - subscriptions.add( - getFiltersSubscription({ - query: data.query, - dashboardStateManager, - }) - ); - subscriptions.add( - merge( - ...[timeFilter.getRefreshIntervalUpdate$(), timeFilter.getTimeUpdate$()] - ).subscribe(() => triggerRefresh$.next()) - ); - - subscriptions.add( - searchSessionIdQuery$.subscribe(() => { - triggerRefresh$.next({ force: true }); - }) - ); - - subscriptions.add( - data.query.timefilter.timefilter - .getAutoRefreshFetch$() - .pipe( - tap(() => { - triggerRefresh$.next({ force: true }); - }), - switchMap((done) => - // best way on a dashboard to estimate that panels are updated is to rely on search session service state - waitUntilNextSessionCompletes$(data.search.session).pipe(finalize(done)) - ) - ) - .subscribe() - ); - - dashboardStateManager.registerChangeListener(() => { - setUnsavedChanges(dashboardStateManager.getIsDirty(data.query.timefilter.timefilter)); - // we aren't checking dirty state because there are changes the container needs to know about - // that won't make the dashboard "dirty" - like a view mode change. - triggerRefresh$.next(); - }); - - // debounce `refreshDashboardContainer()` - // use `forceRefresh=true` in case at least one debounced trigger asked for it - let forceRefresh: boolean = false; - subscriptions.add( - triggerRefresh$ - .pipe( - tap((trigger) => { - forceRefresh = forceRefresh || (trigger?.force ?? false); - }), - debounceTime(50) - ) - .subscribe(() => { - refreshDashboardContainer(forceRefresh); - forceRefresh = false; - }) - ); - - return () => { - subscriptions.unsubscribe(); - }; - }, [ - core.http, - uiSettings, - data.query, - dashboardContainer, - data.search.session, - indexPatternService, - dashboardStateManager, - searchSessionIdQuery$, - triggerRefresh$, - refreshDashboardContainer, - ]); - - // Sync breadcrumbs when Dashboard State Manager changes - useDashboardBreadcrumbs(dashboardStateManager, redirectTo); - - // Build onAppLeave when Dashboard State Manager changes + // Build app leave handler whenever hasUnsavedChanges changes useEffect(() => { - if (!dashboardStateManager || !dashboardContainer) { - return; - } onAppLeave((actions) => { if ( - dashboardStateManager?.getIsDirty() && + dashboardAppState.hasUnsavedChanges && !embeddable.getStateTransfer().isTransferInProgress ) { return actions.confirm( @@ -293,37 +79,36 @@ export function DashboardApp({ // reset on app leave handler so leaving from the listing page doesn't trigger a confirmation onAppLeave((actions) => actions.default()); }; - }, [dashboardStateManager, dashboardContainer, onAppLeave, embeddable]); + }, [onAppLeave, embeddable, dashboardAppState.hasUnsavedChanges]); + + // Set breadcrumbs when dashboard's title or view mode changes + useEffect(() => { + if (!dashboardState.title && savedDashboardId) return; + chrome.setBreadcrumbs([ + { + text: getDashboardBreadcrumb(), + 'data-test-subj': 'dashboardListingBreadcrumb', + onClick: () => { + redirectTo({ destination: 'listing' }); + }, + }, + { + text: getDashboardTitle(dashboardState.title, dashboardState.viewMode, !savedDashboardId), + }, + ]); + }, [chrome, dashboardState.title, dashboardState.viewMode, redirectTo, savedDashboardId]); return ( <> - {savedDashboard && dashboardStateManager && dashboardContainer && viewMode && ( + {isCompleteDashboardAppState(dashboardAppState) && ( <> setUnsavedChanges(false)} - timefilter={data.query.timefilter.timefilter} - onQuerySubmit={(_payload, isUpdate) => { - if (isUpdate === false) { - // The user can still request a reload in the query bar, even if the - // query is the same, and in that case, we have to explicitly ask for - // a reload, since no state changes will cause it. - triggerRefresh$.next({ force: true }); - } - }} + redirectTo={redirectTo} + embedSettings={embedSettings} + dashboardAppState={dashboardAppState} />
- +
)} diff --git a/src/plugins/dashboard/public/application/dashboard_app_functions.ts b/src/plugins/dashboard/public/application/dashboard_app_functions.ts deleted file mode 100644 index 6d51422d4bd23..0000000000000 --- a/src/plugins/dashboard/public/application/dashboard_app_functions.ts +++ /dev/null @@ -1,277 +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 { History } from 'history'; - -import _, { uniqBy } from 'lodash'; -import deepEqual from 'fast-deep-equal'; -import { merge, Observable, pipe } from 'rxjs'; -import { - debounceTime, - distinctUntilChanged, - filter, - map, - mapTo, - startWith, - switchMap, -} from 'rxjs/operators'; - -import { DashboardCapabilities } from './types'; -import { DashboardConstants } from '../dashboard_constants'; -import { DashboardStateManager } from './dashboard_state_manager'; -import { convertSavedDashboardPanelToPanelState } from '../../common/embeddable/embeddable_saved_object_converters'; -import { - DashboardPanelState, - DashboardContainer, - DashboardContainerInput, - SavedDashboardPanel, -} from '.'; - -import { getQueryParams } from '../services/kibana_utils'; -import { EmbeddablePackageState, isErrorEmbeddable } from '../services/embeddable'; -import { - esFilters, - FilterManager, - IndexPattern, - IndexPatternsContract, - QueryStart, -} from '../services/data'; - -export const getChangesFromAppStateForContainerState = ({ - dashboardContainer, - appStateDashboardInput, -}: { - dashboardContainer: DashboardContainer; - appStateDashboardInput: DashboardContainerInput; -}) => { - if (!dashboardContainer || isErrorEmbeddable(dashboardContainer)) { - return appStateDashboardInput; - } - const containerInput = dashboardContainer.getInput(); - const differences: Partial = {}; - - // Filters shouldn't be compared using regular isEqual - if ( - !esFilters.compareFilters( - containerInput.filters, - appStateDashboardInput.filters, - esFilters.COMPARE_ALL_OPTIONS - ) - ) { - differences.filters = appStateDashboardInput.filters; - } - - Object.keys( - _.omit(containerInput, [ - 'filters', - 'searchSessionId', - 'lastReloadRequestTime', - 'switchViewMode', - ]) - ).forEach((key) => { - const containerValue = (containerInput as { [key: string]: unknown })[key]; - const appStateValue = ((appStateDashboardInput as unknown) as { [key: string]: unknown })[key]; - if (!_.isEqual(containerValue, appStateValue)) { - (differences as { [key: string]: unknown })[key] = appStateValue; - } - }); - - // last reload request time can be undefined without causing a refresh - if ( - appStateDashboardInput.lastReloadRequestTime && - containerInput.lastReloadRequestTime !== appStateDashboardInput.lastReloadRequestTime - ) { - differences.lastReloadRequestTime = appStateDashboardInput.lastReloadRequestTime; - } - - // cloneDeep hack is needed, as there are multiple places, where container's input mutated, - // but values from appStateValue are deeply frozen, as they can't be mutated directly - return Object.values(differences).length === 0 ? undefined : _.cloneDeep(differences); -}; - -export const getDashboardContainerInput = ({ - query, - searchSessionId, - incomingEmbeddable, - isEmbeddedExternally, - lastReloadRequestTime, - dashboardStateManager, - dashboardCapabilities, -}: { - dashboardCapabilities: DashboardCapabilities; - dashboardStateManager: DashboardStateManager; - incomingEmbeddable?: EmbeddablePackageState; - lastReloadRequestTime?: number; - isEmbeddedExternally: boolean; - searchSessionId?: string; - query: QueryStart; -}): DashboardContainerInput => { - const embeddablesMap: { - [key: string]: DashboardPanelState; - } = {}; - dashboardStateManager.getPanels().forEach((panel: SavedDashboardPanel) => { - embeddablesMap[panel.panelIndex] = convertSavedDashboardPanelToPanelState(panel); - }); - - // If the incoming embeddable state's id already exists in the embeddables map, replace the input, retaining the existing gridData for that panel. - if (incomingEmbeddable?.embeddableId && embeddablesMap[incomingEmbeddable.embeddableId]) { - const originalPanelState = embeddablesMap[incomingEmbeddable.embeddableId]; - embeddablesMap[incomingEmbeddable.embeddableId] = { - gridData: originalPanelState.gridData, - type: incomingEmbeddable.type, - explicitInput: { - ...originalPanelState.explicitInput, - ...incomingEmbeddable.input, - id: incomingEmbeddable.embeddableId, - }, - }; - } - - return { - refreshConfig: query.timefilter.timefilter.getRefreshInterval(), - hidePanelTitles: dashboardStateManager.getHidePanelTitles(), - isFullScreenMode: dashboardStateManager.getFullScreenMode(), - expandedPanelId: dashboardStateManager.getExpandedPanelId(), - description: dashboardStateManager.getDescription(), - id: dashboardStateManager.savedDashboard.id || '', - useMargins: dashboardStateManager.getUseMargins(), - syncColors: dashboardStateManager.getSyncColors(), - viewMode: dashboardStateManager.getViewMode(), - filters: query.filterManager.getFilters(), - query: dashboardStateManager.getQuery(), - title: dashboardStateManager.getTitle(), - panels: embeddablesMap, - lastReloadRequestTime, - dashboardCapabilities, - isEmbeddedExternally, - searchSessionId, - timeRange: { - ..._.cloneDeep(query.timefilter.timefilter.getTime()), - }, - }; -}; - -export const getInputSubscription = ({ - dashboardContainer, - dashboardStateManager, - filterManager, -}: { - dashboardContainer: DashboardContainer; - dashboardStateManager: DashboardStateManager; - filterManager: FilterManager; -}) => - dashboardContainer.getInput$().subscribe(() => { - // This has to be first because handleDashboardContainerChanges causes - // appState.save which will cause refreshDashboardContainer to be called. - - if ( - !esFilters.compareFilters( - dashboardContainer.getInput().filters, - filterManager.getFilters(), - esFilters.COMPARE_ALL_OPTIONS - ) - ) { - // Add filters modifies the object passed to it, hence the clone deep. - filterManager.addFilters(_.cloneDeep(dashboardContainer.getInput().filters)); - - dashboardStateManager.applyFilters( - dashboardStateManager.getQuery(), - dashboardContainer.getInput().filters - ); - } - - dashboardStateManager.handleDashboardContainerChanges(dashboardContainer); - }); - -export const getOutputSubscription = ({ - dashboardContainer, - indexPatterns, - onUpdateIndexPatterns, -}: { - dashboardContainer: DashboardContainer; - indexPatterns: IndexPatternsContract; - onUpdateIndexPatterns: (newIndexPatterns: IndexPattern[]) => void; -}) => { - const updateIndexPatternsOperator = pipe( - filter((container: DashboardContainer) => !!container && !isErrorEmbeddable(container)), - map((container: DashboardContainer): IndexPattern[] => { - let panelIndexPatterns: IndexPattern[] = []; - Object.values(container.getChildIds()).forEach((id) => { - const embeddableInstance = container.getChild(id); - if (isErrorEmbeddable(embeddableInstance)) return; - const embeddableIndexPatterns = (embeddableInstance.getOutput() as any).indexPatterns; - if (!embeddableIndexPatterns) return; - panelIndexPatterns.push(...embeddableIndexPatterns); - }); - panelIndexPatterns = uniqBy(panelIndexPatterns, 'id'); - return panelIndexPatterns; - }), - distinctUntilChanged((a, b) => - deepEqual( - a.map((ip) => ip && ip.id), - b.map((ip) => ip && ip.id) - ) - ), - // using switchMap for previous task cancellation - switchMap((panelIndexPatterns: IndexPattern[]) => { - return new Observable((observer) => { - if (panelIndexPatterns && panelIndexPatterns.length > 0) { - if (observer.closed) return; - onUpdateIndexPatterns(panelIndexPatterns); - observer.complete(); - } else { - indexPatterns.getDefault().then((defaultIndexPattern) => { - if (observer.closed) return; - onUpdateIndexPatterns([defaultIndexPattern as IndexPattern]); - observer.complete(); - }); - } - }); - }) - ); - - return merge( - // output of dashboard container itself - dashboardContainer.getOutput$(), - // plus output of dashboard container children, - // children may change, so make sure we subscribe/unsubscribe with switchMap - dashboardContainer.getOutput$().pipe( - map(() => dashboardContainer!.getChildIds()), - distinctUntilChanged(deepEqual), - switchMap((newChildIds: string[]) => - merge(...newChildIds.map((childId) => dashboardContainer!.getChild(childId).getOutput$())) - ) - ) - ) - .pipe( - mapTo(dashboardContainer), - startWith(dashboardContainer), // to trigger initial index pattern update - updateIndexPatternsOperator - ) - .subscribe(); -}; - -export const getFiltersSubscription = ({ - query, - dashboardStateManager, -}: { - query: QueryStart; - dashboardStateManager: DashboardStateManager; -}) => { - return merge(query.filterManager.getUpdates$(), query.queryString.getUpdates$()) - .pipe(debounceTime(100)) - .subscribe(() => { - dashboardStateManager.applyFilters( - query.queryString.getQuery(), - query.filterManager.getFilters() - ); - }); -}; - -export const getSearchSessionIdFromURL = (history: History): string | undefined => - getQueryParams(history.location)[DashboardConstants.SEARCH_SESSION_ID] as string | undefined; diff --git a/src/plugins/dashboard/public/application/dashboard_router.tsx b/src/plugins/dashboard/public/application/dashboard_router.tsx index be279ed98492e..e77353000ced4 100644 --- a/src/plugins/dashboard/public/application/dashboard_router.tsx +++ b/src/plugins/dashboard/public/application/dashboard_router.tsx @@ -8,36 +8,37 @@ import './index.scss'; import React from 'react'; +import { History } from 'history'; +import { Provider } from 'react-redux'; +import { first } from 'rxjs/operators'; import { I18nProvider } from '@kbn/i18n/react'; import { parse, ParsedQuery } from 'query-string'; import { render, unmountComponentAtNode } from 'react-dom'; import { Switch, Route, RouteComponentProps, HashRouter, Redirect } from 'react-router-dom'; -import { first } from 'rxjs/operators'; import { DashboardListing } from './listing'; +import { dashboardStateStore } from './state'; import { DashboardApp } from './dashboard_app'; -import { addHelpMenuToAppChrome, DashboardPanelStorage } from './lib'; +import { DashboardNoMatch } from './listing/dashboard_no_match'; +import { KibanaContextProvider } from '../services/kibana_react'; +import { addHelpMenuToAppChrome, DashboardSessionStorage } from './lib'; import { createDashboardListingFilterUrl } from '../dashboard_constants'; -import { getDashboardPageTitle, dashboardReadonlyBadge } from '../dashboard_strings'; import { createDashboardEditUrl, DashboardConstants } from '../dashboard_constants'; -import { DashboardAppServices, DashboardEmbedSettings, RedirectToProps } from './types'; +import { getDashboardPageTitle, dashboardReadonlyBadge } from '../dashboard_strings'; +import { createKbnUrlStateStorage, withNotifyOnErrors } from '../services/kibana_utils'; +import { DashboardAppServices, DashboardEmbedSettings, RedirectToProps } from '../types'; import { DashboardFeatureFlagConfig, DashboardSetupDependencies, DashboardStart, DashboardStartDependencies, } from '../plugin'; - -import { createKbnUrlStateStorage, withNotifyOnErrors } from '../services/kibana_utils'; -import { KibanaContextProvider } from '../services/kibana_react'; - import { AppMountParameters, CoreSetup, PluginInitializerContext, ScopedHistory, } from '../services/core'; -import { DashboardNoMatch } from './listing/dashboard_no_match'; export const dashboardUrlParams = { showTopMenu: 'show-top-menu', @@ -89,12 +90,14 @@ export async function mountApp({ const activeSpaceId = spacesApi && (await spacesApi.getActiveSpace$().pipe(first()).toPromise())?.id; let globalEmbedSettings: DashboardEmbedSettings | undefined; + let routerHistory: History; const dashboardServices: DashboardAppServices = { navigation, onAppLeave, savedObjects, urlForwarding, + visualizations, usageCollection, core: coreStart, data: dataStart, @@ -109,10 +112,6 @@ export async function mountApp({ indexPatterns: dataStart.indexPatterns, savedQueryService: dataStart.query.savedQueries, savedObjectsClient: coreStart.savedObjects.client, - dashboardPanelStorage: new DashboardPanelStorage( - core.notifications.toasts, - activeSpaceId || 'default' - ), savedDashboards: dashboardStart.getSavedDashboardLoader(), savedObjectsTagging: savedObjectsTaggingOss?.getTaggingApi(), allowByValueEmbeddables: initializerContext.config.get() @@ -127,7 +126,10 @@ export async function mountApp({ visualizeCapabilities: { save: Boolean(coreStart.application.capabilities.visualize?.save) }, storeSearchSession: Boolean(coreStart.application.capabilities.dashboard.storeSearchSession), }, - visualizations, + dashboardSessionStorage: new DashboardSessionStorage( + core.notifications.toasts, + activeSpaceId || 'default' + ), }; const getUrlStateStorage = (history: RouteComponentProps['history']) => @@ -137,10 +139,9 @@ export async function mountApp({ ...withNotifyOnErrors(core.notifications.toasts), }); - const redirect = (routeProps: RouteComponentProps, redirectTo: RedirectToProps) => { - const historyFunction = redirectTo.useReplace - ? routeProps.history.replace - : routeProps.history.push; + const redirect = (redirectTo: RedirectToProps) => { + if (!routerHistory) return; + const historyFunction = redirectTo.useReplace ? routerHistory.replace : routerHistory.push; let destination; if (redirectTo.destination === 'dashboard') { destination = redirectTo.id @@ -168,12 +169,15 @@ export async function mountApp({ if (routeParams.embed && !globalEmbedSettings) { globalEmbedSettings = getDashboardEmbedSettings(routeParams); } + if (!routerHistory) { + routerHistory = routeProps.history; + } return ( redirect(routeProps, props)} + redirectTo={redirect} /> ); }; @@ -183,13 +187,15 @@ export async function mountApp({ const routeParams = parse(routeProps.history.location.search); const title = (routeParams.title as string) || undefined; const filter = (routeParams.filter as string) || undefined; - + if (!routerHistory) { + routerHistory = routeProps.history; + } return ( redirect(routeProps, props)} + redirectTo={redirect} /> ); }; @@ -215,26 +221,32 @@ export async function mountApp({ const app = ( - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + ); diff --git a/src/plugins/dashboard/public/application/dashboard_state.test.ts b/src/plugins/dashboard/public/application/dashboard_state.test.ts deleted file mode 100644 index ffe5c80febe02..0000000000000 --- a/src/plugins/dashboard/public/application/dashboard_state.test.ts +++ /dev/null @@ -1,272 +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 { createBrowserHistory } from 'history'; -import { getSavedDashboardMock } from './test_helpers'; -import { DashboardContainer, DashboardContainerInput, DashboardPanelState } from '.'; -import { DashboardStateManager } from './dashboard_state_manager'; -import { DashboardContainerServices } from './embeddable/dashboard_container'; - -import { EmbeddableInput, ViewMode } from '../services/embeddable'; -import { createKbnUrlStateStorage } from '../services/kibana_utils'; -import { InputTimeRange, TimefilterContract, TimeRange } from '../services/data'; - -import { embeddablePluginMock } from 'src/plugins/embeddable/public/mocks'; -import { coreMock } from '../../../../core/public/mocks'; - -describe('DashboardState', function () { - let dashboardState: DashboardStateManager; - const savedDashboard = getSavedDashboardMock(); - - let mockTime: TimeRange = { to: 'now', from: 'now-15m' }; - const mockTimefilter = { - getTime: () => { - return mockTime; - }, - setTime: (time: InputTimeRange) => { - mockTime = time as TimeRange; - }, - } as TimefilterContract; - - // TS is *very* picky with type guards / predicates. can't just use jest.fn() - function mockHasTaggingCapabilities(obj: any): obj is any { - return false; - } - - function initDashboardState() { - dashboardState = new DashboardStateManager({ - savedDashboard, - hideWriteControls: false, - allowByValueEmbeddables: false, - hasPendingEmbeddable: () => false, - kibanaVersion: '7.0.0', - kbnUrlStateStorage: createKbnUrlStateStorage(), - history: createBrowserHistory(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - } - - function initDashboardContainer(initialInput?: Partial) { - const { doStart } = embeddablePluginMock.createInstance(); - const defaultInput: DashboardContainerInput = { - id: '123', - viewMode: ViewMode.EDIT, - filters: [] as DashboardContainerInput['filters'], - query: {} as DashboardContainerInput['query'], - timeRange: {} as DashboardContainerInput['timeRange'], - useMargins: true, - syncColors: false, - title: 'ultra awesome test dashboard', - isFullScreenMode: false, - panels: {} as DashboardContainerInput['panels'], - }; - const input = { ...defaultInput, ...(initialInput ?? {}) }; - return new DashboardContainer(input, { embeddable: doStart() } as DashboardContainerServices); - } - - describe('syncTimefilterWithDashboard', function () { - test('syncs quick time', function () { - savedDashboard.timeRestore = true; - savedDashboard.timeFrom = 'now/w'; - savedDashboard.timeTo = 'now/w'; - - mockTime.from = '2015-09-19 06:31:44.000'; - mockTime.to = '2015-09-29 06:31:44.000'; - - initDashboardState(); - dashboardState.syncTimefilterWithDashboardTime(mockTimefilter); - - expect(mockTime.to).toBe('now/w'); - expect(mockTime.from).toBe('now/w'); - }); - - test('syncs relative time', function () { - savedDashboard.timeRestore = true; - savedDashboard.timeFrom = 'now-13d'; - savedDashboard.timeTo = 'now'; - - mockTime.from = '2015-09-19 06:31:44.000'; - mockTime.to = '2015-09-29 06:31:44.000'; - - initDashboardState(); - dashboardState.syncTimefilterWithDashboardTime(mockTimefilter); - - expect(mockTime.to).toBe('now'); - expect(mockTime.from).toBe('now-13d'); - }); - - test('syncs absolute time', function () { - savedDashboard.timeRestore = true; - savedDashboard.timeFrom = '2015-09-19 06:31:44.000'; - savedDashboard.timeTo = '2015-09-29 06:31:44.000'; - - mockTime.from = 'now/w'; - mockTime.to = 'now/w'; - - initDashboardState(); - dashboardState.syncTimefilterWithDashboardTime(mockTimefilter); - - expect(mockTime.to).toBe(savedDashboard.timeTo); - expect(mockTime.from).toBe(savedDashboard.timeFrom); - }); - }); - - describe('Dashboard Container Changes', () => { - beforeEach(() => { - initDashboardState(); - }); - - test('expanedPanelId in container input casues state update', () => { - dashboardState.setExpandedPanelId = jest.fn(); - - const dashboardContainer = initDashboardContainer({ - expandedPanelId: 'theCoolestPanelOnThisDashboard', - panels: { - theCoolestPanelOnThisDashboard: { - explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, - } as DashboardPanelState, - }, - }); - - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith( - 'theCoolestPanelOnThisDashboard' - ); - }); - - test('expanedPanelId is not updated when it is the same', () => { - dashboardState.setExpandedPanelId = jest - .fn() - .mockImplementation(dashboardState.setExpandedPanelId); - - const dashboardContainer = initDashboardContainer({ - expandedPanelId: 'theCoolestPanelOnThisDashboard', - panels: { - theCoolestPanelOnThisDashboard: { - explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, - } as DashboardPanelState, - }, - }); - - dashboardState.handleDashboardContainerChanges(dashboardContainer); - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledTimes(1); - }); - - test('expandedPanelId is set to undefined if panel does not exist in input', () => { - dashboardState.setExpandedPanelId = jest - .fn() - .mockImplementation(dashboardState.setExpandedPanelId); - const dashboardContainer = initDashboardContainer({ - expandedPanelId: 'theCoolestPanelOnThisDashboard', - panels: { - theCoolestPanelOnThisDashboard: { - explicitInput: { id: 'theCoolestPanelOnThisDashboard' }, - } as DashboardPanelState, - }, - }); - - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith( - 'theCoolestPanelOnThisDashboard' - ); - - dashboardContainer.updateInput({ expandedPanelId: 'theLeastCoolPanelOnThisDashboard' }); - dashboardState.handleDashboardContainerChanges(dashboardContainer); - expect(dashboardState.setExpandedPanelId).toHaveBeenCalledWith(undefined); - }); - }); - - describe('isDirty', function () { - beforeAll(() => { - initDashboardState(); - }); - - test('getIsDirty is true if isDirty is true and editing', () => { - dashboardState.switchViewMode(ViewMode.EDIT); - dashboardState.isDirty = true; - expect(dashboardState.getIsDirty()).toBeTruthy(); - }); - - test('getIsDirty is false if isDirty is true and editing', () => { - dashboardState.switchViewMode(ViewMode.VIEW); - dashboardState.isDirty = true; - expect(dashboardState.getIsDirty()).toBeFalsy(); - }); - }); - - describe('initial view mode', () => { - test('initial view mode set to view when hideWriteControls is true', () => { - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard, - hideWriteControls: true, - allowByValueEmbeddables: false, - hasPendingEmbeddable: () => false, - kibanaVersion: '7.0.0', - kbnUrlStateStorage: createKbnUrlStateStorage(), - history: createBrowserHistory(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.VIEW); - }); - - test('initial view mode set to edit if edit mode specified in URL', () => { - const kbnUrlStateStorage = createKbnUrlStateStorage(); - kbnUrlStateStorage.set('_a', { viewMode: ViewMode.EDIT }); - - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard, - kbnUrlStateStorage, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => false, - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.EDIT); - }); - - test('initial view mode set to edit if the dashboard is new', () => { - const newDashboard = getSavedDashboardMock(); - newDashboard.id = undefined; - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard: newDashboard, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => false, - kbnUrlStateStorage: createKbnUrlStateStorage(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.EDIT); - }); - - test('initial view mode set to edit if there is a pending embeddable', () => { - const newDashboard = getSavedDashboardMock(); - newDashboard.id = undefined; - const initialViewModeDashboardState = new DashboardStateManager({ - savedDashboard: newDashboard, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => true, - kbnUrlStateStorage: createKbnUrlStateStorage(), - toasts: coreMock.createStart().notifications.toasts, - hasTaggingCapabilities: mockHasTaggingCapabilities, - }); - expect(initialViewModeDashboardState.getViewMode()).toBe(ViewMode.EDIT); - }); - }); -}); diff --git a/src/plugins/dashboard/public/application/dashboard_state_manager.ts b/src/plugins/dashboard/public/application/dashboard_state_manager.ts deleted file mode 100644 index 58b413f4303e6..0000000000000 --- a/src/plugins/dashboard/public/application/dashboard_state_manager.ts +++ /dev/null @@ -1,771 +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 _ from 'lodash'; -import { Moment } from 'moment'; -import { i18n } from '@kbn/i18n'; -import { History } from 'history'; -import { Observable, Subscription } from 'rxjs'; - -import { FilterUtils } from './lib/filter_utils'; -import { DashboardContainer } from './embeddable'; -import { DashboardSavedObject } from '../saved_dashboards'; -import { migrateLegacyQuery } from './lib/migrate_legacy_query'; -import { - getAppStateDefaults, - migrateAppState, - getDashboardIdFromUrl, - DashboardPanelStorage, -} from './lib'; -import { convertPanelStateToSavedDashboardPanel } from '../../common/embeddable/embeddable_saved_object_converters'; -import { - DashboardAppState, - DashboardAppStateDefaults, - DashboardAppStateInUrl, - DashboardAppStateTransitions, - SavedDashboardPanel, -} from '../types'; - -import { ViewMode } from '../services/embeddable'; -import { UsageCollectionSetup } from '../services/usage_collection'; -import { Filter, Query, TimefilterContract as Timefilter } from '../services/data'; -import type { SavedObjectTagDecoratorTypeGuard } from '../services/saved_objects_tagging_oss'; -import { - createStateContainer, - IKbnUrlStateStorage, - ISyncStateRef, - ReduxLikeStateContainer, - syncState, -} from '../services/kibana_utils'; -import { STATE_STORAGE_KEY } from '../url_generator'; -import { NotificationsStart } from '../services/core'; -import { getMigratedToastText } from '../dashboard_strings'; - -/** - * Dashboard state manager handles connecting angular and redux state between the angular and react portions of the - * app. There are two "sources of truth" that need to stay in sync - AppState (aka the `_a` portion of the url) and - * the Store. They aren't complete duplicates of each other as AppState has state that the Store doesn't, and vice - * versa. They should be as decoupled as possible so updating the store won't affect bwc of urls. - */ -export class DashboardStateManager { - public savedDashboard: DashboardSavedObject; - public lastSavedDashboardFilters: { - timeTo?: string | Moment; - timeFrom?: string | Moment; - filterBars: Filter[]; - query: Query; - }; - private stateDefaults: DashboardAppStateDefaults; - private toasts: NotificationsStart['toasts']; - private hideWriteControls: boolean; - private kibanaVersion: string; - public isDirty: boolean; - private changeListeners: Array<(status: { dirty: boolean }) => void>; - private hasShownMigrationToast = false; - - public get appState(): DashboardAppState { - return this.stateContainer.get(); - } - - public get appState$(): Observable { - return this.stateContainer.state$; - } - - private readonly stateContainer: ReduxLikeStateContainer< - DashboardAppState, - DashboardAppStateTransitions - >; - private readonly stateContainerChangeSub: Subscription; - private readonly dashboardPanelStorage?: DashboardPanelStorage; - public readonly kbnUrlStateStorage: IKbnUrlStateStorage; - private readonly stateSyncRef: ISyncStateRef; - private readonly allowByValueEmbeddables: boolean; - - private readonly usageCollection: UsageCollectionSetup | undefined; - public readonly hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard; - private hasPendingEmbeddable: () => boolean; - - /** - * - * @param savedDashboard - * @param hideWriteControls true if write controls should be hidden. - * @param kibanaVersion current kibanaVersion - * @param - */ - constructor({ - toasts, - history, - kibanaVersion, - savedDashboard, - usageCollection, - hideWriteControls, - kbnUrlStateStorage, - hasPendingEmbeddable, - dashboardPanelStorage, - hasTaggingCapabilities, - allowByValueEmbeddables, - }: { - history: History; - kibanaVersion: string; - hideWriteControls: boolean; - hasPendingEmbeddable: () => boolean; - allowByValueEmbeddables: boolean; - savedDashboard: DashboardSavedObject; - toasts: NotificationsStart['toasts']; - usageCollection?: UsageCollectionSetup; - kbnUrlStateStorage: IKbnUrlStateStorage; - dashboardPanelStorage?: DashboardPanelStorage; - hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard; - }) { - this.toasts = toasts; - this.kibanaVersion = kibanaVersion; - this.savedDashboard = savedDashboard; - this.hideWriteControls = hideWriteControls; - this.usageCollection = usageCollection; - this.hasTaggingCapabilities = hasTaggingCapabilities; - this.allowByValueEmbeddables = allowByValueEmbeddables; - this.hasPendingEmbeddable = hasPendingEmbeddable; - this.dashboardPanelStorage = dashboardPanelStorage; - this.kbnUrlStateStorage = kbnUrlStateStorage; - - // get state defaults from saved dashboard, make sure it is migrated - const viewMode = this.getInitialViewMode(); - this.stateDefaults = migrateAppState( - getAppStateDefaults(viewMode, this.savedDashboard, this.hasTaggingCapabilities), - kibanaVersion, - usageCollection - ); - - // setup initial state by merging defaults with state from url & panels storage - // also run migration, as state in url could be of older version - const initialUrlState = this.kbnUrlStateStorage.get(STATE_STORAGE_KEY); - - const initialState = migrateAppState( - { - ...this.stateDefaults, - ...this.getUnsavedPanelState(), - ...initialUrlState, - }, - kibanaVersion, - usageCollection - ); - - this.isDirty = false; - - if (initialUrlState?.panels && !_.isEqual(initialUrlState.panels, this.stateDefaults.panels)) { - this.isDirty = true; - this.setUnsavedPanels(initialState.panels); - } - - // setup state container using initial state both from defaults and from url - this.stateContainer = createStateContainer( - initialState, - { - set: (state) => (prop, value) => ({ ...state, [prop]: value }), - setOption: (state) => (option, value) => ({ - ...state, - options: { - ...state.options, - [option]: value, - }, - }), - } - ); - - // We can't compare the filters stored on this.appState to this.savedDashboard because in order to apply - // the filters to the visualizations, we need to save it on the dashboard. We keep track of the original - // filter state in order to let the user know if their filters changed and provide this specific information - // in the 'lose changes' warning message. - this.lastSavedDashboardFilters = this.getFilterState(); - - this.changeListeners = []; - - this.stateContainerChangeSub = this.stateContainer.state$.subscribe(() => { - this.isDirty = this.checkIsDirty(); - this.changeListeners.forEach((listener) => listener({ dirty: this.isDirty })); - }); - - // setup state syncing utils. state container will be synced with url into `STATE_STORAGE_KEY` query param - this.stateSyncRef = syncState({ - storageKey: STATE_STORAGE_KEY, - stateContainer: { - ...this.stateContainer, - get: () => this.toUrlState(this.stateContainer.get()), - set: (stateFromUrl: DashboardAppStateInUrl | null) => { - // sync state required state container to be able to handle null - // overriding set() so it could handle null coming from url - if (stateFromUrl) { - // Skip this update if current dashboardId in the url is different from what we have in the current instance of state manager - // As dashboard is driven by angular at the moment, the destroy cycle happens async, - // If the dashboardId has changed it means this instance - // is going to be destroyed soon and we shouldn't sync state anymore, - // as it could potentially trigger further url updates - const currentDashboardIdInUrl = getDashboardIdFromUrl(history.location.pathname); - if (currentDashboardIdInUrl !== this.savedDashboard.id) return; - - // set View mode before the rest of the state so unsaved panels can be added correctly. - if (this.appState.viewMode !== stateFromUrl.viewMode) { - this.switchViewMode(stateFromUrl.viewMode); - } - - this.stateContainer.set({ - ...this.stateDefaults, - ...this.getUnsavedPanelState(), - ...stateFromUrl, - }); - } else { - // Do nothing in case when state from url is empty, - // this fixes: https://github.com/elastic/kibana/issues/57789 - // There are not much cases when state in url could become empty: - // 1. User manually removed `_a` from the url - // 2. Browser is navigating away from the page and most likely there is no `_a` in the url. - // In this case we don't want to do any state updates - // and just allow $scope.$on('destroy') fire later and clean up everything - } - }, - }, - stateStorage: this.kbnUrlStateStorage, - }); - } - - public startStateSyncing() { - this.saveState({ replace: true }); - this.stateSyncRef.start(); - } - - public registerChangeListener(callback: (status: { dirty: boolean }) => void) { - this.changeListeners.push(callback); - } - - public handleDashboardContainerChanges(dashboardContainer: DashboardContainer) { - let dirty = false; - let dirtyBecauseOfInitialStateMigration = false; - - const savedDashboardPanelMap: { [key: string]: SavedDashboardPanel } = {}; - - const input = dashboardContainer.getInput(); - - this.getPanels().forEach((savedDashboardPanel) => { - if (input.panels[savedDashboardPanel.panelIndex] !== undefined) { - savedDashboardPanelMap[savedDashboardPanel.panelIndex] = savedDashboardPanel; - } else { - // A panel was deleted. - dirty = true; - } - }); - - const convertedPanelStateMap: { [key: string]: SavedDashboardPanel } = {}; - - let expandedPanelValid = false; - Object.values(input.panels).forEach((panelState) => { - if (savedDashboardPanelMap[panelState.explicitInput.id] === undefined) { - dirty = true; - } - - if (panelState.explicitInput.id === input.expandedPanelId) { - expandedPanelValid = true; - } - - convertedPanelStateMap[panelState.explicitInput.id] = convertPanelStateToSavedDashboardPanel( - panelState, - this.kibanaVersion - ); - - if ( - !_.isEqual( - convertedPanelStateMap[panelState.explicitInput.id], - savedDashboardPanelMap[panelState.explicitInput.id] - ) - ) { - // A panel was changed - dirty = true; - - const oldVersion = savedDashboardPanelMap[panelState.explicitInput.id]?.version; - const newVersion = convertedPanelStateMap[panelState.explicitInput.id]?.version; - if (oldVersion && newVersion && oldVersion !== newVersion) { - dirtyBecauseOfInitialStateMigration = true; - } - } - }); - - if (dirty) { - this.stateContainer.transitions.set('panels', Object.values(convertedPanelStateMap)); - if (dirtyBecauseOfInitialStateMigration) { - if (this.getIsEditMode() && !this.hasShownMigrationToast) { - this.toasts.addSuccess(getMigratedToastText()); - this.hasShownMigrationToast = true; - } - this.saveState({ replace: true }); - } - - // If a panel has been changed, and the state is now equal to the state in the saved object, remove the unsaved panels - if (!this.isDirty && this.getIsEditMode()) { - this.clearUnsavedPanels(); - } else { - this.setUnsavedPanels(this.getPanels()); - } - } - - if (input.isFullScreenMode !== this.getFullScreenMode()) { - this.setFullScreenMode(input.isFullScreenMode); - } - - if (expandedPanelValid && input.expandedPanelId !== this.getExpandedPanelId()) { - this.setExpandedPanelId(input.expandedPanelId); - } else if (!expandedPanelValid && this.getExpandedPanelId()) { - this.setExpandedPanelId(undefined); - } - - if (!_.isEqual(input.query, this.getQuery())) { - this.setQuery(input.query); - } - - this.changeListeners.forEach((listener) => listener({ dirty })); - } - - public getFullScreenMode() { - return this.appState.fullScreenMode; - } - - public setFullScreenMode(fullScreenMode: boolean) { - this.stateContainer.transitions.set('fullScreenMode', fullScreenMode); - } - - public getExpandedPanelId() { - return this.appState.expandedPanelId; - } - - public setExpandedPanelId(expandedPanelId?: string) { - this.stateContainer.transitions.set('expandedPanelId', expandedPanelId); - } - - public setFilters(filters: Filter[]) { - this.stateContainer.transitions.set('filters', filters); - } - - /** - * Resets the state back to the last saved version of the dashboard. - */ - public resetState() { - // In order to show the correct warning, we have to store the unsaved - // title on the dashboard object. We should fix this at some point, but this is how all the other object - // save panels work at the moment. - this.savedDashboard.title = this.savedDashboard.lastSavedTitle; - - // appState.reset uses the internal defaults to reset the state, but some of the default settings (e.g. the panels - // array) point to the same object that is stored on appState and is getting modified. - // The right way to fix this might be to ensure the defaults object stored on state is a deep - // clone, but given how much code uses the state object, I determined that to be too risky of a change for - // now. TODO: revisit this! - const currentViewMode = this.stateContainer.get().viewMode; - this.stateDefaults = migrateAppState( - getAppStateDefaults(currentViewMode, this.savedDashboard, this.hasTaggingCapabilities), - this.kibanaVersion, - this.usageCollection - ); - // The original query won't be restored by the above because the query on this.savedDashboard is applied - // in place in order for it to affect the visualizations. - this.stateDefaults.query = this.lastSavedDashboardFilters.query; - // Need to make a copy to ensure they are not overwritten. - this.stateDefaults.filters = [...this.getLastSavedFilterBars()]; - this.isDirty = false; - - this.stateContainer.set(this.stateDefaults); - } - - /** - * Returns an object which contains the current filter state of this.savedDashboard. - */ - public getFilterState() { - return { - timeTo: this.savedDashboard.timeTo, - timeFrom: this.savedDashboard.timeFrom, - filterBars: this.savedDashboard.getFilters(), - query: this.savedDashboard.getQuery(), - }; - } - - public getTitle() { - return this.appState.title; - } - - public isSaved() { - return !!this.savedDashboard.id; - } - - public isNew() { - return !this.isSaved(); - } - - public getDescription() { - return this.appState.description; - } - - public getTags() { - return this.appState.tags; - } - - public setDescription(description: string) { - this.stateContainer.transitions.set('description', description); - } - - public setTitle(title: string) { - this.savedDashboard.title = title; - this.stateContainer.transitions.set('title', title); - } - - public setTags(tags: string[]) { - this.stateContainer.transitions.set('tags', tags); - } - - public getAppState() { - return this.stateContainer.get(); - } - - public getQuery(): Query { - return migrateLegacyQuery(this.stateContainer.get().query); - } - - public getSavedQueryId() { - return this.stateContainer.get().savedQuery; - } - - public setSavedQueryId(id?: string) { - this.stateContainer.transitions.set('savedQuery', id); - } - - public getUseMargins() { - // Existing dashboards that don't define this should default to false. - return this.appState.options.useMargins === undefined - ? false - : this.appState.options.useMargins; - } - - public setUseMargins(useMargins: boolean) { - this.stateContainer.transitions.setOption('useMargins', useMargins); - } - - public getSyncColors() { - // Existing dashboards that don't define this should default to true. - return this.appState.options.syncColors === undefined ? true : this.appState.options.syncColors; - } - - public setSyncColors(syncColors: boolean) { - this.stateContainer.transitions.setOption('syncColors', syncColors); - } - - public getHidePanelTitles() { - return this.appState.options.hidePanelTitles; - } - - public setHidePanelTitles(hidePanelTitles: boolean) { - this.stateContainer.transitions.setOption('hidePanelTitles', hidePanelTitles); - } - - public getTimeRestore() { - return this.appState.timeRestore; - } - - public setTimeRestore(timeRestore: boolean) { - this.stateContainer.transitions.set('timeRestore', timeRestore); - } - - public getIsTimeSavedWithDashboard() { - return this.savedDashboard.timeRestore; - } - - public getLastSavedFilterBars(): Filter[] { - return this.lastSavedDashboardFilters.filterBars; - } - - public getLastSavedQuery() { - return this.lastSavedDashboardFilters.query; - } - - /** - * @returns True if the query changed since the last time the dashboard was saved, or if it's a - * new dashboard, if the query differs from the default. - */ - public getQueryChanged() { - const currentQuery = this.appState.query; - const lastSavedQuery = this.getLastSavedQuery(); - - const query = migrateLegacyQuery(currentQuery); - - const isLegacyStringQuery = - _.isString(lastSavedQuery) && _.isPlainObject(currentQuery) && _.has(currentQuery, 'query'); - if (isLegacyStringQuery) { - return lastSavedQuery !== query.query; - } - - return !_.isEqual(currentQuery, lastSavedQuery); - } - - /** - * @returns True if the filter bar state has changed since the last time the dashboard was saved, - * or if it's a new dashboard, if the query differs from the default. - */ - public getFilterBarChanged() { - return !_.isEqual( - FilterUtils.cleanFiltersForComparison(this.appState.filters), - FilterUtils.cleanFiltersForComparison(this.getLastSavedFilterBars()) - ); - } - - /** - * @param timeFilter - * @returns True if the time state has changed since the time saved with the dashboard. - */ - public getTimeChanged(timeFilter: Timefilter) { - return ( - !FilterUtils.areTimesEqual( - this.lastSavedDashboardFilters.timeFrom, - timeFilter.getTime().from - ) || - !FilterUtils.areTimesEqual(this.lastSavedDashboardFilters.timeTo, timeFilter.getTime().to) - ); - } - - public getViewMode() { - if (this.hideWriteControls) { - return ViewMode.VIEW; - } - if (this.stateContainer) { - return this.appState.viewMode; - } - // get viewMode should work properly even before the state container is created - return this.getInitialViewMode(); - } - - public getIsViewMode() { - return this.getViewMode() === ViewMode.VIEW; - } - - public getIsEditMode() { - return this.getViewMode() === ViewMode.EDIT; - } - - /** - * - * @returns True if the dashboard has changed since the last save (or, is new). - */ - public getIsDirty(timeFilter?: Timefilter) { - // Filter bar comparison is done manually (see cleanFiltersForComparison for the reason) and time picker - // changes are not tracked by the state monitor. - const hasTimeFilterChanged = timeFilter ? this.getFiltersChanged(timeFilter) : false; - return ( - this.hasUnsavedPanelState() || - (this.getIsEditMode() && (this.isDirty || hasTimeFilterChanged)) - ); - } - - public getPanels(): SavedDashboardPanel[] { - return this.appState.panels; - } - - public updatePanel(panelIndex: string, panelAttributes: any) { - const foundPanel = this.getPanels().find( - (panel: SavedDashboardPanel) => panel.panelIndex === panelIndex - ); - Object.assign(foundPanel, panelAttributes); - return foundPanel; - } - - /** - * @param timeFilter - * @returns An array of user friendly strings indicating the filter types that have changed. - */ - public getChangedFilterTypes(timeFilter: Timefilter) { - const changedFilters = []; - if (this.getFilterBarChanged()) { - changedFilters.push('filter'); - } - if (this.getQueryChanged()) { - changedFilters.push('query'); - } - if (this.savedDashboard.timeRestore && this.getTimeChanged(timeFilter)) { - changedFilters.push('time range'); - } - return changedFilters; - } - - /** - * @returns True if filters (query, filter bar filters, and time picker if time is stored - * with the dashboard) have changed since the last saved state (or if the dashboard hasn't been saved, - * the default state). - */ - public getFiltersChanged(timeFilter: Timefilter) { - return this.getChangedFilterTypes(timeFilter).length > 0; - } - - /** - * Updates timeFilter to match the time saved with the dashboard. - * @param timeFilter - * @param timeFilter.setTime - * @param timeFilter.setRefreshInterval - */ - public syncTimefilterWithDashboardTime(timeFilter: Timefilter) { - if (!this.getIsTimeSavedWithDashboard()) { - throw new Error( - i18n.translate('dashboard.stateManager.timeNotSavedWithDashboardErrorMessage', { - defaultMessage: 'The time is not saved with this dashboard so should not be synced.', - }) - ); - } - - if (this.savedDashboard.timeFrom && this.savedDashboard.timeTo) { - timeFilter.setTime({ - from: this.savedDashboard.timeFrom, - to: this.savedDashboard.timeTo, - }); - } - } - - /** - * Updates timeFilter to match the refreshInterval saved with the dashboard. - * @param timeFilter - */ - public syncTimefilterWithDashboardRefreshInterval(timeFilter: Timefilter) { - if (!this.getIsTimeSavedWithDashboard()) { - throw new Error( - i18n.translate('dashboard.stateManager.timeNotSavedWithDashboardErrorMessage', { - defaultMessage: 'The time is not saved with this dashboard so should not be synced.', - }) - ); - } - - if (this.savedDashboard.refreshInterval) { - timeFilter.setRefreshInterval(this.savedDashboard.refreshInterval); - } - } - - /** - * Synchronously writes current state to url - * returned boolean indicates whether the update happened and if history was updated - */ - private saveState({ replace }: { replace: boolean }): boolean { - // schedules setting current state to url - this.kbnUrlStateStorage.set( - STATE_STORAGE_KEY, - this.toUrlState(this.stateContainer.get()) - ); - // immediately forces scheduled updates and changes location - return !!this.kbnUrlStateStorage.kbnUrlControls.flush(replace); - } - - public setQuery(query: Query) { - this.stateContainer.transitions.set('query', query); - } - - /** - * Applies the current filter state to the dashboard. - * @param filter An array of filter bar filters. - */ - public applyFilters(query: Query, filters: Filter[]) { - this.savedDashboard.searchSource.setField('query', query); - this.savedDashboard.searchSource.setField('filter', filters); - this.stateContainer.transitions.set('query', query); - } - - public switchViewMode(newMode: ViewMode) { - this.stateContainer.transitions.set('viewMode', newMode); - this.restorePanels(); - } - - /** - * Destroys and cleans up this object when it's no longer used. - */ - public destroy() { - this.stateContainerChangeSub.unsubscribe(); - this.savedDashboard.destroy(); - if (this.stateSyncRef) { - this.stateSyncRef.stop(); - } - } - - public restorePanels() { - const unsavedState = this.getUnsavedPanelState(); - if (!unsavedState || unsavedState.panels?.length === 0) { - return; - } - this.stateContainer.set( - migrateAppState( - { - ...this.stateDefaults, - ...unsavedState, - ...this.kbnUrlStateStorage.get(STATE_STORAGE_KEY), - viewMode: this.getViewMode(), - }, - this.kibanaVersion, - this.usageCollection - ) - ); - } - - public clearUnsavedPanels() { - if (!this.allowByValueEmbeddables || !this.dashboardPanelStorage) { - return; - } - this.dashboardPanelStorage.clearPanels(this.savedDashboard?.id); - } - - public hasUnsavedPanelState(): boolean { - const panels = this.dashboardPanelStorage?.getPanels(this.savedDashboard?.id); - return panels !== undefined && panels.length > 0; - } - - private getUnsavedPanelState(): { panels?: SavedDashboardPanel[] } { - if (!this.allowByValueEmbeddables || this.getIsViewMode() || !this.dashboardPanelStorage) { - return {}; - } - const panels = this.dashboardPanelStorage.getPanels(this.savedDashboard?.id); - return panels ? { panels } : {}; - } - - private setUnsavedPanels(newPanels: SavedDashboardPanel[]) { - if ( - !this.allowByValueEmbeddables || - this.getIsViewMode() || - !this.getIsDirty() || - !this.dashboardPanelStorage - ) { - return; - } - this.dashboardPanelStorage.setPanels(this.savedDashboard?.id, newPanels); - } - - private toUrlState(state: DashboardAppState): DashboardAppStateInUrl { - if (this.getIsEditMode() && !this.allowByValueEmbeddables) { - return state; - } - const { panels, ...stateWithoutPanels } = state; - return stateWithoutPanels; - } - - private getInitialViewMode() { - if (this.hideWriteControls) { - return ViewMode.VIEW; - } - const viewModeFromUrl = this.kbnUrlStateStorage.get(STATE_STORAGE_KEY) - ?.viewMode; - if (viewModeFromUrl) { - return viewModeFromUrl; - } - return !this.savedDashboard.id || this.hasPendingEmbeddable() ? ViewMode.EDIT : ViewMode.VIEW; - } - - private checkIsDirty() { - // Filters need to be compared manually because they sometimes have a $$hashkey stored on the object. - // Query needs to be compared manually because saved legacy queries get migrated in app state automatically - const propsToIgnore: Array = ['viewMode', 'filters', 'query']; - - const initial = _.omit(this.stateDefaults, propsToIgnore); - const current = _.omit(this.stateContainer.get(), propsToIgnore); - return !_.isEqual(initial, current); - } -} diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx index 92b0727d2458c..b6e2a7c4b8f02 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container.tsx @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import _ from 'lodash'; import React from 'react'; import ReactDOM from 'react-dom'; import { I18nProvider } from '@kbn/i18n/react'; @@ -20,7 +21,6 @@ import { Container, PanelState, IEmbeddable, - ContainerInput, EmbeddableInput, EmbeddableStart, EmbeddableOutput, @@ -36,30 +36,13 @@ import { KibanaReactContextValue, } from '../../services/kibana_react'; import { PLACEHOLDER_EMBEDDABLE } from './placeholder'; -import { PanelPlacementMethod, IPanelPlacementArgs } from './panel/dashboard_panel_placement'; -import { DashboardCapabilities } from '../types'; +import { DashboardAppCapabilities, DashboardContainerInput } from '../../types'; import { PresentationUtilPluginStart } from '../../services/presentation_util'; +import { PanelPlacementMethod, IPanelPlacementArgs } from './panel/dashboard_panel_placement'; -export interface DashboardContainerInput extends ContainerInput { - dashboardCapabilities?: DashboardCapabilities; - refreshConfig?: RefreshInterval; - isEmbeddedExternally?: boolean; - isFullScreenMode: boolean; - expandedPanelId?: string; - timeRange: TimeRange; - description?: string; - useMargins: boolean; - syncColors?: boolean; - viewMode: ViewMode; - filters: Filter[]; - title: string; - query: Query; - panels: { - [panelId: string]: DashboardPanelState; - }; -} export interface DashboardContainerServices { ExitFullScreenButton: React.ComponentType; + presentationUtil: PresentationUtilPluginStart; SavedObjectFinder: React.ComponentType; notifications: CoreStart['notifications']; application: CoreStart['application']; @@ -69,7 +52,6 @@ export interface DashboardContainerServices { embeddable: EmbeddableStart; uiActions: UiActionsStart; http: CoreStart['http']; - presentationUtil: PresentationUtilPluginStart; } interface IndexSignature { @@ -91,7 +73,7 @@ export interface InheritedChildInput extends IndexSignature { export type DashboardReactContextValue = KibanaReactContextValue; export type DashboardReactContext = KibanaReactContext; -const defaultCapabilities: DashboardCapabilities = { +const defaultCapabilities: DashboardAppCapabilities = { show: false, createNew: false, saveQuery: false, @@ -104,7 +86,6 @@ const defaultCapabilities: DashboardCapabilities = { export class DashboardContainer extends Container { public readonly type = DASHBOARD_CONTAINER_TYPE; - public switchViewMode?: (newViewMode: ViewMode) => void; public getPanelCount = () => { return Object.keys(this.getInput().panels).length; @@ -134,7 +115,8 @@ export class DashboardContainer extends Container = {} ): DashboardPanelState { const panelState = super.createNewPanelState(factory, partial); - return createPanelState(panelState, this.input.panels); + const { newPanel } = createPanelState(panelState, this.input.panels); + return newPanel; } public showPlaceholderUntil( @@ -155,7 +137,8 @@ export class DashboardContainer extends Container; - const placeholderPanelState = createPanelState( + + const { otherPanels, newPanel: placeholderPanelState } = createPanelState( originalPanelState, this.input.panels, placementMethod, @@ -164,7 +147,7 @@ export class DashboardContainer extends Container - + , diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx index 05e1e7eb9ec35..a4d96b557ac97 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container_by_value_renderer.tsx @@ -7,7 +7,7 @@ */ import * as React from 'react'; -import { DashboardContainerInput } from './dashboard_container'; +import { DashboardContainerInput } from '../..'; import { DashboardContainerFactory } from './dashboard_container_factory'; import { EmbeddableRenderer } from '../../services/embeddable'; diff --git a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx index ff592742488f5..2e984ccfa5ba9 100644 --- a/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx +++ b/src/plugins/dashboard/public/application/embeddable/dashboard_container_factory.tsx @@ -8,6 +8,10 @@ import { i18n } from '@kbn/i18n'; import { EmbeddablePersistableStateService } from 'src/plugins/embeddable/common'; + +import { DashboardContainerInput } from '../..'; +import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants'; +import { DashboardContainer, DashboardContainerServices } from './dashboard_container'; import { Container, ErrorEmbeddable, @@ -15,12 +19,6 @@ import { EmbeddableFactory, EmbeddableFactoryDefinition, } from '../../services/embeddable'; -import { - DashboardContainer, - DashboardContainerInput, - DashboardContainerServices, -} from './dashboard_container'; -import { DASHBOARD_CONTAINER_TYPE } from './dashboard_constants'; import { createExtract, createInject, diff --git a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap index 44beed5e4a89b..9f56740fdac22 100644 --- a/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap +++ b/src/plugins/dashboard/public/application/embeddable/empty_screen/__snapshots__/dashboard_empty_screen.test.tsx.snap @@ -590,10 +590,12 @@ exports[`DashboardEmptyScreen renders correctly with readonly mode 1`] = `

- Click - -   - - - - - -   - - in the menu bar above to start adding panels. + Click edit in the menu bar above to start adding panels.

diff --git a/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx b/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx index 10fd2eea7dad5..b2f1302c65c9c 100644 --- a/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx +++ b/src/plugins/dashboard/public/application/embeddable/empty_screen/dashboard_empty_screen.tsx @@ -10,7 +10,6 @@ import React from 'react'; import { I18nProvider } from '@kbn/i18n/react'; import { EuiIcon, - EuiLink, EuiSpacer, EuiPageContent, EuiPageBody, @@ -24,7 +23,6 @@ import { emptyScreenStrings } from '../../../dashboard_strings'; export interface DashboardEmptyScreenProps { isEditMode?: boolean; - onLinkClick: () => void; uiSettings: IUiSettingsClient; http: HttpStart; isReadonlyMode?: boolean; @@ -32,7 +30,6 @@ export interface DashboardEmptyScreenProps { export function DashboardEmptyScreen({ isEditMode, - onLinkClick, uiSettings, http, isReadonlyMode, @@ -41,36 +38,14 @@ export function DashboardEmptyScreen({ const emptyStateGraphicURL = IS_DARK_THEME ? '/plugins/home/assets/welcome_graphic_dark_2x.png' : '/plugins/home/assets/welcome_graphic_light_2x.png'; - const paragraph = ( - description1: string | null, - description2: string, - linkText: string, - ariaLabel: string, - dataTestSubj?: string - ) => { - return ( - -

- {description1} - {description1 &&  } - - {linkText} - -   - {description2} -

-
- ); - }; - const enterEditModeParagraph = paragraph( - emptyScreenStrings.getHowToStartWorkingOnNewDashboardDescription1(), - emptyScreenStrings.getHowToStartWorkingOnNewDashboardDescription2(), - emptyScreenStrings.getHowToStartWorkingOnNewDashboardEditLinkText(), - emptyScreenStrings.getHowToStartWorkingOnNewDashboardEditLinkAriaLabel() - ); + const page = (mainText: string, showAdditionalParagraph?: boolean, additionalText?: string) => { return ( - + -
{enterEditModeParagraph}
+
+ +

{emptyScreenStrings.getHowToStartWorkingOnNewDashboardDescription()}

+
+
) : null}
diff --git a/src/plugins/dashboard/public/application/embeddable/index.ts b/src/plugins/dashboard/public/application/embeddable/index.ts index 24b5362359d25..a678dbea16a55 100644 --- a/src/plugins/dashboard/public/application/embeddable/index.ts +++ b/src/plugins/dashboard/public/application/embeddable/index.ts @@ -10,7 +10,7 @@ export { DashboardContainerFactoryDefinition, DashboardContainerFactory, } from './dashboard_container_factory'; -export { DashboardContainer, DashboardContainerInput } from './dashboard_container'; +export { DashboardContainer } from './dashboard_container'; export { createPanelState } from './panel'; export * from './types'; diff --git a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts index 7563d07154d6e..97e078246aca6 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.test.ts @@ -18,7 +18,7 @@ interface TestInput extends EmbeddableInput { const panels: { [key: string]: DashboardPanelState } = {}; test('createPanelState adds a new panel state in 0,0 position', () => { - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'hi', id: '123' }, @@ -37,7 +37,7 @@ test('createPanelState adds a new panel state in 0,0 position', () => { }); test('createPanelState adds a second new panel state', () => { - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'bye', id: '456' } }, panels ); @@ -51,7 +51,7 @@ test('createPanelState adds a second new panel state', () => { }); test('createPanelState adds a third new panel state', () => { - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'bye', id: '789' }, @@ -68,7 +68,7 @@ test('createPanelState adds a third new panel state', () => { test('createPanelState adds a new panel state in the top most position', () => { delete panels['456']; - const panelState = createPanelState( + const { newPanel: panelState } = createPanelState( { type: CONTACT_CARD_EMBEDDABLE, explicitInput: { test: 'bye', id: '987' }, diff --git a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts index 775ac7d7078ad..46a75ca06bdb5 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/create_panel_state.ts @@ -26,7 +26,10 @@ export function createPanelState< currentPanels: { [key: string]: DashboardPanelState }, placementMethod?: PanelPlacementMethod, placementArgs?: TPlacementMethodArgs -): DashboardPanelState { +): { + newPanel: DashboardPanelState; + otherPanels: { [key: string]: DashboardPanelState }; +} { const defaultPlacementArgs = { width: DEFAULT_PANEL_WIDTH, height: DEFAULT_PANEL_HEIGHT, @@ -39,15 +42,18 @@ export function createPanelState< } : defaultPlacementArgs; - const gridDataLocation = placementMethod + const { newPanelPlacement, otherPanels } = placementMethod ? placementMethod(finalPlacementArgs as TPlacementMethodArgs) : findTopLeftMostOpenSpace(defaultPlacementArgs); return { - gridData: { - ...gridDataLocation, - i: panelState.explicitInput.id, + newPanel: { + gridData: { + ...newPanelPlacement, + i: panelState.explicitInput.id, + }, + ...panelState, }, - ...panelState, + otherPanels, }; } diff --git a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts index c8e5fcbe4240b..64b398200db1d 100644 --- a/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts +++ b/src/plugins/dashboard/public/application/embeddable/panel/dashboard_panel_placement.ts @@ -13,7 +13,12 @@ import { DashboardPanelState, DASHBOARD_GRID_COLUMN_COUNT } from '..'; export type PanelPlacementMethod = ( args: PlacementArgs -) => Omit; +) => PanelPlacementMethodReturn; + +interface PanelPlacementMethodReturn { + newPanelPlacement: Omit; + otherPanels: { [key: string]: DashboardPanelState }; +} export interface IPanelPlacementArgs { width: number; @@ -30,7 +35,7 @@ export function findTopLeftMostOpenSpace({ width, height, currentPanels, -}: IPanelPlacementArgs): Omit { +}: IPanelPlacementArgs): PanelPlacementMethodReturn { let maxY = -1; const currentPanelsArray = Object.values(currentPanels); @@ -40,7 +45,7 @@ export function findTopLeftMostOpenSpace({ // Handle case of empty grid. if (maxY < 0) { - return { x: 0, y: 0, w: width, h: height }; + return { newPanelPlacement: { x: 0, y: 0, w: width, h: height }, otherPanels: currentPanels }; } const grid = new Array(maxY); @@ -80,7 +85,10 @@ export function findTopLeftMostOpenSpace({ if (spaceIsEmpty && fitsPanelWidth && fitsPanelHeight) { // Found space - return { x, y, w: width, h: height }; + return { + newPanelPlacement: { x, y, w: width, h: height }, + otherPanels: currentPanels, + }; } else if (grid[h][w] === 1) { // x, y spot doesn't work, break. break; @@ -90,7 +98,7 @@ export function findTopLeftMostOpenSpace({ } } } - return { x: 0, y: maxY, w: width, h: height }; + return { newPanelPlacement: { x: 0, y: maxY, w: width, h: height }, otherPanels: currentPanels }; } interface IplacementDirection { @@ -123,15 +131,15 @@ export function placePanelBeside({ height, currentPanels, placeBesideId, -}: IPanelPlacementBesideArgs): Omit { +}: IPanelPlacementBesideArgs): PanelPlacementMethodReturn { const panelToPlaceBeside = currentPanels[placeBesideId]; if (!panelToPlaceBeside) { throw new PanelNotFoundError(); } const beside = panelToPlaceBeside.gridData; - const otherPanels: GridData[] = []; + const otherPanelGridData: GridData[] = []; _.forOwn(currentPanels, (panel: DashboardPanelState, key: string | undefined) => { - otherPanels.push(panel.gridData); + otherPanelGridData.push(panel.gridData); }); const possiblePlacementDirections: IplacementDirection[] = [ @@ -147,7 +155,7 @@ export function placePanelBeside({ direction.grid.x + direction.grid.w <= DASHBOARD_GRID_COLUMN_COUNT && direction.grid.y >= 0 ) { - const intersection = otherPanels.some((currentPanelGrid: GridData) => { + const intersection = otherPanelGridData.some((currentPanelGrid: GridData) => { return ( direction.grid.x + direction.grid.w > currentPanelGrid.x && direction.grid.x < currentPanelGrid.x + currentPanelGrid.w && @@ -156,7 +164,7 @@ export function placePanelBeside({ ); }); if (!intersection) { - return direction.grid; + return { newPanelPlacement: direction.grid, otherPanels: currentPanels }; } } else { direction.fits = false; @@ -168,7 +176,8 @@ export function placePanelBeside({ * 2. place the cloned panel to the bottom * 3. reposition the panels after the cloned panel in the grid */ - const grid = otherPanels.sort(comparePanels); + const otherPanels = { ...currentPanels }; + const grid = otherPanelGridData.sort(comparePanels); let position = 0; for (position; position < grid.length; position++) { @@ -182,13 +191,13 @@ export function placePanelBeside({ const diff = bottomPlacement.grid.y + bottomPlacement.grid.h - - currentPanels[originalPositionInTheGrid].gridData.y; + otherPanels[originalPositionInTheGrid].gridData.y; for (let j = position + 1; j < grid.length; j++) { originalPositionInTheGrid = grid[j].i; - const movedPanel = _.cloneDeep(currentPanels[originalPositionInTheGrid]); + const movedPanel = _.cloneDeep(otherPanels[originalPositionInTheGrid]); movedPanel.gridData.y = movedPanel.gridData.y + diff; - currentPanels[originalPositionInTheGrid] = movedPanel; + otherPanels[originalPositionInTheGrid] = movedPanel; } - return bottomPlacement.grid; + return { newPanelPlacement: bottomPlacement.grid, otherPanels }; } diff --git a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx index 442bae8dd1dff..cbe10438e578a 100644 --- a/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx +++ b/src/plugins/dashboard/public/application/embeddable/viewport/dashboard_viewport.tsx @@ -15,7 +15,6 @@ import { context } from '../../../services/kibana_react'; import { DashboardEmptyScreen } from '../empty_screen/dashboard_empty_screen'; export interface DashboardViewportProps { - switchViewMode?: (newViewMode: ViewMode) => void; container: DashboardContainer; } @@ -120,7 +119,6 @@ export class DashboardViewport extends React.Component this.props.switchViewMode?.(ViewMode.EDIT)} isEditMode={isEditMode} uiSettings={this.context.services.uiSettings} http={this.context.services.http} diff --git a/src/plugins/dashboard/public/application/hooks/index.ts b/src/plugins/dashboard/public/application/hooks/index.ts index 09b7aea9c6a6d..d9c3cd231c3c3 100644 --- a/src/plugins/dashboard/public/application/hooks/index.ts +++ b/src/plugins/dashboard/public/application/hooks/index.ts @@ -6,7 +6,4 @@ * Side Public License, v 1. */ -export { useSavedDashboard } from './use_saved_dashboard'; -export { useDashboardContainer } from './use_dashboard_container'; -export { useDashboardBreadcrumbs } from './use_dashboard_breadcrumbs'; -export { useDashboardStateManager } from './use_dashboard_state_manager'; +export { useDashboardAppState } from './use_dashboard_app_state'; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx new file mode 100644 index 0000000000000..0e15c65574967 --- /dev/null +++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.test.tsx @@ -0,0 +1,337 @@ +/* + * Copyright 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 { of } from 'rxjs'; +import { Provider } from 'react-redux'; +import { createBrowserHistory } from 'history'; +import { renderHook, act, RenderHookResult } from '@testing-library/react-hooks'; + +import { DashboardContainer } from '..'; +import { DashboardSessionStorage } from '../lib'; +import { coreMock } from '../../../../../core/public/mocks'; +import { DashboardConstants } from '../../dashboard_constants'; +import { dataPluginMock } from '../../../../data/public/mocks'; +import { SavedObjectLoader } from '../../services/saved_objects'; +import { DashboardAppServices, DashboardAppState } from '../../types'; +import { KibanaContextProvider } from '../../../../kibana_react/public'; +import { EmbeddableFactory, ViewMode } from '../../services/embeddable'; +import { dashboardStateStore, setDescription, setViewMode } from '../state'; +import { DashboardContainerServices } from '../embeddable/dashboard_container'; +import { createKbnUrlStateStorage, defer } from '../../../../kibana_utils/public'; +import { Filter, IIndexPattern, IndexPatternsContract } from '../../services/data'; +import { useDashboardAppState, UseDashboardStateProps } from './use_dashboard_app_state'; +import { + getSampleDashboardInput, + getSavedDashboardMock, + makeDefaultServices, +} from '../test_helpers'; + +interface SetupEmbeddableFactoryReturn { + finalizeEmbeddableCreation: () => void; + dashboardContainer: DashboardContainer; + dashboardDestroySpy: jest.SpyInstance; +} + +interface RenderDashboardStateHookReturn { + embeddableFactoryResult: SetupEmbeddableFactoryReturn; + renderHookResult: RenderHookResult, DashboardAppState>; + services: DashboardAppServices; + props: UseDashboardStateProps; +} + +const originalDashboardEmbeddableId = 'originalDashboardEmbeddableId'; + +const createDashboardAppStateProps = (): UseDashboardStateProps => ({ + kbnUrlStateStorage: createKbnUrlStateStorage(), + savedDashboardId: 'testDashboardId', + history: createBrowserHistory(), + isEmbeddedExternally: false, + redirectTo: jest.fn(), +}); + +const createDashboardAppStateServices = () => { + const defaults = makeDefaultServices(); + const indexPatterns = {} as IndexPatternsContract; + const defaultIndexPattern = { id: 'foo', fields: [{ name: 'bar' }] } as IIndexPattern; + indexPatterns.ensureDefaultIndexPattern = jest + .fn() + .mockImplementation(() => Promise.resolve(true)); + indexPatterns.getDefault = jest + .fn() + .mockImplementation(() => Promise.resolve(defaultIndexPattern)); + + const data = dataPluginMock.createStartContract(); + data.query.filterManager.getUpdates$ = jest.fn().mockImplementation(() => of(void 0)); + data.query.queryString.getUpdates$ = jest.fn().mockImplementation(() => of({})); + data.query.timefilter.timefilter.getTimeUpdate$ = jest.fn().mockImplementation(() => of(void 0)); + data.query.timefilter.timefilter.getRefreshIntervalUpdate$ = jest + .fn() + .mockImplementation(() => of(void 0)); + + return { ...defaults, indexPatterns, data }; +}; + +const setupEmbeddableFactory = ( + services: DashboardAppServices, + id: string +): SetupEmbeddableFactoryReturn => { + const coreStart = coreMock.createStart(); + const containerOptions = ({ + notifications: services.core.notifications, + savedObjectMetaData: {} as unknown, + ExitFullScreenButton: () => null, + embeddable: services.embeddable, + uiSettings: services.uiSettings, + SavedObjectFinder: () => null, + overlays: coreStart.overlays, + application: {} as unknown, + inspector: {} as unknown, + uiActions: {} as unknown, + http: coreStart.http, + } as unknown) as DashboardContainerServices; + + const dashboardContainer = new DashboardContainer( + { ...getSampleDashboardInput(), id }, + containerOptions + ); + const deferEmbeddableCreate = defer(); + services.embeddable.getEmbeddableFactory = jest.fn().mockImplementation( + () => + (({ + create: () => deferEmbeddableCreate.promise, + } as unknown) as EmbeddableFactory) + ); + const dashboardDestroySpy = jest.spyOn(dashboardContainer, 'destroy'); + + return { + dashboardContainer, + dashboardDestroySpy, + finalizeEmbeddableCreation: () => { + act(() => { + deferEmbeddableCreate.resolve(dashboardContainer); + }); + }, + }; +}; + +const renderDashboardAppStateHook = ({ + partialProps, + partialServices, +}: { + partialProps?: Partial; + partialServices?: Partial; +}): RenderDashboardStateHookReturn => { + const props = { ...createDashboardAppStateProps(), ...(partialProps ?? {}) }; + const services = { ...createDashboardAppStateServices(), ...(partialServices ?? {}) }; + const embeddableFactoryResult = setupEmbeddableFactory(services, originalDashboardEmbeddableId); + const renderHookResult = renderHook( + (replaceProps: Partial) => + useDashboardAppState({ ...props, ...replaceProps }), + { + wrapper: ({ children }) => ( + + {children} + + ), + } + ); + return { embeddableFactoryResult, renderHookResult, services, props }; +}; + +describe('Dashboard container lifecycle', () => { + test('Dashboard container is destroyed on unmount', async () => { + const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({}); + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(embeddableFactoryResult.dashboardContainer).toBe( + renderHookResult.result.current.dashboardContainer + ); + expect(embeddableFactoryResult.dashboardDestroySpy).not.toBeCalled(); + renderHookResult.unmount(); + expect(embeddableFactoryResult.dashboardDestroySpy).toBeCalled(); + }); + + test('Old dashboard container is destroyed when new dashboardId is given', async () => { + const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({}); + const getResult = () => renderHookResult.result.current; + + // on initial render dashboard container is undefined + expect(getResult().dashboardContainer).toBeUndefined(); + embeddableFactoryResult.finalizeEmbeddableCreation(); + + await renderHookResult.waitForNextUpdate(); + expect(embeddableFactoryResult.dashboardContainer).toBe(getResult().dashboardContainer); + expect(embeddableFactoryResult.dashboardDestroySpy).not.toBeCalled(); + + const newDashboardId = 'wow_a_new_dashboard_id'; + const embeddableFactoryNew = setupEmbeddableFactory(services, newDashboardId); + renderHookResult.rerender({ savedDashboardId: newDashboardId }); + + embeddableFactoryNew.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(embeddableFactoryNew.dashboardContainer).toEqual(getResult().dashboardContainer); + expect(embeddableFactoryNew.dashboardDestroySpy).not.toBeCalled(); + expect(embeddableFactoryResult.dashboardDestroySpy).toBeCalled(); + }); + + test('Dashboard container is destroyed if dashboard id is changed before container is resolved', async () => { + const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({}); + const getResult = () => renderHookResult.result.current; + + // on initial render dashboard container is undefined + expect(getResult().dashboardContainer).toBeUndefined(); + await act(() => Promise.resolve()); // wait for the original savedDashboard to be loaded... + + const newDashboardId = 'wow_a_new_dashboard_id'; + const embeddableFactoryNew = setupEmbeddableFactory(services, newDashboardId); + + renderHookResult.rerender({ savedDashboardId: newDashboardId }); + await act(() => Promise.resolve()); // wait for the new savedDashboard to be loaded... + embeddableFactoryNew.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + expect(embeddableFactoryNew.dashboardContainer).toBe(getResult().dashboardContainer); + expect(embeddableFactoryNew.dashboardDestroySpy).not.toBeCalled(); + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await act(() => Promise.resolve()); // Can't use waitFor from hooks, because there is no hook update + expect(embeddableFactoryNew.dashboardContainer).toBe(getResult().dashboardContainer); + expect(embeddableFactoryNew.dashboardDestroySpy).not.toBeCalled(); + expect(embeddableFactoryResult.dashboardDestroySpy).toBeCalled(); + }); +}); + +describe('Dashboard initial state', () => { + it('Extracts state from Dashboard Saved Object', async () => { + const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({}); + const getResult = () => renderHookResult.result.current; + + // saved dashboard isn't applied until after the dashboard embeddable has been created. + expect(getResult().savedDashboard).toBeUndefined(); + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(getResult().savedDashboard).toBeDefined(); + expect(getResult().savedDashboard?.title).toEqual( + getResult().getLatestDashboardState?.().title + ); + }); + + it('Sets initial time range and filters from saved dashboard', async () => { + const savedDashboards = {} as SavedObjectLoader; + savedDashboards.get = jest.fn().mockImplementation((id?: string) => + Promise.resolve( + getSavedDashboardMock({ + getFilters: () => [({ meta: { test: 'filterMeTimbers' } } as unknown) as Filter], + timeRestore: true, + timeFrom: 'now-13d', + timeTo: 'now', + id, + }) + ) + ); + const partialServices: Partial = { savedDashboards }; + const { renderHookResult, embeddableFactoryResult, services } = renderDashboardAppStateHook({ + partialServices, + }); + const getResult = () => renderHookResult.result.current; + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + + expect(getResult().getLatestDashboardState?.().timeRestore).toEqual(true); + expect(services.data.query.timefilter.timefilter.setTime).toHaveBeenCalledWith({ + from: 'now-13d', + to: 'now', + }); + expect(services.data.query.filterManager.setAppFilters).toHaveBeenCalledWith([ + ({ meta: { test: 'filterMeTimbers' } } as unknown) as Filter, + ]); + }); + + it('Combines session state and URL state into initial state', async () => { + const dashboardSessionStorage = ({ + getState: jest + .fn() + .mockReturnValue({ viewMode: ViewMode.EDIT, description: 'this should be overwritten' }), + } as unknown) as DashboardSessionStorage; + const kbnUrlStateStorage = createKbnUrlStateStorage(); + kbnUrlStateStorage.set('_a', { description: 'with this' }); + const { renderHookResult, embeddableFactoryResult } = renderDashboardAppStateHook({ + partialProps: { kbnUrlStateStorage }, + partialServices: { dashboardSessionStorage }, + }); + const getResult = () => renderHookResult.result.current; + + embeddableFactoryResult.finalizeEmbeddableCreation(); + await renderHookResult.waitForNextUpdate(); + expect(getResult().getLatestDashboardState?.().description).toEqual('with this'); + expect(getResult().getLatestDashboardState?.().viewMode).toEqual(ViewMode.EDIT); + }); +}); + +describe('Dashboard state sync', () => { + let defaultDashboardAppStateHookResult: RenderDashboardStateHookReturn; + const getResult = () => defaultDashboardAppStateHookResult.renderHookResult.result.current; + + beforeEach(async () => { + DashboardConstants.CHANGE_APPLY_DEBOUNCE = 0; + DashboardConstants.CHANGE_CHECK_DEBOUNCE = 0; + defaultDashboardAppStateHookResult = renderDashboardAppStateHook({}); + defaultDashboardAppStateHookResult.embeddableFactoryResult.finalizeEmbeddableCreation(); + await defaultDashboardAppStateHookResult.renderHookResult.waitForNextUpdate(); + }); + + it('Updates Dashboard container input when state changes', async () => { + const { embeddableFactoryResult } = defaultDashboardAppStateHookResult; + embeddableFactoryResult.dashboardContainer.updateInput = jest.fn(); + act(() => { + dashboardStateStore.dispatch(setDescription('Well hello there new description')); + }); + await act(async () => { + await new Promise((resolve) => setTimeout(resolve, 3)); // So that $triggerDashboardRefresh.next is called + }); + expect(embeddableFactoryResult.dashboardContainer.updateInput).toHaveBeenCalledWith( + expect.objectContaining({ description: 'Well hello there new description' }) + ); + }); + + it('Updates state when dashboard container input changes', async () => { + const { embeddableFactoryResult } = defaultDashboardAppStateHookResult; + expect(getResult().getLatestDashboardState?.().fullScreenMode).toBe(false); + act(() => { + embeddableFactoryResult.dashboardContainer.updateInput({ + isFullScreenMode: true, + }); + }); + await act(() => Promise.resolve()); + expect(getResult().getLatestDashboardState?.().fullScreenMode).toBe(true); + }); + + it('pushes unsaved changes to the session storage', async () => { + const { services } = defaultDashboardAppStateHookResult; + expect(getResult().getLatestDashboardState?.().fullScreenMode).toBe(false); + act(() => { + dashboardStateStore.dispatch(setViewMode(ViewMode.EDIT)); // session storage is only populated in edit mode + dashboardStateStore.dispatch(setDescription('Wow an even cooler description.')); + }); + await act(async () => { + await new Promise((resolve) => setTimeout(resolve, 3)); + }); + expect(services.dashboardSessionStorage.setState).toHaveBeenCalledWith( + 'testDashboardId', + expect.objectContaining({ + description: 'Wow an even cooler description.', + viewMode: ViewMode.EDIT, + }) + ); + }); +}); diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts new file mode 100644 index 0000000000000..e9a5275300ffe --- /dev/null +++ b/src/plugins/dashboard/public/application/hooks/use_dashboard_app_state.ts @@ -0,0 +1,351 @@ +/* + * Copyright 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 _ from 'lodash'; +import { History } from 'history'; +import { debounceTime } from 'rxjs/operators'; +import { useCallback, useEffect, useMemo, useState } from 'react'; +import { BehaviorSubject, combineLatest, Subject } from 'rxjs'; + +import { DashboardConstants } from '../..'; +import { ViewMode } from '../../services/embeddable'; +import { useKibana } from '../../services/kibana_react'; +import { getNewDashboardTitle } from '../../dashboard_strings'; +import { IKbnUrlStateStorage } from '../../services/kibana_utils'; +import { setDashboardState, useDashboardDispatch, useDashboardSelector } from '../state'; +import { + DashboardBuildContext, + DashboardAppServices, + DashboardAppState, + DashboardRedirect, + DashboardState, +} from '../../types'; +import { + tryDestroyDashboardContainer, + syncDashboardContainerInput, + savedObjectToDashboardState, + syncDashboardIndexPatterns, + syncDashboardFilterState, + loadSavedDashboardState, + buildDashboardContainer, + loadDashboardUrlState, + diffDashboardState, + areTimeRangesEqual, +} from '../lib'; + +export interface UseDashboardStateProps { + history: History; + savedDashboardId?: string; + redirectTo: DashboardRedirect; + isEmbeddedExternally: boolean; + kbnUrlStateStorage: IKbnUrlStateStorage; +} + +export const useDashboardAppState = ({ + history, + redirectTo, + savedDashboardId, + kbnUrlStateStorage, + isEmbeddedExternally, +}: UseDashboardStateProps) => { + const dispatchDashboardStateChange = useDashboardDispatch(); + const dashboardState = useDashboardSelector((state) => state.dashboardStateReducer); + + /** + * Dashboard app state is the return value for this hook and contains interaction points that the rest of the app can use + * to read or manipulate dashboard state. + */ + const [dashboardAppState, setDashboardAppState] = useState(() => ({ + $onDashboardStateChange: new BehaviorSubject({} as DashboardState), + $triggerDashboardRefresh: new Subject<{ force?: boolean }>(), + })); + + /** + * Last saved state is diffed against the current dashboard state any time either changes. This is used to set the + * unsaved changes portion of the dashboardAppState. + */ + const [lastSavedState, setLastSavedState] = useState(); + const $onLastSavedStateChange = useMemo(() => new Subject(), []); + + /** + * Unpack services + */ + const services = useKibana().services; + const { + data, + core, + chrome, + embeddable, + indexPatterns, + usageCollection, + savedDashboards, + initializerContext, + savedObjectsTagging, + dashboardCapabilities, + dashboardSessionStorage, + } = services; + const { docTitle } = chrome; + const { notifications } = core; + const { query, search } = data; + const { getStateTransfer } = embeddable; + const { version: kibanaVersion } = initializerContext.env.packageInfo; + + /** + * This useEffect triggers when the dashboard ID changes, and is in charge of loading the saved dashboard, + * fetching the initial state, building the Dashboard Container embeddable, and setting up all state syncing. + */ + useEffect(() => { + // fetch incoming embeddable from state transfer service. + const incomingEmbeddable = getStateTransfer().getIncomingEmbeddablePackage( + DashboardConstants.DASHBOARDS_ID, + true + ); + + let canceled = false; + let onDestroy: () => void; + + /** + * The dashboard build context is a collection of all of the services and props required in subsequent steps to build the dashboard + * from the dashboardId. This build context doesn't contain any extrenuous services. + */ + const dashboardBuildContext: DashboardBuildContext = { + query, + search, + history, + embeddable, + indexPatterns, + notifications, + kibanaVersion, + savedDashboards, + kbnUrlStateStorage, + initializerContext, + isEmbeddedExternally, + dashboardCapabilities, + dispatchDashboardStateChange, + $checkForUnsavedChanges: new Subject(), + $onDashboardStateChange: dashboardAppState.$onDashboardStateChange, + $triggerDashboardRefresh: dashboardAppState.$triggerDashboardRefresh, + getLatestDashboardState: () => dashboardAppState.$onDashboardStateChange.value, + }; + + (async () => { + /** + * Load and unpack state from dashboard saved object. + */ + const loadSavedDashboardResult = await loadSavedDashboardState({ + ...dashboardBuildContext, + savedDashboardId, + }); + if (canceled || !loadSavedDashboardResult) return; + const { savedDashboard, savedDashboardState } = loadSavedDashboardResult; + + /** + * Combine initial state from the saved object, session storage, and URL, then dispatch it to Redux. + */ + const dashboardSessionStorageState = dashboardSessionStorage.getState(savedDashboardId) || {}; + const dashboardURLState = loadDashboardUrlState(dashboardBuildContext); + const initialDashboardState = { + ...savedDashboardState, + ...dashboardSessionStorageState, + ...dashboardURLState, + + // if there is an incoming embeddable, dashboard always needs to be in edit mode to receive it. + ...(incomingEmbeddable ? { viewMode: ViewMode.EDIT } : {}), + }; + dispatchDashboardStateChange(setDashboardState(initialDashboardState)); + + /** + * Start syncing dashboard state with the Query, Filters and Timepicker from the Query Service. + */ + const { applyFilters, stopSyncingDashboardFilterState } = syncDashboardFilterState({ + ...dashboardBuildContext, + initialDashboardState, + savedDashboard, + }); + + /** + * Build the dashboard container embeddable, and apply the incoming embeddable if it exists. + */ + const dashboardContainer = await buildDashboardContainer({ + ...dashboardBuildContext, + initialDashboardState, + incomingEmbeddable, + savedDashboard, + data, + }); + if (canceled || !dashboardContainer) { + tryDestroyDashboardContainer(dashboardContainer); + return; + } + + /** + * Start syncing index patterns between the Query Service and the Dashboard Container. + */ + const indexPatternsSubscription = syncDashboardIndexPatterns({ + dashboardContainer, + indexPatterns: dashboardBuildContext.indexPatterns, + onUpdateIndexPatterns: (newIndexPatterns) => + setDashboardAppState((s) => ({ ...s, indexPatterns: newIndexPatterns })), + }); + + /** + * Set up the two way syncing between the Dashboard Container and the Redux Store. + */ + const stopSyncingContainerInput = syncDashboardContainerInput({ + ...dashboardBuildContext, + dashboardContainer, + savedDashboard, + applyFilters, + }); + + /** + * Any time the redux state, or the last saved state changes, compare them, set the unsaved + * changes state, and and push the unsaved changes to session storage. + */ + const { timefilter } = dashboardBuildContext.query.timefilter; + const lastSavedSubscription = combineLatest([ + $onLastSavedStateChange, + dashboardAppState.$onDashboardStateChange, + dashboardBuildContext.$checkForUnsavedChanges, + ]) + .pipe(debounceTime(DashboardConstants.CHANGE_CHECK_DEBOUNCE)) + .subscribe((states) => { + const [lastSaved, current] = states; + const unsavedChanges = + current.viewMode === ViewMode.EDIT ? diffDashboardState(lastSaved, current) : {}; + + if (current.viewMode === ViewMode.EDIT) { + const savedTimeChanged = + lastSaved.timeRestore && + !areTimeRangesEqual( + { + from: savedDashboard?.timeFrom, + to: savedDashboard?.timeTo, + }, + timefilter.getTime() + ); + const hasUnsavedChanges = Object.keys(unsavedChanges).length > 0 || savedTimeChanged; + setDashboardAppState((s) => ({ ...s, hasUnsavedChanges })); + } + + unsavedChanges.viewMode = current.viewMode; // always push view mode into session store. + dashboardSessionStorage.setState(savedDashboardId, unsavedChanges); + }); + + /** + * initialize the last saved state, and build a callback which can be used to update + * the last saved state on save. + */ + setLastSavedState(savedDashboardState); + dashboardBuildContext.$checkForUnsavedChanges.next(); + const updateLastSavedState = () => { + setLastSavedState( + savedObjectToDashboardState({ + hideWriteControls: dashboardBuildContext.dashboardCapabilities.hideWriteControls, + version: dashboardBuildContext.kibanaVersion, + savedObjectsTagging, + usageCollection, + savedDashboard, + }) + ); + }; + + /** + * Apply changes to the dashboard app state, and set the document title + */ + docTitle.change(savedDashboardState.title || getNewDashboardTitle()); + setDashboardAppState((s) => ({ + ...s, + applyFilters, + savedDashboard, + dashboardContainer, + updateLastSavedState, + getLatestDashboardState: dashboardBuildContext.getLatestDashboardState, + })); + + onDestroy = () => { + stopSyncingContainerInput(); + stopSyncingDashboardFilterState(); + lastSavedSubscription.unsubscribe(); + indexPatternsSubscription.unsubscribe(); + tryDestroyDashboardContainer(dashboardContainer); + setDashboardAppState((state) => ({ + ...state, + dashboardContainer: undefined, + })); + }; + })(); + return () => { + canceled = true; + onDestroy?.(); + }; + }, [ + dashboardAppState.$triggerDashboardRefresh, + dashboardAppState.$onDashboardStateChange, + dispatchDashboardStateChange, + $onLastSavedStateChange, + dashboardSessionStorage, + dashboardCapabilities, + isEmbeddedExternally, + kbnUrlStateStorage, + savedObjectsTagging, + initializerContext, + savedDashboardId, + getStateTransfer, + savedDashboards, + usageCollection, + notifications, + indexPatterns, + kibanaVersion, + embeddable, + docTitle, + history, + search, + query, + data, + ]); + + /** + * rebuild reset to last saved state callback whenever last saved state changes + */ + const resetToLastSavedState = useCallback(() => { + if ( + !lastSavedState || + !dashboardAppState.savedDashboard || + !dashboardAppState.getLatestDashboardState + ) { + return; + } + + if (dashboardAppState.getLatestDashboardState().timeRestore) { + const { timefilter } = data.query.timefilter; + const { timeFrom: from, timeTo: to, refreshInterval } = dashboardAppState.savedDashboard; + if (from && to) timefilter.setTime({ from, to }); + if (refreshInterval) timefilter.setRefreshInterval(refreshInterval); + } + dispatchDashboardStateChange(setDashboardState(lastSavedState)); + }, [lastSavedState, dashboardAppState, data.query.timefilter, dispatchDashboardStateChange]); + + /** + * publish state to the state change observable when redux state changes + */ + useEffect(() => { + if (!dashboardState || Object.keys(dashboardState).length === 0) return; + dashboardAppState.$onDashboardStateChange.next(dashboardState); + }, [dashboardAppState.$onDashboardStateChange, dashboardState]); + + /** + * push last saved state to the state change observable when last saved state changes + */ + useEffect(() => { + if (!lastSavedState) return; + $onLastSavedStateChange.next(lastSavedState); + }, [$onLastSavedStateChange, lastSavedState]); + + return { ...dashboardAppState, resetToLastSavedState }; +}; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_breadcrumbs.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_breadcrumbs.ts deleted file mode 100644 index 50465cc4ab58b..0000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_breadcrumbs.ts +++ /dev/null @@ -1,53 +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 { useEffect } from 'react'; -import _ from 'lodash'; - -import { useKibana } from '../../services/kibana_react'; - -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getDashboardBreadcrumb, getDashboardTitle } from '../../dashboard_strings'; -import { DashboardAppServices, DashboardRedirect } from '../types'; - -export const useDashboardBreadcrumbs = ( - dashboardStateManager: DashboardStateManager | null, - redirectTo: DashboardRedirect -) => { - const { data, core, chrome } = useKibana().services; - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { setBreadcrumbs } = chrome; - const { timefilter } = data.query.timefilter; - const { openConfirm } = core.overlays; - - // Sync breadcrumbs when Dashboard State Manager changes - useEffect(() => { - if (!dashboardStateManager) { - return; - } - - setBreadcrumbs([ - { - text: getDashboardBreadcrumb(), - 'data-test-subj': 'dashboardListingBreadcrumb', - onClick: () => { - redirectTo({ destination: 'listing' }); - }, - }, - { - text: getDashboardTitle( - dashboardStateManager.getTitle(), - dashboardStateManager.getViewMode(), - dashboardStateManager.isNew() - ), - }, - ]); - }, [dashboardStateManager, timefilter, openConfirm, redirectTo, setBreadcrumbs]); -}; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.test.tsx b/src/plugins/dashboard/public/application/hooks/use_dashboard_container.test.tsx deleted file mode 100644 index b2fc7c917d285..0000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.test.tsx +++ /dev/null @@ -1,199 +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 { useDashboardContainer } from './use_dashboard_container'; -import { renderHook, act } from '@testing-library/react-hooks'; -import { KibanaContextProvider } from '../../../../kibana_react/public'; -import React from 'react'; -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getSavedDashboardMock } from '../test_helpers'; -import { createKbnUrlStateStorage, defer } from '../../../../kibana_utils/public'; -import { createBrowserHistory } from 'history'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { embeddablePluginMock } from '../../../../embeddable/public/mocks'; -import { DashboardCapabilities } from '../types'; -import { EmbeddableFactory } from '../../../../embeddable/public'; -import { HelloWorldEmbeddable } from '../../../../embeddable/public/tests/fixtures'; -import { DashboardContainer } from '../embeddable'; -import { coreMock } from 'src/core/public/mocks'; - -const savedDashboard = getSavedDashboardMock(); - -// TS is *very* picky with type guards / predicates. can't just use jest.fn() -function mockHasTaggingCapabilities(obj: any): obj is any { - return false; -} - -const history = createBrowserHistory(); -const createDashboardState = () => - new DashboardStateManager({ - savedDashboard, - kibanaVersion: '7.0.0', - hideWriteControls: false, - allowByValueEmbeddables: false, - history: createBrowserHistory(), - hasPendingEmbeddable: () => false, - kbnUrlStateStorage: createKbnUrlStateStorage(), - hasTaggingCapabilities: mockHasTaggingCapabilities, - toasts: coreMock.createStart().notifications.toasts, - }); - -const defaultCapabilities: DashboardCapabilities = { - show: false, - createNew: false, - saveQuery: false, - createShortUrl: false, - hideWriteControls: true, - mapsCapabilities: { save: false }, - visualizeCapabilities: { save: false }, - storeSearchSession: true, -}; - -const getIncomingEmbeddable = () => undefined; - -const services = { - dashboardCapabilities: defaultCapabilities, - data: dataPluginMock.createStartContract(), - embeddable: embeddablePluginMock.createStartContract(), - scopedHistory: history, -}; - -const setupEmbeddableFactory = () => { - const embeddable = new HelloWorldEmbeddable({ id: 'id' }); - const deferEmbeddableCreate = defer(); - services.embeddable.getEmbeddableFactory.mockImplementation( - () => - (({ - create: () => deferEmbeddableCreate.promise, - } as unknown) as EmbeddableFactory) - ); - const destroySpy = jest.spyOn(embeddable, 'destroy'); - - return { - destroySpy, - embeddable, - createEmbeddable: () => { - act(() => { - deferEmbeddableCreate.resolve(embeddable); - }); - }, - }; -}; - -test('container is destroyed on unmount', async () => { - const { createEmbeddable, destroySpy, embeddable } = setupEmbeddableFactory(); - - const dashboardStateManager = createDashboardState(); - const { result, unmount, waitForNextUpdate } = renderHook( - () => - useDashboardContainer({ - getIncomingEmbeddable, - dashboardStateManager, - history, - }), - { - wrapper: ({ children }) => ( - {children} - ), - } - ); - - expect(result.current).toBeNull(); // null on initial render - - createEmbeddable(); - - await waitForNextUpdate(); - - expect(embeddable).toBe(result.current); - expect(destroySpy).not.toBeCalled(); - - unmount(); - - expect(destroySpy).toBeCalled(); -}); - -test('old container is destroyed on new dashboardStateManager', async () => { - const embeddableFactoryOld = setupEmbeddableFactory(); - - const { result, waitForNextUpdate, rerender } = renderHook< - DashboardStateManager, - DashboardContainer | null - >( - (dashboardStateManager) => - useDashboardContainer({ - getIncomingEmbeddable, - dashboardStateManager, - history, - }), - { - wrapper: ({ children }) => ( - {children} - ), - initialProps: createDashboardState(), - } - ); - - expect(result.current).toBeNull(); // null on initial render - - embeddableFactoryOld.createEmbeddable(); - - await waitForNextUpdate(); - - expect(embeddableFactoryOld.embeddable).toBe(result.current); - expect(embeddableFactoryOld.destroySpy).not.toBeCalled(); - - const embeddableFactoryNew = setupEmbeddableFactory(); - rerender(createDashboardState()); - - embeddableFactoryNew.createEmbeddable(); - - await waitForNextUpdate(); - - expect(embeddableFactoryNew.embeddable).toBe(result.current); - - expect(embeddableFactoryNew.destroySpy).not.toBeCalled(); - expect(embeddableFactoryOld.destroySpy).toBeCalled(); -}); - -test('destroyed if rerendered before resolved', async () => { - const embeddableFactoryOld = setupEmbeddableFactory(); - - const { result, waitForNextUpdate, rerender } = renderHook< - DashboardStateManager, - DashboardContainer | null - >( - (dashboardStateManager) => - useDashboardContainer({ - getIncomingEmbeddable, - dashboardStateManager, - history, - }), - { - wrapper: ({ children }) => ( - {children} - ), - initialProps: createDashboardState(), - } - ); - - expect(result.current).toBeNull(); // null on initial render - - const embeddableFactoryNew = setupEmbeddableFactory(); - rerender(createDashboardState()); - embeddableFactoryNew.createEmbeddable(); - await waitForNextUpdate(); - expect(embeddableFactoryNew.embeddable).toBe(result.current); - expect(embeddableFactoryNew.destroySpy).not.toBeCalled(); - - embeddableFactoryOld.createEmbeddable(); - - await act(() => Promise.resolve()); // Can't use waitFor from hooks, because there is no hook update - expect(embeddableFactoryNew.embeddable).toBe(result.current); - expect(embeddableFactoryNew.destroySpy).not.toBeCalled(); - expect(embeddableFactoryOld.destroySpy).toBeCalled(); -}); diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts deleted file mode 100644 index d715fb70ec91a..0000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_container.ts +++ /dev/null @@ -1,169 +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 { useEffect, useState } from 'react'; -import { History } from 'history'; - -import { useKibana } from '../../services/kibana_react'; -import { - ContainerOutput, - EmbeddableFactoryNotFoundError, - EmbeddableInput, - EmbeddablePackageState, - ErrorEmbeddable, - isErrorEmbeddable, - ViewMode, -} from '../../services/embeddable'; - -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getDashboardContainerInput, getSearchSessionIdFromURL } from '../dashboard_app_functions'; -import { DashboardContainer, DashboardContainerInput } from '../..'; -import { DashboardAppServices } from '../types'; -import { DASHBOARD_CONTAINER_TYPE } from '..'; -import { TimefilterContract } from '../../services/data'; - -export const useDashboardContainer = ({ - history, - timeFilter, - setUnsavedChanges, - getIncomingEmbeddable, - dashboardStateManager, - isEmbeddedExternally, -}: { - history: History; - isEmbeddedExternally?: boolean; - timeFilter?: TimefilterContract; - setUnsavedChanges?: (dirty: boolean) => void; - dashboardStateManager: DashboardStateManager | null; - getIncomingEmbeddable: (removeAfterFetch?: boolean) => EmbeddablePackageState | undefined; -}) => { - const { - dashboardCapabilities, - data, - embeddable, - scopedHistory, - } = useKibana().services; - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { query } = data; - const { session: searchSession } = data.search; - - const [dashboardContainer, setDashboardContainer] = useState(null); - - useEffect(() => { - if (!dashboardStateManager) { - return; - } - - // Load dashboard container - const dashboardFactory = embeddable.getEmbeddableFactory< - DashboardContainerInput, - ContainerOutput, - DashboardContainer - >(DASHBOARD_CONTAINER_TYPE); - - if (!dashboardFactory) { - throw new EmbeddableFactoryNotFoundError( - 'dashboard app requires dashboard embeddable factory' - ); - } - - const searchSessionIdFromURL = getSearchSessionIdFromURL(history); - - if (searchSessionIdFromURL) { - searchSession.restore(searchSessionIdFromURL); - } - - const incomingEmbeddable = getIncomingEmbeddable(true); - - let canceled = false; - let pendingContainer: DashboardContainer | ErrorEmbeddable | null | undefined; - (async function createContainer() { - const existingSession = searchSession.getSessionId(); - pendingContainer = await dashboardFactory.create( - getDashboardContainerInput({ - isEmbeddedExternally: Boolean(isEmbeddedExternally), - dashboardCapabilities, - dashboardStateManager, - incomingEmbeddable, - query, - searchSessionId: - searchSessionIdFromURL ?? - (existingSession && incomingEmbeddable ? existingSession : searchSession.start()), - }) - ); - - // already new container is being created - // no longer interested in the pending one - if (canceled) { - try { - pendingContainer?.destroy(); - pendingContainer = null; - } catch (e) { - // destroy could throw if something has already destroyed the container - // eslint-disable-next-line no-console - console.warn(e); - } - - return; - } - - if (!pendingContainer || isErrorEmbeddable(pendingContainer)) { - return; - } - - // inject switch view mode callback for the empty screen to use - pendingContainer.switchViewMode = (newViewMode: ViewMode) => - dashboardStateManager.switchViewMode(newViewMode); - - // If the incoming embeddable is newly created, or doesn't exist in the current panels list, - // add it with `addNewEmbeddable` - if ( - incomingEmbeddable && - (!incomingEmbeddable?.embeddableId || - (incomingEmbeddable.embeddableId && - !pendingContainer.getInput().panels[incomingEmbeddable.embeddableId])) - ) { - pendingContainer.addNewEmbeddable( - incomingEmbeddable.type, - incomingEmbeddable.input - ); - } - setDashboardContainer(pendingContainer); - setUnsavedChanges?.(dashboardStateManager.getIsDirty(data.query.timefilter.timefilter)); - })(); - return () => { - canceled = true; - try { - pendingContainer?.destroy(); - } catch (e) { - // destroy could throw if something has already destroyed the container - // eslint-disable-next-line no-console - console.warn(e); - } - - setDashboardContainer(null); - }; - }, [ - data.query.timefilter.timefilter, - dashboardCapabilities, - dashboardStateManager, - getIncomingEmbeddable, - isEmbeddedExternally, - setUnsavedChanges, - searchSession, - scopedHistory, - timeFilter, - embeddable, - history, - query, - ]); - - return dashboardContainer; -}; diff --git a/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts b/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts deleted file mode 100644 index 72b43723f07fb..0000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_dashboard_state_manager.ts +++ /dev/null @@ -1,220 +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 { useEffect, useState } from 'react'; -import { History } from 'history'; -import _ from 'lodash'; -import { map } from 'rxjs/operators'; - -import { createKbnUrlStateStorage, withNotifyOnErrors } from '../../services/kibana_utils'; -import { useKibana } from '../../services/kibana_react'; -import { - connectToQueryState, - esFilters, - noSearchSessionStorageCapabilityMessage, - QueryState, - syncQueryStateWithUrl, -} from '../../services/data'; -import { SavedObject } from '../../services/saved_objects'; -import type { TagDecoratedSavedObject } from '../../services/saved_objects_tagging_oss'; - -import { DashboardSavedObject } from '../../saved_dashboards'; -import { migrateLegacyQuery } from '../lib/migrate_legacy_query'; -import { createSessionRestorationDataProvider } from '../lib/session_restoration'; -import { DashboardStateManager } from '../dashboard_state_manager'; -import { getDashboardTitle } from '../../dashboard_strings'; -import { DashboardAppServices } from '../types'; -import { EmbeddablePackageState, ViewMode } from '../../services/embeddable'; - -// TS is picky with type guards, we can't just inline `() => false` -function defaultTaggingGuard(_obj: SavedObject): _obj is TagDecoratedSavedObject { - return false; -} - -interface DashboardStateManagerReturn { - dashboardStateManager: DashboardStateManager | null; - viewMode: ViewMode | null; - setViewMode: (value: ViewMode) => void; -} - -export const useDashboardStateManager = ( - savedDashboard: DashboardSavedObject | null, - history: History, - getIncomingEmbeddable: () => EmbeddablePackageState | undefined -): DashboardStateManagerReturn => { - const { - data: dataPlugin, - core, - uiSettings, - usageCollection, - initializerContext, - savedObjectsTagging, - dashboardCapabilities, - dashboardPanelStorage, - allowByValueEmbeddables, - } = useKibana().services; - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { query: queryService } = dataPlugin; - const { session: searchSession } = dataPlugin.search; - const { filterManager, queryString: queryStringManager } = queryService; - const { timefilter } = queryService.timefilter; - const { toasts } = core.notifications; - const { hideWriteControls } = dashboardCapabilities; - const { version: kibanaVersion } = initializerContext.env.packageInfo; - - const [dashboardStateManager, setDashboardStateManager] = useState( - null - ); - const [viewMode, setViewMode] = useState(null); - - const hasTaggingCapabilities = savedObjectsTagging?.ui.hasTagDecoration || defaultTaggingGuard; - - useEffect(() => { - if (!savedDashboard) { - return; - } - - const kbnUrlStateStorage = createKbnUrlStateStorage({ - history, - useHash: uiSettings.get('state:storeInSessionStorage'), - ...withNotifyOnErrors(toasts), - }); - - const stateManager = new DashboardStateManager({ - hasPendingEmbeddable: () => Boolean(getIncomingEmbeddable()), - toasts: core.notifications.toasts, - hasTaggingCapabilities, - dashboardPanelStorage, - hideWriteControls, - history, - kbnUrlStateStorage, - kibanaVersion, - savedDashboard, - usageCollection, - allowByValueEmbeddables, - }); - - // sync initial app filters from state to filterManager - // if there is an existing similar global filter, then leave it as global - filterManager.setAppFilters(_.cloneDeep(stateManager.appState.filters)); - queryStringManager.setQuery(migrateLegacyQuery(stateManager.appState.query)); - - // setup syncing of app filters between appState and filterManager - const stopSyncingAppFilters = connectToQueryState( - queryService, - { - set: ({ filters, query }) => { - stateManager.setFilters(filters || []); - stateManager.setQuery(query || queryStringManager.getDefaultQuery()); - }, - get: () => ({ - filters: stateManager.appState.filters, - query: stateManager.getQuery(), - }), - state$: stateManager.appState$.pipe( - map((appState) => ({ - filters: appState.filters, - query: queryStringManager.formatQuery(appState.query), - })) - ), - }, - { - filters: esFilters.FilterStateStore.APP_STATE, - query: true, - } - ); - - // Apply initial filters to Dashboard State Manager - stateManager.applyFilters( - stateManager.getQuery() || queryStringManager.getDefaultQuery(), - filterManager.getFilters() - ); - - // The hash check is so we only update the time filter on dashboard open, not during - // normal cross app navigation. - if (stateManager.getIsTimeSavedWithDashboard()) { - const initialGlobalStateInUrl = kbnUrlStateStorage.get('_g'); - if (!initialGlobalStateInUrl?.time) { - stateManager.syncTimefilterWithDashboardTime(timefilter); - } - if (!initialGlobalStateInUrl?.refreshInterval) { - stateManager.syncTimefilterWithDashboardRefreshInterval(timefilter); - } - } - - // starts syncing `_g` portion of url with query services - // it is important to start this syncing after `dashboardStateManager.syncTimefilterWithDashboard(timefilter);` above is run, - // otherwise it will case redundant browser history records - const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl( - queryService, - kbnUrlStateStorage - ); - - // starts syncing `_a` portion of url - stateManager.startStateSyncing(); - - const dashboardTitle = getDashboardTitle( - stateManager.getTitle(), - stateManager.getViewMode(), - stateManager.isNew() - ); - - searchSession.enableStorage( - createSessionRestorationDataProvider({ - data: dataPlugin, - getDashboardTitle: () => dashboardTitle, - getDashboardId: () => savedDashboard?.id || '', - getAppState: () => stateManager.getAppState(), - }), - { - isDisabled: () => - dashboardCapabilities.storeSearchSession - ? { disabled: false } - : { - disabled: true, - reasonText: noSearchSessionStorageCapabilityMessage, - }, - } - ); - - setDashboardStateManager(stateManager); - setViewMode(stateManager.getViewMode()); - - return () => { - stateManager?.destroy(); - setDashboardStateManager(null); - stopSyncingAppFilters(); - stopSyncingQueryServiceStateWithUrl(); - }; - }, [ - dataPlugin, - filterManager, - hasTaggingCapabilities, - initializerContext.config, - dashboardPanelStorage, - getIncomingEmbeddable, - hideWriteControls, - history, - kibanaVersion, - queryService, - queryStringManager, - savedDashboard, - searchSession, - timefilter, - toasts, - uiSettings, - usageCollection, - allowByValueEmbeddables, - core.notifications.toasts, - dashboardCapabilities.storeSearchSession, - ]); - - return { dashboardStateManager, viewMode, setViewMode }; -}; diff --git a/src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts b/src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts deleted file mode 100644 index 639bc830803a4..0000000000000 --- a/src/plugins/dashboard/public/application/hooks/use_saved_dashboard.ts +++ /dev/null @@ -1,66 +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 { useEffect, useState } from 'react'; -import { History } from 'history'; -import _ from 'lodash'; - -import { useKibana } from '../../services/kibana_react'; - -import { DashboardConstants } from '../..'; -import { DashboardSavedObject } from '../../saved_dashboards'; -import { getDashboard60Warning, getNewDashboardTitle } from '../../dashboard_strings'; -import { DashboardAppServices } from '../types'; - -export const useSavedDashboard = (savedDashboardId: string | undefined, history: History) => { - const { data, core, chrome, savedDashboards } = useKibana().services; - const [savedDashboard, setSavedDashboard] = useState(null); - - // Destructure and rename services; makes the Effect hook more specific, makes later - // abstraction of service dependencies easier. - const { indexPatterns } = data; - const { recentlyAccessed: recentlyAccessedPaths, docTitle } = chrome; - const { toasts } = core.notifications; - - useEffect(() => { - (async function loadSavedDashboard() { - if (savedDashboardId === 'create') { - history.replace({ - ...history.location, // preserve query, - pathname: DashboardConstants.CREATE_NEW_DASHBOARD_URL, - }); - - toasts.addWarning(getDashboard60Warning()); - return; - } - - await indexPatterns.ensureDefaultIndexPattern(); - - try { - const dashboard = (await savedDashboards.get(savedDashboardId)) as DashboardSavedObject; - docTitle.change(dashboard.title || getNewDashboardTitle()); - setSavedDashboard(dashboard); - } catch (error) { - // E.g. a corrupt or deleted dashboard - toasts.addDanger(error.message); - history.push(DashboardConstants.LANDING_PAGE_PATH); - } - })(); - return () => setSavedDashboard(null); - }, [ - toasts, - docTitle, - history, - indexPatterns, - recentlyAccessedPaths, - savedDashboardId, - savedDashboards, - ]); - - return savedDashboard; -}; diff --git a/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts b/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts new file mode 100644 index 0000000000000..cb8c5ac5745e4 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/build_dashboard_container.ts @@ -0,0 +1,160 @@ +/* + * Copyright 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 _ from 'lodash'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { DashboardContainer, DASHBOARD_CONTAINER_TYPE } from '../embeddable'; +import { + DashboardBuildContext, + DashboardState, + DashboardContainerInput, + DashboardAppServices, +} from '../../types'; +import { + enableDashboardSearchSessions, + getSearchSessionIdFromURL, + stateToDashboardContainerInput, +} from '.'; +import { + ContainerOutput, + EmbeddableFactoryNotFoundError, + EmbeddableInput, + EmbeddablePackageState, + ErrorEmbeddable, + isErrorEmbeddable, +} from '../../services/embeddable'; + +type BuildDashboardContainerProps = DashboardBuildContext & { + data: DashboardAppServices['data']; // the whole data service is required here because it is required by getUrlGeneratorState + savedDashboard: DashboardSavedObject; + initialDashboardState: DashboardState; + incomingEmbeddable?: EmbeddablePackageState; +}; + +/** + * Builds the dashboard container and manages initial search session + */ +export const buildDashboardContainer = async ({ + getLatestDashboardState, + initialDashboardState, + isEmbeddedExternally, + dashboardCapabilities, + incomingEmbeddable, + savedDashboard, + kibanaVersion, + embeddable, + history, + data, +}: BuildDashboardContainerProps) => { + const { + search: { session }, + } = data; + + // set up search session + enableDashboardSearchSessions({ + data, + kibanaVersion, + savedDashboard, + initialDashboardState, + getLatestDashboardState, + canStoreSearchSession: dashboardCapabilities.storeSearchSession, + }); + const searchSessionIdFromURL = getSearchSessionIdFromURL(history); + if (searchSessionIdFromURL) { + session.restore(searchSessionIdFromURL); + } + + const dashboardFactory = embeddable.getEmbeddableFactory< + DashboardContainerInput, + ContainerOutput, + DashboardContainer + >(DASHBOARD_CONTAINER_TYPE); + + if (!dashboardFactory) { + throw new EmbeddableFactoryNotFoundError('dashboard app requires dashboard embeddable factory'); + } + + /** + * Use an existing session instead of starting a new one if there is a session already, and dashboard is being created with an incoming + * embeddable. + */ + const existingSession = session.getSessionId(); + const searchSessionId = + searchSessionIdFromURL ?? + (existingSession && incomingEmbeddable ? existingSession : session.start()); + + // Build the initial input for the dashboard container based on the dashboard state. + const initialInput = stateToDashboardContainerInput({ + isEmbeddedExternally: Boolean(isEmbeddedExternally), + dashboardState: initialDashboardState, + dashboardCapabilities, + incomingEmbeddable, + query: data.query, + searchSessionId, + savedDashboard, + }); + + /** + * Handle the Incoming Embeddable Part 1: + * If the incoming embeddable already exists e.g. if it has been edited by value, the incoming state for that panel needs to replace the + * state for the matching panel already in the dashboard. This needs to happen BEFORE the dashboard container is built, so that the panel + * retains the same placement. + */ + if (incomingEmbeddable?.embeddableId && initialInput.panels[incomingEmbeddable.embeddableId]) { + const originalPanelState = initialInput.panels[incomingEmbeddable.embeddableId]; + initialInput.panels = { + ...initialInput.panels, + [incomingEmbeddable.embeddableId]: { + gridData: originalPanelState.gridData, + type: incomingEmbeddable.type, + explicitInput: { + ...originalPanelState.explicitInput, + ...incomingEmbeddable.input, + id: incomingEmbeddable.embeddableId, + }, + }, + }; + } + + const dashboardContainer = await dashboardFactory.create(initialInput); + if (!dashboardContainer || isErrorEmbeddable(dashboardContainer)) { + tryDestroyDashboardContainer(dashboardContainer); + return; + } + + /** + * Handle the Incoming Embeddable Part 2: + * If the incoming embeddable is new, we can add it to the container using `addNewEmbeddable` after the container is created + * this lets the container handle the placement of it (using the default placement algorithm "top left most open space") + */ + if ( + incomingEmbeddable && + (!incomingEmbeddable?.embeddableId || + (incomingEmbeddable.embeddableId && + !dashboardContainer.getInput().panels[incomingEmbeddable.embeddableId])) + ) { + dashboardContainer.addNewEmbeddable( + incomingEmbeddable.type, + incomingEmbeddable.input + ); + } + + return dashboardContainer; +}; + +export const tryDestroyDashboardContainer = ( + container: DashboardContainer | ErrorEmbeddable | undefined +) => { + try { + container?.destroy(); + } catch (e) { + // destroy could throw if something has already destroyed the container + // eslint-disable-next-line no-console + console.warn(e); + } +}; diff --git a/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts new file mode 100644 index 0000000000000..ee2ec2bb14fe4 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/convert_dashboard_state.ts @@ -0,0 +1,143 @@ +/* + * Copyright 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 _ from 'lodash'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { getTagsFromSavedDashboard, migrateAppState } from '.'; +import { EmbeddablePackageState, ViewMode } from '../../services/embeddable'; +import { + convertPanelStateToSavedDashboardPanel, + convertSavedDashboardPanelToPanelState, +} from '../../../common/embeddable/embeddable_saved_object_converters'; +import { + DashboardState, + RawDashboardState, + DashboardPanelMap, + SavedDashboardPanel, + DashboardAppServices, + DashboardContainerInput, + DashboardBuildContext, +} from '../../types'; + +interface SavedObjectToDashboardStateProps { + version: string; + hideWriteControls: boolean; + savedDashboard: DashboardSavedObject; + usageCollection: DashboardAppServices['usageCollection']; + savedObjectsTagging: DashboardAppServices['savedObjectsTagging']; +} + +interface StateToDashboardContainerInputProps { + searchSessionId?: string; + isEmbeddedExternally?: boolean; + dashboardState: DashboardState; + savedDashboard: DashboardSavedObject; + query: DashboardBuildContext['query']; + incomingEmbeddable?: EmbeddablePackageState; + dashboardCapabilities: DashboardBuildContext['dashboardCapabilities']; +} + +interface StateToRawDashboardStateProps { + version: string; + state: DashboardState; +} +/** + * Converts a dashboard saved object to a dashboard state by extracting raw state from the given Dashboard + * Saved Object migrating the panel states to the latest version, then converting each panel from a saved + * dashboard panel to a panel state. + */ +export const savedObjectToDashboardState = ({ + version, + hideWriteControls, + savedDashboard, + usageCollection, + savedObjectsTagging, +}: SavedObjectToDashboardStateProps): DashboardState => { + const rawState = migrateAppState( + { + fullScreenMode: false, + title: savedDashboard.title, + query: savedDashboard.getQuery(), + filters: savedDashboard.getFilters(), + timeRestore: savedDashboard.timeRestore, + description: savedDashboard.description || '', + tags: getTagsFromSavedDashboard(savedDashboard, savedObjectsTagging), + panels: savedDashboard.panelsJSON ? JSON.parse(savedDashboard.panelsJSON) : [], + viewMode: savedDashboard.id || hideWriteControls ? ViewMode.VIEW : ViewMode.EDIT, + options: savedDashboard.optionsJSON ? JSON.parse(savedDashboard.optionsJSON) : {}, + }, + version, + usageCollection + ); + + const panels: DashboardPanelMap = {}; + rawState.panels?.forEach((panel: SavedDashboardPanel) => { + panels[panel.panelIndex] = convertSavedDashboardPanelToPanelState(panel); + }); + return { ...rawState, panels }; +}; + +/** + * Converts a dashboard state object to dashboard container input + */ +export const stateToDashboardContainerInput = ({ + dashboardCapabilities, + isEmbeddedExternally, + query: queryService, + searchSessionId, + savedDashboard, + dashboardState, +}: StateToDashboardContainerInputProps): DashboardContainerInput => { + const { filterManager, timefilter: timefilterService } = queryService; + const { timefilter } = timefilterService; + + const { + expandedPanelId, + fullScreenMode, + description, + options, + viewMode, + panels, + query, + title, + } = dashboardState; + + return { + refreshConfig: timefilter.getRefreshInterval(), + filters: filterManager.getFilters(), + isFullScreenMode: fullScreenMode, + id: savedDashboard.id || '', + dashboardCapabilities, + isEmbeddedExternally, + ...(options || {}), + searchSessionId, + expandedPanelId, + description, + viewMode, + panels, + query, + title, + timeRange: { + ..._.cloneDeep(timefilter.getTime()), + }, + }; +}; + +/** + * Converts a given dashboard state object to raw dashboard state. This is useful for sharing, and session restoration, as + * they require panels to be formatted as an array. + */ +export const stateToRawDashboardState = ({ + version, + state, +}: StateToRawDashboardStateProps): RawDashboardState => { + const savedDashboardPanels = Object.values(state.panels).map((panel) => + convertPanelStateToSavedDashboardPanel(panel, version) + ); + return { ..._.omit(state, 'panels'), panels: savedDashboardPanels }; +}; diff --git a/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts b/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.ts deleted file mode 100644 index 02890f6aaa790..0000000000000 --- a/src/plugins/dashboard/public/application/lib/dashboard_panel_storage.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 { set } from '@elastic/safer-lodash-set'; -import { Storage } from '../../services/kibana_utils'; -import { NotificationsStart } from '../../services/core'; -import { panelStorageErrorStrings } from '../../dashboard_strings'; -import { SavedDashboardPanel } from '..'; - -export const DASHBOARD_PANELS_UNSAVED_ID = 'unsavedDashboard'; -const DASHBOARD_PANELS_SESSION_KEY = 'dashboardStateManagerPanels'; - -export class DashboardPanelStorage { - private sessionStorage: Storage; - - constructor(private toasts: NotificationsStart['toasts'], private activeSpaceId: string) { - this.sessionStorage = new Storage(sessionStorage); - } - - public clearPanels(id = DASHBOARD_PANELS_UNSAVED_ID) { - try { - const sessionStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY); - const sessionStorageForSpace = sessionStorage?.[this.activeSpaceId] || {}; - if (sessionStorageForSpace[id]) { - delete sessionStorageForSpace[id]; - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStorage); - } - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsClearError(e.message), - 'data-test-subj': 'dashboardPanelsClearFailure', - }); - } - } - - public getPanels(id = DASHBOARD_PANELS_UNSAVED_ID): SavedDashboardPanel[] | undefined { - try { - return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[id]; - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsGetError(e.message), - 'data-test-subj': 'dashboardPanelsGetFailure', - }); - } - } - - public setPanels(id = DASHBOARD_PANELS_UNSAVED_ID, newPanels: SavedDashboardPanel[]) { - try { - const sessionStoragePanels = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; - set(sessionStoragePanels, [this.activeSpaceId, id], newPanels); - this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStoragePanels); - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsSetError(e.message), - 'data-test-subj': 'dashboardPanelsSetFailure', - }); - } - } - - public getDashboardIdsWithUnsavedChanges() { - try { - return Object.keys( - this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] || {} - ); - } catch (e) { - this.toasts.addDanger({ - title: panelStorageErrorStrings.getPanelsGetError(e.message), - 'data-test-subj': 'dashboardPanelsGetFailure', - }); - return []; - } - } - - public dashboardHasUnsavedEdits(id = DASHBOARD_PANELS_UNSAVED_ID) { - return this.getDashboardIdsWithUnsavedChanges().indexOf(id) !== -1; - } -} diff --git a/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts new file mode 100644 index 0000000000000..7dd2b53a58155 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/dashboard_session_restoration.ts @@ -0,0 +1,131 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { History } from 'history'; +import { DashboardConstants } from '../..'; +import { DashboardState } from '../../types'; +import { getDashboardTitle } from '../../dashboard_strings'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { getQueryParams } from '../../services/kibana_utils'; +import { createQueryParamObservable } from '../../../../kibana_utils/public'; +import { DASHBOARD_APP_URL_GENERATOR, DashboardUrlGeneratorState } from '../../url_generator'; +import { + DataPublicPluginStart, + noSearchSessionStorageCapabilityMessage, +} from '../../services/data'; +import { stateToRawDashboardState } from './convert_dashboard_state'; + +export const getSearchSessionIdFromURL = (history: History): string | undefined => + getQueryParams(history.location)[DashboardConstants.SEARCH_SESSION_ID] as string | undefined; + +export const getSessionURLObservable = (history: History) => + createQueryParamObservable(history, DashboardConstants.SEARCH_SESSION_ID); + +export function createSessionRestorationDataProvider(deps: { + kibanaVersion: string; + data: DataPublicPluginStart; + getAppState: () => DashboardState; + getDashboardTitle: () => string; + getDashboardId: () => string; +}) { + return { + getName: async () => deps.getDashboardTitle(), + getUrlGeneratorData: async () => { + return { + urlGeneratorId: DASHBOARD_APP_URL_GENERATOR, + initialState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: false }), + restoreState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: true }), + }; + }, + }; +} + +/** + * Enables dashboard search sessions. + */ +export function enableDashboardSearchSessions({ + canStoreSearchSession, + initialDashboardState, + getLatestDashboardState, + savedDashboard, + kibanaVersion, + data, +}: { + kibanaVersion: string; + data: DataPublicPluginStart; + canStoreSearchSession: boolean; + savedDashboard: DashboardSavedObject; + initialDashboardState: DashboardState; + getLatestDashboardState: () => DashboardState; +}) { + const dashboardTitle = getDashboardTitle( + initialDashboardState.title, + initialDashboardState.viewMode, + !savedDashboard.id + ); + + data.search.session.enableStorage( + createSessionRestorationDataProvider({ + data, + kibanaVersion, + getDashboardTitle: () => dashboardTitle, + getDashboardId: () => savedDashboard?.id || '', + getAppState: getLatestDashboardState, + }), + { + isDisabled: () => + canStoreSearchSession + ? { disabled: false } + : { + disabled: true, + reasonText: noSearchSessionStorageCapabilityMessage, + }, + } + ); +} + +/** + * Fetches the state to store when a session is saved so that this dashboard can be recreated exactly + * as it was. + */ +function getUrlGeneratorState({ + data, + getAppState, + kibanaVersion, + getDashboardId, + shouldRestoreSearchSession, +}: { + kibanaVersion: string; + data: DataPublicPluginStart; + getAppState: () => DashboardState; + getDashboardId: () => string; + shouldRestoreSearchSession: boolean; +}): DashboardUrlGeneratorState { + const appState = stateToRawDashboardState({ state: getAppState(), version: kibanaVersion }); + const { filterManager, queryString } = data.query; + const { timefilter } = data.query.timefilter; + + return { + timeRange: shouldRestoreSearchSession ? timefilter.getAbsoluteTime() : timefilter.getTime(), + searchSessionId: shouldRestoreSearchSession ? data.search.session.getSessionId() : undefined, + panels: getDashboardId() ? undefined : appState.panels, + query: queryString.formatQuery(appState.query), + filters: filterManager.getFilters(), + savedQuery: appState.savedQuery, + dashboardId: getDashboardId(), + preserveSavedFilters: false, + viewMode: appState.viewMode, + useHash: false, + refreshInterval: shouldRestoreSearchSession + ? { + pause: true, // force pause refresh interval when restoring a session + value: 0, + } + : undefined, + }; +} diff --git a/src/plugins/dashboard/public/application/lib/dashboard_session_storage.ts b/src/plugins/dashboard/public/application/lib/dashboard_session_storage.ts new file mode 100644 index 0000000000000..7d0e60c0609a8 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/dashboard_session_storage.ts @@ -0,0 +1,91 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { set } from '@elastic/safer-lodash-set'; +import { Storage } from '../../services/kibana_utils'; +import { NotificationsStart } from '../../services/core'; +import { panelStorageErrorStrings } from '../../dashboard_strings'; +import { DashboardState } from '../../types'; + +export const DASHBOARD_PANELS_UNSAVED_ID = 'unsavedDashboard'; +const DASHBOARD_PANELS_SESSION_KEY = 'dashboardStateManagerPanels'; + +export class DashboardSessionStorage { + private sessionStorage: Storage; + + constructor(private toasts: NotificationsStart['toasts'], private activeSpaceId: string) { + this.sessionStorage = new Storage(sessionStorage); + } + + public clearState(id = DASHBOARD_PANELS_UNSAVED_ID) { + try { + const sessionStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY); + const sessionStorageForSpace = sessionStorage?.[this.activeSpaceId] || {}; + if (sessionStorageForSpace[id]) { + delete sessionStorageForSpace[id]; + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStorage); + } + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsClearError(e.message), + 'data-test-subj': 'dashboardPanelsClearFailure', + }); + } + } + + public getState(id = DASHBOARD_PANELS_UNSAVED_ID): Partial | undefined { + try { + return this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId]?.[id]; + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsGetError(e.message), + 'data-test-subj': 'dashboardPanelsGetFailure', + }); + } + } + + public setState(id = DASHBOARD_PANELS_UNSAVED_ID, newState: Partial) { + try { + const sessionStateStorage = this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY) || {}; + set(sessionStateStorage, [this.activeSpaceId, id], newState); + this.sessionStorage.set(DASHBOARD_PANELS_SESSION_KEY, sessionStateStorage); + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsSetError(e.message), + 'data-test-subj': 'dashboardPanelsSetFailure', + }); + } + } + + public getDashboardIdsWithUnsavedChanges() { + try { + const dashboardStatesInSpace = + this.sessionStorage.get(DASHBOARD_PANELS_SESSION_KEY)?.[this.activeSpaceId] || {}; + const dashboardsWithUnsavedChanges: string[] = []; + Object.keys(dashboardStatesInSpace).map((dashboardId) => { + if ( + Object.keys(dashboardStatesInSpace[dashboardId]).some( + (stateKey) => stateKey !== 'viewMode' + ) + ) + dashboardsWithUnsavedChanges.push(dashboardId); + }); + return dashboardsWithUnsavedChanges; + } catch (e) { + this.toasts.addDanger({ + title: panelStorageErrorStrings.getPanelsGetError(e.message), + 'data-test-subj': 'dashboardPanelsGetFailure', + }); + return []; + } + } + + public dashboardHasUnsavedEdits(id = DASHBOARD_PANELS_UNSAVED_ID) { + return this.getDashboardIdsWithUnsavedChanges().indexOf(id) !== -1; + } +} diff --git a/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts b/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts new file mode 100644 index 0000000000000..df2521044d1a3 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/dashboard_tagging.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DashboardSavedObject } from '../..'; +import { SavedObject } from '../../services/saved_objects'; +import { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss'; +import type { TagDecoratedSavedObject } from '../../services/saved_objects_tagging_oss'; + +// TS is picky with type guards, we can't just inline `() => false` +function defaultTaggingGuard(_obj: SavedObject): _obj is TagDecoratedSavedObject { + return false; +} + +export const getTagsFromSavedDashboard = ( + savedDashboard: DashboardSavedObject, + api?: SavedObjectsTaggingApi +) => { + const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard(api); + return hasTaggingCapabilities(savedDashboard) ? savedDashboard.getTags() : []; +}; + +export const getHasTaggingCapabilitiesGuard = (api?: SavedObjectsTaggingApi) => + api?.ui.hasTagDecoration || defaultTaggingGuard; diff --git a/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts new file mode 100644 index 0000000000000..b1abba44891fc --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/diff_dashboard_state.ts @@ -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 _ from 'lodash'; +import { DashboardPanelState } from '..'; +import { esFilters, Filter } from '../../services/data'; +import { + DashboardContainerInput, + DashboardOptions, + DashboardPanelMap, + DashboardState, +} from '../../types'; + +interface DashboardDiffCommon { + [key: string]: unknown; +} + +type DashboardDiffCommonFilters = DashboardDiffCommon & { filters: Filter[] }; + +export const diffDashboardContainerInput = ( + originalInput: DashboardContainerInput, + newInput: DashboardContainerInput +) => { + return commonDiffFilters( + (originalInput as unknown) as DashboardDiffCommonFilters, + (newInput as unknown) as DashboardDiffCommonFilters, + ['searchSessionId', 'lastReloadRequestTime'] + ); +}; + +export const diffDashboardState = ( + original: DashboardState, + newState: DashboardState +): Partial => { + const common = commonDiffFilters( + (original as unknown) as DashboardDiffCommonFilters, + (newState as unknown) as DashboardDiffCommonFilters, + ['viewMode', 'panels', 'options', 'savedQuery', 'expandedPanelId'], + true + ); + + return { + ...common, + ...(panelsAreEqual(original.panels, newState.panels) ? {} : { panels: newState.panels }), + ...(optionsAreEqual(original.options, newState.options) ? {} : { options: newState.options }), + }; +}; + +const optionsAreEqual = (optionsA: DashboardOptions, optionsB: DashboardOptions): boolean => { + const optionKeys = [...Object.keys(optionsA), ...Object.keys(optionsB)]; + for (const key of optionKeys) { + if ( + Boolean(((optionsA as unknown) as { [key: string]: boolean })[key]) !== + Boolean(((optionsB as unknown) as { [key: string]: boolean })[key]) + ) { + return false; + } + } + return true; +}; + +const panelsAreEqual = (panelsA: DashboardPanelMap, panelsB: DashboardPanelMap): boolean => { + const embeddableIdsA = Object.keys(panelsA); + const embeddableIdsB = Object.keys(panelsB); + if ( + embeddableIdsA.length !== embeddableIdsB.length || + _.xor(embeddableIdsA, embeddableIdsB).length > 0 + ) { + return false; + } + // embeddable ids are equal so let's compare individual panels. + for (const id of embeddableIdsA) { + if ( + Object.keys( + commonDiff( + (panelsA[id] as unknown) as DashboardDiffCommon, + (panelsB[id] as unknown) as DashboardDiffCommon, + ['panelRefName'] + ) + ).length > 0 + ) { + return false; + } + } + + return true; +}; + +const commonDiffFilters = ( + originalObj: DashboardDiffCommonFilters, + newObj: DashboardDiffCommonFilters, + omitKeys: string[], + ignorePinned?: boolean +): Partial => { + const filtersAreDifferent = () => + !esFilters.compareFilters( + originalObj.filters, + ignorePinned ? newObj.filters.filter((f) => !esFilters.isFilterPinned(f)) : newObj.filters, + esFilters.COMPARE_ALL_OPTIONS + ); + const otherDifferences = commonDiff(originalObj, newObj, [...omitKeys, 'filters']); + return _.cloneDeep({ + ...otherDifferences, + ...(filtersAreDifferent() ? { filters: newObj.filters } : {}), + }); +}; + +const commonDiff = ( + originalObj: DashboardDiffCommon, + newObj: DashboardDiffCommon, + omitKeys: string[] +) => { + const differences: Partial = {}; + const keys = [...Object.keys(originalObj), ...Object.keys(newObj)].filter( + (key) => !omitKeys.includes(key) + ); + keys.forEach((key) => { + if (key === undefined) return; + if (!_.isEqual(originalObj[key], newObj[key])) { + (differences as { [key: string]: unknown })[key] = newObj[key]; + } + }); + return differences; +}; diff --git a/src/plugins/dashboard/public/application/lib/filter_utils.ts b/src/plugins/dashboard/public/application/lib/filter_utils.ts index 83dd036285a51..51acc4676c543 100644 --- a/src/plugins/dashboard/public/application/lib/filter_utils.ts +++ b/src/plugins/dashboard/public/application/lib/filter_utils.ts @@ -8,59 +8,68 @@ import _ from 'lodash'; import moment, { Moment } from 'moment'; -import { Filter } from '../../services/data'; +import { Optional } from '@kbn/utility-types'; + +import { Filter, TimeRange } from '../../services/data'; + +type TimeRangeCompare = Optional; /** - * @typedef {Object} QueryFilter - * @property query_string {Object} - * @property query_string.query {String} + * Converts the time to a utc formatted string. If the time is not valid (e.g. it might be in a relative format like + * 'now-15m', then it just returns what it was passed). + * @param time {string|Moment} + * @returns the time represented in utc format, or if the time range was not able to be parsed into a moment + * object, it returns the same object it was given. */ - -export class FilterUtils { - /** - * Converts the time to a utc formatted string. If the time is not valid (e.g. it might be in a relative format like - * 'now-15m', then it just returns what it was passed). - * @param time {string|Moment} - * @returns the time represented in utc format, or if the time range was not able to be parsed into a moment - * object, it returns the same object it was given. - */ - public static convertTimeToUTCString(time?: string | Moment): undefined | string { - if (moment(time).isValid()) { - return moment(time).utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]'); - } else { - // If it's not a valid moment date, then it should be a string representing a relative time - // like 'now' or 'now-15m'. - return time as string; - } +export const convertTimeToUTCString = (time?: string | Moment): undefined | string => { + if (moment(time).isValid()) { + return moment(time).utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]'); + } else { + // If it's not a valid moment date, then it should be a string representing a relative time + // like 'now' or 'now-15m'. + return time as string; } +}; - /** - * Compares the two times, making sure they are in both compared in string format. Absolute times - * are sometimes stored as moment objects, but converted to strings when reloaded. Relative times are - * strings that are not convertible to moment objects. - * @param timeA {string|Moment} - * @param timeB {string|Moment} - * @returns {boolean} - */ - public static areTimesEqual(timeA?: string | Moment, timeB?: string | Moment) { - return this.convertTimeToUTCString(timeA) === this.convertTimeToUTCString(timeB); - } +export const areTimeRangesEqual = (rangeA: TimeRangeCompare, rangeB: TimeRangeCompare): boolean => { + return areTimesEqual(rangeA.from, rangeB.from) && areTimesEqual(rangeA.to, rangeB.to); +}; - /** - * Depending on how a dashboard is loaded, the filter object may contain a $$hashKey and $state that will throw - * off a filter comparison. This removes those variables. - * @param filters {Array.} - * @returns {Array.} - */ - public static cleanFiltersForComparison(filters: Filter[]) { - return _.map(filters, (filter) => { - const f: Partial = _.omit(filter, ['$$hashKey', '$state']); - if (f.meta) { - // f.meta.value is the value displayed in the filter bar. - // It may also be loaded differently and shouldn't be used in this comparison. - return _.omit(f.meta, ['value']); - } - return f; - }); - } -} +/** + * Compares the two times, making sure they are in both compared in string format. Absolute times + * are sometimes stored as moment objects, but converted to strings when reloaded. Relative times are + * strings that are not convertible to moment objects. + * @param timeA {string|Moment} + * @param timeB {string|Moment} + * @returns {boolean} + */ +export const areTimesEqual = (timeA?: string | Moment, timeB?: string | Moment) => { + return convertTimeToUTCString(timeA) === convertTimeToUTCString(timeB); +}; + +/** + * Depending on how a dashboard is loaded, the filter object may contain a $$hashKey and $state that will throw + * off a filter comparison. This removes those variables. + * @param filters {Array.} + * @returns {Array.} + */ +export const cleanFiltersForComparison = (filters: Filter[]) => { + return _.map(filters, (filter) => { + const f: Partial = _.omit(filter, ['$$hashKey', '$state']); + if (f.meta) { + // f.meta.value is the value displayed in the filter bar. + // It may also be loaded differently and shouldn't be used in this comparison. + return _.omit(f.meta, ['value']); + } + return f; + }); +}; + +export const cleanFiltersForSerialize = (filters: Filter[]): Filter[] => { + return filters.map((filter) => { + if (filter.meta.value) { + delete filter.meta.value; + } + return filter; + }); +}; diff --git a/src/plugins/dashboard/public/application/lib/get_app_state_defaults.ts b/src/plugins/dashboard/public/application/lib/get_app_state_defaults.ts deleted file mode 100644 index d8d335317c2b2..0000000000000 --- a/src/plugins/dashboard/public/application/lib/get_app_state_defaults.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 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 { SavedObjectTagDecoratorTypeGuard } from '../../services/saved_objects_tagging_oss'; -import { ViewMode } from '../../services/embeddable'; -import { DashboardSavedObject } from '../../saved_dashboards'; -import { DashboardAppStateDefaults } from '../../types'; - -export function getAppStateDefaults( - viewMode: ViewMode, - savedDashboard: DashboardSavedObject, - hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard -): DashboardAppStateDefaults { - return { - fullScreenMode: false, - title: savedDashboard.title, - description: savedDashboard.description || '', - tags: hasTaggingCapabilities(savedDashboard) ? savedDashboard.getTags() : [], - timeRestore: savedDashboard.timeRestore, - panels: savedDashboard.panelsJSON ? JSON.parse(savedDashboard.panelsJSON) : [], - options: savedDashboard.optionsJSON ? JSON.parse(savedDashboard.optionsJSON) : {}, - query: savedDashboard.getQuery(), - filters: savedDashboard.getFilters(), - viewMode, - }; -} diff --git a/src/plugins/dashboard/public/application/lib/index.ts b/src/plugins/dashboard/public/application/lib/index.ts index f457589c7588e..937c1d2a77c06 100644 --- a/src/plugins/dashboard/public/application/lib/index.ts +++ b/src/plugins/dashboard/public/application/lib/index.ts @@ -6,11 +6,28 @@ * Side Public License, v 1. */ +export * from './filter_utils'; +export { getDashboardIdFromUrl } from './url'; export { saveDashboard } from './save_dashboard'; -export { getAppStateDefaults } from './get_app_state_defaults'; export { migrateAppState } from './migrate_app_state'; -export { getDashboardIdFromUrl } from './url'; -export { createSessionRestorationDataProvider } from './session_restoration'; export { addHelpMenuToAppChrome } from './help_menu_util'; +export { getTagsFromSavedDashboard } from './dashboard_tagging'; +export { loadDashboardUrlState } from './load_dashboard_url_state'; +export { DashboardSessionStorage } from './dashboard_session_storage'; +export { loadSavedDashboardState } from './load_saved_dashboard_state'; export { attemptLoadDashboardByTitle } from './load_dashboard_by_title'; -export { DashboardPanelStorage } from './dashboard_panel_storage'; +export { syncDashboardFilterState } from './sync_dashboard_filter_state'; +export { syncDashboardIndexPatterns } from './sync_dashboard_index_patterns'; +export { syncDashboardContainerInput } from './sync_dashboard_container_input'; +export { diffDashboardContainerInput, diffDashboardState } from './diff_dashboard_state'; +export { buildDashboardContainer, tryDestroyDashboardContainer } from './build_dashboard_container'; +export { + stateToDashboardContainerInput, + savedObjectToDashboardState, +} from './convert_dashboard_state'; +export { + createSessionRestorationDataProvider, + enableDashboardSearchSessions, + getSearchSessionIdFromURL, + getSessionURLObservable, +} from './dashboard_session_restoration'; diff --git a/src/plugins/dashboard/public/application/lib/load_dashboard_url_state.ts b/src/plugins/dashboard/public/application/lib/load_dashboard_url_state.ts new file mode 100644 index 0000000000000..efff2ba6bc087 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/load_dashboard_url_state.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 _ from 'lodash'; + +import { migrateAppState } from '.'; +import { replaceUrlHashQuery } from '../../../../kibana_utils/public'; +import { DASHBOARD_STATE_STORAGE_KEY } from '../../dashboard_constants'; +import { convertSavedDashboardPanelToPanelState } from '../../../common/embeddable/embeddable_saved_object_converters'; +import { + DashboardBuildContext, + DashboardPanelMap, + DashboardState, + RawDashboardState, + SavedDashboardPanel, +} from '../../types'; +import { migrateLegacyQuery } from './migrate_legacy_query'; + +/** + * Loads any dashboard state from the URL, and removes the state from the URL. + */ +export const loadDashboardUrlState = ({ + kibanaVersion, + usageCollection, + kbnUrlStateStorage, +}: DashboardBuildContext): Partial => { + const rawAppStateInUrl = kbnUrlStateStorage.get(DASHBOARD_STATE_STORAGE_KEY); + if (!rawAppStateInUrl) return {}; + + const panelsMap: DashboardPanelMap = {}; + if (rawAppStateInUrl.panels && rawAppStateInUrl.panels.length > 0) { + const rawState = migrateAppState(rawAppStateInUrl, kibanaVersion, usageCollection); + rawState.panels?.forEach((panel: SavedDashboardPanel) => { + panelsMap[panel.panelIndex] = convertSavedDashboardPanelToPanelState(panel); + }); + } + + const migratedQuery = rawAppStateInUrl.query + ? migrateLegacyQuery(rawAppStateInUrl.query) + : undefined; + + // remove state from URL + kbnUrlStateStorage.kbnUrlControls.updateAsync((nextUrl) => { + if (nextUrl.includes(DASHBOARD_STATE_STORAGE_KEY)) { + return replaceUrlHashQuery(nextUrl, (query) => { + delete query[DASHBOARD_STATE_STORAGE_KEY]; + return query; + }); + } + return nextUrl; + }, true); + + return { + ..._.omit(rawAppStateInUrl, ['panels', 'query']), + ...(migratedQuery ? { query: migratedQuery } : {}), + ...(rawAppStateInUrl.panels ? { panels: panelsMap } : {}), + }; +}; diff --git a/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts b/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts new file mode 100644 index 0000000000000..9069173c15e8f --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/load_saved_dashboard_state.ts @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 _ from 'lodash'; + +import { savedObjectToDashboardState } from './convert_dashboard_state'; +import { DashboardState, DashboardBuildContext } from '../../types'; +import { DashboardConstants, DashboardSavedObject } from '../..'; +import { getDashboard60Warning } from '../../dashboard_strings'; +import { migrateLegacyQuery } from './migrate_legacy_query'; +import { cleanFiltersForSerialize } from './filter_utils'; +import { ViewMode } from '../../services/embeddable'; + +interface LoadSavedDashboardStateReturn { + savedDashboardState: DashboardState; + savedDashboard: DashboardSavedObject; +} + +/** + * Loads, migrates, and returns state from a dashboard saved object. + */ +export const loadSavedDashboardState = async ({ + query, + history, + notifications, + indexPatterns, + savedDashboards, + usageCollection, + savedDashboardId, + initializerContext, + savedObjectsTagging, + dashboardCapabilities, +}: DashboardBuildContext & { savedDashboardId?: string }): Promise< + LoadSavedDashboardStateReturn | undefined +> => { + const { hideWriteControls } = dashboardCapabilities; + const { queryString } = query; + + // BWC - remove for 8.0 + if (savedDashboardId === 'create') { + history.replace({ + ...history.location, // preserve query, + pathname: DashboardConstants.CREATE_NEW_DASHBOARD_URL, + }); + + notifications.toasts.addWarning(getDashboard60Warning()); + return; + } + await indexPatterns.ensureDefaultIndexPattern(); + let savedDashboard: DashboardSavedObject | undefined; + try { + savedDashboard = (await savedDashboards.get(savedDashboardId)) as DashboardSavedObject; + } catch (error) { + // E.g. a corrupt or deleted dashboard + notifications.toasts.addDanger(error.message); + history.push(DashboardConstants.LANDING_PAGE_PATH); + return; + } + if (!savedDashboard) return; + + const savedDashboardState = savedObjectToDashboardState({ + savedDashboard, + usageCollection, + hideWriteControls, + savedObjectsTagging, + version: initializerContext.env.packageInfo.version, + }); + + const isViewMode = hideWriteControls || Boolean(savedDashboard.id); + savedDashboardState.viewMode = isViewMode ? ViewMode.VIEW : ViewMode.EDIT; + savedDashboardState.filters = cleanFiltersForSerialize(savedDashboardState.filters); + savedDashboardState.query = migrateLegacyQuery( + savedDashboardState.query || queryString.getDefaultQuery() + ); + + return { savedDashboardState, savedDashboard }; +}; diff --git a/src/plugins/dashboard/public/application/lib/migrate_app_state.ts b/src/plugins/dashboard/public/application/lib/migrate_app_state.ts index 9f60b3b539e26..fb8ef1b9ba2da 100644 --- a/src/plugins/dashboard/public/application/lib/migrate_app_state.ts +++ b/src/plugins/dashboard/public/application/lib/migrate_app_state.ts @@ -11,7 +11,7 @@ import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; import { UsageCollectionSetup } from '../../services/usage_collection'; -import { DashboardAppState, SavedDashboardPanel } from '../../types'; +import { RawDashboardState, SavedDashboardPanel } from '../../types'; import { migratePanelsTo730, SavedDashboardPanelTo60, @@ -28,10 +28,10 @@ import { * Once we hit a major version, we can remove support for older style URLs and get rid of this logic. */ export function migrateAppState( - appState: { [key: string]: any } & DashboardAppState, + appState: { [key: string]: any } & RawDashboardState, kibanaVersion: string, usageCollection?: UsageCollectionSetup -): DashboardAppState { +): RawDashboardState { if (!appState.panels) { throw new Error( i18n.translate('dashboard.panel.invalidData', { diff --git a/src/plugins/dashboard/public/application/lib/save_dashboard.ts b/src/plugins/dashboard/public/application/lib/save_dashboard.ts index 684d8b4c5e8d8..960d7d9cc8687 100644 --- a/src/plugins/dashboard/public/application/lib/save_dashboard.ts +++ b/src/plugins/dashboard/public/application/lib/save_dashboard.ts @@ -6,40 +6,110 @@ * Side Public License, v 1. */ -import { TimefilterContract } from '../../services/data'; +import _ from 'lodash'; + +import { convertTimeToUTCString } from '.'; +import { NotificationsStart } from '../../services/core'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { DashboardRedirect, DashboardState } from '../../types'; import { SavedObjectSaveOpts } from '../../services/saved_objects'; -import { updateSavedDashboard } from './update_saved_dashboard'; -import { DashboardStateManager } from '../dashboard_state_manager'; +import { dashboardSaveToastStrings } from '../../dashboard_strings'; +import { getHasTaggingCapabilitiesGuard } from './dashboard_tagging'; +import { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss'; +import { RefreshInterval, TimefilterContract, esFilters } from '../../services/data'; +import { convertPanelStateToSavedDashboardPanel } from '../../../common/embeddable/embeddable_saved_object_converters'; +import { DashboardSessionStorage } from './dashboard_session_storage'; export type SavedDashboardSaveOpts = SavedObjectSaveOpts & { stayInEditMode?: boolean }; -/** - * Saves the dashboard. - * @param toJson A custom toJson function. Used because the previous code used - * the angularized toJson version, and it was unclear whether there was a reason not to use - * JSON.stringify - * @returns A promise that if resolved, will contain the id of the newly saved - * dashboard. - */ -export function saveDashboard( - toJson: (obj: any) => string, - timeFilter: TimefilterContract, - dashboardStateManager: DashboardStateManager, - saveOptions: SavedDashboardSaveOpts -): Promise { - const savedDashboard = dashboardStateManager.savedDashboard; - const appState = dashboardStateManager.appState; - const hasTaggingCapabilities = dashboardStateManager.hasTaggingCapabilities; - - updateSavedDashboard(savedDashboard, appState, timeFilter, hasTaggingCapabilities, toJson); - - return savedDashboard.save(saveOptions).then((id: string) => { - if (id) { - // reset state only when save() was successful - // e.g. save() could be interrupted if title is duplicated and not confirmed - dashboardStateManager.lastSavedDashboardFilters = dashboardStateManager.getFilterState(); - } - - return id; - }); +interface SaveDashboardProps { + version: string; + redirectTo: DashboardRedirect; + currentState: DashboardState; + timefilter: TimefilterContract; + saveOptions: SavedDashboardSaveOpts; + toasts: NotificationsStart['toasts']; + savedDashboard: DashboardSavedObject; + savedObjectsTagging?: SavedObjectsTaggingApi; + dashboardSessionStorage: DashboardSessionStorage; } + +export const saveDashboard = async ({ + toasts, + version, + redirectTo, + timefilter, + saveOptions, + currentState, + savedDashboard, + savedObjectsTagging, + dashboardSessionStorage, +}: SaveDashboardProps): Promise<{ id?: string; redirected?: boolean; error?: any }> => { + const lastDashboardId = savedDashboard.id; + const hasTaggingCapabilities = getHasTaggingCapabilitiesGuard(savedObjectsTagging); + + const { panels, title, tags, description, timeRestore, options } = currentState; + + const savedDashboardPanels = Object.values(panels).map((panel) => + convertPanelStateToSavedDashboardPanel(panel, version) + ); + + savedDashboard.title = title; + savedDashboard.description = description; + savedDashboard.timeRestore = timeRestore; + savedDashboard.optionsJSON = JSON.stringify(options); + savedDashboard.panelsJSON = JSON.stringify(savedDashboardPanels); + + if (hasTaggingCapabilities(savedDashboard)) { + savedDashboard.setTags(tags); + } + + const { from, to } = timefilter.getTime(); + savedDashboard.timeFrom = savedDashboard.timeRestore ? convertTimeToUTCString(from) : undefined; + savedDashboard.timeTo = savedDashboard.timeRestore ? convertTimeToUTCString(to) : undefined; + + const timeRestoreObj: RefreshInterval = _.pick(timefilter.getRefreshInterval(), [ + 'display', + 'pause', + 'section', + 'value', + ]) as RefreshInterval; + savedDashboard.refreshInterval = savedDashboard.timeRestore ? timeRestoreObj : undefined; + + // only save unpinned filters + const unpinnedFilters = savedDashboard + .getFilters() + .filter((filter) => !esFilters.isFilterPinned(filter)); + savedDashboard.searchSource.setField('filter', unpinnedFilters); + + try { + const newId = await savedDashboard.save(saveOptions); + if (newId) { + toasts.addSuccess({ + title: dashboardSaveToastStrings.getSuccessString(currentState.title), + 'data-test-subj': 'saveDashboardSuccess', + }); + + /** + * If the dashboard id has been changed, redirect to the new ID to keep the url param in sync. + */ + if (newId !== lastDashboardId) { + dashboardSessionStorage.clearState(lastDashboardId); + redirectTo({ + id: newId, + editMode: true, + useReplace: true, + destination: 'dashboard', + }); + return { redirected: true, id: newId }; + } + } + return { id: newId }; + } catch (error) { + toasts.addDanger({ + title: dashboardSaveToastStrings.getFailureString(currentState.title, error.message), + 'data-test-subj': 'saveDashboardFailure', + }); + return { error }; + } +}; diff --git a/src/plugins/dashboard/public/application/lib/session_restoration.test.ts b/src/plugins/dashboard/public/application/lib/session_restoration.test.ts index a6740d8647825..c836638747145 100644 --- a/src/plugins/dashboard/public/application/lib/session_restoration.test.ts +++ b/src/plugins/dashboard/public/application/lib/session_restoration.test.ts @@ -6,23 +6,24 @@ * Side Public License, v 1. */ -import { dataPluginMock } from '../../../../data/public/mocks'; -import { createSessionRestorationDataProvider } from './session_restoration'; -import { getAppStateDefaults } from './get_app_state_defaults'; import { getSavedDashboardMock } from '../test_helpers'; -import { SavedObjectTagDecoratorTypeGuard } from '../../../../saved_objects_tagging_oss/public'; -import { ViewMode } from '../../services/embeddable'; +import { dataPluginMock } from '../../../../data/public/mocks'; +import { createSessionRestorationDataProvider, savedObjectToDashboardState } from '.'; describe('createSessionRestorationDataProvider', () => { const mockDataPlugin = dataPluginMock.createStartContract(); + const version = '8.0.0'; const searchSessionInfoProvider = createSessionRestorationDataProvider({ + kibanaVersion: version, data: mockDataPlugin, getAppState: () => - getAppStateDefaults( - ViewMode.VIEW, - getSavedDashboardMock(), - ((() => false) as unknown) as SavedObjectTagDecoratorTypeGuard - ), + savedObjectToDashboardState({ + version, + hideWriteControls: false, + usageCollection: undefined, + savedObjectsTagging: undefined, + savedDashboard: getSavedDashboardMock(), + }), getDashboardTitle: () => 'Dashboard', getDashboardId: () => 'Id', }); diff --git a/src/plugins/dashboard/public/application/lib/session_restoration.ts b/src/plugins/dashboard/public/application/lib/session_restoration.ts deleted file mode 100644 index 231119eef8d2c..0000000000000 --- a/src/plugins/dashboard/public/application/lib/session_restoration.ts +++ /dev/null @@ -1,63 +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 { DASHBOARD_APP_URL_GENERATOR, DashboardUrlGeneratorState } from '../../url_generator'; -import { DataPublicPluginStart } from '../../services/data'; -import { DashboardAppState } from '../../types'; - -export function createSessionRestorationDataProvider(deps: { - data: DataPublicPluginStart; - getAppState: () => DashboardAppState; - getDashboardTitle: () => string; - getDashboardId: () => string; -}) { - return { - getName: async () => deps.getDashboardTitle(), - getUrlGeneratorData: async () => { - return { - urlGeneratorId: DASHBOARD_APP_URL_GENERATOR, - initialState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: false }), - restoreState: getUrlGeneratorState({ ...deps, shouldRestoreSearchSession: true }), - }; - }, - }; -} - -function getUrlGeneratorState({ - data, - getAppState, - getDashboardId, - shouldRestoreSearchSession, -}: { - data: DataPublicPluginStart; - getAppState: () => DashboardAppState; - getDashboardId: () => string; - shouldRestoreSearchSession: boolean; -}): DashboardUrlGeneratorState { - const appState = getAppState(); - return { - dashboardId: getDashboardId(), - timeRange: shouldRestoreSearchSession - ? data.query.timefilter.timefilter.getAbsoluteTime() - : data.query.timefilter.timefilter.getTime(), - filters: data.query.filterManager.getFilters(), - query: data.query.queryString.formatQuery(appState.query), - savedQuery: appState.savedQuery, - useHash: false, - preserveSavedFilters: false, - viewMode: appState.viewMode, - panels: getDashboardId() ? undefined : appState.panels, - searchSessionId: shouldRestoreSearchSession ? data.search.session.getSessionId() : undefined, - refreshInterval: shouldRestoreSearchSession - ? { - pause: true, // force pause refresh interval when restoring a session - value: 0, - } - : undefined, - }; -} diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts new file mode 100644 index 0000000000000..21010158dc46d --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_container_input.ts @@ -0,0 +1,201 @@ +/* + * Copyright 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 _ from 'lodash'; +import { Subscription } from 'rxjs'; +import { debounceTime, tap } from 'rxjs/operators'; + +import { DashboardContainer } from '../embeddable'; +import { esFilters, Filter, Query } from '../../services/data'; +import { DashboardConstants, DashboardSavedObject } from '../..'; +import { setExpandedPanelId, setFullScreenMode, setPanels, setQuery } from '../state'; +import { diffDashboardContainerInput } from './diff_dashboard_state'; +import { replaceUrlHashQuery } from '../../../../kibana_utils/public'; +import { DashboardBuildContext, DashboardContainerInput } from '../../types'; +import { + getSearchSessionIdFromURL, + getSessionURLObservable, + stateToDashboardContainerInput, +} from '.'; + +type SyncDashboardContainerCommon = DashboardBuildContext & { + dashboardContainer: DashboardContainer; + savedDashboard: DashboardSavedObject; +}; + +type ApplyStateChangesToContainerProps = SyncDashboardContainerCommon & { + force: boolean; +}; + +type ApplyContainerChangesToStateProps = SyncDashboardContainerCommon & { + applyFilters: (query: Query, filters: Filter[]) => void; +}; + +type SyncDashboardContainerProps = SyncDashboardContainerCommon & ApplyContainerChangesToStateProps; + +/** + * Sets up two way binding between dashboard container and redux state. + */ +export const syncDashboardContainerInput = ( + syncDashboardContainerProps: SyncDashboardContainerProps +) => { + const { + history, + dashboardContainer, + $onDashboardStateChange, + $triggerDashboardRefresh, + } = syncDashboardContainerProps; + const subscriptions = new Subscription(); + subscriptions.add( + dashboardContainer + .getInput$() + .subscribe(() => applyContainerChangesToState(syncDashboardContainerProps)) + ); + subscriptions.add($onDashboardStateChange.subscribe(() => $triggerDashboardRefresh.next())); + subscriptions.add( + getSessionURLObservable(history).subscribe(() => { + $triggerDashboardRefresh.next({ force: true }); + }) + ); + + let forceRefresh: boolean = false; + subscriptions.add( + $triggerDashboardRefresh + .pipe( + tap((trigger) => { + forceRefresh = forceRefresh || (trigger?.force ?? false); + }), + debounceTime(DashboardConstants.CHANGE_APPLY_DEBOUNCE) + ) + .subscribe(() => { + applyStateChangesToContainer({ ...syncDashboardContainerProps, force: forceRefresh }); + forceRefresh = false; + }) + ); + + return () => subscriptions.unsubscribe(); +}; + +export const applyContainerChangesToState = ({ + query, + applyFilters, + dashboardContainer, + getLatestDashboardState, + dispatchDashboardStateChange, +}: ApplyContainerChangesToStateProps) => { + const input = dashboardContainer.getInput(); + const latestState = getLatestDashboardState(); + if (Object.keys(latestState).length === 0) { + return; + } + const { filterManager } = query; + if ( + !esFilters.compareFilters( + input.filters, + filterManager.getFilters(), + esFilters.COMPARE_ALL_OPTIONS + ) + ) { + // Add filters modifies the object passed to it, hence the clone deep. + filterManager.addFilters(_.cloneDeep(input.filters)); + applyFilters(latestState.query, input.filters); + } + + if (!_.isEqual(input.panels, latestState.panels)) { + dispatchDashboardStateChange(setPanels(input.panels)); + } + + if (!_.isEqual(input.query, latestState.query)) { + dispatchDashboardStateChange(setQuery(input.query)); + } + + if (!_.isEqual(input.expandedPanelId, latestState.expandedPanelId)) { + dispatchDashboardStateChange(setExpandedPanelId(input.expandedPanelId)); + } + dispatchDashboardStateChange(setFullScreenMode(input.isFullScreenMode)); +}; + +export const applyStateChangesToContainer = ({ + force, + search, + history, + savedDashboard, + dashboardContainer, + kbnUrlStateStorage, + query: queryService, + isEmbeddedExternally, + dashboardCapabilities, + getLatestDashboardState, +}: ApplyStateChangesToContainerProps) => { + const latestState = getLatestDashboardState(); + if (Object.keys(latestState).length === 0) { + return; + } + const currentDashboardStateAsInput = stateToDashboardContainerInput({ + dashboardState: latestState, + isEmbeddedExternally, + dashboardCapabilities, + query: queryService, + savedDashboard, + }); + const differences = diffDashboardContainerInput( + dashboardContainer.getInput(), + currentDashboardStateAsInput + ); + if (force) { + differences.lastReloadRequestTime = Date.now(); + } + + if (Object.keys(differences).length !== 0) { + const shouldRefetch = Object.keys(differences).some( + (changeKey) => !noRefetchKeys.includes(changeKey as keyof DashboardContainerInput) + ); + + const newSearchSessionId: string | undefined = (() => { + // do not update session id if this is irrelevant state change to prevent excessive searches + if (!shouldRefetch) return; + + const sessionApi = search.session; + let searchSessionIdFromURL = getSearchSessionIdFromURL(history); + if (searchSessionIdFromURL) { + if (sessionApi.isRestore() && sessionApi.isCurrentSession(searchSessionIdFromURL)) { + // navigating away from a restored session + kbnUrlStateStorage.kbnUrlControls.updateAsync((nextUrl) => { + if (nextUrl.includes(DashboardConstants.SEARCH_SESSION_ID)) { + return replaceUrlHashQuery(nextUrl, (query) => { + delete query[DashboardConstants.SEARCH_SESSION_ID]; + return query; + }); + } + return nextUrl; + }); + searchSessionIdFromURL = undefined; + } else { + sessionApi.restore(searchSessionIdFromURL); + } + } + + return searchSessionIdFromURL ?? sessionApi.start(); + })(); + + dashboardContainer.updateInput({ + ...differences, + ...(newSearchSessionId && { searchSessionId: newSearchSessionId }), + }); + } +}; + +const noRefetchKeys: Readonly> = [ + 'title', + 'viewMode', + 'useMargins', + 'description', + 'expandedPanelId', + 'isFullScreenMode', + 'isEmbeddedExternally', +] as const; diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts new file mode 100644 index 0000000000000..2cfd7da6145ee --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_filter_state.ts @@ -0,0 +1,157 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 _ from 'lodash'; +import { merge } from 'rxjs'; +import { debounceTime, finalize, map, switchMap, tap } from 'rxjs/operators'; + +import { setQuery } from '../state'; +import { DashboardBuildContext, DashboardState } from '../../types'; +import { DashboardSavedObject } from '../../saved_dashboards'; +import { setFiltersAndQuery } from '../state/dashboard_state_slice'; +import { + syncQueryStateWithUrl, + connectToQueryState, + Filter, + Query, + waitUntilNextSessionCompletes$, + QueryState, +} from '../../services/data'; +import { cleanFiltersForSerialize } from '.'; + +type SyncDashboardFilterStateProps = DashboardBuildContext & { + initialDashboardState: DashboardState; + savedDashboard: DashboardSavedObject; +}; + +/** + * Applies initial state to the query service, and the saved dashboard search source, then + * Sets up syncing and subscriptions between the filter state from the Data plugin + * and the dashboard Redux store. + */ +export const syncDashboardFilterState = ({ + search, + savedDashboard, + kbnUrlStateStorage, + query: queryService, + initialDashboardState, + $checkForUnsavedChanges, + $onDashboardStateChange, + $triggerDashboardRefresh, + dispatchDashboardStateChange, +}: SyncDashboardFilterStateProps) => { + const { filterManager, queryString, timefilter } = queryService; + const { timefilter: timefilterService } = timefilter; + + // apply initial filters to the query service and to the saved dashboard + filterManager.setAppFilters(_.cloneDeep(initialDashboardState.filters)); + savedDashboard.searchSource.setField('filter', initialDashboardState.filters); + + // apply initial query to the query service and to the saved dashboard + queryString.setQuery(initialDashboardState.query); + savedDashboard.searchSource.setField('query', initialDashboardState.query); + + /** + * If a global time range is not set explicitly and the time range was saved with the dashboard, apply + * initial time range and refresh interval to the query service. + */ + if (initialDashboardState.timeRestore) { + const initialGlobalQueryState = kbnUrlStateStorage.get('_g'); + if (!initialGlobalQueryState?.time) { + if (savedDashboard.timeFrom && savedDashboard.timeTo) { + timefilterService.setTime({ + from: savedDashboard.timeFrom, + to: savedDashboard.timeTo, + }); + } + } + if (!initialGlobalQueryState?.refreshInterval) { + if (savedDashboard.refreshInterval) { + timefilterService.setRefreshInterval(savedDashboard.refreshInterval); + } + } + } + + // this callback will be used any time new filters and query need to be applied. + const applyFilters = (query: Query, filters: Filter[]) => { + savedDashboard.searchSource.setField('query', query); + savedDashboard.searchSource.setField('filter', filters); + dispatchDashboardStateChange(setQuery(query)); + }; + + // starts syncing `_g` portion of url with query services + const { stop: stopSyncingQueryServiceStateWithUrl } = syncQueryStateWithUrl( + queryService, + kbnUrlStateStorage + ); + + // starts syncing app filters between dashboard state and filterManager + const intermediateFilterState: { filters: Filter[]; query: Query } = { + query: initialDashboardState.query ?? queryString.getDefaultQuery(), + filters: initialDashboardState.filters ?? [], + }; + const stopSyncingAppFilters = connectToQueryState( + queryService, + { + get: () => intermediateFilterState, + set: ({ filters, query }) => { + intermediateFilterState.filters = cleanFiltersForSerialize(filters ?? []) || []; + intermediateFilterState.query = query || queryString.getDefaultQuery(); + dispatchDashboardStateChange(setFiltersAndQuery(intermediateFilterState)); + }, + state$: $onDashboardStateChange.pipe( + map((appState) => ({ + filters: appState.filters, + query: appState.query, + })) + ), + }, + { + query: true, + filters: true, + } + ); + + // apply filters when the filter manager changes + const filterManagerSubscription = merge(filterManager.getUpdates$(), queryString.getUpdates$()) + .pipe(debounceTime(100)) + .subscribe(() => applyFilters(queryString.getQuery(), filterManager.getFilters())); + + const timeRefreshSubscription = merge( + ...[timefilterService.getRefreshIntervalUpdate$(), timefilterService.getTimeUpdate$()] + ).subscribe(() => { + $triggerDashboardRefresh.next(); + + // manually check for unsaved changes here because the time range is not stored on the dashboardState, + // but it could trigger the unsaved changes badge. + $checkForUnsavedChanges.next(); + }); + + const forceRefreshSubscription = timefilterService + .getAutoRefreshFetch$() + .pipe( + tap(() => { + $triggerDashboardRefresh.next({ force: true }); + }), + switchMap((done) => + // best way on a dashboard to estimate that panels are updated is to rely on search session service state + waitUntilNextSessionCompletes$(search.session).pipe(finalize(done)) + ) + ) + .subscribe(); + + const stopSyncingDashboardFilterState = () => { + filterManagerSubscription.unsubscribe(); + forceRefreshSubscription.unsubscribe(); + timeRefreshSubscription.unsubscribe(); + stopSyncingQueryServiceStateWithUrl(); + stopSyncingAppFilters(); + }; + + return { applyFilters, stopSyncingDashboardFilterState }; +}; diff --git a/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts b/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts new file mode 100644 index 0000000000000..b2873febee0d8 --- /dev/null +++ b/src/plugins/dashboard/public/application/lib/sync_dashboard_index_patterns.ts @@ -0,0 +1,86 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { uniqBy } from 'lodash'; +import deepEqual from 'fast-deep-equal'; +import { merge, Observable, pipe } from 'rxjs'; +import { distinctUntilChanged, switchMap, startWith, filter, mapTo, map } from 'rxjs/operators'; + +import { DashboardContainer } from '..'; +import { isErrorEmbeddable } from '../../services/embeddable'; +import { IndexPattern, IndexPatternsContract } from '../../services/data'; + +interface SyncDashboardIndexPatternsProps { + dashboardContainer: DashboardContainer; + indexPatterns: IndexPatternsContract; + onUpdateIndexPatterns: (newIndexPatterns: IndexPattern[]) => void; +} + +export const syncDashboardIndexPatterns = ({ + dashboardContainer, + indexPatterns, + onUpdateIndexPatterns, +}: SyncDashboardIndexPatternsProps) => { + const updateIndexPatternsOperator = pipe( + filter((container: DashboardContainer) => !!container && !isErrorEmbeddable(container)), + map((container: DashboardContainer): IndexPattern[] => { + let panelIndexPatterns: IndexPattern[] = []; + Object.values(container.getChildIds()).forEach((id) => { + const embeddableInstance = container.getChild(id); + if (isErrorEmbeddable(embeddableInstance)) return; + const embeddableIndexPatterns = (embeddableInstance.getOutput() as any).indexPatterns; + if (!embeddableIndexPatterns) return; + panelIndexPatterns.push(...embeddableIndexPatterns); + }); + panelIndexPatterns = uniqBy(panelIndexPatterns, 'id'); + return panelIndexPatterns; + }), + distinctUntilChanged((a, b) => + deepEqual( + a.map((ip) => ip && ip.id), + b.map((ip) => ip && ip.id) + ) + ), + // using switchMap for previous task cancellation + switchMap((panelIndexPatterns: IndexPattern[]) => { + return new Observable((observer) => { + if (panelIndexPatterns && panelIndexPatterns.length > 0) { + if (observer.closed) return; + onUpdateIndexPatterns(panelIndexPatterns); + observer.complete(); + } else { + indexPatterns.getDefault().then((defaultIndexPattern) => { + if (observer.closed) return; + onUpdateIndexPatterns([defaultIndexPattern as IndexPattern]); + observer.complete(); + }); + } + }); + }) + ); + + return merge( + // output of dashboard container itself + dashboardContainer.getOutput$(), + // plus output of dashboard container children, + // children may change, so make sure we subscribe/unsubscribe with switchMap + dashboardContainer.getOutput$().pipe( + map(() => dashboardContainer!.getChildIds()), + distinctUntilChanged(deepEqual), + switchMap((newChildIds: string[]) => + merge(...newChildIds.map((childId) => dashboardContainer!.getChild(childId).getOutput$())) + ) + ) + ) + .pipe( + mapTo(dashboardContainer), + startWith(dashboardContainer), // to trigger initial index pattern update + updateIndexPatternsOperator + ) + .subscribe(); +}; diff --git a/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts b/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts deleted file mode 100644 index 286414ed30eac..0000000000000 --- a/src/plugins/dashboard/public/application/lib/update_saved_dashboard.ts +++ /dev/null @@ -1,52 +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 _ from 'lodash'; -import type { SavedObjectTagDecoratorTypeGuard } from '../../services/saved_objects_tagging_oss'; -import { RefreshInterval, TimefilterContract, esFilters } from '../../services/data'; -import { FilterUtils } from './filter_utils'; -import { DashboardSavedObject } from '../../saved_dashboards'; -import { DashboardAppState } from '../../types'; - -export function updateSavedDashboard( - savedDashboard: DashboardSavedObject, - appState: DashboardAppState, - timeFilter: TimefilterContract, - hasTaggingCapabilities: SavedObjectTagDecoratorTypeGuard, - toJson: (object: T) => string -) { - savedDashboard.title = appState.title; - savedDashboard.description = appState.description; - savedDashboard.timeRestore = appState.timeRestore; - savedDashboard.panelsJSON = toJson(appState.panels); - savedDashboard.optionsJSON = toJson(appState.options); - - if (hasTaggingCapabilities(savedDashboard)) { - savedDashboard.setTags(appState.tags); - } - - savedDashboard.timeFrom = savedDashboard.timeRestore - ? FilterUtils.convertTimeToUTCString(timeFilter.getTime().from) - : undefined; - savedDashboard.timeTo = savedDashboard.timeRestore - ? FilterUtils.convertTimeToUTCString(timeFilter.getTime().to) - : undefined; - const timeRestoreObj: RefreshInterval = _.pick(timeFilter.getRefreshInterval(), [ - 'display', - 'pause', - 'section', - 'value', - ]) as RefreshInterval; - savedDashboard.refreshInterval = savedDashboard.timeRestore ? timeRestoreObj : undefined; - - // save only unpinned filters - const unpinnedFilters = savedDashboard - .getFilters() - .filter((filter) => !esFilters.isFilterPinned(filter)); - savedDashboard.searchSource.setField('filter', unpinnedFilters); -} diff --git a/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx b/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx index 726d647abe212..e3f7b32ef8223 100644 --- a/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx +++ b/src/plugins/dashboard/public/application/listing/confirm_overlays.tsx @@ -19,13 +19,10 @@ import { EUI_MODAL_CANCEL_BUTTON, } from '@elastic/eui'; import React from 'react'; + import { OverlayStart } from '../../../../../core/public'; -import { - createConfirmStrings, - discardConfirmStrings, - leaveEditModeConfirmStrings, -} from '../../dashboard_strings'; import { toMountPoint } from '../../services/kibana_react'; +import { createConfirmStrings, discardConfirmStrings } from '../../dashboard_strings'; export type DiscardOrKeepSelection = 'cancel' | 'discard' | 'keep'; @@ -44,76 +41,6 @@ export const confirmDiscardUnsavedChanges = (overlays: OverlayStart, discardCall } }); -export const confirmDiscardOrKeepUnsavedChanges = ( - overlays: OverlayStart -): Promise => { - const titleId = 'confirmDiscardOrKeepTitle'; - const descriptionId = 'confirmDiscardOrKeepDescription'; - - return new Promise((resolve) => { - const session = overlays.openModal( - toMountPoint( - - session.close()}> -
- - -

{leaveEditModeConfirmStrings.getLeaveEditModeTitle()}

-
-
- - - -

{leaveEditModeConfirmStrings.getLeaveEditModeSubtitle()}

-
-
- - - session.close()} - > - {leaveEditModeConfirmStrings.getLeaveEditModeCancelButtonText()} - - { - session.close(); - resolve('discard'); - }} - > - {leaveEditModeConfirmStrings.getLeaveEditModeDiscardButtonText()} - - { - session.close(); - resolve('keep'); - }} - > - {leaveEditModeConfirmStrings.getLeaveEditModeKeepChangesText()} - - -
-
-
- ), - { - 'data-test-subj': 'dashboardDiscardConfirmModal', - maxWidth: 550, - } - ); - }); -}; - export const confirmCreateWithUnsaved = ( overlays: OverlayStart, startBlankCallback: () => void, diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx index 022c830b180b6..7602b2ed68b62 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.test.tsx @@ -6,80 +6,16 @@ * Side Public License, v 1. */ +import React from 'react'; import { mount } from 'enzyme'; -import { - IUiSettingsClient, - PluginInitializerContext, - ScopedHistory, - SimpleSavedObject, -} from '../../../../../core/public'; +import { I18nProvider } from '@kbn/i18n/react'; -import { SavedObjectLoader, SavedObjectLoaderFindOptions } from '../../services/saved_objects'; -import { IndexPatternsContract, SavedQueryService } from '../../services/data'; -import { NavigationPublicPluginStart } from '../../services/navigation'; +import { DashboardAppServices } from '../../types'; +import { SimpleSavedObject } from '../../../../../core/public'; import { KibanaContextProvider } from '../../services/kibana_react'; import { createKbnUrlStateStorage } from '../../services/kibana_utils'; - -import { savedObjectsPluginMock } from '../../../../saved_objects/public/mocks'; import { DashboardListing, DashboardListingProps } from './dashboard_listing'; -import { embeddablePluginMock } from '../../../../embeddable/public/mocks'; -import { visualizationsPluginMock } from '../../../../visualizations/public/mocks'; -import { DashboardAppServices, DashboardCapabilities } from '../types'; -import { dataPluginMock } from '../../../../data/public/mocks'; -import { chromeServiceMock, coreMock } from '../../../../../core/public/mocks'; -import { I18nProvider } from '@kbn/i18n/react'; -import React from 'react'; -import { UrlForwardingStart } from '../../../../url_forwarding/public'; -import { DashboardPanelStorage } from '../lib'; - -function makeDefaultServices(): DashboardAppServices { - const core = coreMock.createStart(); - const savedDashboards = {} as SavedObjectLoader; - savedDashboards.find = (search: string, sizeOrOptions: number | SavedObjectLoaderFindOptions) => { - const size = typeof sizeOrOptions === 'number' ? sizeOrOptions : sizeOrOptions.size ?? 10; - const hits = []; - for (let i = 0; i < size; i++) { - hits.push({ - id: `dashboard${i}`, - title: `dashboard${i} - ${search} - title`, - description: `dashboard${i} desc`, - }); - } - return Promise.resolve({ - total: size, - hits, - }); - }; - const dashboardPanelStorage = ({ - getDashboardIdsWithUnsavedChanges: jest - .fn() - .mockResolvedValue(['dashboardUnsavedOne', 'dashboardUnsavedTwo']), - } as unknown) as DashboardPanelStorage; - - return { - savedObjects: savedObjectsPluginMock.createStartContract(), - embeddable: embeddablePluginMock.createInstance().doStart(), - dashboardCapabilities: {} as DashboardCapabilities, - initializerContext: {} as PluginInitializerContext, - chrome: chromeServiceMock.createStartContract(), - navigation: {} as NavigationPublicPluginStart, - savedObjectsClient: core.savedObjects.client, - data: dataPluginMock.createStartContract(), - indexPatterns: {} as IndexPatternsContract, - scopedHistory: () => ({} as ScopedHistory), - savedQueryService: {} as SavedQueryService, - setHeaderActionMenu: (mountPoint) => {}, - urlForwarding: {} as UrlForwardingStart, - uiSettings: {} as IUiSettingsClient, - restorePreviousUrl: () => {}, - onAppLeave: (handler) => {}, - allowByValueEmbeddables: true, - dashboardPanelStorage, - savedDashboards, - core, - visualizations: visualizationsPluginMock.createStartContract(), - }; -} +import { makeDefaultServices } from '../test_helpers'; function makeDefaultProps(): DashboardListingProps { return { diff --git a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx index e2c11d614d797..eaa4746566002 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_listing.tsx @@ -10,7 +10,7 @@ import { FormattedMessage } from '@kbn/i18n/react'; import { EuiLink, EuiButton, EuiEmptyPrompt } from '@elastic/eui'; import React, { Fragment, useCallback, useEffect, useMemo, useState } from 'react'; import { attemptLoadDashboardByTitle } from '../lib'; -import { DashboardAppServices, DashboardRedirect } from '../types'; +import { DashboardAppServices, DashboardRedirect } from '../../types'; import { getDashboardBreadcrumb, dashboardListingTable } from '../../dashboard_strings'; import { ApplicationStart, SavedObjectsFindOptionsReference } from '../../../../../core/public'; import { syncQueryStateWithUrl } from '../../services/data'; @@ -43,13 +43,13 @@ export const DashboardListing = ({ savedObjectsClient, savedObjectsTagging, dashboardCapabilities, - dashboardPanelStorage, + dashboardSessionStorage, chrome: { setBreadcrumbs }, }, } = useKibana(); const [unsavedDashboardIds, setUnsavedDashboardIds] = useState( - dashboardPanelStorage.getDashboardIdsWithUnsavedChanges() + dashboardSessionStorage.getDashboardIdsWithUnsavedChanges() ); // Set breadcrumbs useEffect @@ -104,19 +104,19 @@ export const DashboardListing = ({ ); const createItem = useCallback(() => { - if (!dashboardPanelStorage.dashboardHasUnsavedEdits()) { + if (!dashboardSessionStorage.dashboardHasUnsavedEdits()) { redirectTo({ destination: 'dashboard' }); } else { confirmCreateWithUnsaved( core.overlays, () => { - dashboardPanelStorage.clearPanels(); + dashboardSessionStorage.clearState(); redirectTo({ destination: 'dashboard' }); }, () => redirectTo({ destination: 'dashboard' }) ); } - }, [dashboardPanelStorage, redirectTo, core.overlays]); + }, [dashboardSessionStorage, redirectTo, core.overlays]); const emptyPrompt = useMemo( () => getNoItemsMessage(hideWriteControls, core.application, createItem), @@ -145,11 +145,11 @@ export const DashboardListing = ({ const deleteItems = useCallback( (dashboards: Array<{ id: string }>) => { - dashboards.map((d) => dashboardPanelStorage.clearPanels(d.id)); - setUnsavedDashboardIds(dashboardPanelStorage.getDashboardIdsWithUnsavedChanges()); + dashboards.map((d) => dashboardSessionStorage.clearState(d.id)); + setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges()); return savedDashboards.delete(dashboards.map((d) => d.id)); }, - [savedDashboards, dashboardPanelStorage] + [savedDashboards, dashboardSessionStorage] ); const editItem = useCallback( @@ -196,7 +196,7 @@ export const DashboardListing = ({ redirectTo={redirectTo} unsavedDashboardIds={unsavedDashboardIds} refreshUnsavedDashboards={() => - setUnsavedDashboardIds(dashboardPanelStorage.getDashboardIdsWithUnsavedChanges()) + setUnsavedDashboardIds(dashboardSessionStorage.getDashboardIdsWithUnsavedChanges()) } /> diff --git a/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx b/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx index a649bf37dfae9..03f7b0e162229 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_no_match.tsx @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -import React, { useEffect } from 'react'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n/react'; +import React, { useEffect } from 'react'; import { EuiCallOut } from '@elastic/eui'; - +import { FormattedMessage } from '@kbn/i18n/react'; import { RouteComponentProps } from 'react-router-dom'; + import { useKibana, toMountPoint } from '../../services/kibana_react'; -import { DashboardAppServices } from '../types'; +import { DashboardAppServices } from '../../types'; import { DashboardConstants } from '../..'; let bannerId: string | undefined; diff --git a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx index 13688b4061be9..8f53c16749fe6 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.test.tsx @@ -11,14 +11,14 @@ import { findTestSubject } from '@elastic/eui/lib/test'; import { waitFor } from '@testing-library/react'; import { mount } from 'enzyme'; import React from 'react'; + import { DashboardSavedObject } from '../..'; -import { coreMock } from '../../../../../core/public/mocks'; -import { KibanaContextProvider } from '../../services/kibana_react'; +import { DashboardAppServices } from '../../types'; import { SavedObjectLoader } from '../../services/saved_objects'; -import { DashboardPanelStorage } from '../lib'; -import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_panel_storage'; -import { DashboardAppServices } from '../types'; +import { KibanaContextProvider } from '../../services/kibana_react'; +import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_session_storage'; import { DashboardUnsavedListing, DashboardUnsavedListingProps } from './dashboard_unsaved_listing'; +import { makeDefaultServices } from '../test_helpers'; const mockedDashboards: { [key: string]: DashboardSavedObject } = { dashboardUnsavedOne: { @@ -35,20 +35,16 @@ const mockedDashboards: { [key: string]: DashboardSavedObject } = { } as DashboardSavedObject, }; -function makeDefaultServices(): DashboardAppServices { - const core = coreMock.createStart(); - core.overlays.openConfirm = jest.fn().mockResolvedValue(true); +function makeServices(): DashboardAppServices { + const services = makeDefaultServices(); const savedDashboards = {} as SavedObjectLoader; savedDashboards.get = jest .fn() .mockImplementation((id: string) => Promise.resolve(mockedDashboards[id])); - const dashboardPanelStorage = {} as DashboardPanelStorage; - dashboardPanelStorage.clearPanels = jest.fn(); - return ({ - dashboardPanelStorage, + return { + ...services, savedDashboards, - core, - } as unknown) as DashboardAppServices; + }; } const makeDefaultProps = (): DashboardUnsavedListingProps => ({ @@ -64,7 +60,7 @@ function mountWith({ services?: DashboardAppServices; props?: DashboardUnsavedListingProps; }) { - const services = incomingServices ?? makeDefaultServices(); + const services = incomingServices ?? makeServices(); const props = incomingProps ?? makeDefaultProps(); const wrappingComponent: React.FC<{ children: React.ReactNode; @@ -140,14 +136,14 @@ describe('Unsaved listing', () => { waitFor(() => { component.update(); expect(services.core.overlays.openConfirm).toHaveBeenCalled(); - expect(services.dashboardPanelStorage.clearPanels).toHaveBeenCalledWith( + expect(services.dashboardSessionStorage.clearState).toHaveBeenCalledWith( 'dashboardUnsavedOne' ); }); }); it('removes unsaved changes from any dashboard which errors on fetch', async () => { - const services = makeDefaultServices(); + const services = makeServices(); const props = makeDefaultProps(); services.savedDashboards.get = jest.fn().mockImplementation((id: string) => { if (id === 'failCase1' || id === 'failCase2') { @@ -166,12 +162,12 @@ describe('Unsaved listing', () => { const { component } = mountWith({ services, props }); waitFor(() => { component.update(); - expect(services.dashboardPanelStorage.clearPanels).toHaveBeenCalledWith('failCase1'); - expect(services.dashboardPanelStorage.clearPanels).toHaveBeenCalledWith('failCase2'); + expect(services.dashboardSessionStorage.clearState).toHaveBeenCalledWith('failCase1'); + expect(services.dashboardSessionStorage.clearState).toHaveBeenCalledWith('failCase2'); // clearing panels from dashboard with errors should cause getDashboardIdsWithUnsavedChanges to be called again. expect( - services.dashboardPanelStorage.getDashboardIdsWithUnsavedChanges + services.dashboardSessionStorage.getDashboardIdsWithUnsavedChanges ).toHaveBeenCalledTimes(2); }); }); diff --git a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx index 66e8b2348490a..acff60d9bac3d 100644 --- a/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx +++ b/src/plugins/dashboard/public/application/listing/dashboard_unsaved_listing.tsx @@ -19,8 +19,8 @@ import React, { useCallback, useEffect, useState } from 'react'; import { DashboardSavedObject } from '../..'; import { dashboardUnsavedListingStrings, getNewDashboardTitle } from '../../dashboard_strings'; import { useKibana } from '../../services/kibana_react'; -import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_panel_storage'; -import { DashboardAppServices, DashboardRedirect } from '../types'; +import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_session_storage'; +import { DashboardAppServices, DashboardRedirect } from '../../types'; import { confirmDiscardUnsavedChanges } from './confirm_overlays'; const DashboardUnsavedItem = ({ @@ -115,7 +115,7 @@ export const DashboardUnsavedListing = ({ }: DashboardUnsavedListingProps) => { const { services: { - dashboardPanelStorage, + dashboardSessionStorage, savedDashboards, core: { overlays }, }, @@ -133,11 +133,11 @@ export const DashboardUnsavedListing = ({ const onDiscard = useCallback( (id?: string) => { confirmDiscardUnsavedChanges(overlays, () => { - dashboardPanelStorage.clearPanels(id); + dashboardSessionStorage.clearState(id); refreshUnsavedDashboards(); }); }, - [overlays, refreshUnsavedDashboards, dashboardPanelStorage] + [overlays, refreshUnsavedDashboards, dashboardSessionStorage] ); useEffect(() => { @@ -161,7 +161,7 @@ export const DashboardUnsavedListing = ({ const newItems = dashboards.reduce((map, dashboard) => { if (typeof dashboard === 'string') { hasError = true; - dashboardPanelStorage.clearPanels(dashboard); + dashboardSessionStorage.clearState(dashboard); return map; } return { @@ -178,7 +178,7 @@ export const DashboardUnsavedListing = ({ return () => { canceled = true; }; - }, [savedDashboards, dashboardPanelStorage, refreshUnsavedDashboards, unsavedDashboardIds]); + }, [savedDashboards, dashboardSessionStorage, refreshUnsavedDashboards, unsavedDashboardIds]); return unsavedDashboardIds.length === 0 ? null : ( <> diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_hooks.ts b/src/plugins/dashboard/public/application/state/dashboard_state_hooks.ts new file mode 100644 index 0000000000000..abc346d4bbaa3 --- /dev/null +++ b/src/plugins/dashboard/public/application/state/dashboard_state_hooks.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 { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; +import type { DashboardRootState, DashboardDispatch } from './dashboard_state_store'; + +export const useDashboardDispatch = () => useDispatch(); +export const useDashboardSelector: TypedUseSelectorHook = useSelector; diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts b/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts new file mode 100644 index 0000000000000..1acf806ae2f0d --- /dev/null +++ b/src/plugins/dashboard/public/application/state/dashboard_state_slice.ts @@ -0,0 +1,112 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { createSlice, PayloadAction } from '@reduxjs/toolkit'; + +import { Filter, Query } from '../../services/data'; +import { ViewMode } from '../../services/embeddable'; +import { DashboardOptions, DashboardPanelMap, DashboardState } from '../../types'; + +export const dashboardStateSlice = createSlice({ + name: 'dashboardState', + initialState: {} as DashboardState, + reducers: { + setDashboardState: (state, action: PayloadAction) => { + return action.payload; + }, + updateState: (state, action: PayloadAction>) => { + state = { ...state, ...action.payload }; + }, + setDashboardOptions: (state, action: PayloadAction) => { + state.options = action.payload; + }, + setStateFromSaveModal: ( + state, + action: PayloadAction<{ + title: string; + description: string; + tags?: string[]; + timeRestore: boolean; + }> + ) => { + state.title = action.payload.title; + state.description = action.payload.description; + state.timeRestore = action.payload.timeRestore; + if (action.payload.tags) { + state.tags = action.payload.tags; + } + }, + setUseMargins: (state, action: PayloadAction) => { + state.options.useMargins = action.payload; + }, + setSyncColors: (state, action: PayloadAction) => { + state.options.syncColors = action.payload; + }, + setHidePanelTitles: (state, action: PayloadAction) => { + state.options.hidePanelTitles = action.payload; + }, + setPanels: (state, action: PayloadAction) => { + state.panels = action.payload; + }, + setExpandedPanelId: (state, action: PayloadAction) => { + state.expandedPanelId = action.payload; + }, + setFullScreenMode: (state, action: PayloadAction) => { + state.fullScreenMode = action.payload; + }, + setSavedQueryId: (state, action: PayloadAction) => { + state.savedQuery = action.payload; + }, + setTimeRestore: (state, action: PayloadAction) => { + state.timeRestore = action.payload; + }, + setDescription: (state, action: PayloadAction) => { + state.description = action.payload; + }, + setViewMode: (state, action: PayloadAction) => { + state.viewMode = action.payload; + }, + setFiltersAndQuery: (state, action: PayloadAction<{ filters: Filter[]; query: Query }>) => { + state.filters = action.payload.filters; + state.query = action.payload.query; + }, + setFilters: (state, action: PayloadAction) => { + state.filters = action.payload; + }, + setTags: (state, action: PayloadAction) => { + state.tags = action.payload; + }, + setTitle: (state, action: PayloadAction) => { + state.description = action.payload; + }, + setQuery: (state, action: PayloadAction) => { + state.query = action.payload; + }, + }, +}); + +export const { + setStateFromSaveModal, + setDashboardOptions, + setExpandedPanelId, + setHidePanelTitles, + setFiltersAndQuery, + setDashboardState, + setFullScreenMode, + setSavedQueryId, + setDescription, + setTimeRestore, + setSyncColors, + setUseMargins, + setViewMode, + setFilters, + setPanels, + setTitle, + setQuery, + setTags, +} = dashboardStateSlice.actions; diff --git a/src/plugins/dashboard/public/application/state/dashboard_state_store.ts b/src/plugins/dashboard/public/application/state/dashboard_state_store.ts new file mode 100644 index 0000000000000..76bc2c2fb1c77 --- /dev/null +++ b/src/plugins/dashboard/public/application/state/dashboard_state_store.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { configureStore } from '@reduxjs/toolkit'; +import { dashboardStateSlice } from './dashboard_state_slice'; + +export const dashboardStateStore = configureStore({ + reducer: { dashboardStateReducer: dashboardStateSlice.reducer }, +}); + +export type DashboardRootState = ReturnType; +export type DashboardDispatch = typeof dashboardStateStore.dispatch; diff --git a/src/plugins/dashboard/public/application/state/index.ts b/src/plugins/dashboard/public/application/state/index.ts new file mode 100644 index 0000000000000..d394876173160 --- /dev/null +++ b/src/plugins/dashboard/public/application/state/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './dashboard_state_slice'; + +export { dashboardStateStore } from './dashboard_state_store'; +export { useDashboardDispatch, useDashboardSelector } from './dashboard_state_hooks'; diff --git a/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts b/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts index fb160568fa4f4..46be5b3b16d84 100644 --- a/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts +++ b/src/plugins/dashboard/public/application/test_helpers/get_sample_dashboard_input.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ +import { DashboardContainerInput } from '../..'; +import { DashboardPanelState } from '../embeddable'; import { ViewMode, EmbeddableInput } from '../../services/embeddable'; -import { DashboardContainerInput, DashboardPanelState } from '../embeddable'; export function getSampleDashboardInput( overrides?: Partial diff --git a/src/plugins/dashboard/public/application/test_helpers/index.ts b/src/plugins/dashboard/public/application/test_helpers/index.ts index d782fb67d039b..d26eadec8f1c9 100644 --- a/src/plugins/dashboard/public/application/test_helpers/index.ts +++ b/src/plugins/dashboard/public/application/test_helpers/index.ts @@ -8,3 +8,4 @@ export { getSampleDashboardInput, getSampleDashboardPanel } from './get_sample_dashboard_input'; export { getSavedDashboardMock } from './get_saved_dashboard_mock'; +export { makeDefaultServices } from './make_default_services'; diff --git a/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts b/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts new file mode 100644 index 0000000000000..41da74dbba778 --- /dev/null +++ b/src/plugins/dashboard/public/application/test_helpers/make_default_services.ts @@ -0,0 +1,97 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DashboardSessionStorage } from '../lib'; +import { dataPluginMock } from '../../../../data/public/mocks'; +import { getSavedDashboardMock } from './get_saved_dashboard_mock'; +import { UrlForwardingStart } from '../../../../url_forwarding/public'; +import { NavigationPublicPluginStart } from '../../services/navigation'; +import { DashboardAppServices, DashboardAppCapabilities } from '../../types'; +import { embeddablePluginMock } from '../../../../embeddable/public/mocks'; +import { IndexPatternsContract, SavedQueryService } from '../../services/data'; +import { savedObjectsPluginMock } from '../../../../saved_objects/public/mocks'; +import { visualizationsPluginMock } from '../../../../visualizations/public/mocks'; +import { PluginInitializerContext, ScopedHistory } from '../../../../../core/public'; +import { SavedObjectLoader, SavedObjectLoaderFindOptions } from '../../services/saved_objects'; +import { + chromeServiceMock, + coreMock, + uiSettingsServiceMock, +} from '../../../../../core/public/mocks'; + +export function makeDefaultServices(): DashboardAppServices { + const core = coreMock.createStart(); + core.overlays.openConfirm = jest.fn().mockResolvedValue(true); + + const savedDashboards = {} as SavedObjectLoader; + savedDashboards.find = (search: string, sizeOrOptions: number | SavedObjectLoaderFindOptions) => { + const size = typeof sizeOrOptions === 'number' ? sizeOrOptions : sizeOrOptions.size ?? 10; + const hits = []; + for (let i = 0; i < size; i++) { + hits.push({ + id: `dashboard${i}`, + title: `dashboard${i} - ${search} - title`, + description: `dashboard${i} desc`, + }); + } + return Promise.resolve({ + total: size, + hits, + }); + }; + savedDashboards.get = jest + .fn() + .mockImplementation((id?: string) => Promise.resolve(getSavedDashboardMock({ id }))); + + const dashboardSessionStorage = ({ + getDashboardIdsWithUnsavedChanges: jest + .fn() + .mockResolvedValue(['dashboardUnsavedOne', 'dashboardUnsavedTwo']), + getState: jest.fn().mockReturnValue(undefined), + setState: jest.fn(), + } as unknown) as DashboardSessionStorage; + dashboardSessionStorage.clearState = jest.fn(); + + const defaultCapabilities: DashboardAppCapabilities = { + show: true, + createNew: true, + saveQuery: true, + createShortUrl: true, + hideWriteControls: false, + storeSearchSession: true, + mapsCapabilities: { save: true }, + visualizeCapabilities: { save: true }, + }; + const initializerContext = { + env: { packageInfo: { version: '8.0.0' } }, + } as PluginInitializerContext; + + return { + visualizations: visualizationsPluginMock.createStartContract(), + savedObjects: savedObjectsPluginMock.createStartContract(), + embeddable: embeddablePluginMock.createInstance().doStart(), + uiSettings: uiSettingsServiceMock.createStartContract(), + chrome: chromeServiceMock.createStartContract(), + navigation: {} as NavigationPublicPluginStart, + savedObjectsClient: core.savedObjects.client, + dashboardCapabilities: defaultCapabilities, + data: dataPluginMock.createStartContract(), + indexPatterns: {} as IndexPatternsContract, + savedQueryService: {} as SavedQueryService, + scopedHistory: () => ({} as ScopedHistory), + setHeaderActionMenu: (mountPoint) => {}, + urlForwarding: {} as UrlForwardingStart, + allowByValueEmbeddables: true, + restorePreviousUrl: () => {}, + onAppLeave: (handler) => {}, + dashboardSessionStorage, + initializerContext, + savedDashboards, + core, + }; +} diff --git a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx index e1a62fe980f55..1cfa39d5e0e79 100644 --- a/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx +++ b/src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx @@ -7,92 +7,94 @@ */ import { METRIC_TYPE } from '@kbn/analytics'; +import { Required } from '@kbn/utility-types'; import { EuiHorizontalRule } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import angular from 'angular'; +import UseUnmount from 'react-use/lib/useUnmount'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import UseUnmount from 'react-use/lib/useUnmount'; +import { saveDashboard } from '../lib'; +import { TopNavIds } from './top_nav_ids'; +import { EditorMenu } from './editor_menu'; import { UI_SETTINGS } from '../../../common'; +import { SavedQuery } from '../../services/data'; +import { DashboardSaveModal } from './save_modal'; +import { showCloneModal } from './show_clone_modal'; +import { ShowShareModal } from './show_share_modal'; +import { getTopNavConfig } from './get_top_nav_config'; +import { OverlayRef } from '../../../../../core/public'; +import { useKibana } from '../../services/kibana_react'; +import { showOptionsPopover } from './show_options_popover'; +import { DashboardConstants } from '../../dashboard_constants'; +import { TopNavMenuProps } from '../../../../navigation/public'; +import { confirmDiscardUnsavedChanges } from '../listing/confirm_overlays'; import { BaseVisType, VisTypeAlias } from '../../../../visualizations/public'; +import { DashboardAppState, DashboardSaveOptions, NavAction } from '../../types'; +import { isErrorEmbeddable, openAddPanelFlyout, ViewMode } from '../../services/embeddable'; +import { DashboardAppServices, DashboardEmbedSettings, DashboardRedirect } from '../../types'; +import { getSavedObjectFinder, SaveResult, showSaveModal } from '../../services/saved_objects'; +import { getCreateVisualizationButtonTitle, unsavedChangesBadge } from '../../dashboard_strings'; +import { + setFullScreenMode, + setHidePanelTitles, + setSavedQueryId, + setStateFromSaveModal, + setSyncColors, + setUseMargins, + setViewMode, + useDashboardDispatch, + useDashboardSelector, +} from '../state'; + import { AddFromLibraryButton, + LazyLabsFlyout, PrimaryActionButton, QuickButtonGroup, - SolutionToolbar, QuickButtonProps, + SolutionToolbar, + withSuspense, } from '../../../../presentation_util/public'; -import { useKibana } from '../../services/kibana_react'; -import { IndexPattern, SavedQuery, TimefilterContract } from '../../services/data'; -import { isErrorEmbeddable, openAddPanelFlyout, ViewMode } from '../../services/embeddable'; -import { - getSavedObjectFinder, - SavedObjectSaveOpts, - SaveResult, - showSaveModal, -} from '../../services/saved_objects'; -import { LazyLabsFlyout, withSuspense } from '../../../../presentation_util/public'; - -import { NavAction } from '../../types'; -import { DashboardSavedObject } from '../..'; -import { DashboardStateManager } from '../dashboard_state_manager'; -import { saveDashboard } from '../lib'; -import { - DashboardAppServices, - DashboardEmbedSettings, - DashboardRedirect, - DashboardSaveOptions, -} from '../types'; -import { getTopNavConfig } from './get_top_nav_config'; -import { DashboardSaveModal } from './save_modal'; -import { showCloneModal } from './show_clone_modal'; -import { showOptionsPopover } from './show_options_popover'; -import { TopNavIds } from './top_nav_ids'; -import { ShowShareModal } from './show_share_modal'; -import { confirmDiscardOrKeepUnsavedChanges } from '../listing/confirm_overlays'; -import { OverlayRef } from '../../../../../core/public'; -import { DashboardConstants } from '../../dashboard_constants'; -import { getNewDashboardTitle, unsavedChangesBadge } from '../../dashboard_strings'; -import { DASHBOARD_PANELS_UNSAVED_ID } from '../lib/dashboard_panel_storage'; -import { DashboardContainer } from '..'; -import { EditorMenu } from './editor_menu'; export interface DashboardTopNavState { chromeIsVisible: boolean; addPanelOverlay?: OverlayRef; savedQuery?: SavedQuery; + isSaveInProgress?: boolean; } +type CompleteDashboardAppState = Required< + DashboardAppState, + | 'getLatestDashboardState' + | 'dashboardContainer' + | 'savedDashboard' + | 'indexPatterns' + | 'applyFilters' +>; + +export const isCompleteDashboardAppState = ( + state: DashboardAppState +): state is CompleteDashboardAppState => { + return ( + Boolean(state.getLatestDashboardState) && + Boolean(state.dashboardContainer) && + Boolean(state.savedDashboard) && + Boolean(state.indexPatterns) && + Boolean(state.applyFilters) + ); +}; + export interface DashboardTopNavProps { - onQuerySubmit: (_payload: unknown, isUpdate: boolean | undefined) => void; - dashboardStateManager: DashboardStateManager; - dashboardContainer: DashboardContainer; + dashboardAppState: CompleteDashboardAppState; embedSettings?: DashboardEmbedSettings; - savedDashboard: DashboardSavedObject; - timefilter: TimefilterContract; - indexPatterns: IndexPattern[]; redirectTo: DashboardRedirect; - unsavedChanges: boolean; - clearUnsavedChanges: () => void; - lastDashboardId?: string; - viewMode: ViewMode; } -const Flyout = withSuspense(LazyLabsFlyout, null); +const LabsFlyout = withSuspense(LazyLabsFlyout, null); export function DashboardTopNav({ - dashboardStateManager, - clearUnsavedChanges, - dashboardContainer, - lastDashboardId, - unsavedChanges, - savedDashboard, - onQuerySubmit, + dashboardAppState, embedSettings, - indexPatterns, redirectTo, - timefilter, - viewMode, }: DashboardTopNavProps) { const { core, @@ -102,17 +104,24 @@ export function DashboardTopNav({ embeddable, navigation, uiSettings, - setHeaderActionMenu, + visualizations, + usageCollection, + initializerContext, savedObjectsTagging, + setHeaderActionMenu, dashboardCapabilities, - dashboardPanelStorage, + dashboardSessionStorage, allowByValueEmbeddables, - visualizations, - usageCollection, } = useKibana().services; + const { version: kibanaVersion } = initializerContext.env.packageInfo; + const timefilter = data.query.timefilter.timefilter; + const toasts = core.notifications.toasts; + + const dispatchDashboardStateChange = useDashboardDispatch(); + const dashboardState = useDashboardSelector((state) => state.dashboardStateReducer); + const [mounted, setMounted] = useState(true); const [state, setState] = useState({ chromeIsVisible: false }); - const [isSaveInProgress, setIsSaveInProgress] = useState(false); const [isLabsShown, setIsLabsShown] = useState(false); const lensAlias = visualizations.getAliases().find(({ name }) => name === 'lens'); @@ -130,25 +139,25 @@ export function DashboardTopNav({ const visibleSubscription = chrome.getIsVisible$().subscribe((chromeIsVisible) => { setState((s) => ({ ...s, chromeIsVisible })); }); - const { id, title, getFullEditPath } = savedDashboard; - if (id || allowByValueEmbeddables) { + const { id, title, getFullEditPath } = dashboardAppState.savedDashboard; + if (id && title) { chrome.recentlyAccessed.add( - getFullEditPath(dashboardStateManager.getIsEditMode()), - title || getNewDashboardTitle(), - id || DASHBOARD_PANELS_UNSAVED_ID + getFullEditPath(dashboardState.viewMode === ViewMode.EDIT), + title, + id ); } return () => { visibleSubscription.unsubscribe(); }; - }, [chrome, allowByValueEmbeddables, dashboardStateManager, savedDashboard]); + }, [chrome, allowByValueEmbeddables, dashboardState.viewMode, dashboardAppState.savedDashboard]); const addFromLibrary = useCallback(() => { - if (!isErrorEmbeddable(dashboardContainer)) { + if (!isErrorEmbeddable(dashboardAppState.dashboardContainer)) { setState((s) => ({ ...s, addPanelOverlay: openAddPanelFlyout({ - embeddable: dashboardContainer, + embeddable: dashboardAppState.dashboardContainer, getAllFactories: embeddable.getEmbeddableFactories, getFactory: embeddable.getEmbeddableFactory, notifications: core.notifications, @@ -158,9 +167,9 @@ export function DashboardTopNav({ })); } }, [ + dashboardAppState.dashboardContainer, embeddable.getEmbeddableFactories, embeddable.getEmbeddableFactory, - dashboardContainer, core.notifications, core.savedObjects, core.overlays, @@ -209,291 +218,220 @@ export function DashboardTopNav({ const onChangeViewMode = useCallback( (newMode: ViewMode) => { clearAddPanel(); - const isPageRefresh = newMode === dashboardStateManager.getViewMode(); - const isLeavingEditMode = !isPageRefresh && newMode === ViewMode.VIEW; - const willLoseChanges = isLeavingEditMode && dashboardStateManager.getIsDirty(timefilter); - - function switchViewMode() { - dashboardStateManager.switchViewMode(newMode); - - if (savedDashboard?.id && allowByValueEmbeddables) { - const { getFullEditPath, title, id } = savedDashboard; - chrome.recentlyAccessed.add(getFullEditPath(newMode === ViewMode.EDIT), title, id); - } - } + const willLoseChanges = newMode === ViewMode.VIEW && dashboardAppState.hasUnsavedChanges; if (!willLoseChanges) { - switchViewMode(); + dispatchDashboardStateChange(setViewMode(newMode)); return; } - function discardChanges() { - dashboardStateManager.resetState(); - dashboardStateManager.clearUnsavedPanels(); - - // We need to do a hard reset of the timepicker. appState will not reload like - // it does on 'open' because it's been saved to the url and the getAppState.previouslyStored() check on - // reload will cause it not to sync. - if (dashboardStateManager.getIsTimeSavedWithDashboard()) { - dashboardStateManager.syncTimefilterWithDashboardTime(timefilter); - dashboardStateManager.syncTimefilterWithDashboardRefreshInterval(timefilter); - } - dashboardStateManager.switchViewMode(ViewMode.VIEW); - } - confirmDiscardOrKeepUnsavedChanges(core.overlays).then((selection) => { - if (selection === 'discard') { - discardChanges(); - } - if (selection !== 'cancel') { - switchViewMode(); - } - }); - }, - [ - timefilter, - core.overlays, - clearAddPanel, - savedDashboard, - dashboardStateManager, - allowByValueEmbeddables, - chrome.recentlyAccessed, - ] - ); - - /** - * Saves the dashboard. - * - * @param {object} [saveOptions={}] - * @property {boolean} [saveOptions.confirmOverwrite=false] - If true, attempts to create the source so it - * can confirm an overwrite if a document with the id already exists. - * @property {boolean} [saveOptions.isTitleDuplicateConfirmed=false] - If true, save allowed with duplicate title - * @property {func} [saveOptions.onTitleDuplicate] - function called if duplicate title exists. - * When not provided, confirm modal will be displayed asking user to confirm or cancel save. - * @return {Promise} - * @resolved {String} - The id of the doc - */ - const save = useCallback( - async (saveOptions: SavedObjectSaveOpts) => { - setIsSaveInProgress(true); - return saveDashboard(angular.toJson, timefilter, dashboardStateManager, saveOptions) - .then(function (id) { - if (id) { - core.notifications.toasts.addSuccess({ - title: i18n.translate('dashboard.dashboardWasSavedSuccessMessage', { - defaultMessage: `Dashboard '{dashTitle}' was saved`, - values: { dashTitle: dashboardStateManager.savedDashboard.title }, - }), - 'data-test-subj': 'saveDashboardSuccess', - }); - - dashboardPanelStorage.clearPanels(lastDashboardId); - if (id !== lastDashboardId) { - redirectTo({ - id, - // editMode: true, - destination: 'dashboard', - useReplace: true, - }); - } else { - dashboardStateManager.resetState(); - chrome.docTitle.change(dashboardStateManager.savedDashboard.lastSavedTitle); - } - } - setIsSaveInProgress(false); - return { id }; - }) - .catch((error) => { - core.notifications?.toasts.addDanger({ - title: i18n.translate('dashboard.dashboardWasNotSavedDangerMessage', { - defaultMessage: `Dashboard '{dashTitle}' was not saved. Error: {errorMessage}`, - values: { - dashTitle: dashboardStateManager.savedDashboard.title, - errorMessage: error.message, - }, - }), - 'data-test-subj': 'saveDashboardFailure', - }); - return { error }; - }); + confirmDiscardUnsavedChanges(core.overlays, () => + dashboardAppState.resetToLastSavedState?.() + ); }, - [ - core.notifications.toasts, - dashboardStateManager, - dashboardPanelStorage, - lastDashboardId, - chrome.docTitle, - redirectTo, - timefilter, - ] + [clearAddPanel, core.overlays, dashboardAppState, dispatchDashboardStateChange] ); - const runSave = useCallback(async () => { - const currentTitle = dashboardStateManager.getTitle(); - const currentDescription = dashboardStateManager.getDescription(); - const currentTimeRestore = dashboardStateManager.getTimeRestore(); - - let currentTags: string[] = []; - if (savedObjectsTagging) { - const dashboard = dashboardStateManager.savedDashboard; - if (savedObjectsTagging.ui.hasTagDecoration(dashboard)) { - currentTags = dashboard.getTags(); - } - } - - const onSave = ({ + const runSaveAs = useCallback(async () => { + const currentState = dashboardAppState.getLatestDashboardState(); + const onSave = async ({ + newTags, newTitle, newDescription, newCopyOnSave, newTimeRestore, onTitleDuplicate, isTitleDuplicateConfirmed, - newTags, }: DashboardSaveOptions): Promise => { - dashboardStateManager.setTitle(newTitle); - dashboardStateManager.setDescription(newDescription); - dashboardStateManager.savedDashboard.copyOnSave = newCopyOnSave; - dashboardStateManager.setTimeRestore(newTimeRestore); - if (savedObjectsTagging && newTags) { - dashboardStateManager.setTags(newTags); - } - const saveOptions = { confirmOverwrite: false, isTitleDuplicateConfirmed, onTitleDuplicate, }; + const stateFromSaveModal = { + title: newTitle, + description: newDescription, + timeRestore: newTimeRestore, + tags: [] as string[], + }; + if (savedObjectsTagging && newTags) { + stateFromSaveModal.tags = newTags; + } - return save(saveOptions).then((response: SaveResult) => { - // If the save wasn't successful, put the original values back. - if (!(response as { id: string }).id) { - dashboardStateManager.setTitle(currentTitle); - dashboardStateManager.setDescription(currentDescription); - dashboardStateManager.setTimeRestore(currentTimeRestore); - if (savedObjectsTagging) { - dashboardStateManager.setTags(currentTags); - } - } - return response; + dashboardAppState.savedDashboard.copyOnSave = newCopyOnSave; + const saveResult = await saveDashboard({ + toasts, + timefilter, + redirectTo, + saveOptions, + savedObjectsTagging, + version: kibanaVersion, + dashboardSessionStorage, + savedDashboard: dashboardAppState.savedDashboard, + currentState: { ...currentState, ...stateFromSaveModal }, }); + if (saveResult.id && !saveResult.redirected) { + dispatchDashboardStateChange(setStateFromSaveModal(stateFromSaveModal)); + dashboardAppState.updateLastSavedState?.(); + chrome.docTitle.change(stateFromSaveModal.title); + } + return saveResult.id ? { id: saveResult.id } : { error: saveResult.error }; }; + const lastDashboardId = dashboardAppState.savedDashboard.id; + const currentTags = savedObjectsTagging?.ui.hasTagDecoration(dashboardAppState.savedDashboard) + ? dashboardAppState.savedDashboard.getTags() + : []; const dashboardSaveModal = ( {}} - title={currentTitle} - description={currentDescription} tags={currentTags} + title={currentState.title} + timeRestore={currentState.timeRestore} + description={currentState.description} savedObjectsTagging={savedObjectsTagging} - timeRestore={currentTimeRestore} showCopyOnSave={lastDashboardId ? true : false} /> ); clearAddPanel(); showSaveModal(dashboardSaveModal, core.i18n.Context); }, [ - save, - clearAddPanel, - lastDashboardId, - core.i18n.Context, + dispatchDashboardStateChange, + dashboardSessionStorage, savedObjectsTagging, - dashboardStateManager, + dashboardAppState, + core.i18n.Context, + chrome.docTitle, + clearAddPanel, + kibanaVersion, + timefilter, + redirectTo, + toasts, ]); const runQuickSave = useCallback(async () => { - const currentTitle = dashboardStateManager.getTitle(); - const currentDescription = dashboardStateManager.getDescription(); - const currentTimeRestore = dashboardStateManager.getTimeRestore(); - - let currentTags: string[] = []; - if (savedObjectsTagging) { - const dashboard = dashboardStateManager.savedDashboard; - if (savedObjectsTagging.ui.hasTagDecoration(dashboard)) { - currentTags = dashboard.getTags(); - } - } - - setIsSaveInProgress(true); - save({}).then((response: SaveResult) => { - // If the save wasn't successful, put the original values back. - if (!(response as { id: string }).id) { - dashboardStateManager.setTitle(currentTitle); - dashboardStateManager.setDescription(currentDescription); - dashboardStateManager.setTimeRestore(currentTimeRestore); - if (savedObjectsTagging) { - dashboardStateManager.setTags(currentTags); - } - } else { - clearUnsavedChanges(); - } - setIsSaveInProgress(false); - return response; + setState((s) => ({ ...s, isSaveInProgress: true })); + const currentState = dashboardAppState.getLatestDashboardState(); + const saveResult = await saveDashboard({ + toasts, + timefilter, + redirectTo, + currentState, + saveOptions: {}, + savedObjectsTagging, + version: kibanaVersion, + dashboardSessionStorage, + savedDashboard: dashboardAppState.savedDashboard, }); - }, [save, savedObjectsTagging, dashboardStateManager, clearUnsavedChanges]); + if (saveResult.id && !saveResult.redirected) { + dashboardAppState.updateLastSavedState?.(); + } + // turn off save in progress after the next change check. This prevents the save button from flashing + setTimeout(() => { + if (!mounted) return; + setState((s) => ({ ...s, isSaveInProgress: false })); + }, DashboardConstants.CHANGE_CHECK_DEBOUNCE); + }, [ + dashboardSessionStorage, + savedObjectsTagging, + dashboardAppState, + kibanaVersion, + timefilter, + redirectTo, + mounted, + toasts, + ]); const runClone = useCallback(() => { - const currentTitle = dashboardStateManager.getTitle(); + const currentState = dashboardAppState.getLatestDashboardState(); const onClone = async ( newTitle: string, isTitleDuplicateConfirmed: boolean, onTitleDuplicate: () => void ) => { - dashboardStateManager.savedDashboard.copyOnSave = true; - dashboardStateManager.setTitle(newTitle); + dashboardAppState.savedDashboard.copyOnSave = true; const saveOptions = { confirmOverwrite: false, isTitleDuplicateConfirmed, onTitleDuplicate, }; - return save(saveOptions).then((response: { id?: string } | { error: Error }) => { - // If the save wasn't successful, put the original title back. - if ((response as { error: Error }).error) { - dashboardStateManager.setTitle(currentTitle); - } - return response; + const saveResult = await saveDashboard({ + toasts, + timefilter, + redirectTo, + saveOptions, + savedObjectsTagging, + version: kibanaVersion, + dashboardSessionStorage, + savedDashboard: dashboardAppState.savedDashboard, + currentState: { ...currentState, title: newTitle }, }); + return saveResult.id ? { id: saveResult.id } : { error: saveResult.error }; }; + showCloneModal(onClone, currentState.title); + }, [ + dashboardSessionStorage, + savedObjectsTagging, + dashboardAppState, + kibanaVersion, + redirectTo, + timefilter, + toasts, + ]); - showCloneModal(onClone, currentTitle); - }, [dashboardStateManager, save]); + const showOptions = useCallback( + (anchorElement: HTMLElement) => { + const currentState = dashboardAppState.getLatestDashboardState(); + showOptionsPopover({ + anchorElement, + useMargins: currentState.options.useMargins, + onUseMarginsChange: (isChecked: boolean) => { + dispatchDashboardStateChange(setUseMargins(isChecked)); + }, + syncColors: Boolean(currentState.options.syncColors), + onSyncColorsChange: (isChecked: boolean) => { + dispatchDashboardStateChange(setSyncColors(isChecked)); + }, + hidePanelTitles: currentState.options.hidePanelTitles, + onHidePanelTitlesChange: (isChecked: boolean) => { + dispatchDashboardStateChange(setHidePanelTitles(isChecked)); + }, + }); + }, + [dashboardAppState, dispatchDashboardStateChange] + ); + + const showShare = useCallback( + (anchorElement: HTMLElement) => { + if (!share) return; + const currentState = dashboardAppState.getLatestDashboardState(); + ShowShareModal({ + share, + kibanaVersion, + anchorElement, + dashboardCapabilities, + currentDashboardState: currentState, + savedDashboard: dashboardAppState.savedDashboard, + isDirty: Boolean(dashboardAppState.hasUnsavedChanges), + }); + }, + [dashboardAppState, dashboardCapabilities, share, kibanaVersion] + ); const dashboardTopNavActions = useMemo(() => { const actions = { - [TopNavIds.FULL_SCREEN]: () => { - dashboardStateManager.setFullScreenMode(true); - }, + [TopNavIds.FULL_SCREEN]: () => dispatchDashboardStateChange(setFullScreenMode(true)), [TopNavIds.EXIT_EDIT_MODE]: () => onChangeViewMode(ViewMode.VIEW), [TopNavIds.ENTER_EDIT_MODE]: () => onChangeViewMode(ViewMode.EDIT), - [TopNavIds.SAVE]: runSave, [TopNavIds.QUICK_SAVE]: runQuickSave, + [TopNavIds.OPTIONS]: showOptions, + [TopNavIds.SAVE]: runSaveAs, [TopNavIds.CLONE]: runClone, - [TopNavIds.OPTIONS]: (anchorElement) => { - showOptionsPopover({ - anchorElement, - useMargins: dashboardStateManager.getUseMargins(), - onUseMarginsChange: (isChecked: boolean) => { - dashboardStateManager.setUseMargins(isChecked); - }, - syncColors: dashboardStateManager.getSyncColors(), - onSyncColorsChange: (isChecked: boolean) => { - dashboardStateManager.setSyncColors(isChecked); - }, - hidePanelTitles: dashboardStateManager.getHidePanelTitles(), - onHidePanelTitlesChange: (isChecked: boolean) => { - dashboardStateManager.setHidePanelTitles(isChecked); - }, - }); - }, } as { [key: string]: NavAction }; + if (share) { - actions[TopNavIds.SHARE] = (anchorElement) => - ShowShareModal({ - share, - anchorElement, - savedDashboard, - dashboardStateManager, - dashboardCapabilities, - }); + actions[TopNavIds.SHARE] = showShare; } if (isLabsEnabled) { @@ -503,13 +441,13 @@ export function DashboardTopNav({ } return actions; }, [ - dashboardCapabilities, - dashboardStateManager, + dispatchDashboardStateChange, onChangeViewMode, - savedDashboard, - runClone, - runSave, runQuickSave, + showOptions, + runSaveAs, + showShare, + runClone, share, isLabsEnabled, isLabsShown, @@ -517,43 +455,49 @@ export function DashboardTopNav({ UseUnmount(() => { clearAddPanel(); + setMounted(false); }); - const getNavBarProps = () => { + const getNavBarProps = (): TopNavMenuProps => { + const { hasUnsavedChanges, savedDashboard } = dashboardAppState; const shouldShowNavBarComponent = (forceShow: boolean): boolean => - (forceShow || state.chromeIsVisible) && !dashboardStateManager.getFullScreenMode(); + (forceShow || state.chromeIsVisible) && !dashboardState.fullScreenMode; const shouldShowFilterBar = (forceHide: boolean): boolean => !forceHide && - (data.query.filterManager.getFilters().length > 0 || - !dashboardStateManager.getFullScreenMode()); + (data.query.filterManager.getFilters().length > 0 || !dashboardState.fullScreenMode); - const isFullScreenMode = dashboardStateManager.getFullScreenMode(); - const screenTitle = dashboardStateManager.getTitle(); + const isFullScreenMode = dashboardState.fullScreenMode; const showTopNavMenu = shouldShowNavBarComponent(Boolean(embedSettings?.forceShowTopNavMenu)); const showQueryInput = shouldShowNavBarComponent(Boolean(embedSettings?.forceShowQueryInput)); const showDatePicker = shouldShowNavBarComponent(Boolean(embedSettings?.forceShowDatePicker)); - const showQueryBar = showQueryInput || showDatePicker; const showFilterBar = shouldShowFilterBar(Boolean(embedSettings?.forceHideFilterBar)); + const showQueryBar = showQueryInput || showDatePicker; const showSearchBar = showQueryBar || showFilterBar; + const screenTitle = dashboardState.title; + + const topNav = getTopNavConfig( + dashboardAppState.getLatestDashboardState().viewMode, + dashboardTopNavActions, + { + hideWriteControls: dashboardCapabilities.hideWriteControls, + isDirty: Boolean(dashboardAppState.hasUnsavedChanges), + isSaveInProgress: state.isSaveInProgress, + isNewDashboard: !savedDashboard.id, + isLabsEnabled, + } + ); - const topNav = getTopNavConfig(viewMode, dashboardTopNavActions, { - hideWriteControls: dashboardCapabilities.hideWriteControls, - isNewDashboard: !savedDashboard.id, - isDirty: dashboardStateManager.getIsDirty(timefilter), - isSaveInProgress, - isLabsEnabled, - }); - - const badges = unsavedChanges - ? [ - { - 'data-test-subj': 'dashboardUnsavedChangesBadge', - badgeText: unsavedChangesBadge.getUnsavedChangedBadgeText(), - color: 'secondary', - }, - ] - : undefined; + const badges = + hasUnsavedChanges && dashboardState.viewMode === ViewMode.EDIT + ? [ + { + 'data-test-subj': 'dashboardUnsavedChangesBadge', + badgeText: unsavedChangesBadge.getUnsavedChangedBadgeText(), + color: 'secondary', + }, + ] + : undefined; return { badges, @@ -561,36 +505,25 @@ export function DashboardTopNav({ config: showTopNavMenu ? topNav : undefined, className: isFullScreenMode ? 'kbnTopNavMenu-isFullScreen' : undefined, screenTitle, - showTopNavMenu, showSearchBar, showQueryBar, showQueryInput, showDatePicker, showFilterBar, setMenuMountPoint: embedSettings ? undefined : setHeaderActionMenu, - indexPatterns, + indexPatterns: dashboardAppState.indexPatterns, showSaveQuery: dashboardCapabilities.saveQuery, useDefaultBehaviors: true, - onQuerySubmit, - onSavedQueryUpdated: (savedQuery: SavedQuery) => { - const allFilters = data.query.filterManager.getFilters(); - data.query.filterManager.setFilters(allFilters); - dashboardStateManager.applyFilters(savedQuery.attributes.query, allFilters); - if (savedQuery.attributes.timefilter) { - timefilter.setTime({ - from: savedQuery.attributes.timefilter.from, - to: savedQuery.attributes.timefilter.to, - }); - if (savedQuery.attributes.timefilter.refreshInterval) { - timefilter.setRefreshInterval(savedQuery.attributes.timefilter.refreshInterval); - } + savedQuery: state.savedQuery, + savedQueryId: dashboardState.savedQuery, + onQuerySubmit: (_payload, isUpdate) => { + if (isUpdate === false) { + dashboardAppState.$triggerDashboardRefresh.next({ force: true }); } - setState((s) => ({ ...s, savedQuery })); }, - savedQuery: state.savedQuery, - savedQueryId: dashboardStateManager.getSavedQueryId(), - onSavedQueryIdChange: (newId: string | undefined) => - dashboardStateManager.setSavedQueryId(newId), + onSavedQueryIdChange: (newId: string | undefined) => { + dispatchDashboardStateChange(setSavedQueryId(newId)); + }, }; }; @@ -636,9 +569,9 @@ export function DashboardTopNav({ <> {isLabsEnabled && isLabsShown ? ( - setIsLabsShown(false)} /> + setIsLabsShown(false)} /> ) : null} - {viewMode !== ViewMode.VIEW ? ( + {dashboardState.viewMode !== ViewMode.VIEW ? ( <> @@ -646,9 +579,7 @@ export function DashboardTopNav({ primaryActionButton: ( , ], }} diff --git a/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx b/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx index 5205f5b294c4f..90cf0fcd571a1 100644 --- a/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx +++ b/src/plugins/dashboard/public/application/top_nav/editor_menu.tsx @@ -18,7 +18,7 @@ import { BaseVisType, VisGroups, VisTypeAlias } from '../../../../visualizations import { SolutionToolbarPopover } from '../../../../presentation_util/public'; import { EmbeddableFactoryDefinition, EmbeddableInput } from '../../services/embeddable'; import { useKibana } from '../../services/kibana_react'; -import { DashboardAppServices } from '../types'; +import { DashboardAppServices } from '../../types'; import { DashboardContainer } from '..'; import { DashboardConstants } from '../../dashboard_constants'; import { dashboardReplacePanelAction } from '../../dashboard_strings'; diff --git a/src/plugins/dashboard/public/application/top_nav/save_modal.tsx b/src/plugins/dashboard/public/application/top_nav/save_modal.tsx index 5b1fbe7374dac..79ac3917fb968 100644 --- a/src/plugins/dashboard/public/application/top_nav/save_modal.tsx +++ b/src/plugins/dashboard/public/application/top_nav/save_modal.tsx @@ -12,7 +12,7 @@ import { EuiFormRow, EuiTextArea, EuiSwitch } from '@elastic/eui'; import type { SavedObjectsTaggingApi } from '../../services/saved_objects_tagging_oss'; import { SavedObjectSaveModal } from '../../services/saved_objects'; -import { DashboardSaveOptions } from '../types'; +import { DashboardSaveOptions } from '../../types'; interface Props { onSave: ({ diff --git a/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx b/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx index 56823adf6bc14..239d2bf72b9c1 100644 --- a/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx +++ b/src/plugins/dashboard/public/application/top_nav/show_share_modal.tsx @@ -14,34 +14,38 @@ import { DashboardSavedObject } from '../..'; import { setStateToKbnUrl, unhashUrl } from '../../services/kibana_utils'; import { SharePluginStart } from '../../services/share'; import { dashboardUrlParams } from '../dashboard_router'; -import { DashboardStateManager } from '../dashboard_state_manager'; import { shareModalStrings } from '../../dashboard_strings'; -import { DashboardCapabilities } from '../types'; +import { DashboardAppCapabilities, DashboardState } from '../../types'; +import { stateToRawDashboardState } from '../lib/convert_dashboard_state'; const showFilterBarId = 'showFilterBar'; interface ShowShareModalProps { + isDirty: boolean; + kibanaVersion: string; share: SharePluginStart; anchorElement: HTMLElement; savedDashboard: DashboardSavedObject; - dashboardCapabilities: DashboardCapabilities; - dashboardStateManager: DashboardStateManager; + currentDashboardState: DashboardState; + dashboardCapabilities: DashboardAppCapabilities; } export const showPublicUrlSwitch = (anonymousUserCapabilities: Capabilities) => { if (!anonymousUserCapabilities.dashboard) return false; - const dashboard = (anonymousUserCapabilities.dashboard as unknown) as DashboardCapabilities; + const dashboard = (anonymousUserCapabilities.dashboard as unknown) as DashboardAppCapabilities; return !!dashboard.show; }; export function ShowShareModal({ share, + isDirty, + kibanaVersion, anchorElement, savedDashboard, dashboardCapabilities, - dashboardStateManager, + currentDashboardState, }: ShowShareModalProps) { const EmbedUrlParamExtension = ({ setParamValue, @@ -101,12 +105,13 @@ export function ShowShareModal({ }; share.toggleShareContextMenu({ + isDirty, anchorElement, allowEmbed: true, allowShortUrl: dashboardCapabilities.createShortUrl, shareableUrl: setStateToKbnUrl( '_a', - dashboardStateManager.getAppState(), + stateToRawDashboardState({ state: currentDashboardState, version: kibanaVersion }), { useHash: false, storeInHashQuery: true }, unhashUrl(window.location.href) ), @@ -115,7 +120,6 @@ export function ShowShareModal({ sharingData: { title: savedDashboard.title, }, - isDirty: dashboardStateManager.getIsDirty(), embedUrlParamExtensions: [ { paramName: 'embed', diff --git a/src/plugins/dashboard/public/application/types.ts b/src/plugins/dashboard/public/application/types.ts deleted file mode 100644 index dd291291ce9d6..0000000000000 --- a/src/plugins/dashboard/public/application/types.ts +++ /dev/null @@ -1,88 +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 { - AppMountParameters, - CoreStart, - SavedObjectsClientContract, - ScopedHistory, - ChromeStart, - IUiSettingsClient, - PluginInitializerContext, -} from 'kibana/public'; - -import { SharePluginStart } from '../services/share'; -import { EmbeddableStart } from '../services/embeddable'; -import { UsageCollectionSetup } from '../services/usage_collection'; -import { NavigationPublicPluginStart } from '../services/navigation'; -import { SavedObjectsTaggingApi } from '../services/saved_objects_tagging_oss'; -import { DataPublicPluginStart, IndexPatternsContract } from '../services/data'; -import { SavedObjectLoader, SavedObjectsStart } from '../services/saved_objects'; -import { DashboardPanelStorage } from './lib'; -import { UrlForwardingStart } from '../../../url_forwarding/public'; -import { VisualizationsStart } from '../../../visualizations/public'; - -export type DashboardRedirect = (props: RedirectToProps) => void; -export type RedirectToProps = - | { destination: 'dashboard'; id?: string; useReplace?: boolean; editMode?: boolean } - | { destination: 'listing'; filter?: string; useReplace?: boolean }; - -export interface DashboardEmbedSettings { - forceShowTopNavMenu?: boolean; - forceShowQueryInput?: boolean; - forceShowDatePicker?: boolean; - forceHideFilterBar?: boolean; -} - -export interface DashboardSaveOptions { - newTitle: string; - newTags?: string[]; - newDescription: string; - newCopyOnSave: boolean; - newTimeRestore: boolean; - onTitleDuplicate: () => void; - isTitleDuplicateConfirmed: boolean; -} - -export interface DashboardCapabilities { - visualizeCapabilities: { save: boolean }; - mapsCapabilities: { save: boolean }; - hideWriteControls: boolean; - createShortUrl: boolean; - saveQuery: boolean; - createNew: boolean; - show: boolean; - storeSearchSession: boolean; -} - -export interface DashboardAppServices { - core: CoreStart; - chrome: ChromeStart; - share?: SharePluginStart; - embeddable: EmbeddableStart; - data: DataPublicPluginStart; - uiSettings: IUiSettingsClient; - restorePreviousUrl: () => void; - savedObjects: SavedObjectsStart; - allowByValueEmbeddables: boolean; - urlForwarding: UrlForwardingStart; - savedDashboards: SavedObjectLoader; - scopedHistory: () => ScopedHistory; - indexPatterns: IndexPatternsContract; - usageCollection?: UsageCollectionSetup; - navigation: NavigationPublicPluginStart; - dashboardPanelStorage: DashboardPanelStorage; - dashboardCapabilities: DashboardCapabilities; - initializerContext: PluginInitializerContext; - onAppLeave: AppMountParameters['onAppLeave']; - savedObjectsTagging?: SavedObjectsTaggingApi; - savedObjectsClient: SavedObjectsClientContract; - setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; - savedQueryService: DataPublicPluginStart['query']['savedQueries']; - visualizations: VisualizationsStart; -} diff --git a/src/plugins/dashboard/public/dashboard_constants.ts b/src/plugins/dashboard/public/dashboard_constants.ts index 16cb74209dd79..7d5123ac27cb6 100644 --- a/src/plugins/dashboard/public/dashboard_constants.ts +++ b/src/plugins/dashboard/public/dashboard_constants.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -const DASHBOARD_STATE_STORAGE_KEY = '_a'; +export const DASHBOARD_STATE_STORAGE_KEY = '_a'; export const DashboardConstants = { LANDING_PAGE_PATH: '/list', @@ -17,6 +17,8 @@ export const DashboardConstants = { DASHBOARDS_ID: 'dashboards', DASHBOARD_ID: 'dashboard', SEARCH_SESSION_ID: 'searchSessionId', + CHANGE_CHECK_DEBOUNCE: 100, + CHANGE_APPLY_DEBOUNCE: 50, }; export function createDashboardEditUrl(id?: string, editMode?: boolean) { diff --git a/src/plugins/dashboard/public/dashboard_strings.ts b/src/plugins/dashboard/public/dashboard_strings.ts index 531ff815312cf..ef158a149c377 100644 --- a/src/plugins/dashboard/public/dashboard_strings.ts +++ b/src/plugins/dashboard/public/dashboard_strings.ts @@ -215,6 +215,22 @@ export const dashboardReadonlyBadge = { }), }; +export const dashboardSaveToastStrings = { + getSuccessString: (dashTitle: string) => + i18n.translate('dashboard.dashboardWasSavedSuccessMessage', { + defaultMessage: `Dashboard '{dashTitle}' was saved`, + values: { dashTitle }, + }), + getFailureString: (dashTitle: string, errorMessage: string) => + i18n.translate('dashboard.dashboardWasNotSavedDangerMessage', { + defaultMessage: `Dashboard '{dashTitle}' was not saved. Error: {errorMessage}`, + values: { + dashTitle, + errorMessage, + }, + }), +}; + /* Modals */ @@ -359,17 +375,9 @@ export const emptyScreenStrings = { i18n.translate('dashboard.fillDashboardTitle', { defaultMessage: 'This dashboard is empty. Let\u2019s fill it up!', }), - getHowToStartWorkingOnNewDashboardDescription1: () => - i18n.translate('dashboard.howToStartWorkingOnNewDashboardDescription1', { - defaultMessage: 'Click', - }), - getHowToStartWorkingOnNewDashboardDescription2: () => - i18n.translate('dashboard.howToStartWorkingOnNewDashboardDescription2', { - defaultMessage: 'in the menu bar above to start adding panels.', - }), - getHowToStartWorkingOnNewDashboardEditLinkText: () => - i18n.translate('dashboard.howToStartWorkingOnNewDashboardEditLinkText', { - defaultMessage: 'Edit', + getHowToStartWorkingOnNewDashboardDescription: () => + i18n.translate('dashboard.howToStartWorkingOnNewDashboardDescription', { + defaultMessage: 'Click edit in the menu bar above to start adding panels.', }), getHowToStartWorkingOnNewDashboardEditLinkAriaLabel: () => i18n.translate('dashboard.howToStartWorkingOnNewDashboardEditLinkAriaLabel', { @@ -442,3 +450,8 @@ export const dashboardUnsavedListingStrings = { defaultMessage: 'Discard changes', }), }; + +export const getCreateVisualizationButtonTitle = () => + i18n.translate('dashboard.solutionToolbar.addPanelButtonLabel', { + defaultMessage: 'Create visualization', + }); diff --git a/src/plugins/dashboard/public/index.ts b/src/plugins/dashboard/public/index.ts index 1acd1995b7290..c584b44286e07 100644 --- a/src/plugins/dashboard/public/index.ts +++ b/src/plugins/dashboard/public/index.ts @@ -11,7 +11,6 @@ import { DashboardPlugin } from './plugin'; export { DashboardContainer, - DashboardContainerInput, DashboardContainerFactoryDefinition, DASHBOARD_CONTAINER_TYPE, } from './application'; @@ -29,7 +28,7 @@ export { DashboardUrlGeneratorState, } from './url_generator'; export { DashboardSavedObject } from './saved_dashboards'; -export { SavedDashboardPanel } from './types'; +export { SavedDashboardPanel, DashboardContainerInput } from './types'; export function plugin(initializerContext: PluginInitializerContext) { return new DashboardPlugin(initializerContext); diff --git a/src/plugins/dashboard/public/plugin.tsx b/src/plugins/dashboard/public/plugin.tsx index 230918399d88f..b73fe5f2ba410 100644 --- a/src/plugins/dashboard/public/plugin.tsx +++ b/src/plugins/dashboard/public/plugin.tsx @@ -65,6 +65,7 @@ import { AddToLibraryAction, LibraryNotificationAction, CopyToDashboardAction, + DashboardCapabilities, } from './application'; import { createDashboardUrlGenerator, @@ -351,6 +352,9 @@ export class DashboardPlugin const { notifications, overlays, application } = core; const { uiActions, data, share, presentationUtil, embeddable } = plugins; + const dashboardCapabilities: Readonly = application.capabilities + .dashboard as DashboardCapabilities; + const SavedObjectFinder = getSavedObjectFinder(core.savedObjects, core.uiSettings); const expandPanelAction = new ExpandPanelAction(); @@ -395,8 +399,8 @@ export class DashboardPlugin overlays, embeddable.getStateTransfer(), { - canCreateNew: Boolean(application.capabilities.dashboard.createNew), - canEditExisting: !Boolean(application.capabilities.dashboard.hideWriteControls), + canCreateNew: Boolean(dashboardCapabilities.createNew), + canEditExisting: Boolean(dashboardCapabilities.showWriteControls), }, presentationUtil.ContextProvider ); diff --git a/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts b/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts index 1c9125f8a064e..7c056e04c1cd6 100644 --- a/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts +++ b/src/plugins/dashboard/public/saved_dashboards/saved_dashboard.ts @@ -14,6 +14,7 @@ import { createDashboardEditUrl } from '../dashboard_constants'; import { extractReferences, injectReferences } from '../../common/saved_dashboard_references'; import { SavedObjectAttributes, SavedObjectReference } from '../../../../core/types'; +import { DashboardOptions } from '../types'; export interface DashboardSavedObject extends SavedObject { id?: string; @@ -97,9 +98,10 @@ export function createSavedDashboardClass( panelsJSON: '[]', optionsJSON: JSON.stringify({ // for BWC reasons we can't default dashboards that already exist without this setting to true. - useMargins: !id, + useMargins: true, + syncColors: false, hidePanelTitles: false, - }), + } as DashboardOptions), version: 1, timeRestore: false, timeTo: undefined, diff --git a/src/plugins/dashboard/public/types.ts b/src/plugins/dashboard/public/types.ts index 9285944bfe5fe..89c9adb572142 100644 --- a/src/plugins/dashboard/public/types.ts +++ b/src/plugins/dashboard/public/types.ts @@ -6,109 +6,195 @@ * Side Public License, v 1. */ -import { SavedObject as SavedObjectType, SavedObjectAttributes } from 'src/core/public'; -import { Query, Filter } from './services/data'; -import { ViewMode } from './services/embeddable'; +import { + AppMountParameters, + CoreStart, + SavedObjectsClientContract, + ScopedHistory, + ChromeStart, + IUiSettingsClient, + PluginInitializerContext, +} from 'kibana/public'; -import { SavedDashboardPanel } from '../common/types'; -export { SavedDashboardPanel }; +import { History } from 'history'; +import { AnyAction, Dispatch } from 'redux'; +import { BehaviorSubject, Subject } from 'rxjs'; +import { Query, Filter, IndexPattern, RefreshInterval, TimeRange } from './services/data'; +import { ContainerInput, EmbeddableInput, ViewMode } from './services/embeddable'; +import { SharePluginStart } from './services/share'; +import { EmbeddableStart } from './services/embeddable'; +import { DashboardSessionStorage } from './application/lib'; +import { UrlForwardingStart } from '../../url_forwarding/public'; +import { UsageCollectionSetup } from './services/usage_collection'; +import { NavigationPublicPluginStart } from './services/navigation'; +import { DashboardPanelState, SavedDashboardPanel } from '../common/types'; +import { SavedObjectsTaggingApi } from './services/saved_objects_tagging_oss'; +import { DataPublicPluginStart, IndexPatternsContract } from './services/data'; +import { SavedObjectLoader, SavedObjectsStart } from './services/saved_objects'; +import { IKbnUrlStateStorage } from './services/kibana_utils'; +import { DashboardContainer, DashboardSavedObject } from '.'; +import { VisualizationsStart } from '../../visualizations/public'; -// TODO: Replace Saved object interfaces by the ones Core will provide when it is ready. -export type SavedObjectAttribute = - | string - | number - | boolean - | null - | undefined - | SavedObjectAttributes - | SavedObjectAttributes[]; - -export interface SimpleSavedObject { - attributes: T; - _version?: SavedObjectType['version']; - id: SavedObjectType['id']; - type: SavedObjectType['type']; - migrationVersion: SavedObjectType['migrationVersion']; - error: SavedObjectType['error']; - references: SavedObjectType['references']; - get(key: string): any; - set(key: string, value: any): T; - has(key: string): boolean; - save(): Promise>; - delete(): void; -} +export { SavedDashboardPanel }; -interface FieldSubType { - multi?: { parent: string }; - nested?: { path: string }; +export type NavAction = (anchorElement?: any) => void; +export interface SavedDashboardPanelMap { + [key: string]: SavedDashboardPanel; } -export interface Field { - name: string; - type: string; - // esTypes might be undefined on old index patterns that have not been refreshed since we added - // this prop. It is also undefined on scripted fields. - esTypes?: string[]; - aggregatable: boolean; - filterable: boolean; - searchable: boolean; - subType?: FieldSubType; +export interface DashboardPanelMap { + [key: string]: DashboardPanelState; } -export type NavAction = (anchorElement?: any) => void; - -export interface DashboardAppState { - panels: SavedDashboardPanel[]; - fullScreenMode: boolean; +/** + * DashboardState contains all pieces of tracked state for an individual dashboard + */ +export interface DashboardState { + query: Query; title: string; - description: string; tags: string[]; - timeRestore: boolean; - options: { - hidePanelTitles: boolean; - useMargins: boolean; - syncColors?: boolean; - }; - query: Query | string; filters: Filter[]; viewMode: ViewMode; - expandedPanelId?: string; + description: string; savedQuery?: string; + timeRestore: boolean; + fullScreenMode: boolean; + expandedPanelId?: string; + options: DashboardOptions; + panels: DashboardPanelMap; } -export type DashboardAppStateDefaults = DashboardAppState & { +/** + * RawDashboardState is the dashboard state as directly loaded from the panelJSON + */ +export type RawDashboardState = Omit & { panels: SavedDashboardPanel[] }; + +export interface DashboardContainerInput extends ContainerInput { + dashboardCapabilities?: DashboardAppCapabilities; + refreshConfig?: RefreshInterval; + isEmbeddedExternally?: boolean; + isFullScreenMode: boolean; + expandedPanelId?: string; + timeRange: TimeRange; description?: string; -}; + useMargins: boolean; + syncColors?: boolean; + viewMode: ViewMode; + filters: Filter[]; + title: string; + query: Query; + panels: { + [panelId: string]: DashboardPanelState; + }; +} /** - * Panels are not added to the URL + * DashboardAppState contains all the tools the dashboard application uses to track, + * update, and view its state. */ -export type DashboardAppStateInUrl = Omit & { - panels?: SavedDashboardPanel[]; +export interface DashboardAppState { + hasUnsavedChanges?: boolean; + indexPatterns?: IndexPattern[]; + updateLastSavedState?: () => void; + resetToLastSavedState?: () => void; + savedDashboard?: DashboardSavedObject; + dashboardContainer?: DashboardContainer; + getLatestDashboardState?: () => DashboardState; + $triggerDashboardRefresh: Subject<{ force?: boolean }>; + $onDashboardStateChange: BehaviorSubject; + applyFilters?: (query: Query, filters: Filter[]) => void; +} + +/** + * The shared services and tools used to build a dashboard from a saved object ID. + */ +export type DashboardBuildContext = Pick< + DashboardAppServices, + | 'embeddable' + | 'indexPatterns' + | 'savedDashboards' + | 'usageCollection' + | 'initializerContext' + | 'savedObjectsTagging' + | 'dashboardCapabilities' +> & { + query: DashboardAppServices['data']['query']; + search: DashboardAppServices['data']['search']; + notifications: DashboardAppServices['core']['notifications']; + + history: History; + kibanaVersion: string; + isEmbeddedExternally: boolean; + kbnUrlStateStorage: IKbnUrlStateStorage; + $checkForUnsavedChanges: Subject; + getLatestDashboardState: () => DashboardState; + dispatchDashboardStateChange: Dispatch; + $triggerDashboardRefresh: Subject<{ force?: boolean }>; + $onDashboardStateChange: BehaviorSubject; }; -export interface DashboardAppStateTransitions { - set: ( - state: DashboardAppState - ) => ( - prop: T, - value: DashboardAppState[T] - ) => DashboardAppState; - setOption: ( - state: DashboardAppState - ) => ( - prop: T, - value: DashboardAppState['options'][T] - ) => DashboardAppState; +export interface DashboardOptions { + hidePanelTitles: boolean; + useMargins: boolean; + syncColors: boolean; } -export interface SavedDashboardPanelMap { - [key: string]: SavedDashboardPanel; +export type DashboardRedirect = (props: RedirectToProps) => void; +export type RedirectToProps = + | { destination: 'dashboard'; id?: string; useReplace?: boolean; editMode?: boolean } + | { destination: 'listing'; filter?: string; useReplace?: boolean }; + +export interface DashboardEmbedSettings { + forceHideFilterBar?: boolean; + forceShowTopNavMenu?: boolean; + forceShowQueryInput?: boolean; + forceShowDatePicker?: boolean; +} + +export interface DashboardSaveOptions { + newTitle: string; + newTags?: string[]; + newDescription: string; + newCopyOnSave: boolean; + newTimeRestore: boolean; + onTitleDuplicate: () => void; + isTitleDuplicateConfirmed: boolean; +} + +export interface DashboardAppCapabilities { + show: boolean; + createNew: boolean; + saveQuery: boolean; + createShortUrl: boolean; + hideWriteControls: boolean; + storeSearchSession: boolean; + mapsCapabilities: { save: boolean }; + visualizeCapabilities: { save: boolean }; } -export interface StagedFilter { - field: string; - value: string; - operator: string; - index: string; +export interface DashboardAppServices { + core: CoreStart; + chrome: ChromeStart; + share?: SharePluginStart; + embeddable: EmbeddableStart; + data: DataPublicPluginStart; + uiSettings: IUiSettingsClient; + restorePreviousUrl: () => void; + savedObjects: SavedObjectsStart; + allowByValueEmbeddables: boolean; + urlForwarding: UrlForwardingStart; + savedDashboards: SavedObjectLoader; + scopedHistory: () => ScopedHistory; + visualizations: VisualizationsStart; + indexPatterns: IndexPatternsContract; + usageCollection?: UsageCollectionSetup; + navigation: NavigationPublicPluginStart; + dashboardCapabilities: DashboardAppCapabilities; + initializerContext: PluginInitializerContext; + onAppLeave: AppMountParameters['onAppLeave']; + savedObjectsTagging?: SavedObjectsTaggingApi; + savedObjectsClient: SavedObjectsClientContract; + dashboardSessionStorage: DashboardSessionStorage; + setHeaderActionMenu: AppMountParameters['setHeaderActionMenu']; + savedQueryService: DataPublicPluginStart['query']['savedQueries']; } diff --git a/src/plugins/dashboard/server/capabilities_provider.ts b/src/plugins/dashboard/server/capabilities_provider.ts index 25457c1a487d9..c5b740c581294 100644 --- a/src/plugins/dashboard/server/capabilities_provider.ts +++ b/src/plugins/dashboard/server/capabilities_provider.ts @@ -6,7 +6,11 @@ * Side Public License, v 1. */ -export const capabilitiesProvider = () => ({ +import { DashboardCapabilities } from '../common/types'; + +export const capabilitiesProvider = (): { + dashboard: DashboardCapabilities; +} => ({ dashboard: { createNew: true, show: true, diff --git a/src/plugins/dashboard/server/usage/dashboard_telemetry.ts b/src/plugins/dashboard/server/usage/dashboard_telemetry.ts index 02d492de4fe66..912dc04d16d09 100644 --- a/src/plugins/dashboard/server/usage/dashboard_telemetry.ts +++ b/src/plugins/dashboard/server/usage/dashboard_telemetry.ts @@ -41,6 +41,9 @@ export interface DashboardCollectorData { visualizationByValue: { [key: string]: number; }; + embeddable: { + [key: string]: number; + }; } export const getEmptyTelemetryData = (): DashboardCollectorData => ({ @@ -48,6 +51,7 @@ export const getEmptyTelemetryData = (): DashboardCollectorData => ({ panelsByValue: 0, lensByValue: {}, visualizationByValue: {}, + embeddable: {}, }); type DashboardCollectorFunction = ( @@ -115,6 +119,23 @@ export const collectForPanels: DashboardCollectorFunction = (panels, collectorDa collectByValueLensInfo(panels, collectorData); }; +export const collectEmbeddableData = ( + panels: SavedDashboardPanel730ToLatest[], + collectorData: DashboardCollectorData, + embeddableService: EmbeddablePersistableStateService +) => { + for (const panel of panels) { + collectorData.embeddable = embeddableService.telemetry( + { + ...panel.embeddableConfig, + id: panel.id || '', + type: panel.type, + }, + collectorData.embeddable + ); + } +}; + export async function collectDashboardTelemetry( savedObjectClient: Pick, embeddableService: EmbeddablePersistableStateService @@ -134,6 +155,7 @@ export async function collectDashboardTelemetry( ) as unknown) as SavedDashboardPanel730ToLatest[]; collectForPanels(panels, collectorData); + collectEmbeddableData(panels, collectorData, embeddableService); } return collectorData; diff --git a/src/plugins/dashboard/server/usage/register_collector.ts b/src/plugins/dashboard/server/usage/register_collector.ts index 780dd716c0f78..a911fc9b81666 100644 --- a/src/plugins/dashboard/server/usage/register_collector.ts +++ b/src/plugins/dashboard/server/usage/register_collector.ts @@ -27,11 +27,28 @@ export function registerDashboardUsageCollector( lensByValue: { DYNAMIC_KEY: { type: 'long', + _meta: { + description: + 'Collection of telemetry metrics for Lens visualizations, which are added to dashboard by "value".', + }, }, }, visualizationByValue: { DYNAMIC_KEY: { type: 'long', + _meta: { + description: + 'Collection of telemetry metrics for visualizations, which are added to dashboard by "value".', + }, + }, + }, + embeddable: { + DYNAMIC_KEY: { + type: 'long', + _meta: { + description: + 'Collection of telemetry metrics that embeddable service reports. Embeddable service internally calls each embeddable, which in turn calls its dynamic actions, which calls each drill down attached to that embeddable.', + }, }, }, }, diff --git a/src/plugins/data/common/es_query/filters/phrase_filter.ts b/src/plugins/data/common/es_query/filters/phrase_filter.ts index 2a7f2458a27de..85562435e68d0 100644 --- a/src/plugins/data/common/es_query/filters/phrase_filter.ts +++ b/src/plugins/data/common/es_query/filters/phrase_filter.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { get, isPlainObject } from 'lodash'; import { Filter, FilterMeta } from './meta_filter'; import { IIndexPattern, IFieldType } from '../../index_patterns'; @@ -23,7 +23,7 @@ export type PhraseFilter = Filter & { script?: { script: { source?: any; - lang?: string; + lang?: estypes.ScriptLanguage; params: any; }; }; diff --git a/src/plugins/data/common/es_query/filters/range_filter.ts b/src/plugins/data/common/es_query/filters/range_filter.ts index fb8426655583e..a082b93c0a79a 100644 --- a/src/plugins/data/common/es_query/filters/range_filter.ts +++ b/src/plugins/data/common/es_query/filters/range_filter.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { map, reduce, mapValues, get, keys, pickBy } from 'lodash'; import { Filter, FilterMeta } from './meta_filter'; import { IIndexPattern, IFieldType } from '../../index_patterns'; @@ -63,7 +63,7 @@ export type RangeFilter = Filter & script?: { script: { params: any; - lang: string; + lang: estypes.ScriptLanguage; source: any; }; }; diff --git a/src/plugins/data/common/field_formats/converters/duration.test.ts b/src/plugins/data/common/field_formats/converters/duration.test.ts index fc019720425df..72551f4b7b236 100644 --- a/src/plugins/data/common/field_formats/converters/duration.test.ts +++ b/src/plugins/data/common/field_formats/converters/duration.test.ts @@ -139,17 +139,182 @@ describe('Duration Format', () => { ], }); + testCase({ + inputFormat: 'nanoseconds', + outputFormat: 'humanizePrecise', + outputPrecision: 2, + showSuffix: true, + fixtures: [ + { + input: 1988, + output: '0.00 Milliseconds', + }, + { + input: 658, + output: '0.00 Milliseconds', + }, + { + input: 3857, + output: '0.00 Milliseconds', + }, + ], + }); + + testCase({ + inputFormat: 'microseconds', + outputFormat: 'humanizePrecise', + outputPrecision: 2, + showSuffix: true, + fixtures: [ + { + input: 1988, + output: '1.99 Milliseconds', + }, + { + input: 658, + output: '0.66 Milliseconds', + }, + { + input: 3857, + output: '3.86 Milliseconds', + }, + ], + }); + + testCase({ + inputFormat: 'microseconds', + outputFormat: 'humanizePrecise', + outputPrecision: 1, + showSuffix: true, + fixtures: [ + { + input: 1988, + output: '2.0 Milliseconds', + }, + { + input: 0, + output: '0.0 Milliseconds', + }, + { + input: 658, + output: '0.7 Milliseconds', + }, + { + input: 3857, + output: '3.9 Milliseconds', + }, + ], + }); + + testCase({ + inputFormat: 'seconds', + outputFormat: 'humanizePrecise', + outputPrecision: 0, + showSuffix: true, + fixtures: [ + { + input: 600, + output: '10 Minutes', + }, + { + input: 30, + output: '30 Seconds', + }, + { + input: 3000, + output: '50 Minutes', + }, + ], + }); + + testCase({ + inputFormat: 'milliseconds', + outputFormat: 'humanizePrecise', + outputPrecision: 0, + showSuffix: true, + useShortSuffix: true, + fixtures: [ + { + input: -123, + output: '-123 ms', + }, + { + input: 1, + output: '1 ms', + }, + { + input: 600, + output: '600 ms', + }, + { + input: 30, + output: '30 ms', + }, + { + input: 3000, + output: '3 s', + }, + { + input: 300000, + output: '5 min', + }, + { + input: 30000000, + output: '8 h', + }, + { + input: 90000000, + output: '1 d', + }, + { + input: 9000000000, + output: '3 mon', + }, + { + input: 99999999999, + output: '3 y', + }, + ], + }); + + testCase({ + inputFormat: 'milliseconds', + outputFormat: 'humanizePrecise', + outputPrecision: 0, + showSuffix: true, + useShortSuffix: true, + includeSpaceWithSuffix: false, + fixtures: [ + { + input: -123, + output: '-123ms', + }, + { + input: 1, + output: '1ms', + }, + { + input: 600, + output: '600ms', + }, + ], + }); + function testCase({ inputFormat, outputFormat, outputPrecision, showSuffix, + useShortSuffix, + includeSpaceWithSuffix, fixtures, }: { inputFormat: string; outputFormat: string; outputPrecision: number | undefined; showSuffix: boolean | undefined; + useShortSuffix?: boolean; + includeSpaceWithSuffix?: boolean; fixtures: any[]; }) { fixtures.forEach((fixture: Record) => { @@ -160,7 +325,14 @@ describe('Duration Format', () => { outputPrecision ? `, ${outputPrecision} decimals` : '' }`, () => { const duration = new DurationFormat( - { inputFormat, outputFormat, outputPrecision, showSuffix }, + { + inputFormat, + outputFormat, + outputPrecision, + showSuffix, + useShortSuffix, + includeSpaceWithSuffix, + }, jest.fn() ); expect(duration.convert(input)).toBe(output); diff --git a/src/plugins/data/common/field_formats/converters/duration.ts b/src/plugins/data/common/field_formats/converters/duration.ts index ef8c1df3704a8..c9a7091db8471 100644 --- a/src/plugins/data/common/field_formats/converters/duration.ts +++ b/src/plugins/data/common/field_formats/converters/duration.ts @@ -18,6 +18,7 @@ const ratioToSeconds: Record = { microseconds: 0.000001, }; const HUMAN_FRIENDLY = 'humanize'; +const HUMAN_FRIENDLY_PRECISE = 'humanizePrecise'; const DEFAULT_OUTPUT_PRECISION = 2; const DEFAULT_INPUT_FORMAT = { text: i18n.translate('data.fieldFormats.duration.inputFormats.seconds', { @@ -89,59 +90,89 @@ const inputFormats = [ }, ]; const DEFAULT_OUTPUT_FORMAT = { - text: i18n.translate('data.fieldFormats.duration.outputFormats.humanize', { - defaultMessage: 'Human Readable', + text: i18n.translate('data.fieldFormats.duration.outputFormats.humanize.approximate', { + defaultMessage: 'Human-readable (approximate)', }), method: 'humanize', }; const outputFormats = [ { ...DEFAULT_OUTPUT_FORMAT }, + { + text: i18n.translate('data.fieldFormats.duration.outputFormats.humanize.precise', { + defaultMessage: 'Human-readable (precise)', + }), + method: 'humanizePrecise', + }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asMilliseconds', { defaultMessage: 'Milliseconds', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asMilliseconds.short', { + defaultMessage: 'ms', + }), method: 'asMilliseconds', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asSeconds', { defaultMessage: 'Seconds', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asSeconds.short', { + defaultMessage: 's', + }), method: 'asSeconds', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asMinutes', { defaultMessage: 'Minutes', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asMinutes.short', { + defaultMessage: 'min', + }), method: 'asMinutes', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asHours', { defaultMessage: 'Hours', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asHours.short', { + defaultMessage: 'h', + }), method: 'asHours', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asDays', { defaultMessage: 'Days', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asDays.short', { + defaultMessage: 'd', + }), method: 'asDays', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asWeeks', { defaultMessage: 'Weeks', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asWeeks.short', { + defaultMessage: 'w', + }), method: 'asWeeks', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asMonths', { defaultMessage: 'Months', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asMonths.short', { + defaultMessage: 'mon', + }), method: 'asMonths', }, { text: i18n.translate('data.fieldFormats.duration.outputFormats.asYears', { defaultMessage: 'Years', }), + shortText: i18n.translate('data.fieldFormats.duration.outputFormats.asYears.short', { + defaultMessage: 'y', + }), method: 'asYears', }, ]; @@ -154,6 +185,29 @@ function parseInputAsDuration(val: number, inputFormat: string) { return moment.duration(val * ratio, kind); } +function formatInputHumanPrecise( + val: number, + inputFormat: string, + outputPrecision: number, + useShortSuffix: boolean, + includeSpace: string +) { + const ratio = ratioToSeconds[inputFormat] || 1; + const kind = (inputFormat in ratioToSeconds + ? 'seconds' + : inputFormat) as unitOfTime.DurationConstructor; + const valueInDuration = moment.duration(val * ratio, kind); + + return formatDuration( + val, + valueInDuration, + inputFormat, + outputPrecision, + useShortSuffix, + includeSpace + ); +} + export class DurationFormat extends FieldFormat { static id = FIELD_FORMAT_IDS.DURATION; static title = i18n.translate('data.fieldFormats.duration.title', { @@ -167,11 +221,17 @@ export class DurationFormat extends FieldFormat { isHuman() { return this.param('outputFormat') === HUMAN_FRIENDLY; } + + isHumanPrecise() { + return this.param('outputFormat') === HUMAN_FRIENDLY_PRECISE; + } + getParamDefaults() { return { inputFormat: DEFAULT_INPUT_FORMAT.kind, outputFormat: DEFAULT_OUTPUT_FORMAT.method, outputPrecision: DEFAULT_OUTPUT_PRECISION, + includeSpaceWithSuffix: true, }; } @@ -180,19 +240,84 @@ export class DurationFormat extends FieldFormat { const outputFormat = this.param('outputFormat') as keyof Duration; const outputPrecision = this.param('outputPrecision'); const showSuffix = Boolean(this.param('showSuffix')); + const useShortSuffix = Boolean(this.param('useShortSuffix')); + const includeSpaceWithSuffix = this.param('includeSpaceWithSuffix'); + + const includeSpace = includeSpaceWithSuffix ? ' ' : ''; + const human = this.isHuman(); + const humanPrecise = this.isHumanPrecise(); + const prefix = val < 0 && human ? i18n.translate('data.fieldFormats.duration.negativeLabel', { defaultMessage: 'minus', }) + ' ' : ''; + const duration = parseInputAsDuration(val, inputFormat) as Record; - const formatted = duration[outputFormat](); - const precise = human ? formatted : formatted.toFixed(outputPrecision); + const formatted = humanPrecise + ? formatInputHumanPrecise(val, inputFormat, outputPrecision, useShortSuffix, includeSpace) + : duration[outputFormat](); + + const precise = human || humanPrecise ? formatted : formatted.toFixed(outputPrecision); const type = outputFormats.find(({ method }) => method === outputFormat); - const suffix = showSuffix && type ? ` ${type.text}` : ''; - return prefix + precise + suffix; + const unitText = useShortSuffix ? type?.shortText : type?.text; + + const suffix = showSuffix && unitText && !human ? `${includeSpace}${unitText}` : ''; + + return humanPrecise ? precise : prefix + precise + suffix; }; } + +function formatDuration( + val: number, + duration: moment.Duration, + inputFormat: string, + outputPrecision: number, + useShortSuffix: boolean, + includeSpace: string +) { + // return nothing when the duration is falsy or not correctly parsed (P0D) + if (!duration || !duration.isValid()) return; + const units = [ + { unit: duration.years(), nextUnitRate: 12, method: 'asYears' }, + { unit: duration.months(), nextUnitRate: 4, method: 'asMonths' }, + { unit: duration.weeks(), nextUnitRate: 7, method: 'asWeeks' }, + { unit: duration.days(), nextUnitRate: 24, method: 'asDays' }, + { unit: duration.hours(), nextUnitRate: 60, method: 'asHours' }, + { unit: duration.minutes(), nextUnitRate: 60, method: 'asMinutes' }, + { unit: duration.seconds(), nextUnitRate: 1000, method: 'asSeconds' }, + { unit: duration.milliseconds(), nextUnitRate: 1000, method: 'asMilliseconds' }, + ]; + + const getUnitText = (method: string) => { + const type = outputFormats.find(({ method: methodT }) => method === methodT); + return useShortSuffix ? type?.shortText : type?.text; + }; + + for (let i = 0; i < units.length; i++) { + const unitValue = units[i].unit; + if (unitValue >= 1) { + const unitText = getUnitText(units[i].method); + + const value = Math.floor(unitValue); + if (units?.[i + 1]) { + const decimalPointValue = Math.floor(units[i + 1].unit); + return ( + (value + decimalPointValue / units[i].nextUnitRate).toFixed(outputPrecision) + + includeSpace + + unitText + ); + } else { + return unitValue.toFixed(outputPrecision) + includeSpace + unitText; + } + } + } + + const unitValue = units[units.length - 1].unit; + const unitText = getUnitText(units[units.length - 1].method); + + return unitValue.toFixed(outputPrecision) + includeSpace + unitText; +} diff --git a/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap b/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap index 6b1d01e5ba142..681aba41a609c 100644 --- a/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap +++ b/src/plugins/data/common/index_patterns/fields/__snapshots__/index_pattern_field.test.ts.snap @@ -16,7 +16,7 @@ Object { "esTypes": Array [ "keyword", ], - "lang": "lang", + "lang": "java", "name": "name", "readFromDocValues": false, "script": "script", @@ -58,7 +58,7 @@ Object { }, }, "isMapped": undefined, - "lang": "lang", + "lang": "java", "name": "name", "readFromDocValues": false, "runtimeField": Object { diff --git a/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts b/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts index 48342a9e02a2b..73f015ca5517c 100644 --- a/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts +++ b/src/plugins/data/common/index_patterns/fields/index_pattern_field.test.ts @@ -24,7 +24,7 @@ describe('Field', function () { name: 'name', type: 'string', script: 'script', - lang: 'lang', + lang: 'java' as const, count: 1, esTypes: ['text'], // note, this will get replaced by the runtime field type aggregatable: true, diff --git a/src/plugins/data/common/index_patterns/fields/types.ts b/src/plugins/data/common/index_patterns/fields/types.ts index 565dd6d926948..0fb7a46c2cf73 100644 --- a/src/plugins/data/common/index_patterns/fields/types.ts +++ b/src/plugins/data/common/index_patterns/fields/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { FieldSpec, IFieldSubType, IndexPattern } from '../..'; /** @@ -16,7 +16,7 @@ export interface IFieldType { name: string; type: string; script?: string; - lang?: string; + lang?: estypes.ScriptLanguage; count?: number; // esTypes might be undefined on old index patterns that have not been refreshed since we added // this prop. It is also undefined on scripted fields. diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts index 41ce7ba4bab4a..0c3a9901f8c8c 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts @@ -7,7 +7,7 @@ */ import _, { each, reject } from 'lodash'; -import { FieldAttrs, FieldAttrSet } from '../..'; +import { FieldAttrs, FieldAttrSet, IndexPatternAttributes } from '../..'; import type { RuntimeField } from '../types'; import { DuplicateField } from '../../../../kibana_utils/common'; @@ -240,6 +240,7 @@ export class IndexPattern implements IIndexPattern { * @param script script code * @param fieldType * @param lang + * @deprecated use runtime field instead */ async addScriptedField(name: string, script: string, fieldType: string = 'string') { const scriptedFields = this.getScriptedFields(); @@ -265,6 +266,7 @@ export class IndexPattern implements IIndexPattern { /** * Remove scripted field from field list * @param fieldName + * @deprecated use runtime field instead */ removeScriptedField(fieldName: string) { @@ -274,10 +276,18 @@ export class IndexPattern implements IIndexPattern { } } + /** + * + * @deprecated use runtime field instead + */ getNonScriptedFields() { return [...this.fields.getAll().filter((field) => !field.scripted)]; } + /** + * + * @deprecated use runtime field instead + */ getScriptedFields() { return [...this.fields.getAll().filter((field) => field.scripted)]; } @@ -308,7 +318,7 @@ export class IndexPattern implements IIndexPattern { /** * Returns index pattern as saved object body for saving */ - getAsSavedObjectBody() { + getAsSavedObjectBody(): IndexPatternAttributes { const fieldFormatMap = _.isEmpty(this.fieldFormatMap) ? undefined : JSON.stringify(this.fieldFormatMap); @@ -321,12 +331,10 @@ export class IndexPattern implements IIndexPattern { timeFieldName: this.timeFieldName, intervalName: this.intervalName, sourceFilters: this.sourceFilters ? JSON.stringify(this.sourceFilters) : undefined, - fields: this.fields - ? JSON.stringify(this.fields.filter((field) => field.scripted)) - : undefined, + fields: JSON.stringify(this.fields?.filter((field) => field.scripted) ?? []), fieldFormatMap, - type: this.type, - typeMeta: this.typeMeta ? JSON.stringify(this.typeMeta) : undefined, + type: this.type!, + typeMeta: JSON.stringify(this.typeMeta ?? {}), allowNoIndex: this.allowNoIndex ? this.allowNoIndex : undefined, runtimeFieldMap: runtimeFieldMap ? JSON.stringify(runtimeFieldMap) : undefined, }; @@ -356,7 +364,6 @@ export class IndexPattern implements IIndexPattern { * @param name Field name * @param runtimeField Runtime field definition */ - addRuntimeField(name: string, runtimeField: RuntimeField) { const existingField = this.getFieldByName(name); if (existingField) { @@ -376,11 +383,41 @@ export class IndexPattern implements IIndexPattern { } /** - * Remove a runtime field - removed from mapped field or removed unmapped - * field as appropriate - * @param name Field name + * Checks if runtime field exists + * @param name */ + hasRuntimeField(name: string): boolean { + return !!this.runtimeFieldMap[name]; + } + /** + * Returns runtime field if exists + * @param name + */ + getRuntimeField(name: string): RuntimeField | null { + return this.runtimeFieldMap[name] ?? null; + } + + /** + * Replaces all existing runtime fields with new fields + * @param newFields + */ + replaceAllRuntimeFields(newFields: Record) { + const oldRuntimeFieldNames = Object.keys(this.runtimeFieldMap); + oldRuntimeFieldNames.forEach((name) => { + this.removeRuntimeField(name); + }); + + Object.entries(newFields).forEach(([name, field]) => { + this.addRuntimeField(name, field); + }); + } + + /** + * Remove a runtime field - removed from mapped field or removed unmapped + * field as appropriate. Doesn't clear associated field attributes. + * @param name - Field name to remove + */ removeRuntimeField(name: string) { const existingField = this.getFieldByName(name); if (existingField) { @@ -388,9 +425,6 @@ export class IndexPattern implements IIndexPattern { // mapped field, remove runtimeField def existingField.runtimeField = undefined; } else { - // runtimeField only - this.setFieldCustomLabel(name, null); - this.deleteFieldFormat(name); this.fields.remove(existingField); } } diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts index a4f37334c212e..8715f8feb067a 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.test.ts @@ -230,7 +230,12 @@ describe('IndexPatterns', () => { test('createAndSave', async () => { const title = 'kibana-*'; - indexPatterns.createSavedObject = jest.fn(); + + indexPatterns.createSavedObject = jest.fn(() => + Promise.resolve(({ + id: 'id', + } as unknown) as IndexPattern) + ); indexPatterns.setDefault = jest.fn(); await indexPatterns.createAndSave({ title }); expect(indexPatterns.createSavedObject).toBeCalled(); diff --git a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts index 66e66051a6370..e67e72f295b8e 100644 --- a/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts +++ b/src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts @@ -403,6 +403,12 @@ export class IndexPatternsService { throw new SavedObjectNotFound(savedObjectType, id, 'management/kibana/indexPatterns'); } + return this.initFromSavedObject(savedObject); + }; + + private initFromSavedObject = async ( + savedObject: SavedObject + ): Promise => { const spec = this.savedObjectToSpec(savedObject); const { title, type, typeMeta, runtimeFieldMap } = spec; spec.fieldAttrs = savedObject.attributes.fieldAttrs @@ -412,7 +418,7 @@ export class IndexPatternsService { try { spec.fields = await this.refreshFieldSpecMap( spec.fields || {}, - id, + savedObject.id, spec.title as string, { pattern: title as string, @@ -423,6 +429,7 @@ export class IndexPatternsService { }, spec.fieldAttrs ); + // CREATE RUNTIME FIELDS for (const [key, value] of Object.entries(runtimeFieldMap || {})) { // do not create runtime field if mapped field exists @@ -450,7 +457,7 @@ export class IndexPatternsService { this.onError(err, { title: i18n.translate('data.indexPatterns.fetchFieldErrorTitle', { defaultMessage: 'Error fetching fields for index pattern {title} (ID: {id})', - values: { id, title }, + values: { id: savedObject.id, title }, }), }); } @@ -516,9 +523,9 @@ export class IndexPatternsService { async createAndSave(spec: IndexPatternSpec, override = false, skipFetchFields = false) { const indexPattern = await this.create(spec, skipFetchFields); - await this.createSavedObject(indexPattern, override); - await this.setDefault(indexPattern.id!); - return indexPattern; + const createdIndexPattern = await this.createSavedObject(indexPattern, override); + await this.setDefault(createdIndexPattern.id!); + return createdIndexPattern; } /** @@ -538,15 +545,20 @@ export class IndexPatternsService { } const body = indexPattern.getAsSavedObjectBody(); - const response = await this.savedObjectsClient.create(savedObjectType, body, { - id: indexPattern.id, - }); - indexPattern.id = response.id; - this.indexPatternCache.set(indexPattern.id, Promise.resolve(indexPattern)); + const response: SavedObject = (await this.savedObjectsClient.create( + savedObjectType, + body, + { + id: indexPattern.id, + } + )) as SavedObject; + + const createdIndexPattern = await this.initFromSavedObject(response); + this.indexPatternCache.set(createdIndexPattern.id!, Promise.resolve(createdIndexPattern)); if (this.savedObjectsCache) { this.savedObjectsCache.push(response as SavedObject); } - return indexPattern; + return createdIndexPattern; } /** diff --git a/src/plugins/data/common/index_patterns/types.ts b/src/plugins/data/common/index_patterns/types.ts index 0fcdea1a878eb..07aa8967b905e 100644 --- a/src/plugins/data/common/index_patterns/types.ts +++ b/src/plugins/data/common/index_patterns/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { ToastInputFields, ErrorToastOptions } from 'src/core/public/notifications'; // eslint-disable-next-line import type { SavedObject } from 'src/core/server'; @@ -167,7 +167,7 @@ export type FieldSpecConflictDescriptions = Record; export interface FieldSpecExportFmt { count?: number; script?: string; - lang?: string; + lang?: estypes.ScriptLanguage; conflictDescriptions?: FieldSpecConflictDescriptions; name: string; type: KBN_FIELD_TYPES; @@ -197,7 +197,7 @@ export interface FieldSpec { * Scripted field langauge * Painless is the only valid scripted field language */ - lang?: string; + lang?: estypes.ScriptLanguage; conflictDescriptions?: Record; format?: SerializedFieldFormat; name: string; diff --git a/src/plugins/data/common/search/aggs/agg_config.ts b/src/plugins/data/common/search/aggs/agg_config.ts index 283d276a22904..3c83b5bdf6084 100644 --- a/src/plugins/data/common/search/aggs/agg_config.ts +++ b/src/plugins/data/common/search/aggs/agg_config.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ +import moment from 'moment'; import _ from 'lodash'; import { i18n } from '@kbn/i18n'; import { Assign, Ensure } from '@kbn/utility-types'; @@ -20,6 +21,7 @@ import { import { IAggType } from './agg_type'; import { writeParams } from './agg_params'; import { IAggConfigs } from './agg_configs'; +import { parseTimeShift } from './utils'; type State = string | number | boolean | null | undefined | SerializableState; @@ -172,6 +174,31 @@ export class AggConfig { return _.get(this.params, key); } + hasTimeShift(): boolean { + return Boolean(this.getParam('timeShift')); + } + + getTimeShift(): undefined | moment.Duration { + const rawTimeShift = this.getParam('timeShift'); + if (!rawTimeShift) return undefined; + const parsedTimeShift = parseTimeShift(rawTimeShift); + if (parsedTimeShift === 'invalid') { + throw new Error(`could not parse time shift ${rawTimeShift}`); + } + if (parsedTimeShift === 'previous') { + const timeShiftInterval = this.aggConfigs.getTimeShiftInterval(); + if (timeShiftInterval) { + return timeShiftInterval; + } else if (!this.aggConfigs.timeRange) { + return; + } + return moment.duration( + moment(this.aggConfigs.timeRange.to).diff(this.aggConfigs.timeRange.from) + ); + } + return parsedTimeShift; + } + write(aggs?: IAggConfigs) { return writeParams(this.type.params, this, aggs); } diff --git a/src/plugins/data/common/search/aggs/agg_configs.test.ts b/src/plugins/data/common/search/aggs/agg_configs.test.ts index 28102544ae055..72ea64791fa5b 100644 --- a/src/plugins/data/common/search/aggs/agg_configs.test.ts +++ b/src/plugins/data/common/search/aggs/agg_configs.test.ts @@ -14,6 +14,7 @@ import { mockAggTypesRegistry } from './test_helpers'; import type { IndexPatternField } from '../../index_patterns'; import { IndexPattern } from '../../index_patterns/index_patterns/index_pattern'; import { stubIndexPattern, stubIndexPatternWithFields } from '../../../common/stubs'; +import { IEsSearchResponse } from '..'; describe('AggConfigs', () => { let indexPattern: IndexPattern; @@ -332,6 +333,109 @@ describe('AggConfigs', () => { }); }); + it('inserts a time split filters agg if there are multiple time shifts', () => { + const configStates = [ + { + enabled: true, + type: 'terms', + schema: 'segment', + params: { field: 'clientip', size: 10 }, + }, + { enabled: true, type: 'avg', schema: 'metric', params: { field: 'bytes' } }, + { + enabled: true, + type: 'sum', + schema: 'metric', + params: { field: 'bytes', timeShift: '1d' }, + }, + ]; + indexPattern.fields.push({ + name: 'timestamp', + type: 'date', + esTypes: ['date'], + aggregatable: true, + filterable: true, + searchable: true, + } as IndexPatternField); + + const ac = new AggConfigs(indexPattern, configStates, { typesRegistry }); + ac.timeFields = ['timestamp']; + ac.timeRange = { + from: '2021-05-05T00:00:00.000Z', + to: '2021-05-10T00:00:00.000Z', + }; + const dsl = ac.toDsl(); + + const terms = ac.byName('terms')[0]; + const avg = ac.byName('avg')[0]; + const sum = ac.byName('sum')[0]; + + expect(dsl[terms.id].aggs.time_offset_split.filters.filters).toMatchInlineSnapshot(` + Object { + "0": Object { + "range": Object { + "timestamp": Object { + "gte": "2021-05-05T00:00:00.000Z", + "lte": "2021-05-10T00:00:00.000Z", + }, + }, + }, + "86400000": Object { + "range": Object { + "timestamp": Object { + "gte": "2021-05-04T00:00:00.000Z", + "lte": "2021-05-09T00:00:00.000Z", + }, + }, + }, + } + `); + expect(dsl[terms.id].aggs.time_offset_split.aggs).toHaveProperty(avg.id); + expect(dsl[terms.id].aggs.time_offset_split.aggs).toHaveProperty(sum.id); + }); + + it('does not insert a time split if there is a single time shift', () => { + const configStates = [ + { + enabled: true, + type: 'terms', + schema: 'segment', + params: { field: 'clientip', size: 10 }, + }, + { + enabled: true, + type: 'avg', + schema: 'metric', + params: { + field: 'bytes', + timeShift: '1d', + }, + }, + { + enabled: true, + type: 'sum', + schema: 'metric', + params: { field: 'bytes', timeShift: '1d' }, + }, + ]; + + const ac = new AggConfigs(indexPattern, configStates, { typesRegistry }); + ac.timeFields = ['timestamp']; + ac.timeRange = { + from: '2021-05-05T00:00:00.000Z', + to: '2021-05-10T00:00:00.000Z', + }; + const dsl = ac.toDsl(); + + const terms = ac.byName('terms')[0]; + const avg = ac.byName('avg')[0]; + const sum = ac.byName('sum')[0]; + + expect(dsl[terms.id].aggs).not.toHaveProperty('time_offset_split'); + expect(dsl[terms.id].aggs).toHaveProperty(avg.id); + expect(dsl[terms.id].aggs).toHaveProperty(sum.id); + }); + it('writes multiple metric aggregations at every level if the vis is hierarchical', () => { const configStates = [ { enabled: true, type: 'terms', schema: 'segment', params: { field: 'bytes', orderBy: 1 } }, @@ -426,4 +530,246 @@ describe('AggConfigs', () => { ); }); }); + + describe('#postFlightTransform', () => { + it('merges together splitted responses for multiple shifts', () => { + indexPattern = stubIndexPattern as IndexPattern; + indexPattern.fields.getByName = (name) => (({ name } as unknown) as IndexPatternField); + const configStates = [ + { + enabled: true, + type: 'terms', + schema: 'segment', + params: { field: 'clientip', size: 10 }, + }, + { + enabled: true, + type: 'date_histogram', + schema: 'segment', + params: { field: '@timestamp', interval: '1d' }, + }, + { + enabled: true, + type: 'avg', + schema: 'metric', + params: { + field: 'bytes', + timeShift: '1d', + }, + }, + { + enabled: true, + type: 'sum', + schema: 'metric', + params: { field: 'bytes' }, + }, + ]; + + const ac = new AggConfigs(indexPattern, configStates, { typesRegistry }); + ac.timeFields = ['@timestamp']; + ac.timeRange = { + from: '2021-05-05T00:00:00.000Z', + to: '2021-05-10T00:00:00.000Z', + }; + // 1 terms bucket (A), with 2 date buckets (7th and 8th of May) + // the bucket keys of the shifted time range will be shifted forward + const response = { + rawResponse: { + aggregations: { + '1': { + buckets: [ + { + key: 'A', + time_offset_split: { + buckets: { + '0': { + 2: { + buckets: [ + { + // 2021-05-07 + key: 1620345600000, + 3: { + value: 1.1, + }, + 4: { + value: 2.2, + }, + }, + { + // 2021-05-08 + key: 1620432000000, + doc_count: 26, + 3: { + value: 3.3, + }, + 4: { + value: 4.4, + }, + }, + ], + }, + }, + '86400000': { + 2: { + buckets: [ + { + // 2021-05-07 + key: 1620345600000, + doc_count: 13, + 3: { + value: 5.5, + }, + 4: { + value: 6.6, + }, + }, + { + // 2021-05-08 + key: 1620432000000, + 3: { + value: 7.7, + }, + 4: { + value: 8.8, + }, + }, + ], + }, + }, + }, + }, + }, + ], + }, + }, + }, + }; + const mergedResponse = ac.postFlightTransform( + (response as unknown) as IEsSearchResponse + ); + expect(mergedResponse.rawResponse).toEqual({ + aggregations: { + '1': { + buckets: [ + { + '2': { + buckets: [ + { + '4': { + value: 2.2, + }, + // 2021-05-07 + key: 1620345600000, + }, + { + '3': { + value: 5.5, + }, + '4': { + value: 4.4, + }, + doc_count: 26, + doc_count_86400000: 13, + // 2021-05-08 + key: 1620432000000, + }, + { + '3': { + value: 7.7, + }, + // 2021-05-09 + key: 1620518400000, + }, + ], + }, + key: 'A', + }, + ], + }, + }, + }); + }); + + it('shifts date histogram keys and renames doc_count properties for single shift', () => { + indexPattern = stubIndexPattern as IndexPattern; + indexPattern.fields.getByName = (name) => (({ name } as unknown) as IndexPatternField); + const configStates = [ + { + enabled: true, + type: 'date_histogram', + schema: 'segment', + params: { field: '@timestamp', interval: '1d' }, + }, + { + enabled: true, + type: 'avg', + schema: 'metric', + params: { + field: 'bytes', + timeShift: '1d', + }, + }, + ]; + + const ac = new AggConfigs(indexPattern, configStates, { typesRegistry }); + ac.timeFields = ['@timestamp']; + ac.timeRange = { + from: '2021-05-05T00:00:00.000Z', + to: '2021-05-10T00:00:00.000Z', + }; + const response = { + rawResponse: { + aggregations: { + '1': { + buckets: [ + { + // 2021-05-07 + key: 1620345600000, + doc_count: 26, + 2: { + value: 1.1, + }, + }, + { + // 2021-05-08 + key: 1620432000000, + doc_count: 27, + 2: { + value: 2.2, + }, + }, + ], + }, + }, + }, + }; + const mergedResponse = ac.postFlightTransform( + (response as unknown) as IEsSearchResponse + ); + expect(mergedResponse.rawResponse).toEqual({ + aggregations: { + '1': { + buckets: [ + { + '2': { + value: 1.1, + }, + doc_count_86400000: 26, + // 2021-05-08 + key: 1620432000000, + }, + { + '2': { + value: 2.2, + }, + doc_count_86400000: 27, + // 2021-05-09 + key: 1620518400000, + }, + ], + }, + }, + }); + }); + }); }); diff --git a/src/plugins/data/common/search/aggs/agg_configs.ts b/src/plugins/data/common/search/aggs/agg_configs.ts index 2932ef7325aed..8593a0b0ed0fa 100644 --- a/src/plugins/data/common/search/aggs/agg_configs.ts +++ b/src/plugins/data/common/search/aggs/agg_configs.ts @@ -6,17 +6,26 @@ * Side Public License, v 1. */ -import _ from 'lodash'; +import moment from 'moment'; +import _, { cloneDeep } from 'lodash'; import { i18n } from '@kbn/i18n'; import { Assign } from '@kbn/utility-types'; - -import { ISearchOptions, ISearchSource } from 'src/plugins/data/public'; +import type { estypes } from '@elastic/elasticsearch'; + +import { + IEsSearchResponse, + ISearchOptions, + ISearchSource, + RangeFilter, +} from 'src/plugins/data/public'; import { AggConfig, AggConfigSerialized, IAggConfig } from './agg_config'; import { IAggType } from './agg_type'; import { AggTypesRegistryStart } from './agg_types_registry'; import { AggGroupNames } from './agg_groups'; import { IndexPattern } from '../../index_patterns/index_patterns/index_pattern'; -import { TimeRange } from '../../../common'; +import { TimeRange, getTime, isRangeFilter } from '../../../common'; +import { IBucketAggConfig } from './buckets'; +import { insertTimeShiftSplit, mergeTimeShifts } from './utils/time_splits'; function removeParentAggs(obj: any) { for (const prop in obj) { @@ -48,6 +57,10 @@ export interface AggConfigsOptions { export type CreateAggConfigParams = Assign; +export type GenericBucket = estypes.AggregationsBucket & { + [property: string]: estypes.AggregationsAggregate; +}; + /** * @name AggConfigs * @@ -66,6 +79,7 @@ export class AggConfigs { public indexPattern: IndexPattern; public timeRange?: TimeRange; public timeFields?: string[]; + public forceNow?: Date; public hierarchical?: boolean = false; private readonly typesRegistry: AggTypesRegistryStart; @@ -92,6 +106,10 @@ export class AggConfigs { this.timeFields = timeFields; } + setForceNow(now: Date | undefined) { + this.forceNow = now; + } + setTimeRange(timeRange: TimeRange) { this.timeRange = timeRange; @@ -183,7 +201,13 @@ export class AggConfigs { let dslLvlCursor: Record; let nestedMetrics: Array<{ config: AggConfig; dsl: Record }> | []; + const timeShifts = this.getTimeShifts(); + const hasMultipleTimeShifts = Object.keys(timeShifts).length > 1; + if (this.hierarchical) { + if (hasMultipleTimeShifts) { + throw new Error('Multiple time shifts not supported for hierarchical metrics'); + } // collect all metrics, and filter out the ones that we won't be copying nestedMetrics = this.aggs .filter(function (agg) { @@ -196,52 +220,67 @@ export class AggConfigs { }; }); } - this.getRequestAggs() - .filter((config: AggConfig) => !config.type.hasNoDsl) - .forEach((config: AggConfig, i: number, list) => { - if (!dslLvlCursor) { - // start at the top level - dslLvlCursor = dslTopLvl; - } else { - const prevConfig: AggConfig = list[i - 1]; - const prevDsl = dslLvlCursor[prevConfig.id]; + const requestAggs = this.getRequestAggs(); + const aggsWithDsl = requestAggs.filter((agg) => !agg.type.hasNoDsl).length; + const timeSplitIndex = this.getAll().findIndex( + (config) => 'splitForTimeShift' in config.type && config.type.splitForTimeShift(config, this) + ); - // advance the cursor and nest under the previous agg, or - // put it on the same level if the previous agg doesn't accept - // sub aggs - dslLvlCursor = prevDsl?.aggs || dslLvlCursor; - } + requestAggs.forEach((config: AggConfig, i: number, list) => { + if (!dslLvlCursor) { + // start at the top level + dslLvlCursor = dslTopLvl; + } else { + const prevConfig: AggConfig = list[i - 1]; + const prevDsl = dslLvlCursor[prevConfig.id]; + + // advance the cursor and nest under the previous agg, or + // put it on the same level if the previous agg doesn't accept + // sub aggs + dslLvlCursor = prevDsl?.aggs || dslLvlCursor; + } + + if (hasMultipleTimeShifts) { + dslLvlCursor = insertTimeShiftSplit(this, config, timeShifts, dslLvlCursor); + } - const dsl = config.type.hasNoDslParams - ? config.toDsl(this) - : (dslLvlCursor[config.id] = config.toDsl(this)); - let subAggs: any; + if (config.type.hasNoDsl) { + return; + } - parseParentAggs(dslLvlCursor, dsl); + const dsl = config.type.hasNoDslParams + ? config.toDsl(this) + : (dslLvlCursor[config.id] = config.toDsl(this)); + let subAggs: any; - if (config.type.type === AggGroupNames.Buckets && i < list.length - 1) { - // buckets that are not the last item in the list accept sub-aggs - subAggs = dsl.aggs || (dsl.aggs = {}); - } + parseParentAggs(dslLvlCursor, dsl); - if (subAggs) { - _.each(subAggs, (agg) => { - parseParentAggs(subAggs, agg); - }); - } - if (subAggs && nestedMetrics) { - nestedMetrics.forEach((agg: any) => { - subAggs[agg.config.id] = agg.dsl; - // if a nested metric agg has parent aggs, we have to add them to every level of the tree - // to make sure "bucket_path" references in the nested metric agg itself are still working - if (agg.dsl.parentAggs) { - Object.entries(agg.dsl.parentAggs).forEach(([parentAggId, parentAgg]) => { - subAggs[parentAggId] = parentAgg; - }); - } - }); - } - }); + if ( + config.type.type === AggGroupNames.Buckets && + (i < aggsWithDsl - 1 || timeSplitIndex > i) + ) { + // buckets that are not the last item in the list of dsl producing aggs or have a time split coming up accept sub-aggs + subAggs = dsl.aggs || (dsl.aggs = {}); + } + + if (subAggs) { + _.each(subAggs, (agg) => { + parseParentAggs(subAggs, agg); + }); + } + if (subAggs && nestedMetrics) { + nestedMetrics.forEach((agg: any) => { + subAggs[agg.config.id] = agg.dsl; + // if a nested metric agg has parent aggs, we have to add them to every level of the tree + // to make sure "bucket_path" references in the nested metric agg itself are still working + if (agg.dsl.parentAggs) { + Object.entries(agg.dsl.parentAggs).forEach(([parentAggId, parentAgg]) => { + subAggs[parentAggId] = parentAgg; + }); + } + }); + } + }); removeParentAggs(dslTopLvl); return dslTopLvl; @@ -289,6 +328,104 @@ export class AggConfigs { ); } + getTimeShifts(): Record { + const timeShifts: Record = {}; + this.getAll() + .filter((agg) => agg.schema === 'metric') + .map((agg) => agg.getTimeShift()) + .forEach((timeShift) => { + if (timeShift) { + timeShifts[String(timeShift.asMilliseconds())] = timeShift; + } else { + timeShifts[0] = moment.duration(0); + } + }); + return timeShifts; + } + + getTimeShiftInterval(): moment.Duration | undefined { + const splitAgg = (this.getAll().filter( + (agg) => agg.type.type === AggGroupNames.Buckets + ) as IBucketAggConfig[]).find((agg) => agg.type.splitForTimeShift(agg, this)); + return splitAgg?.type.getTimeShiftInterval(splitAgg); + } + + hasTimeShifts(): boolean { + return this.getAll().some((agg) => agg.hasTimeShift()); + } + + getSearchSourceTimeFilter(forceNow?: Date) { + if (!this.timeFields || !this.timeRange) { + return []; + } + const timeRange = this.timeRange; + const timeFields = this.timeFields; + const timeShifts = this.getTimeShifts(); + if (!this.hasTimeShifts()) { + return this.timeFields + .map((fieldName) => getTime(this.indexPattern, timeRange, { fieldName, forceNow })) + .filter(isRangeFilter); + } + return [ + { + meta: { + index: this.indexPattern?.id, + params: {}, + alias: '', + disabled: false, + negate: false, + }, + query: { + bool: { + should: Object.entries(timeShifts).map(([, shift]) => { + return { + bool: { + filter: timeFields + .map( + (fieldName) => + [ + getTime(this.indexPattern, timeRange, { fieldName, forceNow }), + fieldName, + ] as [RangeFilter | undefined, string] + ) + .filter(([filter]) => isRangeFilter(filter)) + .map(([filter, field]) => ({ + range: { + [field]: { + gte: moment(filter?.range[field].gte).subtract(shift).toISOString(), + lte: moment(filter?.range[field].lte).subtract(shift).toISOString(), + }, + }, + })), + }, + }; + }), + minimum_should_match: 1, + }, + }, + }, + ]; + } + + postFlightTransform(response: IEsSearchResponse) { + if (!this.hasTimeShifts()) { + return response; + } + const transformedRawResponse = cloneDeep(response.rawResponse); + if (!transformedRawResponse.aggregations) { + transformedRawResponse.aggregations = { + doc_count: response.rawResponse.hits?.total as estypes.AggregationsAggregate, + }; + } + const aggCursor = transformedRawResponse.aggregations!; + + mergeTimeShifts(this, aggCursor); + return { + ...response, + rawResponse: transformedRawResponse, + }; + } + getRequestAggById(id: string) { return this.aggs.find((agg: AggConfig) => agg.id === id); } diff --git a/src/plugins/data/common/search/aggs/agg_type.ts b/src/plugins/data/common/search/aggs/agg_type.ts index f0f3912bf64fe..48ce54bbd61bd 100644 --- a/src/plugins/data/common/search/aggs/agg_type.ts +++ b/src/plugins/data/common/search/aggs/agg_type.ts @@ -215,6 +215,10 @@ export class AggType< return agg.id; }; + splitForTimeShift(agg: TAggConfig, aggs: IAggConfigs) { + return false; + } + /** * Generic AggType Constructor * diff --git a/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts b/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts index 6230ae897b170..372d487bcf7a3 100644 --- a/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts +++ b/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.ts @@ -166,7 +166,7 @@ export const buildOtherBucketAgg = ( key: string ) => { // make sure there are actually results for the buckets - if (aggregations[aggId].buckets.length < 1) { + if (aggregations[aggId]?.buckets.length < 1) { noAggBucketResults = true; return; } diff --git a/src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts b/src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts index e9ed3799b90cf..d44e634a00fe6 100644 --- a/src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts +++ b/src/plugins/data/common/search/aggs/buckets/bucket_agg_type.ts @@ -6,8 +6,9 @@ * Side Public License, v 1. */ +import moment from 'moment'; import { IAggConfig } from '../agg_config'; -import { KBN_FIELD_TYPES } from '../../../../common'; +import { GenericBucket, IAggConfigs, KBN_FIELD_TYPES } from '../../../../common'; import { AggType, AggTypeConfig } from '../agg_type'; import { AggParamType } from '../param_types/agg'; @@ -26,6 +27,14 @@ const bucketType = 'buckets'; interface BucketAggTypeConfig extends AggTypeConfig> { getKey?: (bucket: any, key: any, agg: IAggConfig) => any; + getShiftedKey?: ( + agg: TBucketAggConfig, + key: string | number, + timeShift: moment.Duration + ) => string | number; + orderBuckets?(agg: TBucketAggConfig, a: GenericBucket, b: GenericBucket): number; + splitForTimeShift?(agg: TBucketAggConfig, aggs: IAggConfigs): boolean; + getTimeShiftInterval?(agg: TBucketAggConfig): undefined | moment.Duration; } export class BucketAggType extends AggType< @@ -35,6 +44,22 @@ export class BucketAggType any; type = bucketType; + getShiftedKey( + agg: TBucketAggConfig, + key: string | number, + timeShift: moment.Duration + ): string | number { + return key; + } + + getTimeShiftInterval(agg: TBucketAggConfig): undefined | moment.Duration { + return undefined; + } + + orderBuckets(agg: TBucketAggConfig, a: GenericBucket, b: GenericBucket): number { + return Number(a.key) - Number(b.key); + } + constructor(config: BucketAggTypeConfig) { super(config); @@ -43,6 +68,22 @@ export class BucketAggType { return key || bucket.key; }); + + if (config.getShiftedKey) { + this.getShiftedKey = config.getShiftedKey; + } + + if (config.orderBuckets) { + this.orderBuckets = config.orderBuckets; + } + + if (config.getTimeShiftInterval) { + this.getTimeShiftInterval = config.getTimeShiftInterval; + } + + if (config.splitForTimeShift) { + this.splitForTimeShift = config.splitForTimeShift; + } } } diff --git a/src/plugins/data/common/search/aggs/buckets/date_histogram.ts b/src/plugins/data/common/search/aggs/buckets/date_histogram.ts index 4a83ae38d34db..4cbf6562487b2 100644 --- a/src/plugins/data/common/search/aggs/buckets/date_histogram.ts +++ b/src/plugins/data/common/search/aggs/buckets/date_histogram.ts @@ -135,6 +135,17 @@ export const getDateHistogramBucketAgg = ({ }, }; }, + getShiftedKey(agg, key, timeShift) { + return moment(key).add(timeShift).valueOf(); + }, + splitForTimeShift(agg, aggs) { + return aggs.hasTimeShifts() && Boolean(aggs.timeFields?.includes(agg.fieldName())); + }, + getTimeShiftInterval(agg) { + const { useNormalizedEsInterval } = agg.params; + const interval = agg.buckets.getInterval(useNormalizedEsInterval); + return interval; + }, params: [ { name: 'field', diff --git a/src/plugins/data/common/search/aggs/buckets/terms.ts b/src/plugins/data/common/search/aggs/buckets/terms.ts index 1b876051d009b..b9329bcb25af3 100644 --- a/src/plugins/data/common/search/aggs/buckets/terms.ts +++ b/src/plugins/data/common/search/aggs/buckets/terms.ts @@ -9,6 +9,7 @@ import { noop } from 'lodash'; import { i18n } from '@kbn/i18n'; +import moment from 'moment'; import { BucketAggType, IBucketAggConfig } from './bucket_agg_type'; import { BUCKET_TYPES } from './bucket_agg_types'; import { createFilterTerms } from './create_filter/terms'; @@ -179,6 +180,54 @@ export const getTermsBucketAgg = () => return; } + if ( + aggs?.hasTimeShifts() && + Object.keys(aggs?.getTimeShifts()).length > 1 && + aggs.timeRange + ) { + const shift = orderAgg.getTimeShift(); + orderAgg = aggs.createAggConfig( + { + type: 'filtered_metric', + id: orderAgg.id, + params: { + customBucket: aggs + .createAggConfig( + { + type: 'filter', + id: 'shift', + params: { + filter: { + language: 'lucene', + query: { + range: { + [aggs.timeFields![0]]: { + gte: moment(aggs.timeRange.from) + .subtract(shift || 0) + .toISOString(), + lte: moment(aggs.timeRange.to) + .subtract(shift || 0) + .toISOString(), + }, + }, + }, + }, + }, + }, + { + addToAggConfigs: false, + } + ) + .serialize(), + customMetric: orderAgg.serialize(), + }, + enabled: false, + }, + { + addToAggConfigs: false, + } + ); + } if (orderAgg.type.name === 'count') { order._count = dir; return; diff --git a/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts index 05a6e9eeff7d7..0b794617fb96e 100644 --- a/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/avg_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "avg", diff --git a/src/plugins/data/common/search/aggs/metrics/avg_fn.ts b/src/plugins/data/common/search/aggs/metrics/avg_fn.ts index 253013238d10e..e32de6cd0a83f 100644 --- a/src/plugins/data/common/search/aggs/metrics/avg_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/avg_fn.ts @@ -62,6 +62,13 @@ export const aggAvg = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts index 33f20b9a40dc2..ac214c1a1591c 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "avg_bucket", @@ -42,11 +43,13 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "avg_bucket", }, "json": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts index b79e57207ebd8..a980f6ac555a2 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_avg_fn.ts @@ -77,6 +77,13 @@ export const aggBucketAvg = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts index 35b765ec0e075..e6db7665a68dd 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "max_bucket", @@ -42,11 +43,13 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "max_bucket", }, "json": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts index e12a592448334..0d3e8a5e7f878 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_max_fn.ts @@ -77,6 +77,13 @@ export const aggBucketMax = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts index 49346036ce649..22ec55506fe90 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "min_bucket", @@ -42,11 +43,13 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "min_bucket", }, "json": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts index ece5c07c6e5f8..3b6c32595909a 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_min_fn.ts @@ -77,6 +77,13 @@ export const aggBucketMin = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts index 0f5c84a477b06..0e3370cec14e5 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "sum_bucket", @@ -42,11 +43,13 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "customMetric": undefined, "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "sum_bucket", }, "json": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts index 5fe0ee75bfe38..ae3502bbc2588 100644 --- a/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/bucket_sum_fn.ts @@ -77,6 +77,13 @@ export const aggBucketSum = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts index 8b235edacb59a..08d64e599d8a9 100644 --- a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "cardinality", diff --git a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts index ee0f72e01e1de..89006761407f7 100644 --- a/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/cardinality_fn.ts @@ -67,6 +67,13 @@ export const aggCardinality = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/count.ts b/src/plugins/data/common/search/aggs/metrics/count.ts index 8a10d7edb3f83..fac1751290f70 100644 --- a/src/plugins/data/common/search/aggs/metrics/count.ts +++ b/src/plugins/data/common/search/aggs/metrics/count.ts @@ -31,7 +31,12 @@ export const getCountMetricAgg = () => }; }, getValue(agg, bucket) { - return bucket.doc_count; + const timeShift = agg.getTimeShift(); + if (!timeShift) { + return bucket.doc_count; + } else { + return bucket[`doc_count_${timeShift.asMilliseconds()}`]; + } }, isScalable() { return true; diff --git a/src/plugins/data/common/search/aggs/metrics/count_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/count_fn.test.ts index 047b9bbd8517f..c6736c5b69f7d 100644 --- a/src/plugins/data/common/search/aggs/metrics/count_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/count_fn.test.ts @@ -23,6 +23,7 @@ describe('agg_expression_functions', () => { "id": undefined, "params": Object { "customLabel": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "count", diff --git a/src/plugins/data/common/search/aggs/metrics/count_fn.ts b/src/plugins/data/common/search/aggs/metrics/count_fn.ts index 40c87db57eedc..a3a4bcc16a391 100644 --- a/src/plugins/data/common/search/aggs/metrics/count_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/count_fn.ts @@ -54,6 +54,13 @@ export const aggCount = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts index 5eb6d2b780442..f311ab35a8d0d 100644 --- a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "cumulative_sum", @@ -54,6 +55,7 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": "sum", + "timeShift": undefined, }, "schema": undefined, "type": "cumulative_sum", @@ -81,12 +83,14 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "cumulative_sum", }, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts index cba4de1ad11ae..5cdbcfe857585 100644 --- a/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/cumulative_sum_fn.ts @@ -81,6 +81,13 @@ export const aggCumulativeSum = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts index 1eaca811a2481..3e4fc838dd398 100644 --- a/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/derivative_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "derivative", @@ -54,6 +55,7 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": "sum", + "timeShift": undefined, }, "schema": undefined, "type": "derivative", @@ -81,12 +83,14 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "derivative", }, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts b/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts index e27179c7209ad..8bfe808aede8e 100644 --- a/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/derivative_fn.ts @@ -81,6 +81,13 @@ export const aggDerivative = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts b/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts index aa2417bbf8415..00f47d31b0398 100644 --- a/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts +++ b/src/plugins/data/common/search/aggs/metrics/filtered_metric.ts @@ -42,7 +42,7 @@ export const getFilteredMetricAgg = () => { getValue(agg, bucket) { const customMetric = agg.getParam('customMetric'); const customBucket = agg.getParam('customBucket'); - return customMetric.getValue(bucket[customBucket.id]); + return bucket && bucket[customBucket.id] && customMetric.getValue(bucket[customBucket.id]); }, getValueBucketPath(agg) { const customBucket = agg.getParam('customBucket'); diff --git a/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.test.ts index 22e97fe18b604..d1ce6ff463903 100644 --- a/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.test.ts @@ -28,6 +28,7 @@ describe('agg_expression_functions', () => { "customBucket": undefined, "customLabel": undefined, "customMetric": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "filtered_metric", @@ -40,10 +41,12 @@ describe('agg_expression_functions', () => { "customBucket": undefined, "customLabel": undefined, "customMetric": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "filtered_metric", }, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.ts b/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.ts index 6a7ff5fa5fd40..0b3d3acd3a603 100644 --- a/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/filtered_metric_fn.ts @@ -72,6 +72,13 @@ export const aggFilteredMetric = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts index c48233e84404c..50b5f5b60376b 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "geo_bounds", diff --git a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts index 19d2dabc843dd..b2cfad1805b9f 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_bounds_fn.ts @@ -67,6 +67,13 @@ export const aggGeoBounds = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts index e984df13527ca..889ed29c63ee1 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "geo_centroid", diff --git a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts index 1cc11c345e9ba..9215f7afb4c6d 100644 --- a/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/geo_centroid_fn.ts @@ -67,6 +67,13 @@ export const aggGeoCentroid = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts index d94e01927c851..021c5aac69e10 100644 --- a/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/max_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "max", diff --git a/src/plugins/data/common/search/aggs/metrics/max_fn.ts b/src/plugins/data/common/search/aggs/metrics/max_fn.ts index 7eac992680737..7a1d8ad22fb7e 100644 --- a/src/plugins/data/common/search/aggs/metrics/max_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/max_fn.ts @@ -62,6 +62,13 @@ export const aggMax = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/median.ts b/src/plugins/data/common/search/aggs/metrics/median.ts index bad4c7baf173f..4fdb1ce6b7d81 100644 --- a/src/plugins/data/common/search/aggs/metrics/median.ts +++ b/src/plugins/data/common/search/aggs/metrics/median.ts @@ -46,7 +46,7 @@ export const getMedianMetricAgg = () => { { name: 'percents', default: [50], shouldShow: () => false, serialize: () => undefined }, ], getValue(agg, bucket) { - return bucket[agg.id].values['50.0']; + return bucket[agg.id]?.values['50.0']; }, }); }; diff --git a/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts index e70520b743e17..7ff7f18cdbc02 100644 --- a/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/median_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "median", diff --git a/src/plugins/data/common/search/aggs/metrics/median_fn.ts b/src/plugins/data/common/search/aggs/metrics/median_fn.ts index 1c0afd81a63c4..a9537e1f99ca4 100644 --- a/src/plugins/data/common/search/aggs/metrics/median_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/median_fn.ts @@ -67,6 +67,13 @@ export const aggMedian = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts b/src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts index 3ebb771413665..6ddb0fdd9410d 100644 --- a/src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts +++ b/src/plugins/data/common/search/aggs/metrics/metric_agg_type.ts @@ -11,7 +11,8 @@ import { AggType, AggTypeConfig } from '../agg_type'; import { AggParamType } from '../param_types/agg'; import { AggConfig } from '../agg_config'; import { METRIC_TYPES } from './metric_agg_types'; -import { FieldTypes } from '../param_types'; +import { BaseParamType, FieldTypes } from '../param_types'; +import { AggGroupNames } from '../agg_groups'; export interface IMetricAggConfig extends AggConfig { type: InstanceType; @@ -47,6 +48,14 @@ export class MetricAggType) { super(config); + this.params.push( + new BaseParamType({ + name: 'timeShift', + type: 'string', + write: () => {}, + }) as MetricAggParam + ); + this.getValue = config.getValue || ((agg, bucket) => { @@ -69,6 +78,14 @@ export class MetricAggType false); + + // split at this point if there are time shifts and this is the first metric + this.splitForTimeShift = (agg, aggs) => + aggs.hasTimeShifts() && + aggs.byType(AggGroupNames.Metrics)[0] === agg && + !aggs + .byType(AggGroupNames.Buckets) + .some((bucketAgg) => bucketAgg.type.splitForTimeShift(bucketAgg, aggs)); } } diff --git a/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts index ea2d2cd23edae..fee4b28882408 100644 --- a/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/min_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "min", diff --git a/src/plugins/data/common/search/aggs/metrics/min_fn.ts b/src/plugins/data/common/search/aggs/metrics/min_fn.ts index 6dfbac1ecb8b4..a97834f310a49 100644 --- a/src/plugins/data/common/search/aggs/metrics/min_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/min_fn.ts @@ -62,6 +62,13 @@ export const aggMin = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts index bde90c563afc1..645519a668376 100644 --- a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.test.ts @@ -30,6 +30,7 @@ describe('agg_expression_functions', () => { "json": undefined, "metricAgg": undefined, "script": undefined, + "timeShift": undefined, "window": undefined, }, "schema": undefined, @@ -59,6 +60,7 @@ describe('agg_expression_functions', () => { "json": undefined, "metricAgg": "sum", "script": "test", + "timeShift": undefined, "window": 10, }, "schema": undefined, @@ -88,6 +90,7 @@ describe('agg_expression_functions', () => { "json": undefined, "metricAgg": undefined, "script": undefined, + "timeShift": undefined, "window": undefined, }, "schema": undefined, @@ -96,6 +99,7 @@ describe('agg_expression_functions', () => { "json": undefined, "metricAgg": undefined, "script": undefined, + "timeShift": undefined, "window": undefined, } `); diff --git a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts index 667c585226a52..1637dad561c37 100644 --- a/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/moving_avg_fn.ts @@ -94,6 +94,13 @@ export const aggMovingAvg = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts index 9328597b24cfa..873765374c80a 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, "values": undefined, }, "schema": undefined, @@ -51,6 +52,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, "values": Array [ 1, 2, diff --git a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts index 7929a01c0b589..60a2882fcec58 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentile_ranks_fn.ts @@ -74,6 +74,13 @@ export const aggPercentileRanks = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts index 0d71df240d122..468da036cea88 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.test.ts @@ -28,6 +28,7 @@ describe('agg_expression_functions', () => { "field": "machine.os.keyword", "json": undefined, "percents": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "percentiles", @@ -56,6 +57,7 @@ describe('agg_expression_functions', () => { 2, 3, ], + "timeShift": undefined, }, "schema": undefined, "type": "percentiles", diff --git a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts index fa5120dfc3b97..1a746a86cbcd5 100644 --- a/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/percentiles_fn.ts @@ -74,6 +74,13 @@ export const aggPercentiles = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts index 065ef8021cbda..aa73d5c44dd7f 100644 --- a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.test.ts @@ -29,6 +29,7 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "serial_diff", @@ -54,6 +55,7 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": "sum", + "timeShift": undefined, }, "schema": undefined, "type": "serial_diff", @@ -81,12 +83,14 @@ describe('agg_expression_functions', () => { "customMetric": undefined, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "serial_diff", }, "json": undefined, "metricAgg": undefined, + "timeShift": undefined, } `); }); diff --git a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts index 925d85774c7ad..8460cb891f1e4 100644 --- a/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/serial_diff_fn.ts @@ -81,6 +81,13 @@ export const aggSerialDiff = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/single_percentile_fn.ts b/src/plugins/data/common/search/aggs/metrics/single_percentile_fn.ts index e7ef22c6faeee..edf69031c31ac 100644 --- a/src/plugins/data/common/search/aggs/metrics/single_percentile_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/single_percentile_fn.ts @@ -74,6 +74,13 @@ export const aggSinglePercentile = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts index 9aaf82e65812b..849987695dc7c 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "std_dev", diff --git a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts index 80787a3383c6b..c181065d2416e 100644 --- a/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/std_deviation_fn.ts @@ -67,6 +67,13 @@ export const aggStdDeviation = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts index e19fc072e1cd9..f4d4fb5451dcd 100644 --- a/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/sum_fn.test.ts @@ -27,6 +27,7 @@ describe('agg_expression_functions', () => { "customLabel": undefined, "field": "machine.os.keyword", "json": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "sum", diff --git a/src/plugins/data/common/search/aggs/metrics/sum_fn.ts b/src/plugins/data/common/search/aggs/metrics/sum_fn.ts index d0175e0c8fafe..d8e03d28bb12a 100644 --- a/src/plugins/data/common/search/aggs/metrics/sum_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/sum_fn.ts @@ -62,6 +62,13 @@ export const aggSum = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts index e9d6a619a9cd6..2f8ef74b5c2f0 100644 --- a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts +++ b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.test.ts @@ -32,6 +32,7 @@ describe('agg_expression_functions', () => { "size": undefined, "sortField": undefined, "sortOrder": undefined, + "timeShift": undefined, }, "schema": undefined, "type": "top_hits", @@ -64,6 +65,7 @@ describe('agg_expression_functions', () => { "size": 6, "sortField": "_score", "sortOrder": "asc", + "timeShift": undefined, }, "schema": "whatever", "type": "top_hits", diff --git a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts index 85b54f1695493..bc20f19253eec 100644 --- a/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts +++ b/src/plugins/data/common/search/aggs/metrics/top_hit_fn.ts @@ -94,6 +94,13 @@ export const aggTopHit = (): FunctionDefinition => ({ defaultMessage: 'Represents a custom label for this aggregation', }), }, + timeShift: { + types: ['string'], + help: i18n.translate('data.search.aggs.metrics.timeShift.help', { + defaultMessage: + 'Shift the time range for the metric by a set time, for example 1h or 7d. "previous" will use the closest time range from the date histogram or time range filter.', + }), + }, }, fn: (input, args) => { const { id, enabled, schema, ...rest } = args; diff --git a/src/plugins/data/common/search/aggs/types.ts b/src/plugins/data/common/search/aggs/types.ts index 675be2323b93e..c0eb0c6c241a9 100644 --- a/src/plugins/data/common/search/aggs/types.ts +++ b/src/plugins/data/common/search/aggs/types.ts @@ -132,6 +132,7 @@ export type AggsStart = Assign { + const trimmedVal = val.trim(); + if (trimmedVal === 'previous') { + return 'previous'; + } + const [, amount, unit] = trimmedVal.match(/^(\d+)(\w)$/) || []; + const parsedAmount = Number(amount); + if (Number.isNaN(parsedAmount) || !allowedUnits.includes(unit as AllowedUnit)) { + return 'invalid'; + } + return moment.duration(Number(amount), unit as AllowedUnit); +}; diff --git a/src/plugins/data/common/search/aggs/utils/time_splits.ts b/src/plugins/data/common/search/aggs/utils/time_splits.ts new file mode 100644 index 0000000000000..75c1c091e0756 --- /dev/null +++ b/src/plugins/data/common/search/aggs/utils/time_splits.ts @@ -0,0 +1,446 @@ +/* + * Copyright 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 moment from 'moment'; +import _, { isArray } from 'lodash'; +import type { estypes } from '@elastic/elasticsearch'; + +import { AggGroupNames } from '../agg_groups'; +import { GenericBucket, AggConfigs, getTime, AggConfig } from '../../../../common'; +import { IBucketAggConfig } from '../buckets'; + +/** + * This function will transform an ES response containg a time split (using a filters aggregation before the metrics or date histogram aggregation), + * merging together all branches for the different time ranges into a single response structure which can be tabified into a single table. + * + * If there is just a single time shift, there are no separate branches per time range - in this case only the date histogram keys are shifted by the + * configured amount of time. + * + * To do this, the following steps are taken: + * * Traverse the response tree, tracking the current agg config + * * Once the node which would contain the time split object is found, merge all separate time range buckets into a single layer of buckets of the parent agg + * * Recursively repeat this process for all nested sub-buckets + * + * Example input: + * ``` + * "aggregations" : { + "product" : { + "buckets" : [ + { + "key" : "Product A", + "doc_count" : 512, + "first_year" : { + "doc_count" : 418, + "overall_revenue" : { + "value" : 2163634.0 + } + }, + "time_offset_split" : { + "buckets" : { + "-1y" : { + "doc_count" : 420, + "year" : { + "buckets" : [ + { + "key_as_string" : "2018", + "doc_count" : 81, + "revenue" : { + "value" : 505124.0 + } + }, + { + "key_as_string" : "2019", + "doc_count" : 65, + "revenue" : { + "value" : 363058.0 + } + } + ] + } + }, + "regular" : { + "doc_count" : 418, + "year" : { + "buckets" : [ + { + "key_as_string" : "2019", + "doc_count" : 65, + "revenue" : { + "value" : 363058.0 + } + }, + { + "key_as_string" : "2020", + "doc_count" : 84, + "revenue" : { + "value" : 392924.0 + } + } + ] + } + } + } + } + }, + { + "key" : "Product B", + "doc_count" : 248, + "first_year" : { + "doc_count" : 215, + "overall_revenue" : { + "value" : 1315547.0 + } + }, + "time_offset_split" : { + "buckets" : { + "-1y" : { + "doc_count" : 211, + "year" : { + "buckets" : [ + { + "key_as_string" : "2018", + "key" : 1618963200000, + "doc_count" : 28, + "revenue" : { + "value" : 156543.0 + } + }, + // ... + * ``` + * + * Example output: + * ``` + * "aggregations" : { + "product" : { + "buckets" : [ + { + "key" : "Product A", + "doc_count" : 512, + "first_year" : { + "doc_count" : 418, + "overall_revenue" : { + "value" : 2163634.0 + } + }, + "year" : { + "buckets" : [ + { + "key_as_string" : "2019", + "doc_count" : 81, + "revenue_regular" : { + "value" : 505124.0 + }, + "revenue_-1y" : { + "value" : 302736.0 + } + }, + { + "key_as_string" : "2020", + "doc_count" : 78, + "revenue_regular" : { + "value" : 392924.0 + }, + "revenue_-1y" : { + "value" : 363058.0 + }, + } + // ... + * ``` + * + * + * @param aggConfigs The agg configs instance + * @param aggCursor The root aggregations object from the response which will be mutated in place + */ +export function mergeTimeShifts( + aggConfigs: AggConfigs, + aggCursor: Record +) { + const timeShifts = aggConfigs.getTimeShifts(); + const hasMultipleTimeShifts = Object.keys(timeShifts).length > 1; + const requestAggs = aggConfigs.getRequestAggs(); + const bucketAggs = aggConfigs.aggs.filter( + (agg) => agg.type.type === AggGroupNames.Buckets + ) as IBucketAggConfig[]; + const mergeAggLevel = ( + target: GenericBucket, + source: GenericBucket, + shift: moment.Duration, + aggIndex: number + ) => { + Object.entries(source).forEach(([key, val]) => { + // copy over doc count into special key + if (typeof val === 'number' && key === 'doc_count') { + if (shift.asMilliseconds() === 0) { + target.doc_count = val; + } else { + target[`doc_count_${shift.asMilliseconds()}`] = val; + } + } else if (typeof val !== 'object') { + // other meta keys not of interest + return; + } else { + // a sub-agg + const agg = requestAggs.find((requestAgg) => key.indexOf(requestAgg.id) === 0); + if (agg && agg.type.type === AggGroupNames.Metrics) { + const timeShift = agg.getTimeShift(); + if ( + (timeShift && timeShift.asMilliseconds() === shift.asMilliseconds()) || + (shift.asMilliseconds() === 0 && !timeShift) + ) { + // this is a metric from the current time shift, copy it over + target[key] = source[key]; + } + } else if (agg && agg === bucketAggs[aggIndex]) { + const bucketAgg = agg as IBucketAggConfig; + // expected next bucket sub agg + const subAggregate = val as estypes.AggregationsAggregate; + const buckets = ('buckets' in subAggregate ? subAggregate.buckets : undefined) as + | GenericBucket[] + | Record + | undefined; + if (!target[key]) { + // sub aggregate only exists in shifted branch, not in base branch - create dummy aggregate + // which will be filled with shifted data + target[key] = { + buckets: isArray(buckets) ? [] : {}, + }; + } + const baseSubAggregate = target[key] as estypes.AggregationsAggregate; + // only supported bucket formats in agg configs are array of buckets and record of buckets for filters + const baseBuckets = ('buckets' in baseSubAggregate + ? baseSubAggregate.buckets + : undefined) as GenericBucket[] | Record | undefined; + // merge + if (isArray(buckets) && isArray(baseBuckets)) { + const baseBucketMap: Record = {}; + baseBuckets.forEach((bucket) => { + baseBucketMap[String(bucket.key)] = bucket; + }); + buckets.forEach((bucket) => { + const bucketKey = bucketAgg.type.getShiftedKey(bucketAgg, bucket.key, shift); + // if a bucket is missing in the map, create an empty one + if (!baseBucketMap[bucketKey]) { + baseBucketMap[String(bucketKey)] = { + key: bucketKey, + } as GenericBucket; + } + mergeAggLevel(baseBucketMap[bucketKey], bucket, shift, aggIndex + 1); + }); + (baseSubAggregate as estypes.AggregationsMultiBucketAggregate).buckets = Object.values( + baseBucketMap + ).sort((a, b) => bucketAgg.type.orderBuckets(bucketAgg, a, b)); + } else if (baseBuckets && buckets && !isArray(baseBuckets)) { + Object.entries(buckets).forEach(([bucketKey, bucket]) => { + // if a bucket is missing in the base response, create an empty one + if (!baseBuckets[bucketKey]) { + baseBuckets[bucketKey] = {} as GenericBucket; + } + mergeAggLevel(baseBuckets[bucketKey], bucket, shift, aggIndex + 1); + }); + } + } + } + }); + }; + const transformTimeShift = ( + cursor: Record, + aggIndex: number + ): undefined => { + const shouldSplit = aggConfigs.aggs[aggIndex].type.splitForTimeShift( + aggConfigs.aggs[aggIndex], + aggConfigs + ); + if (shouldSplit) { + // multiple time shifts caused a filters agg in the tree we have to merge + if (hasMultipleTimeShifts && cursor.time_offset_split) { + const timeShiftedBuckets = (cursor.time_offset_split as estypes.AggregationsFiltersAggregate) + .buckets as Record; + const subTree = {}; + Object.entries(timeShifts).forEach(([key, shift]) => { + mergeAggLevel( + subTree as GenericBucket, + timeShiftedBuckets[key] as GenericBucket, + shift, + aggIndex + ); + }); + + delete cursor.time_offset_split; + Object.assign(cursor, subTree); + } else { + // otherwise we have to "merge" a single level to shift all keys + const [[, shift]] = Object.entries(timeShifts); + const subTree = {}; + mergeAggLevel(subTree, cursor, shift, aggIndex); + Object.assign(cursor, subTree); + } + return; + } + // recurse deeper into the response object + Object.keys(cursor).forEach((subAggId) => { + const subAgg = cursor[subAggId]; + if (typeof subAgg !== 'object' || !('buckets' in subAgg)) { + return; + } + if (isArray(subAgg.buckets)) { + subAgg.buckets.forEach((bucket) => transformTimeShift(bucket, aggIndex + 1)); + } else { + Object.values(subAgg.buckets).forEach((bucket) => transformTimeShift(bucket, aggIndex + 1)); + } + }); + }; + transformTimeShift(aggCursor, 0); +} + +/** + * Inserts a filters aggregation into the aggregation tree which splits buckets to fetch data for all time ranges + * configured in metric aggregations. + * + * The current agg config can implement `splitForTimeShift` to force insertion of the time split filters aggregation + * before the dsl of the agg config (date histogram and metrics aggregations do this) + * + * Example aggregation tree without time split: + * ``` + * "aggs": { + "product": { + "terms": { + "field": "product", + "size": 3, + "order": { "overall_revenue": "desc" } + }, + "aggs": { + "overall_revenue": { + "sum": { + "field": "sales" + } + }, + "year": { + "date_histogram": { + "field": "timestamp", + "interval": "year" + }, + "aggs": { + "revenue": { + "sum": { + "field": "sales" + } + } + } + // ... + * ``` + * + * Same aggregation tree with inserted time split: + * ``` + * "aggs": { + "product": { + "terms": { + "field": "product", + "size": 3, + "order": { "first_year>overall_revenue": "desc" } + }, + "aggs": { + "first_year": { + "filter": { + "range": { + "timestamp": { + "gte": "2019", + "lte": "2020" + } + } + }, + "aggs": { + "overall_revenue": { + "sum": { + "field": "sales" + } + } + } + }, + "time_offset_split": { + "filters": { + "filters": { + "regular": { + "range": { + "timestamp": { + "gte": "2019", + "lte": "2020" + } + } + }, + "-1y": { + "range": { + "timestamp": { + "gte": "2018", + "lte": "2019" + } + } + } + } + }, + "aggs": { + "year": { + "date_histogram": { + "field": "timestamp", + "interval": "year" + }, + "aggs": { + "revenue": { + "sum": { + "field": "sales" + } + } + } + } + } + } + } + * ``` + */ +export function insertTimeShiftSplit( + aggConfigs: AggConfigs, + config: AggConfig, + timeShifts: Record, + dslLvlCursor: Record +) { + if ('splitForTimeShift' in config.type && !config.type.splitForTimeShift(config, aggConfigs)) { + return dslLvlCursor; + } + if (!aggConfigs.timeFields || aggConfigs.timeFields.length < 1) { + throw new Error('Time shift can only be used with configured time field'); + } + if (!aggConfigs.timeRange) { + throw new Error('Time shift can only be used with configured time range'); + } + const timeRange = aggConfigs.timeRange; + const filters: Record = {}; + const timeField = aggConfigs.timeFields[0]; + Object.entries(timeShifts).forEach(([key, shift]) => { + const timeFilter = getTime(aggConfigs.indexPattern, timeRange, { + fieldName: timeField, + forceNow: aggConfigs.forceNow, + }); + if (timeFilter) { + filters[key] = { + range: { + [timeField]: { + gte: moment(timeFilter.range[timeField].gte).subtract(shift).toISOString(), + lte: moment(timeFilter.range[timeField].lte).subtract(shift).toISOString(), + }, + }, + }; + } + }); + dslLvlCursor.time_offset_split = { + filters: { + filters, + }, + aggs: {}, + }; + + return dslLvlCursor.time_offset_split.aggs; +} diff --git a/src/plugins/data/common/search/expressions/esaggs/request_handler.test.ts b/src/plugins/data/common/search/expressions/esaggs/request_handler.test.ts index 32775464d055f..4f255cf4c244c 100644 --- a/src/plugins/data/common/search/expressions/esaggs/request_handler.test.ts +++ b/src/plugins/data/common/search/expressions/esaggs/request_handler.test.ts @@ -42,6 +42,7 @@ describe('esaggs expression function - public', () => { toDsl: jest.fn().mockReturnValue({ aggs: {} }), onSearchRequestStart: jest.fn(), setTimeFields: jest.fn(), + setForceNow: jest.fn(), } as unknown) as jest.Mocked, filters: undefined, indexPattern: ({ id: 'logstash-*' } as unknown) as jest.Mocked, diff --git a/src/plugins/data/common/search/expressions/esaggs/request_handler.ts b/src/plugins/data/common/search/expressions/esaggs/request_handler.ts index d152ebf159a8e..61193c52a5e74 100644 --- a/src/plugins/data/common/search/expressions/esaggs/request_handler.ts +++ b/src/plugins/data/common/search/expressions/esaggs/request_handler.ts @@ -9,15 +9,7 @@ import { i18n } from '@kbn/i18n'; import { Adapters } from 'src/plugins/inspector/common'; -import { - calculateBounds, - Filter, - getTime, - IndexPattern, - isRangeFilter, - Query, - TimeRange, -} from '../../../../common'; +import { calculateBounds, Filter, IndexPattern, Query, TimeRange } from '../../../../common'; import { IAggConfigs } from '../../aggs'; import { ISearchStartSearchSource } from '../../search_source'; @@ -70,8 +62,15 @@ export const handleRequest = async ({ const timeFilterSearchSource = searchSource.createChild({ callParentStartHandlers: true }); const requestSearchSource = timeFilterSearchSource.createChild({ callParentStartHandlers: true }); + // If timeFields have been specified, use the specified ones, otherwise use primary time field of index + // pattern if it's available. + const defaultTimeField = indexPattern?.getTimeField?.(); + const defaultTimeFields = defaultTimeField ? [defaultTimeField.name] : []; + const allTimeFields = timeFields && timeFields.length > 0 ? timeFields : defaultTimeFields; + aggs.setTimeRange(timeRange as TimeRange); - aggs.setTimeFields(timeFields); + aggs.setForceNow(forceNow); + aggs.setTimeFields(allTimeFields); // For now we need to mirror the history of the passed search source, since // the request inspector wouldn't work otherwise. @@ -90,19 +89,11 @@ export const handleRequest = async ({ return aggs.onSearchRequestStart(paramSearchSource, options); }); - // If timeFields have been specified, use the specified ones, otherwise use primary time field of index - // pattern if it's available. - const defaultTimeField = indexPattern?.getTimeField?.(); - const defaultTimeFields = defaultTimeField ? [defaultTimeField.name] : []; - const allTimeFields = timeFields && timeFields.length > 0 ? timeFields : defaultTimeFields; - // If a timeRange has been specified and we had at least one timeField available, create range // filters for that those time fields if (timeRange && allTimeFields.length > 0) { timeFilterSearchSource.setField('filter', () => { - return allTimeFields - .map((fieldName) => getTime(indexPattern, timeRange, { fieldName, forceNow })) - .filter(isRangeFilter); + return aggs.getSearchSourceTimeFilter(forceNow); }); } diff --git a/src/plugins/data/common/search/search_source/mocks.ts b/src/plugins/data/common/search/search_source/mocks.ts index 64ed82f36e81b..c8769141a71d6 100644 --- a/src/plugins/data/common/search/search_source/mocks.ts +++ b/src/plugins/data/common/search/search_source/mocks.ts @@ -45,6 +45,10 @@ export const searchSourceCommonMock: jest.Mocked = { export const createSearchSourceMock = (fields?: SearchSourceFields) => new SearchSource(fields, { getConfig: uiSettingsServiceMock.createStartContract().get, - search: jest.fn(), + search: jest + .fn() + .mockReturnValue( + of({ rawResponse: { hits: { hits: [], total: 0 } }, isPartial: false, isRunning: false }) + ), onResponse: jest.fn().mockImplementation((req, res) => res), }); diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index f35d2d47f1bf4..19e80c7a487dc 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -75,7 +75,13 @@ import { estypes } from '@elastic/elasticsearch'; import { normalizeSortRequest } from './normalize_sort_request'; import { fieldWildcardFilter } from '../../../../kibana_utils/common'; import { IIndexPattern, IndexPattern, IndexPatternField } from '../../index_patterns'; -import { AggConfigs, ES_SEARCH_STRATEGY, ISearchGeneric, ISearchOptions } from '../..'; +import { + AggConfigs, + ES_SEARCH_STRATEGY, + IEsSearchResponse, + ISearchGeneric, + ISearchOptions, +} from '../..'; import type { ISearchSource, SearchFieldValue, @@ -414,6 +420,15 @@ export class SearchSource { } } + private postFlightTransform(response: IEsSearchResponse) { + const aggs = this.getField('aggs'); + if (aggs instanceof AggConfigs) { + return aggs.postFlightTransform(response); + } else { + return response; + } + } + private async fetchOthers(response: estypes.SearchResponse, options: ISearchOptions) { const aggs = this.getField('aggs'); if (aggs instanceof AggConfigs) { @@ -451,24 +466,26 @@ export class SearchSource { if (isErrorResponse(response)) { obs.error(response); } else if (isPartialResponse(response)) { - obs.next(response); + obs.next(this.postFlightTransform(response)); } else { if (!this.hasPostFlightRequests()) { - obs.next(response); + obs.next(this.postFlightTransform(response)); obs.complete(); } else { // Treat the complete response as partial, then run the postFlightRequests. obs.next({ - ...response, + ...this.postFlightTransform(response), isPartial: true, isRunning: true, }); const sub = from(this.fetchOthers(response.rawResponse, options)).subscribe({ next: (responseWithOther) => { - obs.next({ - ...response, - rawResponse: responseWithOther, - }); + obs.next( + this.postFlightTransform({ + ...response, + rawResponse: responseWithOther!, + }) + ); }, error: (e) => { obs.error(e); @@ -682,7 +699,7 @@ export class SearchSource { searchRequest.body = searchRequest.body || {}; const { body, index, query, filters, highlightAll } = searchRequest; searchRequest.indexType = this.getIndexType(index); - const metaFields = getConfig(UI_SETTINGS.META_FIELDS); + const metaFields = getConfig(UI_SETTINGS.META_FIELDS) ?? []; // get some special field types from the index pattern const { docvalueFields, scriptFields, storedFields, runtimeFields } = index diff --git a/src/plugins/data/common/search/search_source/types.ts b/src/plugins/data/common/search/search_source/types.ts index 507fda0dc9e47..40e92f45af143 100644 --- a/src/plugins/data/common/search/search_source/types.ts +++ b/src/plugins/data/common/search/search_source/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { NameList } from 'elasticsearch'; import { IAggConfigs } from 'src/plugins/data/public'; import { Query } from '../..'; @@ -156,7 +156,7 @@ export interface ShardFailure { type: string; }; reason: string; - lang?: string; + lang?: estypes.ScriptLanguage; script?: string; script_stack?: string[]; type: string; diff --git a/src/plugins/data/common/search/tabify/tabify.ts b/src/plugins/data/common/search/tabify/tabify.ts index 4a8972d4384c2..a4d9551da75d5 100644 --- a/src/plugins/data/common/search/tabify/tabify.ts +++ b/src/plugins/data/common/search/tabify/tabify.ts @@ -139,7 +139,7 @@ export function tabifyAggResponse( const write = new TabbedAggResponseWriter(aggConfigs, respOpts || {}); const topLevelBucket: AggResponseBucket = { ...esResponse.aggregations, - doc_count: esResponse.hits?.total, + doc_count: esResponse.aggregations?.doc_count || esResponse.hits?.total, }; collectBucket(aggConfigs, write, topLevelBucket, '', 1); diff --git a/src/plugins/data/config.ts b/src/plugins/data/config.ts index 72fa547f44a77..9306b64019bbc 100644 --- a/src/plugins/data/config.ts +++ b/src/plugins/data/config.ts @@ -15,6 +15,8 @@ export const configSchema = schema.object({ }), valueSuggestions: schema.object({ enabled: schema.boolean({ defaultValue: true }), + terminateAfter: schema.duration({ defaultValue: 100000 }), + timeout: schema.duration({ defaultValue: 1000 }), }), }), search: schema.object({ diff --git a/src/plugins/data/public/autocomplete/autocomplete_service.ts b/src/plugins/data/public/autocomplete/autocomplete_service.ts index eb9d859664c4d..67efbe2af29ce 100644 --- a/src/plugins/data/public/autocomplete/autocomplete_service.ts +++ b/src/plugins/data/public/autocomplete/autocomplete_service.ts @@ -7,6 +7,7 @@ */ import { CoreSetup, PluginInitializerContext } from 'src/core/public'; +import moment from 'moment'; import { TimefilterSetup } from '../query'; import { QuerySuggestionGetFn } from './providers/query_suggestion_provider'; import { @@ -27,7 +28,7 @@ import { DataPublicPluginStart, DataStartDependencies } from '../types'; export class AutocompleteService { autocompleteConfig: ConfigSchema['autocomplete']; - constructor(initializerContext: PluginInitializerContext) { + constructor(private initializerContext: PluginInitializerContext) { const { autocomplete } = initializerContext.config.get(); this.autocompleteConfig = autocomplete; @@ -55,6 +56,8 @@ export class AutocompleteService { usageCollection, }: { timefilter: TimefilterSetup; usageCollection?: UsageCollectionSetup } ) { + const { autocomplete } = this.initializerContext.config.get(); + const { terminateAfter, timeout } = autocomplete.valueSuggestions; const usageCollector = createUsageCollector(core.getStartServices, usageCollection); this.getValueSuggestions = this.autocompleteConfig.valueSuggestions.enabled @@ -71,6 +74,10 @@ export class AutocompleteService { * please use "getQuerySuggestions" from the start contract */ getQuerySuggestions: this.getQuerySuggestions, + getAutocompleteSettings: () => ({ + terminateAfter: moment.duration(terminateAfter).asMilliseconds(), + timeout: moment.duration(timeout).asMilliseconds(), + }), }; } diff --git a/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts b/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts index f1eced06a33ea..84ed4315ee16f 100644 --- a/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts +++ b/src/plugins/data/public/autocomplete/providers/kql_query_suggestion/field.test.ts @@ -41,6 +41,7 @@ describe('Kuery field suggestions', () => { querySuggestionsArgs, mockKueryNode({ prefix, suffix }) ); + // @ts-expect-error indexPatternResponse is not properly typed json const filterableFields = indexPatternResponse.fields.filter(indexPatternsUtils.isFilterable); expect(suggestions.length).toBe(filterableFields.length); diff --git a/src/plugins/data/public/mocks.ts b/src/plugins/data/public/mocks.ts index f5def327b5473..1277e31be2103 100644 --- a/src/plugins/data/public/mocks.ts +++ b/src/plugins/data/public/mocks.ts @@ -16,8 +16,9 @@ import { createNowProviderMock } from './now_provider/mocks'; export type Setup = jest.Mocked>; export type Start = jest.Mocked>; -const automcompleteSetupMock: jest.Mocked = { +const autocompleteSetupMock: jest.Mocked = { getQuerySuggestions: jest.fn(), + getAutocompleteSettings: jest.fn(), }; const autocompleteStartMock: jest.Mocked = { @@ -29,7 +30,7 @@ const autocompleteStartMock: jest.Mocked = { const createSetupContract = (): Setup => { const querySetupMock = queryServiceMock.createSetupContract(); return { - autocomplete: automcompleteSetupMock, + autocomplete: autocompleteSetupMock, search: searchServiceMock.createSetupContract(), fieldFormats: fieldFormatsServiceMock.createSetupContract(), query: querySetupMock, diff --git a/src/plugins/data/public/public.api.md b/src/plugins/data/public/public.api.md index fde7075d9e760..67534577d99fc 100644 --- a/src/plugins/data/public/public.api.md +++ b/src/plugins/data/public/public.api.md @@ -46,6 +46,7 @@ import { Href } from 'history'; import { HttpSetup } from 'kibana/public'; import { IAggConfigs as IAggConfigs_2 } from 'src/plugins/data/public'; import { IconType } from '@elastic/eui'; +import { IEsSearchResponse as IEsSearchResponse_2 } from 'src/plugins/data/public'; import { IncomingHttpHeaders } from 'http'; import { InjectedIntl } from '@kbn/i18n/react'; import { ISearchOptions as ISearchOptions_2 } from 'src/plugins/data/public'; @@ -74,6 +75,7 @@ import * as PropTypes from 'prop-types'; import { PublicContract } from '@kbn/utility-types'; import { PublicMethodsOf } from '@kbn/utility-types'; import { PublicUiSettingsParams } from 'src/core/server/types'; +import { RangeFilter as RangeFilter_2 } from 'src/plugins/data/public'; import React from 'react'; import * as React_3 from 'react'; import { RecursiveReadonly } from '@kbn/utility-types'; @@ -152,9 +154,13 @@ export class AggConfig { // (undocumented) getTimeRange(): import("../../../public").TimeRange | undefined; // (undocumented) + getTimeShift(): undefined | moment.Duration; + // (undocumented) getValue(bucket: any): any; getValueBucketPath(): string; // (undocumented) + hasTimeShift(): boolean; + // (undocumented) id: string; // (undocumented) isFilterable(): boolean; @@ -245,6 +251,8 @@ export class AggConfigs { addToAggConfigs?: boolean | undefined; }) => T; // (undocumented) + forceNow?: Date; + // (undocumented) getAll(): AggConfig[]; // (undocumented) getRequestAggById(id: string): AggConfig | undefined; @@ -253,6 +261,39 @@ export class AggConfigs { getResponseAggById(id: string): AggConfig | undefined; getResponseAggs(): AggConfig[]; // (undocumented) + getSearchSourceTimeFilter(forceNow?: Date): RangeFilter_2[] | { + meta: { + index: string | undefined; + params: {}; + alias: string; + disabled: boolean; + negate: boolean; + }; + query: { + bool: { + should: { + bool: { + filter: { + range: { + [x: string]: { + gte: string; + lte: string; + }; + }; + }[]; + }; + }[]; + minimum_should_match: number; + }; + }; + }[]; + // (undocumented) + getTimeShiftInterval(): moment.Duration | undefined; + // (undocumented) + getTimeShifts(): Record; + // (undocumented) + hasTimeShifts(): boolean; + // (undocumented) hierarchical?: boolean; // (undocumented) indexPattern: IndexPattern; @@ -260,6 +301,10 @@ export class AggConfigs { // (undocumented) onSearchRequestStart(searchSource: ISearchSource_2, options?: ISearchOptions_2): Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>; // (undocumented) + postFlightTransform(response: IEsSearchResponse_2): IEsSearchResponse_2; + // (undocumented) + setForceNow(now: Date | undefined): void; + // (undocumented) setTimeFields(timeFields: string[] | undefined): void; // (undocumented) setTimeRange(timeRange: TimeRange): void; @@ -1198,7 +1243,7 @@ export interface IFieldType { // (undocumented) format?: any; // (undocumented) - lang?: string; + lang?: estypes.ScriptLanguage; // (undocumented) name: string; // (undocumented) @@ -1307,6 +1352,7 @@ export class IndexPattern implements IIndexPattern { // Warning: (ae-forgotten-export) The symbol "IndexPatternDeps" needs to be exported by the entry point index.d.ts constructor({ spec, fieldFormats, shortDotsEnable, metaFields, }: IndexPatternDeps); addRuntimeField(name: string, runtimeField: RuntimeField): void; + // @deprecated addScriptedField(name: string, script: string, fieldType?: string): Promise; readonly allowNoIndex: boolean; // (undocumented) @@ -1335,19 +1381,7 @@ export class IndexPattern implements IIndexPattern { delay?: string | undefined; time_zone?: string | undefined; }>> | undefined; - getAsSavedObjectBody(): { - fieldAttrs: string | undefined; - title: string; - timeFieldName: string | undefined; - intervalName: string | undefined; - sourceFilters: string | undefined; - fields: string | undefined; - fieldFormatMap: string | undefined; - type: string | undefined; - typeMeta: string | undefined; - allowNoIndex: true | undefined; - runtimeFieldMap: string | undefined; - }; + getAsSavedObjectBody(): IndexPatternAttributes; // (undocumented) getComputedFields(): { storedFields: string[]; @@ -1366,7 +1400,7 @@ export class IndexPattern implements IIndexPattern { getFieldByName(name: string): IndexPatternField | undefined; getFormatterForField(field: IndexPatternField | IndexPatternField['spec'] | IFieldType): FieldFormat; getFormatterForFieldNoDefault(fieldname: string): FieldFormat | undefined; - // (undocumented) + // @deprecated (undocumented) getNonScriptedFields(): IndexPatternField[]; getOriginalSavedObjectBody: () => { fieldAttrs?: string | undefined; @@ -1379,13 +1413,15 @@ export class IndexPattern implements IIndexPattern { typeMeta?: string | undefined; type?: string | undefined; }; - // (undocumented) + getRuntimeField(name: string): RuntimeField | null; + // @deprecated (undocumented) getScriptedFields(): IndexPatternField[]; getSourceFiltering(): { excludes: any[]; }; // (undocumented) getTimeField(): IndexPatternField | undefined; + hasRuntimeField(name: string): boolean; // (undocumented) id?: string; // @deprecated (undocumented) @@ -1397,7 +1433,9 @@ export class IndexPattern implements IIndexPattern { // (undocumented) metaFields: string[]; removeRuntimeField(name: string): void; + // @deprecated removeScriptedField(fieldName: string): void; + replaceAllRuntimeFields(newFields: Record): void; resetOriginalSavedObjectBody: () => void; // (undocumented) protected setFieldAttrs(fieldName: string, attrName: K, value: FieldAttrSet[K]): void; @@ -1483,8 +1521,8 @@ export class IndexPatternField implements IFieldType { // (undocumented) get filterable(): boolean; get isMapped(): boolean | undefined; - get lang(): string | undefined; - set lang(lang: string | undefined); + get lang(): "painless" | "expression" | "mustache" | "java" | undefined; + set lang(lang: "painless" | "expression" | "mustache" | "java" | undefined); // (undocumented) get name(): string; // (undocumented) @@ -1508,7 +1546,7 @@ export class IndexPatternField implements IFieldType { toJSON(): { count: number; script: string | undefined; - lang: string | undefined; + lang: "painless" | "expression" | "mustache" | "java" | undefined; conflictDescriptions: Record | undefined; name: string; type: string; @@ -1953,7 +1991,7 @@ export type PhraseFilter = Filter & { script?: { script: { source?: any; - lang?: string; + lang?: estypes.ScriptLanguage; params: any; }; }; @@ -2171,7 +2209,7 @@ export type RangeFilter = Filter & EsRangeFilter & { script?: { script: { params: any; - lang: string; + lang: estypes.ScriptLanguage; source: any; }; }; @@ -2217,7 +2255,7 @@ export interface Reason { reason: string; }; // (undocumented) - lang?: string; + lang?: estypes.ScriptLanguage; // (undocumented) position?: { offset: number; diff --git a/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.test.ts b/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.test.ts index 479cbb140fc70..0ae1513ae5d1b 100644 --- a/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.test.ts +++ b/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.test.ts @@ -54,6 +54,61 @@ describe('mapSpatialFilter()', () => { expect(result).toHaveProperty('type', FILTERS.SPATIAL_FILTER); }); + test('should return the key for matching multi field filter', async () => { + const filter = { + meta: { + alias: 'my spatial filter', + isMultiIndex: true, + type: FILTERS.SPATIAL_FILTER, + } as FilterMeta, + query: { + bool: { + should: [ + { + bool: { + must: [ + { + exists: { + field: 'geo.coordinates', + }, + }, + { + geo_distance: { + distance: '1000km', + 'geo.coordinates': [120, 30], + }, + }, + ], + }, + }, + { + bool: { + must: [ + { + exists: { + field: 'location', + }, + }, + { + geo_distance: { + distance: '1000km', + location: [120, 30], + }, + }, + ], + }, + }, + ], + }, + }, + } as Filter; + const result = mapSpatialFilter(filter); + + expect(result).toHaveProperty('key', 'query'); + expect(result).toHaveProperty('value', ''); + expect(result).toHaveProperty('type', FILTERS.SPATIAL_FILTER); + }); + test('should return undefined for none matching', async (done) => { const filter = { meta: { diff --git a/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.ts b/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.ts index 0703bc055a39b..229257c1a7d81 100644 --- a/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.ts +++ b/src/plugins/data/public/query/filter_manager/lib/mappers/map_spatial_filter.ts @@ -22,5 +22,18 @@ export const mapSpatialFilter = (filter: Filter) => { value: '', }; } + + if ( + filter.meta && + filter.meta.type === FILTERS.SPATIAL_FILTER && + filter.meta.isMultiIndex && + filter.query?.bool?.should + ) { + return { + key: 'query', + type: filter.meta.type, + value: '', + }; + } throw filter; }; diff --git a/src/plugins/data/public/query/query_string/query_string_manager.mock.ts b/src/plugins/data/public/query/query_string/query_string_manager.mock.ts index 0038ba0e87e06..976d3ce13e7de 100644 --- a/src/plugins/data/public/query/query_string/query_string_manager.mock.ts +++ b/src/plugins/data/public/query/query_string/query_string_manager.mock.ts @@ -7,12 +7,13 @@ */ import { QueryStringContract } from '.'; +import { Observable } from 'rxjs'; const createSetupContractMock = () => { const queryStringManagerMock: jest.Mocked = { getQuery: jest.fn(), setQuery: jest.fn(), - getUpdates$: jest.fn(), + getUpdates$: jest.fn(() => new Observable()), getDefaultQuery: jest.fn(), formatQuery: jest.fn(), clearQuery: jest.fn(), diff --git a/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts b/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts index c22f62f45a709..f1f02a010e98c 100644 --- a/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts +++ b/src/plugins/data/public/query/timefilter/timefilter_service.mock.ts @@ -21,7 +21,7 @@ const createSetupContractMock = () => { getTimeUpdate$: jest.fn(), getRefreshIntervalUpdate$: jest.fn(), getAutoRefreshFetch$: jest.fn(() => new Observable<() => void>()), - getFetch$: jest.fn(), + getFetch$: jest.fn(() => new Observable<() => void>()), getTime: jest.fn(), setTime: jest.fn(), setRefreshInterval: jest.fn(), diff --git a/src/plugins/data/public/search/errors/painless_error.test.tsx b/src/plugins/data/public/search/errors/painless_error.test.tsx index f07f078ea03a3..833573786594b 100644 --- a/src/plugins/data/public/search/errors/painless_error.test.tsx +++ b/src/plugins/data/public/search/errors/painless_error.test.tsx @@ -23,6 +23,7 @@ describe('PainlessError', () => { const e = new PainlessError({ statusCode: 400, message: 'search_phase_execution_exception', + // @ts-expect-error searchPhaseException is not properly typed json attributes: searchPhaseException.error, }); const component = mount(e.getErrorMessage(startMock.application)); diff --git a/src/plugins/data/public/search/errors/types.ts b/src/plugins/data/public/search/errors/types.ts index 445293fe47ea3..13c5d0c242ed0 100644 --- a/src/plugins/data/public/search/errors/types.ts +++ b/src/plugins/data/public/search/errors/types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; import { KibanaServerError } from '../../../../kibana_utils/common'; export interface FailedShard { @@ -24,7 +24,7 @@ export interface Reason { start: number; end: number; }; - lang?: string; + lang?: estypes.ScriptLanguage; script?: string; caused_by?: { type: string; diff --git a/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts b/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts index dfbc912453d6e..fe66d4b6e9937 100644 --- a/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts +++ b/src/plugins/data/public/search/search_interceptor/search_interceptor.test.ts @@ -135,6 +135,7 @@ describe('SearchInterceptor', () => { new PainlessError({ statusCode: 400, message: 'search_phase_execution_exception', + // @ts-expect-error searchPhaseException is not properly typed json attributes: searchPhaseException.error, }) ); diff --git a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts index c34a47dc1c6dd..83e4abf55d525 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts +++ b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_types.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ - +import type { estypes } from '@elastic/elasticsearch'; export interface ShardFailureRequest { docvalue_fields: string[]; _source: unknown; @@ -24,7 +24,7 @@ export interface ShardFailure { type: string; }; reason: string; - lang?: string; + lang?: estypes.ScriptLanguage; script?: string; script_stack?: string[]; type: string; diff --git a/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap b/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap index 9896a6dbdc7b7..a0a7e54d27532 100644 --- a/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap +++ b/src/plugins/data/public/utils/table_inspector_view/components/__snapshots__/data_view.test.tsx.snap @@ -718,11 +718,13 @@ exports[`Inspector Data View component should render single table without select > @@ -996,6 +998,7 @@ exports[`Inspector Data View component should render single table without select - - - - - column1 - - - - - - - Click to sort in ascending order - + + + + column1 + + + - + @@ -1322,6 +1320,7 @@ exports[`Inspector Data View component should render single table without select