Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a27d3fdd3 | |||
| c480e6a2a5 | |||
| 3e8045f769 | |||
| bc6fcde8f0 | |||
| 45fab27d8a | |||
| 2d623ada4d | |||
| cc770a9031 | |||
| e1790135c6 | |||
| 820ed3e3e0 | |||
| 64ed0ecb61 | |||
| c51560e5c8 | |||
| e3a791b10f | |||
| 6392ee3a40 | |||
| 40eb32f884 | |||
| b648f7cdc5 | |||
| 63073e952c | |||
| 66723ee8c9 | |||
| 0817e3f884 | |||
| 3286101891 | |||
| 21804dd7e3 | |||
| d279b29d29 | |||
| 3e6b02b504 | |||
| 84d8b68007 |
@ -1,4 +1,4 @@
|
||||
ARG NODE_JS_VERSION=16
|
||||
ARG NODE_JS_VERSION=10
|
||||
FROM node:${NODE_JS_VERSION}
|
||||
|
||||
# Create app directory
|
||||
|
||||
15
.ci/jobs/elastic+elasticsearch-js+5.x.yml
Normal file
15
.ci/jobs/elastic+elasticsearch-js+5.x.yml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
- job:
|
||||
name: elastic+elasticsearch-js+5.x
|
||||
display-name: 'elastic / elasticsearch-js # 5.x'
|
||||
description: Testing the elasticsearch-js 5.x branch.
|
||||
junit_results: "*-junit.xml"
|
||||
parameters:
|
||||
- string:
|
||||
name: branch_specifier
|
||||
default: refs/heads/5.x
|
||||
description: the Git branch specifier to build (<branchName>, <tagName>,
|
||||
<commitId>, etc.)
|
||||
triggers:
|
||||
- github
|
||||
- timed: '@weekly'
|
||||
@ -1,13 +1,13 @@
|
||||
---
|
||||
- job:
|
||||
name: elastic+elasticsearch-js+8.2
|
||||
display-name: 'elastic / elasticsearch-js # 8.2'
|
||||
description: Testing the elasticsearch-js 8.2 branch.
|
||||
name: elastic+elasticsearch-js+6.x
|
||||
display-name: 'elastic / elasticsearch-js # 6.x'
|
||||
description: Testing the elasticsearch-js 6.x branch.
|
||||
junit_results: "*-junit.xml"
|
||||
parameters:
|
||||
- string:
|
||||
name: branch_specifier
|
||||
default: refs/heads/8.2
|
||||
default: refs/heads/6.x
|
||||
description: the Git branch specifier to build (<branchName>, <tagName>,
|
||||
<commitId>, etc.)
|
||||
triggers:
|
||||
15
.ci/jobs/elastic+elasticsearch-js+7.16.yml
Normal file
15
.ci/jobs/elastic+elasticsearch-js+7.16.yml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
- job:
|
||||
name: elastic+elasticsearch-js+7.16
|
||||
display-name: 'elastic / elasticsearch-js # 7.16'
|
||||
description: Testing the elasticsearch-js 7.16 branch.
|
||||
junit_results: "*-junit.xml"
|
||||
parameters:
|
||||
- string:
|
||||
name: branch_specifier
|
||||
default: refs/heads/7.16
|
||||
description: the Git branch specifier to build (<branchName>, <tagName>,
|
||||
<commitId>, etc.)
|
||||
triggers:
|
||||
- github
|
||||
- timed: 'H */12 * * *'
|
||||
15
.ci/jobs/elastic+elasticsearch-js+8.0.yml
Normal file
15
.ci/jobs/elastic+elasticsearch-js+8.0.yml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
- job:
|
||||
name: elastic+elasticsearch-js+8.0
|
||||
display-name: 'elastic / elasticsearch-js # 8.0'
|
||||
description: Testing the elasticsearch-js 8.0 branch.
|
||||
junit_results: "*-junit.xml"
|
||||
parameters:
|
||||
- string:
|
||||
name: branch_specifier
|
||||
default: refs/heads/8.0
|
||||
description: the Git branch specifier to build (<branchName>, <tagName>,
|
||||
<commitId>, etc.)
|
||||
triggers:
|
||||
- github
|
||||
- timed: 'H */12 * * *'
|
||||
125
.ci/make.mjs
125
.ci/make.mjs
@ -1,125 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* global $ argv */
|
||||
|
||||
'use strict'
|
||||
|
||||
import 'zx/globals'
|
||||
|
||||
import { readFile, writeFile } from 'fs/promises'
|
||||
import assert from 'assert'
|
||||
import { join } from 'desm'
|
||||
import semver from 'semver'
|
||||
|
||||
assert(typeof argv.task === 'string', 'Missing task parameter')
|
||||
|
||||
switch (argv.task) {
|
||||
case 'release':
|
||||
release(argv._).catch(onError)
|
||||
break
|
||||
case 'bump':
|
||||
bump(argv._).catch(onError)
|
||||
break
|
||||
case 'codegen':
|
||||
codegen(argv._).catch(onError)
|
||||
break
|
||||
default:
|
||||
console.log(`Unknown task: ${argv.task}`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
async function release (args) {
|
||||
assert(args.length === 2, 'Release task expects two parameters')
|
||||
let [version, outputFolder] = args
|
||||
|
||||
if (process.env.WORKFLOW === 'snapshot' && !version.endsWith('SNAPSHOT')) {
|
||||
version = `${version}-SNAPSHOT`
|
||||
}
|
||||
|
||||
await bump([version])
|
||||
|
||||
const packageJson = JSON.parse(await readFile(
|
||||
join(import.meta.url, '..', 'package.json'),
|
||||
'utf8'
|
||||
))
|
||||
|
||||
await $`npm run build`
|
||||
await $`npm pack`
|
||||
await $`zip elasticsearch-js-${version}.zip elastic-elasticsearch-${packageJson.version}.tgz`
|
||||
await $`rm elastic-elasticsearch-${packageJson.version}.tgz`
|
||||
await $`mv ${join(import.meta.url, '..', `elasticsearch-js-${version}.zip`)} ${join(import.meta.url, '..', outputFolder, `elasticsearch-js-${version}.zip`)}`
|
||||
}
|
||||
|
||||
async function bump (args) {
|
||||
assert(args.length === 1, 'Bump task expects one parameter')
|
||||
const [version] = args
|
||||
const packageJson = JSON.parse(await readFile(
|
||||
join(import.meta.url, '..', 'package.json'),
|
||||
'utf8'
|
||||
))
|
||||
|
||||
const cleanVersion = semver.clean(version.includes('SNAPSHOT') ? version.split('-')[0] : version)
|
||||
assert(semver.valid(cleanVersion))
|
||||
packageJson.version = cleanVersion
|
||||
packageJson.versionCanary = `${cleanVersion}-canary.0`
|
||||
|
||||
await writeFile(
|
||||
join(import.meta.url, '..', 'package.json'),
|
||||
JSON.stringify(packageJson, null, 2),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
const testMatrix = await readFile(join(import.meta.url, 'test-matrix.yml'), 'utf8')
|
||||
await writeFile(
|
||||
join(import.meta.url, 'test-matrix.yml'),
|
||||
testMatrix.replace(/STACK_VERSION:\s+\- "[0-9]+[0-9\.]*[0-9](?:\-SNAPSHOT)?"/, `STACK_VERSION:\n - "${cleanVersion}-SNAPSHOT"`), // eslint-disable-line
|
||||
'utf8'
|
||||
)
|
||||
}
|
||||
|
||||
// this command can only be executed locally for now
|
||||
async function codegen (args) {
|
||||
assert(args.length === 1, 'Bump task expects one parameter')
|
||||
const clientGeneratorPath = join(import.meta.url, '..', '..', 'elastic-client-generator-js')
|
||||
const [version] = args
|
||||
|
||||
const isGeneratorCloned = await $`[[ -d ${clientGeneratorPath} ]]`.exitCode === 0
|
||||
assert(isGeneratorCloned, 'You must clone the elastic-client-generator-js first')
|
||||
|
||||
await $`npm install --prefix ${clientGeneratorPath}`
|
||||
// this command will take a while!
|
||||
if (version === 'main') {
|
||||
await $`npm run elasticsearch --prefix ${clientGeneratorPath} -- --version main`
|
||||
} else {
|
||||
await $`npm run elasticsearch --prefix ${clientGeneratorPath} -- --version ${version.split('.').slice(0, 2).join('.')}`
|
||||
}
|
||||
await $`npm run lint --prefix ${clientGeneratorPath}`
|
||||
|
||||
await $`rm -rf ${join(import.meta.url, '..', 'src', 'api')}`
|
||||
await $`mkdir ${join(import.meta.url, '..', 'src', 'api')}`
|
||||
await $`cp -R ${join(import.meta.url, '..', '..', 'elastic-client-generator-js', 'output')}/* ${join(import.meta.url, '..', 'src', 'api')}`
|
||||
await $`mv ${join(import.meta.url, '..', 'src', 'api', 'reference.asciidoc')} ${join(import.meta.url, '..', 'docs', 'reference.asciidoc')}`
|
||||
await $`npm run build`
|
||||
}
|
||||
|
||||
function onError (err) {
|
||||
console.log(err)
|
||||
process.exit(1)
|
||||
}
|
||||
180
.ci/make.sh
180
.ci/make.sh
@ -1,180 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
#
|
||||
# Skeleton for common build entry script for all elastic
|
||||
# clients. Needs to be adapted to individual client usage.
|
||||
#
|
||||
# Must be called: ./.ci/make.sh <target> <params>
|
||||
#
|
||||
# Version: 1.1.0
|
||||
#
|
||||
# Targets:
|
||||
# ---------------------------
|
||||
# assemble <VERSION> : build client artefacts with version
|
||||
# bump <VERSION> : bump client internals to version
|
||||
# codegen <VERSION> : generate endpoints
|
||||
# docsgen <VERSION> : generate documentation
|
||||
# examplegen : generate the doc examples
|
||||
# clean : clean workspace
|
||||
#
|
||||
# ------------------------------------------------------- #
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
# Bootstrap
|
||||
# ------------------------------------------------------- #
|
||||
|
||||
script_path=$(dirname "$(realpath -s "$0")")
|
||||
repo=$(realpath "$script_path/../")
|
||||
generator=$(realpath "$script_path/../../elastic-client-generator-js")
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
CMD=$1
|
||||
TASK=$1
|
||||
TASK_ARGS=()
|
||||
VERSION=$2
|
||||
STACK_VERSION=$VERSION
|
||||
NODE_JS_VERSION=16
|
||||
WORKFLOW=${WORKFLOW-staging}
|
||||
set -euo pipefail
|
||||
|
||||
product="elastic/elasticsearch-js"
|
||||
output_folder=".ci/output"
|
||||
OUTPUT_DIR="$repo/${output_folder}"
|
||||
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
|
||||
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
|
||||
echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m"
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
# Parse Command
|
||||
# ------------------------------------------------------- #
|
||||
|
||||
case $CMD in
|
||||
clean)
|
||||
echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
|
||||
rm -rf "$output_folder"
|
||||
echo -e "\033[32;1mdone.\033[0m"
|
||||
exit 0
|
||||
;;
|
||||
assemble)
|
||||
if [ -v $VERSION ]; then
|
||||
echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\033[36;1mTARGET: assemble artefact $VERSION\033[0m"
|
||||
TASK=release
|
||||
TASK_ARGS=("$VERSION" "$output_folder")
|
||||
;;
|
||||
codegen)
|
||||
if [ -v $VERSION ]; then
|
||||
echo -e "\033[31;1mTARGET: codegen -> missing version parameter\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\033[36;1mTARGET: codegen API v$VERSION\033[0m"
|
||||
TASK=codegen
|
||||
# VERSION is BRANCH here for now
|
||||
TASK_ARGS=("$VERSION")
|
||||
;;
|
||||
docsgen)
|
||||
if [ -v $VERSION ]; then
|
||||
echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\033[36;1mTARGET: generate docs for $VERSION\033[0m"
|
||||
TASK=codegen
|
||||
# VERSION is BRANCH here for now
|
||||
TASK_ARGS=("$VERSION" "$codegen_folder")
|
||||
;;
|
||||
examplesgen)
|
||||
echo -e "\033[36;1mTARGET: generate examples\033[0m"
|
||||
TASK=codegen
|
||||
# VERSION is BRANCH here for now
|
||||
TASK_ARGS=("$VERSION" "$codegen_folder")
|
||||
;;
|
||||
bump)
|
||||
if [ -v $VERSION ]; then
|
||||
echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
echo -e "\033[36;1mTARGET: bump to version $VERSION\033[0m"
|
||||
TASK=bump
|
||||
# VERSION is BRANCH here for now
|
||||
TASK_ARGS=("$VERSION")
|
||||
;;
|
||||
*)
|
||||
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
# Build Container
|
||||
# ------------------------------------------------------- #
|
||||
|
||||
echo -e "\033[34;1mINFO: building $product container\033[0m"
|
||||
|
||||
docker build \
|
||||
--file .ci/Dockerfile \
|
||||
--tag ${product} \
|
||||
--build-arg NODE_JS_VERSION=${NODE_JS_VERSION} \
|
||||
--build-arg USER_ID="$(id -u)" \
|
||||
--build-arg GROUP_ID="$(id -g)" \
|
||||
.
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
# Run the Container
|
||||
# ------------------------------------------------------- #
|
||||
|
||||
echo -e "\033[34;1mINFO: running $product container\033[0m"
|
||||
|
||||
docker run \
|
||||
--volume $repo:/usr/src/app \
|
||||
--volume $generator:/usr/src/elastic-client-generator-js \
|
||||
--volume /usr/src/app/node_modules \
|
||||
--env "WORKFLOW=${WORKFLOW}" \
|
||||
--name make-elasticsearch-js \
|
||||
--rm \
|
||||
$product \
|
||||
node .ci/make.mjs --task $TASK ${TASK_ARGS[*]}
|
||||
|
||||
# ------------------------------------------------------- #
|
||||
# Post Command tasks & checks
|
||||
# ------------------------------------------------------- #
|
||||
|
||||
if [[ "$CMD" == "assemble" ]]; then
|
||||
if compgen -G ".ci/output/*" > /dev/null; then
|
||||
echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
|
||||
else
|
||||
echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$CMD" == "bump" ]]; then
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo -e "\033[32;1mTARGET: successfully bumped client v$VERSION\033[0m"
|
||||
else
|
||||
echo -e "\033[31;1mTARGET: failed bumped client v$VERSION\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$CMD" == "codegen" ]]; then
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo -e "\033[32;1mTARGET: successfully generated client v$VERSION\033[0m"
|
||||
else
|
||||
echo -e "\033[31;1mTARGET: failed generating client v$VERSION\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$CMD" == "docsgen" ]]; then
|
||||
echo "TODO"
|
||||
fi
|
||||
|
||||
if [[ "$CMD" == "examplesgen" ]]; then
|
||||
echo "TODO"
|
||||
fi
|
||||
@ -2,9 +2,9 @@
|
||||
|
||||
source /usr/local/bin/bash_standard_lib.sh
|
||||
|
||||
DOCKER_IMAGES="node:17-alpine
|
||||
node:16-alpine
|
||||
DOCKER_IMAGES="node:16-alpine
|
||||
node:14-alpine
|
||||
node:12-alpine
|
||||
"
|
||||
|
||||
for di in ${DOCKER_IMAGES}
|
||||
|
||||
@ -22,12 +22,12 @@
|
||||
# - Use https only when TEST_SUITE is "platinum", when "free" use http
|
||||
# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
|
||||
|
||||
script_path=$(dirname "$(realpath -s "$0")")
|
||||
source "$script_path/functions/imports.sh"
|
||||
script_path=$(dirname $(realpath -s $0))
|
||||
source $script_path/functions/imports.sh
|
||||
set -euo pipefail
|
||||
|
||||
echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on separate terminals \033[0m"
|
||||
cleanup_node "$es_node_name"
|
||||
echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on seperate terminals \033[0m"
|
||||
cleanup_node $es_node_name
|
||||
|
||||
master_node_name=${es_node_name}
|
||||
cluster_name=${moniker}${suffix}
|
||||
|
||||
@ -9,7 +9,7 @@ script_path=$(dirname $(realpath -s $0))
|
||||
source $script_path/functions/imports.sh
|
||||
set -euo pipefail
|
||||
|
||||
NODE_JS_VERSION=${NODE_JS_VERSION-16}
|
||||
NODE_JS_VERSION=${NODE_JS_VERSION-12}
|
||||
ELASTICSEARCH_URL=${ELASTICSEARCH_URL-"$elasticsearch_url"}
|
||||
elasticsearch_container=${elasticsearch_container-}
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
---
|
||||
STACK_VERSION:
|
||||
- "8.7.0-SNAPSHOT"
|
||||
- 8.1.0-SNAPSHOT
|
||||
|
||||
NODE_JS_VERSION:
|
||||
- 18
|
||||
- 16
|
||||
- 14
|
||||
- 12
|
||||
|
||||
TEST_SUITE:
|
||||
- free
|
||||
|
||||
1
.github/ISSUE_TEMPLATE/regression.md
vendored
1
.github/ISSUE_TEMPLATE/regression.md
vendored
@ -51,6 +51,5 @@ Paste the results here:
|
||||
|
||||
- *node version*: 6,8,10
|
||||
- `@elastic/elasticsearch` *version*: >=7.0.0
|
||||
- *typescript version*: 4.x (if applicable)
|
||||
- *os*: Mac, Windows, Linux
|
||||
- *any other relevant information*
|
||||
|
||||
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x, 16.x, 18.x]
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
@ -176,7 +176,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -72,3 +72,7 @@ CODE_OF_CONDUCT.md
|
||||
CONTRIBUTING.md
|
||||
|
||||
src
|
||||
|
||||
# CANARY-PACKAGE
|
||||
lib/api/kibana.*
|
||||
# /CANARY-PACKAGE
|
||||
|
||||
11
Makefile
11
Makefile
@ -1,11 +0,0 @@
|
||||
.PHONY: integration-setup
|
||||
integration-setup: integration-cleanup
|
||||
DETACH=true .ci/run-elasticsearch.sh
|
||||
|
||||
.PHONY: integration-cleanup
|
||||
integration-cleanup:
|
||||
docker container rm --force --volumes instance || true
|
||||
|
||||
.PHONY: integration
|
||||
integration: integration-setup
|
||||
npm run test:integration
|
||||
11
README.md
11
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
# Elasticsearch Node.js client
|
||||
|
||||
[](http://standardjs.com/) [](https://clients-ci.elastic.co/view/JavaScript/job/elastic+elasticsearch-js+main/) [](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [](https://codecov.io/gh/elastic/elasticsearch-js) [](https://www.npmjs.com/package/@elastic/elasticsearch)
|
||||
[](http://standardjs.com/) [](https://clients-ci.elastic.co/view/Javascript/job/elastic+elasticsearch-js+main/) [](https://github.com/elastic/elasticsearch-js/actions/workflows/nodejs.yml) [](https://codecov.io/gh/elastic/elasticsearch-js) [](https://www.npmjs.com/package/@elastic/elasticsearch)
|
||||
|
||||
The official Node.js client for Elasticsearch.
|
||||
|
||||
@ -22,7 +22,7 @@ npm install @elastic/elasticsearch
|
||||
|
||||
### Node.js support
|
||||
|
||||
NOTE: The minimum supported version of Node.js is `v14`.
|
||||
NOTE: The minimum supported version of Node.js is `v12`.
|
||||
|
||||
The client versioning follows the Elastic Stack versioning, this means that
|
||||
major, minor, and patch releases are done following a precise schedule that
|
||||
@ -44,9 +44,8 @@ of `^7.10.0`).
|
||||
| Node.js Version | Node.js EOL date | End of support |
|
||||
| --------------- |------------------| ---------------------- |
|
||||
| `8.x` | `December 2019` | `7.11` (early 2021) |
|
||||
| `10.x` | `April 2021` | `7.12` (mid 2021) |
|
||||
| `12.x` | `April 2022` | `8.2` (early 2022) |
|
||||
| `14.x` | `April 2023` | `8.8` (early 2023) |
|
||||
| `10.x` | `April 2021` | `7.12` (mid 2021) |
|
||||
| `12.x` | `April 2022` | `8.2` (early 2022) |
|
||||
|
||||
### Compatibility
|
||||
|
||||
@ -183,4 +182,4 @@ npm install esmain@github:elastic/elasticsearch-js
|
||||
|
||||
## License
|
||||
|
||||
This software is licensed under the [Apache License 2.0](./LICENSE).
|
||||
This software is licensed under the [Apache 2 license](./LICENSE).
|
||||
|
||||
@ -95,12 +95,12 @@ const client = new Client({
|
||||
==== Migrate to v8
|
||||
|
||||
The Node.js client can be configured to emit an HTTP header
|
||||
`Accept: application/vnd.elasticsearch+json; compatible-with=7`
|
||||
``Accept: application/vnd.elasticsearch+json; compatible-with=7``
|
||||
which signals to Elasticsearch that the client is requesting
|
||||
`7.x` version of request and response bodies. This allows for
|
||||
``7.x`` version of request and response bodies. This allows for
|
||||
upgrading from 7.x to 8.x version of Elasticsearch without upgrading
|
||||
everything at once. Elasticsearch should be upgraded first after
|
||||
the compatibility header is configured and clients should be upgraded
|
||||
second.
|
||||
To enable to setting, configure the environment variable
|
||||
`ELASTIC_CLIENT_APIVERSIONING` to `true`.
|
||||
``ELASTIC_CLIENT_APIVERSIONING`` to ``true``.
|
||||
|
||||
@ -1,126 +1,6 @@
|
||||
[[changelog-client]]
|
||||
== Release notes
|
||||
|
||||
[discrete]
|
||||
=== 8.7.0
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.7.0`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.7/release-notes-8.7.0.html[here].
|
||||
|
||||
[discrete]
|
||||
=== 8.6.0
|
||||
|
||||
[discrete]
|
||||
===== Bump @elastic/transport to 8.3.1+ https://github.com/elastic/elasticsearch-js/pull/1802[#1802]
|
||||
|
||||
The `@elastic/transport` dependency has been bumped to `~8.3.1` to ensure
|
||||
fixes to the `maxResponseSize` option are available in the client.
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.6.0`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.6/release-notes-8.6.0.html[here].
|
||||
|
||||
[discrete]
|
||||
=== 8.5.0
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.5.0`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.5/release-notes-8.5.0.html[here].
|
||||
|
||||
[discrete]
|
||||
=== 8.4.0
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.4.0`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.4/release-notes-8.4.0.html[here].
|
||||
|
||||
[discrete]
|
||||
=== 8.2.1
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.2.1`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.2/release-notes-8.2.1.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Fix ndjson APIs https://github.com/elastic/elasticsearch-js/pull/1688[#1688]
|
||||
|
||||
The previous release contained a bug that broken ndjson APIs.
|
||||
We have released `v8.2.0-patch.1` to address this.
|
||||
This fix is the same as the one we have released and we strongly recommend upgrading to this version.
|
||||
|
||||
[discrete]
|
||||
===== Fix node shutdown apis https://github.com/elastic/elasticsearch-js/pull/1697[#1697]
|
||||
|
||||
The shutdown APIs wheren't complete, this fix completes them.
|
||||
|
||||
[discrete]
|
||||
==== Types: move query keys to body https://github.com/elastic/elasticsearch-js/pull/1693[#1693]
|
||||
|
||||
The types definitions where wrongly representing the types of fields present in both query and body.
|
||||
|
||||
[discrete]
|
||||
=== 8.2.0
|
||||
|
||||
[discrete]
|
||||
==== Breaking changes
|
||||
|
||||
[discrete]
|
||||
===== Drop Node.js v12 https://github.com/elastic/elasticsearch-js/pull/1670[#1670]
|
||||
|
||||
According to our https://github.com/elastic/elasticsearch-js#nodejs-support[Node.js support matrix].
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.2`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.2/release-notes-8.2.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== More lenient parameter checks https://github.com/elastic/elasticsearch-js/pull/1662[#1662]
|
||||
|
||||
When creating a new client, an `undefined` `caFingerprint` no longer trigger an error for a http connection.
|
||||
|
||||
[discrete]
|
||||
===== Update TypeScript docs and export estypes https://github.com/elastic/elasticsearch-js/pull/1675[#1675]
|
||||
|
||||
You can import the full TypeScript requests & responses definitions as it follows:
|
||||
[source,ts]
|
||||
----
|
||||
import { estypes } from '@elastic/elasticsearch'
|
||||
----
|
||||
|
||||
If you need the legacy definitions with the body, you can do the following:
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
import { estypesWithBody } from '@elastic/elasticsearch'
|
||||
----
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Updated hpagent to the latest version https://github.com/elastic/elastic-transport-js/pull/49[transport/#49]
|
||||
|
||||
You can fing the related changes https://github.com/delvedor/hpagent/releases/tag/v1.0.0[here].
|
||||
|
||||
[discrete]
|
||||
=== 8.1.0
|
||||
|
||||
|
||||
@ -77,8 +77,8 @@ async function run () {
|
||||
// fix the document before to try it again.
|
||||
status: action[operation].status,
|
||||
error: action[operation].error,
|
||||
operation: operations[i * 2],
|
||||
document: operations[i * 2 + 1]
|
||||
operation: body[i * 2],
|
||||
document: body[i * 2 + 1]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
@ -1,185 +0,0 @@
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.card {
|
||||
cursor: pointer;
|
||||
padding: 16px;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
|
||||
padding: 16px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#guide a.no-text-decoration:hover {
|
||||
text-decoration: none!important;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background-position: bottom;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.ul-col-1 {
|
||||
columns: 1;
|
||||
-webkit-columns: 1;
|
||||
-moz-columns: 1;
|
||||
}
|
||||
|
||||
@media (min-width:769px) {
|
||||
.ul-col-md-2 {
|
||||
columns: 2;
|
||||
-webkit-columns: 2;
|
||||
-moz-columns: 2;
|
||||
}
|
||||
}
|
||||
|
||||
#guide h3.gtk {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.mb-4, .my-4 {
|
||||
margin-bottom: 0!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="legalnotice"></div>
|
||||
|
||||
<div class="row my-4">
|
||||
<div class="col-md-6 col-12">
|
||||
<p></p>
|
||||
<p>
|
||||
<h2>Documentation</h2>
|
||||
</p>
|
||||
<p>
|
||||
The official Node.js client provides one-to-one mapping with Elasticsearch REST APIs.
|
||||
</p>
|
||||
<p>
|
||||
<a href="https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html">
|
||||
<button class="btn btn-primary">Get started</button>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<img class="w-100" src="https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt3826dd36882ab258/641c4e9d542f593a7e8ba656/js-es-lp-hero.png" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="gtk">Get to know the JavaScript client</h3>
|
||||
|
||||
<div class="my-5">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<h4 class="mt-3">
|
||||
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltfd59779217093221/641ae0c8db18f61d68e9c377/64x64_Color_icon-connected-circles64-color.png');"></span>
|
||||
Connecting
|
||||
</h4>
|
||||
</div>
|
||||
<ul class="ul-col-md-2 ul-col-1">
|
||||
<li>
|
||||
<a href="introduction.html">Introduction to the client</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="installation.html">Installing the client</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="client-connecting.html">Connecting to Elasticsearch</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="client-configuration.html">Configuration options</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<h4 class="mt-3">
|
||||
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltca09fd8c807816ce/641ae17733e7f95594918557/icon-monitor-cog-64-color.png');"></span>
|
||||
Using the JS client
|
||||
</h4>
|
||||
</div>
|
||||
<ul class="ul-col-md-2 ul-col-1">
|
||||
<li>
|
||||
<a href="bulk_examples.html">Bulk indexing</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="get_examples.html">Getting documents</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="search_examples.html">Searching</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="examples.html">More examples</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<h4 class="mt-3">
|
||||
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blteacd058910f155d8/636925a6e0ff7c532db636d7/64x64_Color_icon-dev-tools-64-color.png');"></span>
|
||||
API and developer docs
|
||||
</h4>
|
||||
</div>
|
||||
<ul class="ul-col-md-2 ul-col-1">
|
||||
<li>
|
||||
<a href="api-reference.html">API reference</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="client-helpers.html">Client helpers</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="integrations.html">Integrations</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="changelog-client.html">Release notes</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h3 class="explore">Explore by use case</h3>
|
||||
|
||||
<div class="row my-4">
|
||||
<div class="col-md-4 col-12 mb-2">
|
||||
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/enterprise-search/current/start.html">
|
||||
<div class="card h-100">
|
||||
<h4 class="mt-3">
|
||||
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt11200907c1c033aa/634d9da119d8652169cf9b2b/enterprise-search-logo-color-32px.png');"></span>
|
||||
Search my data
|
||||
</h4>
|
||||
<p>Create search experiences for your content, wherever it lives.</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-4 col-12 mb-2">
|
||||
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html">
|
||||
<div class="card h-100">
|
||||
<h4 class="mt-3">
|
||||
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltaa08b370a00bbecc/634d9da14e565f1cdce27f7c/observability-logo-color-32px.png');"></span>
|
||||
Observe my data
|
||||
</h4>
|
||||
<p>Follow our guides to monitor logs, metrics, and traces.</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-4 col-12 mb-2">
|
||||
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/security/current/es-overview.html">
|
||||
<div class="card h-100">
|
||||
<h4 class="mt-3">
|
||||
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt5e0e0ad9a13e6b8c/634d9da18473831f96bbdf1e/security-logo-color-32px.png');"></span>
|
||||
Protect my environment
|
||||
</h4>
|
||||
<p>Learn how to defend against threats across your environment.</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="my-4"><a href="https://www.elastic.co/guide/index.html">View all Elastic docs</a></p>
|
||||
@ -24,7 +24,7 @@ To learn more about the supported major versions, please refer to the
|
||||
[[nodejs-support]]
|
||||
=== Node.js support
|
||||
|
||||
NOTE: The minimum supported version of Node.js is `v14`.
|
||||
NOTE: The minimum supported version of Node.js is `v12`.
|
||||
|
||||
The client versioning follows the {stack} versioning, this means that
|
||||
major, minor, and patch releases are done following a precise schedule that
|
||||
@ -60,10 +60,6 @@ of `^7.10.0`).
|
||||
|`12.x`
|
||||
|April 2022
|
||||
|`8.2` (early 2022)
|
||||
|
||||
|`14.x`
|
||||
|April 2023
|
||||
|`8.8` (early 2023)
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
|
||||
@ -154,6 +154,9 @@ request: {
|
||||
|
||||
The event order is described in the following graph, in some edge cases, the
|
||||
order is not guaranteed.
|
||||
You can find in
|
||||
https://github.com/elastic/elasticsearch-js/blob/master/test/acceptance/events-order.test.js[`test/acceptance/events-order.test.js`]
|
||||
how the order changes based on the situation.
|
||||
|
||||
[source]
|
||||
----
|
||||
@ -374,9 +377,9 @@ child.search({
|
||||
To improve observability, the client offers an easy way to configure the
|
||||
`X-Opaque-Id` header. If you set the `X-Opaque-Id` in a specific request, this
|
||||
allows you to discover this identifier in the
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html#deprecation-logging[deprecation logs],
|
||||
helps you with https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules-slowlog.html#_identifying_search_slow_log_origin[identifying search slow log origin]
|
||||
as well as https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html#_identifying_running_tasks[identifying running tasks].
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.1/logging.html#deprecation-logging[deprecation logs],
|
||||
helps you with https://www.elastic.co/guide/en/elasticsearch/reference/8.1/index-modules-slowlog.html#_identifying_search_slow_log_origin[identifying search slow log origin]
|
||||
as well as https://www.elastic.co/guide/en/elasticsearch/reference/8.1/tasks.html#_identifying_running_tasks[identifying running tasks].
|
||||
|
||||
The `X-Opaque-Id` should be configured in each request, for doing that you can
|
||||
use the `opaqueId` option, as you can see in the following example. The
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -7,10 +7,6 @@ of type definitions of Elasticsearch's API surface.
|
||||
The types are not 100% complete yet. Some APIs are missing (the newest ones, e.g. EQL),
|
||||
and others may contain some errors, but we are continuously pushing fixes & improvements.
|
||||
|
||||
NOTE: The client is developed against the https://www.npmjs.com/package/typescript?activeTab=versions[latest]
|
||||
version of TypeScript. Furthermore, unless you have set `skipLibCheck` to `true`,
|
||||
you should configure `esModuleInterop` to `true`.
|
||||
|
||||
[discrete]
|
||||
==== Example
|
||||
|
||||
@ -75,16 +71,9 @@ run().catch(console.log)
|
||||
[discrete]
|
||||
==== Request & Response types
|
||||
|
||||
You can import the full TypeScript requests & responses definitions as it follows:
|
||||
You can import the full TypeScript requests & responses defintions as it follows:
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
import { estypes } from '@elastic/elasticsearch'
|
||||
----
|
||||
|
||||
If you need the legacy definitions with the body, you can do the following:
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
import { estypesWithBody } from '@elastic/elasticsearch'
|
||||
----
|
||||
2
index.d.ts
vendored
2
index.d.ts
vendored
@ -21,7 +21,5 @@ import Client from './lib/client'
|
||||
import SniffingTransport from './lib/sniffingTransport'
|
||||
|
||||
export * from '@elastic/transport'
|
||||
export * as estypes from './lib/api/types'
|
||||
export * as estypesWithBody from './lib/api/types'
|
||||
export { Client, SniffingTransport }
|
||||
export type { ClientOptions, NodeOptions } from './lib/client'
|
||||
|
||||
43
package.json
43
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@elastic/elasticsearch",
|
||||
"version": "8.7.0",
|
||||
"versionCanary": "8.7.0-canary.1",
|
||||
"version": "8.1.0",
|
||||
"versionCanary": "8.1.0-canary.3",
|
||||
"description": "The official Elasticsearch client for Node.js",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
@ -45,44 +45,43 @@
|
||||
},
|
||||
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
"node": ">=12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/debug": "^4.1.6",
|
||||
"@types/ms": "^0.7.31",
|
||||
"@types/node": "^17.0.31",
|
||||
"@types/sinonjs__fake-timers": "^8.1.2",
|
||||
"@types/node": "^16.4.1",
|
||||
"@types/sinonjs__fake-timers": "^6.0.3",
|
||||
"@types/split2": "^3.2.1",
|
||||
"@types/stoppable": "^1.1.1",
|
||||
"@types/tap": "^15.0.7",
|
||||
"@types/tap": "^15.0.5",
|
||||
"cross-zip": "^4.0.0",
|
||||
"desm": "^1.2.0",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"into-stream": "^7.0.0",
|
||||
"into-stream": "^6.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"license-checker": "^25.0.1",
|
||||
"minimist": "^1.2.6",
|
||||
"minimist": "^1.2.5",
|
||||
"ms": "^2.1.3",
|
||||
"node-abort-controller": "^3.0.1",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-abort-controller": "^2.0.0",
|
||||
"node-fetch": "^2.6.2",
|
||||
"ora": "^5.4.1",
|
||||
"proxy": "^1.0.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.7",
|
||||
"split2": "^4.1.0",
|
||||
"semver": "^7.3.5",
|
||||
"split2": "^3.2.2",
|
||||
"standard": "^16.0.3",
|
||||
"stoppable": "^1.1.0",
|
||||
"tap": "^16.1.0",
|
||||
"ts-node": "^10.7.0",
|
||||
"ts-standard": "^11.0.0",
|
||||
"typescript": "^4.6.4",
|
||||
"tap": "^15.0.9",
|
||||
"ts-node": "^10.1.0",
|
||||
"ts-standard": "^10.0.0",
|
||||
"typescript": "^4.3.5",
|
||||
"workq": "^3.0.0",
|
||||
"xmlbuilder2": "^3.0.2",
|
||||
"zx": "^6.1.0"
|
||||
"xmlbuilder2": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/transport": "^8.3.1",
|
||||
"tslib": "^2.4.0"
|
||||
"@elastic/transport": "^8.0.2",
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"tap": {
|
||||
"ts": true,
|
||||
|
||||
@ -31,6 +31,7 @@ async function release (opts) {
|
||||
const originalVersion = packageJson.version
|
||||
const currentCanaryVersion = packageJson.versionCanary
|
||||
const originalTypes = packageJson.types
|
||||
const originalNpmIgnore = await readFile(join(__dirname, '..', '.npmignore'), 'utf8')
|
||||
|
||||
const newCanaryInteger = opts.reset ? 1 : (Number(currentCanaryVersion.split('-')[1].split('.')[1]) + 1)
|
||||
const newCanaryVersion = `${originalVersion.split('-')[0]}-canary.${newCanaryInteger}`
|
||||
@ -48,6 +49,15 @@ async function release (opts) {
|
||||
'utf8'
|
||||
)
|
||||
|
||||
// update the npmignore to publish the kibana types as well
|
||||
const newNpmIgnore = originalNpmIgnore.slice(0, originalNpmIgnore.indexOf('# CANARY-PACKAGE')) +
|
||||
originalNpmIgnore.slice(originalNpmIgnore.indexOf('# /CANARY-PACKAGE') + 17)
|
||||
await writeFile(
|
||||
join(__dirname, '..', '.npmignore'),
|
||||
newNpmIgnore,
|
||||
'utf8'
|
||||
)
|
||||
|
||||
// confirm the package.json changes with the user
|
||||
const diff = execSync('git diff').toString().split('\n').map(colorDiff).join('\n')
|
||||
console.log(diff)
|
||||
@ -71,6 +81,12 @@ async function release (opts) {
|
||||
JSON.stringify(packageJson, null, 2) + '\n',
|
||||
'utf8'
|
||||
)
|
||||
|
||||
await writeFile(
|
||||
join(__dirname, '..', '.npmignore'),
|
||||
originalNpmIgnore,
|
||||
'utf8'
|
||||
)
|
||||
}
|
||||
|
||||
function confirm (question) {
|
||||
|
||||
@ -228,7 +228,7 @@ function generateSingleApi (version, spec, common) {
|
||||
|
||||
${genUrlValidation(paths, api)}
|
||||
|
||||
let { ${genQueryDenylist(false)}, ...querystring } = params
|
||||
let { ${genQueryBlacklist(false)}, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
@ -316,20 +316,20 @@ function generateSingleApi (version, spec, common) {
|
||||
}, {})
|
||||
}
|
||||
|
||||
function genQueryDenylist (addQuotes = true) {
|
||||
function genQueryBlacklist (addQuotes = true) {
|
||||
const toCamelCase = str => {
|
||||
return str[0] === '_'
|
||||
? '_' + str.slice(1).replace(/_([a-z])/g, k => k[1].toUpperCase())
|
||||
: str.replace(/_([a-z])/g, k => k[1].toUpperCase())
|
||||
}
|
||||
|
||||
const denylist = ['method', 'body']
|
||||
const blacklist = ['method', 'body']
|
||||
parts.forEach(p => {
|
||||
const camelStr = toCamelCase(p)
|
||||
if (camelStr !== p) denylist.push(`${camelStr}`)
|
||||
denylist.push(`${p}`)
|
||||
if (camelStr !== p) blacklist.push(`${camelStr}`)
|
||||
blacklist.push(`${p}`)
|
||||
})
|
||||
return addQuotes ? denylist.map(q => `'${q}'`) : denylist
|
||||
return addQuotes ? blacklist.map(q => `'${q}'`) : blacklist
|
||||
}
|
||||
|
||||
function buildPath () {
|
||||
|
||||
111
src/api/api/_internal.ts
Normal file
111
src/api/api/_internal.ts
Normal file
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-misused-new */
|
||||
/* eslint-disable @typescript-eslint/no-extraneous-class */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
// This file was automatically generated by elastic/elastic-client-generator-js
|
||||
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
|
||||
// and elastic/elastic-client-generator-js to regenerate this file again.
|
||||
|
||||
import {
|
||||
Transport,
|
||||
TransportRequestOptions,
|
||||
TransportRequestOptionsWithMeta,
|
||||
TransportRequestOptionsWithOutMeta,
|
||||
TransportResult
|
||||
} from '@elastic/transport'
|
||||
import * as T from '../types'
|
||||
import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
export default class Internal {
|
||||
transport: Transport
|
||||
constructor (transport: Transport) {
|
||||
this.transport = transport
|
||||
}
|
||||
|
||||
async deleteDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async deleteDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async deleteDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async deleteDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'DELETE'
|
||||
const path = '/_internal/desired_nodes'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async getDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async getDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async getDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'GET'
|
||||
const path = '/_internal/desired_nodes/_latest'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async updateDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async updateDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async updateDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async updateDesiredNodes (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['history_id', 'version']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'PUT'
|
||||
const path = `/_internal/desired_nodes/${encodeURIComponent(params.history_id.toString())}/${encodeURIComponent(params.version.toString())}`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
}
|
||||
@ -65,10 +65,10 @@ export default class AsyncSearch {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
|
||||
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument, TAggregations>, unknown>>
|
||||
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
|
||||
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async get<TDocument = unknown> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument>>
|
||||
async get<TDocument = unknown> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument>, unknown>>
|
||||
async get<TDocument = unknown> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchGetResponse<TDocument>>
|
||||
async get<TDocument = unknown> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
@ -109,12 +109,12 @@ export default class AsyncSearch {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>
|
||||
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument, TAggregations>, unknown>>
|
||||
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>
|
||||
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async submit<TDocument = unknown> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument>>
|
||||
async submit<TDocument = unknown> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument>, unknown>>
|
||||
async submit<TDocument = unknown> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchSubmitResponse<TDocument>>
|
||||
async submit<TDocument = unknown> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -130,8 +130,7 @@ export default class AsyncSearch {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
|
||||
// @ts-expect-error
|
||||
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
|
||||
querystring[key] = params[key]
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
|
||||
@ -103,36 +103,6 @@ export default class Cat {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatComponentTemplatesResponse>
|
||||
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatComponentTemplatesResponse, unknown>>
|
||||
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptions): Promise<T.CatComponentTemplatesResponse>
|
||||
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
let method = ''
|
||||
let path = ''
|
||||
if (params.name != null) {
|
||||
method = 'GET'
|
||||
path = `/_cat/component_templates/${encodeURIComponent(params.name.toString())}`
|
||||
} else {
|
||||
method = 'GET'
|
||||
path = '/_cat/component_templates'
|
||||
}
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatCountResponse>
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatCountResponse, unknown>>
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptions): Promise<T.CatCountResponse>
|
||||
|
||||
@ -279,7 +279,7 @@ export default class Cluster {
|
||||
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterPutComponentTemplateResponse>
|
||||
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedBody: string[] = ['template', 'version', '_meta', 'allow_auto_create']
|
||||
const acceptedBody: string[] = ['template', 'aliases', 'mappings', 'settings', 'version', '_meta']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -122,7 +122,7 @@ export default class Enrich {
|
||||
async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichPutPolicyResponse>
|
||||
async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedBody: string[] = ['geo_match', 'match', 'range']
|
||||
const acceptedBody: string[] = ['geo_match', 'match']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -37,12 +37,12 @@ import * as T from '../types'
|
||||
import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
export default async function FieldCapsApi (this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>
|
||||
export default async function FieldCapsApi (this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>
|
||||
export default async function FieldCapsApi (this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>
|
||||
export default async function FieldCapsApi (this: That, params: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['fields', 'index_filter', 'runtime_mappings']
|
||||
const acceptedBody: string[] = ['index_filter', 'runtime_mappings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -53,7 +53,6 @@ export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequ
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
|
||||
@ -104,7 +104,7 @@ export default class Fleet {
|
||||
async search<TDocument = unknown> (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptions): Promise<T.FleetSearchResponse<TDocument>>
|
||||
async search<TDocument = unknown> (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-misused-new */
|
||||
/* eslint-disable @typescript-eslint/no-extraneous-class */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
// This file was automatically generated by elastic/elastic-client-generator-js
|
||||
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
|
||||
// and elastic/elastic-client-generator-js to regenerate this file again.
|
||||
|
||||
import {
|
||||
Transport,
|
||||
TransportRequestOptions,
|
||||
TransportRequestOptionsWithMeta,
|
||||
TransportRequestOptionsWithOutMeta,
|
||||
TransportResult
|
||||
} from '@elastic/transport'
|
||||
import * as T from '../types'
|
||||
import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['feature']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
let method = ''
|
||||
let path = ''
|
||||
if (params.feature != null) {
|
||||
method = 'GET'
|
||||
path = `/_health_report/${encodeURIComponent(params.feature.toString())}`
|
||||
} else {
|
||||
method = 'GET'
|
||||
path = '/_health_report'
|
||||
}
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
@ -418,33 +418,6 @@ export default class Indices {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDownsampleResponse>
|
||||
async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDownsampleResponse, unknown>>
|
||||
async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptions): Promise<T.IndicesDownsampleResponse>
|
||||
async downsample (this: That, params: T.IndicesDownsampleRequest | TB.IndicesDownsampleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'target_index']
|
||||
const acceptedBody: string[] = ['config']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/${encodeURIComponent(params.index.toString())}/_downsample/${encodeURIComponent(params.target_index.toString())}`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async exists (this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsResponse>
|
||||
async exists (this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsResponse, unknown>>
|
||||
async exists (this: That, params: T.IndicesExistsRequest | TB.IndicesExistsRequest, options?: TransportRequestOptions): Promise<T.IndicesExistsResponse>
|
||||
@ -887,31 +860,19 @@ export default class Indices {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesModifyDataStreamResponse>
|
||||
async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesModifyDataStreamResponse, unknown>>
|
||||
async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptions): Promise<T.IndicesModifyDataStreamResponse>
|
||||
async modifyDataStream (this: That, params: T.IndicesModifyDataStreamRequest | TB.IndicesModifyDataStreamRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async modifyDataStream (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async modifyDataStream (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async modifyDataStream (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async modifyDataStream (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['actions']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ export default async function KnnSearchApi<TDocument = unknown> (this: That, par
|
||||
export default async function KnnSearchApi<TDocument = unknown> (this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptions): Promise<T.KnnSearchResponse<TDocument>>
|
||||
export default async function KnnSearchApi<TDocument = unknown> (this: That, params: T.KnnSearchRequest | TB.KnnSearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['_source', 'docvalue_fields', 'stored_fields', 'fields', 'filter', 'knn']
|
||||
const acceptedBody: string[] = ['_source', 'docvalue_fields', 'stored_fields', 'fields', 'knn']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -135,10 +135,10 @@ export default class License {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostResponse>
|
||||
async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostResponse, unknown>>
|
||||
async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<T.LicensePostResponse>
|
||||
async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async post (this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LicensePostResponse>
|
||||
async post (this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LicensePostResponse, unknown>>
|
||||
async post (this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<T.LicensePostResponse>
|
||||
async post (this: That, params: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['license', 'licenses']
|
||||
const querystring: Record<string, any> = {}
|
||||
@ -151,7 +151,6 @@ export default class License {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
|
||||
@ -73,10 +73,10 @@ export default class Migration {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MigrationGetFeatureUpgradeStatusResponse>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MigrationGetFeatureUpgradeStatusResponse, unknown>>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptions): Promise<T.MigrationGetFeatureUpgradeStatusResponse>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.MigrationGetFeatureUpgradeStatusRequest | TB.MigrationGetFeatureUpgradeStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
@ -86,7 +86,6 @@ export default class Migration {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -96,10 +95,10 @@ export default class Migration {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MigrationPostFeatureUpgradeResponse>
|
||||
async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MigrationPostFeatureUpgradeResponse, unknown>>
|
||||
async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptions): Promise<T.MigrationPostFeatureUpgradeResponse>
|
||||
async postFeatureUpgrade (this: That, params?: T.MigrationPostFeatureUpgradeRequest | TB.MigrationPostFeatureUpgradeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
@ -109,7 +108,6 @@ export default class Migration {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,28 +43,6 @@ export default class Ml {
|
||||
this.transport = transport
|
||||
}
|
||||
|
||||
async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlClearTrainedModelDeploymentCacheResponse>
|
||||
async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlClearTrainedModelDeploymentCacheResponse, unknown>>
|
||||
async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptions): Promise<T.MlClearTrainedModelDeploymentCacheResponse>
|
||||
async clearTrainedModelDeploymentCache (this: That, params: T.MlClearTrainedModelDeploymentCacheRequest | TB.MlClearTrainedModelDeploymentCacheRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['model_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/_ml/trained_models/${encodeURIComponent(params.model_id.toString())}/deployment/cache/_clear`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlCloseJobResponse>
|
||||
async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlCloseJobResponse, unknown>>
|
||||
async closeJob (this: That, params: T.MlCloseJobRequest | TB.MlCloseJobRequest, options?: TransportRequestOptions): Promise<T.MlCloseJobResponse>
|
||||
@ -959,11 +937,11 @@ export default class Ml {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetMemoryStatsResponse>
|
||||
async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlGetMemoryStatsResponse, unknown>>
|
||||
async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptions): Promise<T.MlGetMemoryStatsResponse>
|
||||
async getMemoryStats (this: That, params?: T.MlGetMemoryStatsRequest | TB.MlGetMemoryStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getModelSnapshotUpgradeStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['job_id', 'snapshot_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
@ -972,36 +950,6 @@ export default class Ml {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
let method = ''
|
||||
let path = ''
|
||||
if (params.node_id != null) {
|
||||
method = 'GET'
|
||||
path = `/_ml/memory/${encodeURIComponent(params.node_id.toString())}/_stats`
|
||||
} else {
|
||||
method = 'GET'
|
||||
path = '/_ml/memory/_stats'
|
||||
}
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlGetModelSnapshotUpgradeStatsResponse>
|
||||
async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlGetModelSnapshotUpgradeStatsResponse, unknown>>
|
||||
async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptions): Promise<T.MlGetModelSnapshotUpgradeStatsResponse>
|
||||
async getModelSnapshotUpgradeStats (this: That, params: T.MlGetModelSnapshotUpgradeStatsRequest | TB.MlGetModelSnapshotUpgradeStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['job_id', 'snapshot_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -1180,12 +1128,12 @@ export default class Ml {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlInferTrainedModelResponse>
|
||||
async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlInferTrainedModelResponse, unknown>>
|
||||
async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptions): Promise<T.MlInferTrainedModelResponse>
|
||||
async inferTrainedModel (this: That, params: T.MlInferTrainedModelRequest | TB.MlInferTrainedModelRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
async inferTrainedModelDeployment (this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlInferTrainedModelDeploymentResponse>
|
||||
async inferTrainedModelDeployment (this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlInferTrainedModelDeploymentResponse, unknown>>
|
||||
async inferTrainedModelDeployment (this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<T.MlInferTrainedModelDeploymentResponse>
|
||||
async inferTrainedModelDeployment (this: That, params: T.MlInferTrainedModelDeploymentRequest | TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['model_id']
|
||||
const acceptedBody: string[] = ['docs', 'inference_config']
|
||||
const acceptedBody: string[] = ['docs']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -1210,7 +1158,7 @@ export default class Ml {
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/_ml/trained_models/${encodeURIComponent(params.model_id.toString())}/_infer`
|
||||
const path = `/_ml/trained_models/${encodeURIComponent(params.model_id.toString())}/deployment/_infer`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
@ -1703,7 +1651,7 @@ export default class Ml {
|
||||
async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptions): Promise<T.MlPutTrainedModelVocabularyResponse>
|
||||
async putTrainedModelVocabulary (this: That, params: T.MlPutTrainedModelVocabularyRequest | TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['model_id']
|
||||
const acceptedBody: string[] = ['vocabulary', 'merges']
|
||||
const acceptedBody: string[] = ['vocabulary']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -2006,7 +1954,7 @@ export default class Ml {
|
||||
async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise<T.MlUpdateDatafeedResponse>
|
||||
async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['datafeed_id']
|
||||
const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indexes', 'indices_options', 'job_id', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size']
|
||||
const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indexes', 'indices_options', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -2074,7 +2022,7 @@ export default class Ml {
|
||||
async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptions): Promise<T.MlUpdateJobResponse>
|
||||
async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['job_id']
|
||||
const acceptedBody: string[] = ['allow_lazy_open', 'analysis_limits', 'background_persist_interval', 'custom_settings', 'categorization_filters', 'description', 'model_plot_config', 'model_prune_window', 'daily_model_snapshot_retention_after_days', 'model_snapshot_retention_days', 'renormalization_window_days', 'results_retention_days', 'groups', 'detectors', 'per_partition_categorization']
|
||||
const acceptedBody: string[] = ['allow_lazy_open', 'analysis_limits', 'background_persist_interval', 'custom_settings', 'categorization_filters', 'description', 'model_plot_config', 'daily_model_snapshot_retention_after_days', 'model_snapshot_retention_days', 'renormalization_window_days', 'results_retention_days', 'groups', 'detectors', 'per_partition_categorization']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -2137,28 +2085,6 @@ export default class Ml {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['model_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/_ml/trained_models/${encodeURIComponent(params.model_id.toString())}/deployment/_update`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlUpgradeJobSnapshotResponse>
|
||||
async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlUpgradeJobSnapshotResponse, unknown>>
|
||||
async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptions): Promise<T.MlUpgradeJobSnapshotResponse>
|
||||
|
||||
@ -181,6 +181,33 @@ export default class Rollup {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async rollup (this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.RollupRollupResponse>
|
||||
async rollup (this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.RollupRollupResponse, unknown>>
|
||||
async rollup (this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptions): Promise<T.RollupRollupResponse>
|
||||
async rollup (this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'rollup_index']
|
||||
const acceptedBody: string[] = ['config']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/${encodeURIComponent(params.index.toString())}/_rollup/${encodeURIComponent(params.rollup_index.toString())}`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async rollupSearch<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.RollupRollupSearchResponse<TDocument, TAggregations>>
|
||||
async rollupSearch<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.RollupRollupSearchResponse<TDocument, TAggregations>, unknown>>
|
||||
async rollupSearch<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptions): Promise<T.RollupRollupSearchResponse<TDocument, TAggregations>>
|
||||
|
||||
@ -42,7 +42,7 @@ export default async function SearchApi<TDocument = unknown, TAggregations = Rec
|
||||
export default async function SearchApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise<T.SearchResponse<TDocument, TAggregations>>
|
||||
export default async function SearchApi<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'ext', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'knn', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const acceptedBody: string[] = ['aggregations', 'aggs', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -58,8 +58,7 @@ export default async function SearchApi<TDocument = unknown, TAggregations = Rec
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) { // eslint-disable-line
|
||||
// @ts-expect-error
|
||||
if (key === 'sort' && typeof params[key] === 'string' && params[key].includes(':')) {
|
||||
querystring[key] = params[key]
|
||||
} else {
|
||||
// @ts-expect-error
|
||||
|
||||
@ -42,7 +42,7 @@ export default async function SearchMvtApi (this: That, params: T.SearchMvtReque
|
||||
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise<T.SearchMvtResponse>
|
||||
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'field', 'zoom', 'x', 'y']
|
||||
const acceptedBody: string[] = ['aggs', 'buffer', 'exact_bounds', 'extent', 'fields', 'grid_agg', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort', 'track_total_hits', 'with_labels']
|
||||
const acceptedBody: string[] = ['aggs', 'exact_bounds', 'extent', 'fields', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort', 'track_total_hits']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -43,40 +43,6 @@ export default class Security {
|
||||
this.transport = transport
|
||||
}
|
||||
|
||||
async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityActivateUserProfileResponse>
|
||||
async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityActivateUserProfileResponse, unknown>>
|
||||
async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptions): Promise<T.SecurityActivateUserProfileResponse>
|
||||
async activateUserProfile (this: That, params: T.SecurityActivateUserProfileRequest | TB.SecurityActivateUserProfileRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['access_token', 'grant_type', 'password', 'username']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = '/_security/profile/_activate'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async authenticate (this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityAuthenticateResponse>
|
||||
async authenticate (this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityAuthenticateResponse, unknown>>
|
||||
async authenticate (this: That, params?: T.SecurityAuthenticateRequest | TB.SecurityAuthenticateRequest, options?: TransportRequestOptions): Promise<T.SecurityAuthenticateResponse>
|
||||
@ -100,28 +66,6 @@ export default class Security {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async bulkUpdateApiKeys (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = '/_security/api_key/_bulk_update'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityChangePasswordResponse>
|
||||
async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityChangePasswordResponse, unknown>>
|
||||
async changePassword (this: That, params?: T.SecurityChangePasswordRequest | TB.SecurityChangePasswordRequest, options?: TransportRequestOptions): Promise<T.SecurityChangePasswordResponse>
|
||||
@ -470,28 +414,6 @@ export default class Security {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityDisableUserProfileResponse>
|
||||
async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityDisableUserProfileResponse, unknown>>
|
||||
async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptions): Promise<T.SecurityDisableUserProfileResponse>
|
||||
async disableUserProfile (this: That, params: T.SecurityDisableUserProfileRequest | TB.SecurityDisableUserProfileRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['uid']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'PUT'
|
||||
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}/_disable`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnableUserResponse>
|
||||
async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityEnableUserResponse, unknown>>
|
||||
async enableUser (this: That, params: T.SecurityEnableUserRequest | TB.SecurityEnableUserRequest, options?: TransportRequestOptions): Promise<T.SecurityEnableUserResponse>
|
||||
@ -514,28 +436,6 @@ export default class Security {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnableUserProfileResponse>
|
||||
async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityEnableUserProfileResponse, unknown>>
|
||||
async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptions): Promise<T.SecurityEnableUserProfileResponse>
|
||||
async enableUserProfile (this: That, params: T.SecurityEnableUserProfileRequest | TB.SecurityEnableUserProfileRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['uid']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'PUT'
|
||||
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}/_enable`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityEnrollKibanaResponse>
|
||||
async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityEnrollKibanaResponse, unknown>>
|
||||
async enrollKibana (this: That, params?: T.SecurityEnrollKibanaRequest | TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptions): Promise<T.SecurityEnrollKibanaResponse>
|
||||
@ -864,34 +764,12 @@ export default class Security {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGetUserProfileResponse>
|
||||
async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityGetUserProfileResponse, unknown>>
|
||||
async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptions): Promise<T.SecurityGetUserProfileResponse>
|
||||
async getUserProfile (this: That, params: T.SecurityGetUserProfileRequest | TB.SecurityGetUserProfileRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['uid']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'GET'
|
||||
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityGrantApiKeyResponse>
|
||||
async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityGrantApiKeyResponse, unknown>>
|
||||
async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptions): Promise<T.SecurityGrantApiKeyResponse>
|
||||
async grantApiKey (this: That, params: T.SecurityGrantApiKeyRequest | TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['api_key', 'grant_type', 'access_token', 'username', 'password', 'run_as']
|
||||
const acceptedBody: string[] = ['api_key', 'grant_type', 'access_token', 'username', 'password']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -962,40 +840,6 @@ export default class Security {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityHasPrivilegesUserProfileResponse>
|
||||
async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityHasPrivilegesUserProfileResponse, unknown>>
|
||||
async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptions): Promise<T.SecurityHasPrivilegesUserProfileResponse>
|
||||
async hasPrivilegesUserProfile (this: That, params: T.SecurityHasPrivilegesUserProfileRequest | TB.SecurityHasPrivilegesUserProfileRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['uids', 'privileges']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = body != null ? 'POST' : 'GET'
|
||||
const path = '/_security/profile/_has_privileges'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityInvalidateApiKeyResponse>
|
||||
async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityInvalidateApiKeyResponse, unknown>>
|
||||
async invalidateApiKey (this: That, params?: T.SecurityInvalidateApiKeyRequest | TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptions): Promise<T.SecurityInvalidateApiKeyResponse>
|
||||
@ -1488,107 +1332,4 @@ export default class Security {
|
||||
const path = `/_security/saml/metadata/${encodeURIComponent(params.realm_name.toString())}`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecuritySuggestUserProfilesResponse>
|
||||
async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecuritySuggestUserProfilesResponse, unknown>>
|
||||
async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptions): Promise<T.SecuritySuggestUserProfilesResponse>
|
||||
async suggestUserProfiles (this: That, params?: T.SecuritySuggestUserProfilesRequest | TB.SecuritySuggestUserProfilesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['name', 'size', 'data', 'hint']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = body != null ? 'POST' : 'GET'
|
||||
const path = '/_security/profile/_suggest'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateApiKeyResponse>
|
||||
async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityUpdateApiKeyResponse, unknown>>
|
||||
async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptions): Promise<T.SecurityUpdateApiKeyResponse>
|
||||
async updateApiKey (this: That, params: T.SecurityUpdateApiKeyRequest | TB.SecurityUpdateApiKeyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedBody: string[] = ['role_descriptors', 'metadata']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'PUT'
|
||||
const path = `/_security/api_key/${encodeURIComponent(params.id.toString())}`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SecurityUpdateUserProfileDataResponse>
|
||||
async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SecurityUpdateUserProfileDataResponse, unknown>>
|
||||
async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptions): Promise<T.SecurityUpdateUserProfileDataResponse>
|
||||
async updateUserProfileData (this: That, params: T.SecurityUpdateUserProfileDataRequest | TB.SecurityUpdateUserProfileDataRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['uid']
|
||||
const acceptedBody: string[] = ['labels', 'data']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'PUT'
|
||||
const path = `/_security/profile/${encodeURIComponent(params.uid.toString())}/_data`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,23 +100,11 @@ export default class Shutdown {
|
||||
async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptions): Promise<T.ShutdownPutNodeResponse>
|
||||
async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedBody: string[] = ['type', 'reason', 'allocation_delay', 'target_node_name']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
|
||||
@ -215,28 +215,6 @@ export default class Transform {
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_schedule_now`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformStartTransformResponse>
|
||||
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformStartTransformResponse, unknown>>
|
||||
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptions): Promise<T.TransformStartTransformResponse>
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
|
||||
// and elastic/elastic-client-generator-js to regenerate this file again.
|
||||
|
||||
import InternalApi from './api/_internal'
|
||||
import AsyncSearchApi from './api/async_search'
|
||||
import AutoscalingApi from './api/autoscaling'
|
||||
import bulkApi from './api/bulk'
|
||||
@ -55,7 +56,6 @@ import getScriptContextApi from './api/get_script_context'
|
||||
import getScriptLanguagesApi from './api/get_script_languages'
|
||||
import getSourceApi from './api/get_source'
|
||||
import GraphApi from './api/graph'
|
||||
import healthReportApi from './api/health_report'
|
||||
import IlmApi from './api/ilm'
|
||||
import indexApi from './api/index'
|
||||
import IndicesApi from './api/indices'
|
||||
@ -106,6 +106,7 @@ import XpackApi from './api/xpack'
|
||||
|
||||
export default interface API {
|
||||
new(): API
|
||||
Internal: InternalApi
|
||||
asyncSearch: AsyncSearchApi
|
||||
autoscaling: AutoscalingApi
|
||||
bulk: typeof bulkApi
|
||||
@ -135,7 +136,6 @@ export default interface API {
|
||||
getScriptLanguages: typeof getScriptLanguagesApi
|
||||
getSource: typeof getSourceApi
|
||||
graph: GraphApi
|
||||
healthReport: typeof healthReportApi
|
||||
ilm: IlmApi
|
||||
index: typeof indexApi
|
||||
indices: IndicesApi
|
||||
@ -185,6 +185,7 @@ export default interface API {
|
||||
xpack: XpackApi
|
||||
}
|
||||
|
||||
const kInternal = Symbol('Internal')
|
||||
const kAsyncSearch = Symbol('AsyncSearch')
|
||||
const kAutoscaling = Symbol('Autoscaling')
|
||||
const kCat = Symbol('Cat')
|
||||
@ -220,6 +221,7 @@ const kWatcher = Symbol('Watcher')
|
||||
const kXpack = Symbol('Xpack')
|
||||
|
||||
export default class API {
|
||||
[kInternal]: symbol | null
|
||||
[kAsyncSearch]: symbol | null
|
||||
[kAutoscaling]: symbol | null
|
||||
[kCat]: symbol | null
|
||||
@ -254,6 +256,7 @@ export default class API {
|
||||
[kWatcher]: symbol | null
|
||||
[kXpack]: symbol | null
|
||||
constructor () {
|
||||
this[kInternal] = null
|
||||
this[kAsyncSearch] = null
|
||||
this[kAutoscaling] = null
|
||||
this[kCat] = null
|
||||
@ -308,7 +311,6 @@ API.prototype.getScript = getScriptApi
|
||||
API.prototype.getScriptContext = getScriptContextApi
|
||||
API.prototype.getScriptLanguages = getScriptLanguagesApi
|
||||
API.prototype.getSource = getSourceApi
|
||||
API.prototype.healthReport = healthReportApi
|
||||
API.prototype.index = indexApi
|
||||
API.prototype.info = infoApi
|
||||
API.prototype.knnSearch = knnSearchApi
|
||||
@ -336,6 +338,9 @@ API.prototype.updateByQuery = updateByQueryApi
|
||||
API.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
||||
|
||||
Object.defineProperties(API.prototype, {
|
||||
Internal: {
|
||||
get () { return this[kInternal] === null ? (this[kInternal] = new InternalApi(this.transport)) : this[kInternal] }
|
||||
},
|
||||
asyncSearch: {
|
||||
get () { return this[kAsyncSearch] === null ? (this[kAsyncSearch] = new AsyncSearchApi(this.transport)) : this[kAsyncSearch] }
|
||||
},
|
||||
|
||||
527
src/api/kibana.ts
Normal file
527
src/api/kibana.ts
Normal file
@ -0,0 +1,527 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable import/export */
|
||||
/* eslint-disable @typescript-eslint/no-misused-new */
|
||||
/* eslint-disable @typescript-eslint/no-extraneous-class */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
|
||||
// This file was automatically generated by elastic/elastic-client-generator-js
|
||||
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
|
||||
// and elastic/elastic-client-generator-js to regenerate this file again.
|
||||
|
||||
import {
|
||||
Serializer,
|
||||
Diagnostic,
|
||||
BaseConnectionPool,
|
||||
TransportRequestParams,
|
||||
TransportRequestOptions,
|
||||
TransportResult
|
||||
} from '@elastic/transport'
|
||||
import * as T from './types'
|
||||
import * as TB from './typesWithBodyKey'
|
||||
import SniffingTransport from '../sniffingTransport'
|
||||
import Helpers from '../helpers'
|
||||
import { ClientOptions } from '../client'
|
||||
|
||||
interface KibanaClient {
|
||||
diagnostic: Diagnostic
|
||||
name: string | symbol
|
||||
connectionPool: BaseConnectionPool
|
||||
transport: Omit<SniffingTransport, 'request'> & {
|
||||
request: <TResponse = unknown, TContext = any>(params: TransportRequestParams, options?: TransportRequestOptions) => Promise<TransportResult<TResponse, TContext>>
|
||||
}
|
||||
serializer: Serializer
|
||||
helpers: Helpers
|
||||
child: (opts?: ClientOptions) => KibanaClient
|
||||
close: () => Promise<void>
|
||||
Internal: {
|
||||
deleteDesiredNodes: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
getDesiredNodes: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
updateDesiredNodes: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
}
|
||||
asyncSearch: {
|
||||
delete: <TContext = unknown>(params: T.AsyncSearchDeleteRequest| TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AsyncSearchDeleteResponse, TContext>>
|
||||
get: <TDocument = unknown, TContext = unknown>(params: T.AsyncSearchGetRequest| TB.AsyncSearchGetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AsyncSearchGetResponse<TDocument>, TContext>>
|
||||
status: <TContext = unknown>(params: T.AsyncSearchStatusRequest| TB.AsyncSearchStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AsyncSearchStatusResponse, TContext>>
|
||||
submit: <TDocument = unknown, TContext = unknown>(params?: T.AsyncSearchSubmitRequest| TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument>, TContext>>
|
||||
}
|
||||
autoscaling: {
|
||||
deleteAutoscalingPolicy: <TContext = unknown>(params: T.AutoscalingDeleteAutoscalingPolicyRequest| TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AutoscalingDeleteAutoscalingPolicyResponse, TContext>>
|
||||
getAutoscalingCapacity: <TContext = unknown>(params?: T.AutoscalingGetAutoscalingCapacityRequest| TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AutoscalingGetAutoscalingCapacityResponse, TContext>>
|
||||
getAutoscalingPolicy: <TContext = unknown>(params: T.AutoscalingGetAutoscalingPolicyRequest| TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AutoscalingGetAutoscalingPolicyResponse, TContext>>
|
||||
putAutoscalingPolicy: <TContext = unknown>(params: T.AutoscalingPutAutoscalingPolicyRequest| TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.AutoscalingPutAutoscalingPolicyResponse, TContext>>
|
||||
}
|
||||
bulk: <TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.BulkRequest<TDocument, TPartialDocument>| TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.BulkResponse, TContext>>
|
||||
cat: {
|
||||
aliases: <TContext = unknown>(params?: T.CatAliasesRequest| TB.CatAliasesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatAliasesResponse, TContext>>
|
||||
allocation: <TContext = unknown>(params?: T.CatAllocationRequest| TB.CatAllocationRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatAllocationResponse, TContext>>
|
||||
count: <TContext = unknown>(params?: T.CatCountRequest| TB.CatCountRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatCountResponse, TContext>>
|
||||
fielddata: <TContext = unknown>(params?: T.CatFielddataRequest| TB.CatFielddataRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatFielddataResponse, TContext>>
|
||||
health: <TContext = unknown>(params?: T.CatHealthRequest| TB.CatHealthRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatHealthResponse, TContext>>
|
||||
help: <TContext = unknown>(params?: T.CatHelpRequest| TB.CatHelpRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatHelpResponse, TContext>>
|
||||
indices: <TContext = unknown>(params?: T.CatIndicesRequest| TB.CatIndicesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatIndicesResponse, TContext>>
|
||||
master: <TContext = unknown>(params?: T.CatMasterRequest| TB.CatMasterRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatMasterResponse, TContext>>
|
||||
mlDataFrameAnalytics: <TContext = unknown>(params?: T.CatMlDataFrameAnalyticsRequest| TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatMlDataFrameAnalyticsResponse, TContext>>
|
||||
mlDatafeeds: <TContext = unknown>(params?: T.CatMlDatafeedsRequest| TB.CatMlDatafeedsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatMlDatafeedsResponse, TContext>>
|
||||
mlJobs: <TContext = unknown>(params?: T.CatMlJobsRequest| TB.CatMlJobsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatMlJobsResponse, TContext>>
|
||||
mlTrainedModels: <TContext = unknown>(params?: T.CatMlTrainedModelsRequest| TB.CatMlTrainedModelsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatMlTrainedModelsResponse, TContext>>
|
||||
nodeattrs: <TContext = unknown>(params?: T.CatNodeattrsRequest| TB.CatNodeattrsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatNodeattrsResponse, TContext>>
|
||||
nodes: <TContext = unknown>(params?: T.CatNodesRequest| TB.CatNodesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatNodesResponse, TContext>>
|
||||
pendingTasks: <TContext = unknown>(params?: T.CatPendingTasksRequest| TB.CatPendingTasksRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatPendingTasksResponse, TContext>>
|
||||
plugins: <TContext = unknown>(params?: T.CatPluginsRequest| TB.CatPluginsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatPluginsResponse, TContext>>
|
||||
recovery: <TContext = unknown>(params?: T.CatRecoveryRequest| TB.CatRecoveryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatRecoveryResponse, TContext>>
|
||||
repositories: <TContext = unknown>(params?: T.CatRepositoriesRequest| TB.CatRepositoriesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatRepositoriesResponse, TContext>>
|
||||
segments: <TContext = unknown>(params?: T.CatSegmentsRequest| TB.CatSegmentsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatSegmentsResponse, TContext>>
|
||||
shards: <TContext = unknown>(params?: T.CatShardsRequest| TB.CatShardsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatShardsResponse, TContext>>
|
||||
snapshots: <TContext = unknown>(params?: T.CatSnapshotsRequest| TB.CatSnapshotsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatSnapshotsResponse, TContext>>
|
||||
tasks: <TContext = unknown>(params?: T.CatTasksRequest| TB.CatTasksRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatTasksResponse, TContext>>
|
||||
templates: <TContext = unknown>(params?: T.CatTemplatesRequest| TB.CatTemplatesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatTemplatesResponse, TContext>>
|
||||
threadPool: <TContext = unknown>(params?: T.CatThreadPoolRequest| TB.CatThreadPoolRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatThreadPoolResponse, TContext>>
|
||||
transforms: <TContext = unknown>(params?: T.CatTransformsRequest| TB.CatTransformsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CatTransformsResponse, TContext>>
|
||||
}
|
||||
ccr: {
|
||||
deleteAutoFollowPattern: <TContext = unknown>(params: T.CcrDeleteAutoFollowPatternRequest| TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrDeleteAutoFollowPatternResponse, TContext>>
|
||||
follow: <TContext = unknown>(params: T.CcrFollowRequest| TB.CcrFollowRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrFollowResponse, TContext>>
|
||||
followInfo: <TContext = unknown>(params: T.CcrFollowInfoRequest| TB.CcrFollowInfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrFollowInfoResponse, TContext>>
|
||||
followStats: <TContext = unknown>(params: T.CcrFollowStatsRequest| TB.CcrFollowStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrFollowStatsResponse, TContext>>
|
||||
forgetFollower: <TContext = unknown>(params: T.CcrForgetFollowerRequest| TB.CcrForgetFollowerRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrForgetFollowerResponse, TContext>>
|
||||
getAutoFollowPattern: <TContext = unknown>(params?: T.CcrGetAutoFollowPatternRequest| TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrGetAutoFollowPatternResponse, TContext>>
|
||||
pauseAutoFollowPattern: <TContext = unknown>(params: T.CcrPauseAutoFollowPatternRequest| TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrPauseAutoFollowPatternResponse, TContext>>
|
||||
pauseFollow: <TContext = unknown>(params: T.CcrPauseFollowRequest| TB.CcrPauseFollowRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrPauseFollowResponse, TContext>>
|
||||
putAutoFollowPattern: <TContext = unknown>(params: T.CcrPutAutoFollowPatternRequest| TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrPutAutoFollowPatternResponse, TContext>>
|
||||
resumeAutoFollowPattern: <TContext = unknown>(params: T.CcrResumeAutoFollowPatternRequest| TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrResumeAutoFollowPatternResponse, TContext>>
|
||||
resumeFollow: <TContext = unknown>(params: T.CcrResumeFollowRequest| TB.CcrResumeFollowRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrResumeFollowResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.CcrStatsRequest| TB.CcrStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrStatsResponse, TContext>>
|
||||
unfollow: <TContext = unknown>(params: T.CcrUnfollowRequest| TB.CcrUnfollowRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CcrUnfollowResponse, TContext>>
|
||||
}
|
||||
clearScroll: <TContext = unknown>(params?: T.ClearScrollRequest| TB.ClearScrollRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClearScrollResponse, TContext>>
|
||||
closePointInTime: <TContext = unknown>(params?: T.ClosePointInTimeRequest| TB.ClosePointInTimeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClosePointInTimeResponse, TContext>>
|
||||
cluster: {
|
||||
allocationExplain: <TContext = unknown>(params?: T.ClusterAllocationExplainRequest| TB.ClusterAllocationExplainRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterAllocationExplainResponse, TContext>>
|
||||
deleteComponentTemplate: <TContext = unknown>(params: T.ClusterDeleteComponentTemplateRequest| TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterDeleteComponentTemplateResponse, TContext>>
|
||||
deleteVotingConfigExclusions: <TContext = unknown>(params?: T.ClusterDeleteVotingConfigExclusionsRequest| TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterDeleteVotingConfigExclusionsResponse, TContext>>
|
||||
existsComponentTemplate: <TContext = unknown>(params: T.ClusterExistsComponentTemplateRequest| TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterExistsComponentTemplateResponse, TContext>>
|
||||
getComponentTemplate: <TContext = unknown>(params?: T.ClusterGetComponentTemplateRequest| TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterGetComponentTemplateResponse, TContext>>
|
||||
getSettings: <TContext = unknown>(params?: T.ClusterGetSettingsRequest| TB.ClusterGetSettingsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterGetSettingsResponse, TContext>>
|
||||
health: <TContext = unknown>(params?: T.ClusterHealthRequest| TB.ClusterHealthRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterHealthResponse, TContext>>
|
||||
pendingTasks: <TContext = unknown>(params?: T.ClusterPendingTasksRequest| TB.ClusterPendingTasksRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterPendingTasksResponse, TContext>>
|
||||
postVotingConfigExclusions: <TContext = unknown>(params?: T.ClusterPostVotingConfigExclusionsRequest| TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterPostVotingConfigExclusionsResponse, TContext>>
|
||||
putComponentTemplate: <TContext = unknown>(params: T.ClusterPutComponentTemplateRequest| TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterPutComponentTemplateResponse, TContext>>
|
||||
putSettings: <TContext = unknown>(params?: T.ClusterPutSettingsRequest| TB.ClusterPutSettingsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterPutSettingsResponse, TContext>>
|
||||
remoteInfo: <TContext = unknown>(params?: T.ClusterRemoteInfoRequest| TB.ClusterRemoteInfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterRemoteInfoResponse, TContext>>
|
||||
reroute: <TContext = unknown>(params?: T.ClusterRerouteRequest| TB.ClusterRerouteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterRerouteResponse, TContext>>
|
||||
state: <TContext = unknown>(params?: T.ClusterStateRequest| TB.ClusterStateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterStateResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.ClusterStatsRequest| TB.ClusterStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ClusterStatsResponse, TContext>>
|
||||
}
|
||||
count: <TContext = unknown>(params?: T.CountRequest| TB.CountRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.CountResponse, TContext>>
|
||||
create: <TDocument = unknown, TContext = unknown>(params: T.CreateRequest<TDocument>| TB.CreateRequest<TDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.CreateResponse, TContext>>
|
||||
danglingIndices: {
|
||||
deleteDanglingIndex: <TContext = unknown>(params: T.DanglingIndicesDeleteDanglingIndexRequest| TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DanglingIndicesDeleteDanglingIndexResponse, TContext>>
|
||||
importDanglingIndex: <TContext = unknown>(params: T.DanglingIndicesImportDanglingIndexRequest| TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DanglingIndicesImportDanglingIndexResponse, TContext>>
|
||||
listDanglingIndices: <TContext = unknown>(params?: T.DanglingIndicesListDanglingIndicesRequest| TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DanglingIndicesListDanglingIndicesResponse, TContext>>
|
||||
}
|
||||
delete: <TContext = unknown>(params: T.DeleteRequest| TB.DeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteResponse, TContext>>
|
||||
deleteByQuery: <TContext = unknown>(params: T.DeleteByQueryRequest| TB.DeleteByQueryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteByQueryResponse, TContext>>
|
||||
deleteByQueryRethrottle: <TContext = unknown>(params: T.DeleteByQueryRethrottleRequest| TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteByQueryRethrottleResponse, TContext>>
|
||||
deleteScript: <TContext = unknown>(params: T.DeleteScriptRequest| TB.DeleteScriptRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteScriptResponse, TContext>>
|
||||
enrich: {
|
||||
deletePolicy: <TContext = unknown>(params: T.EnrichDeletePolicyRequest| TB.EnrichDeletePolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EnrichDeletePolicyResponse, TContext>>
|
||||
executePolicy: <TContext = unknown>(params: T.EnrichExecutePolicyRequest| TB.EnrichExecutePolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EnrichExecutePolicyResponse, TContext>>
|
||||
getPolicy: <TContext = unknown>(params?: T.EnrichGetPolicyRequest| TB.EnrichGetPolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EnrichGetPolicyResponse, TContext>>
|
||||
putPolicy: <TContext = unknown>(params: T.EnrichPutPolicyRequest| TB.EnrichPutPolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EnrichPutPolicyResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.EnrichStatsRequest| TB.EnrichStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EnrichStatsResponse, TContext>>
|
||||
}
|
||||
eql: {
|
||||
delete: <TContext = unknown>(params: T.EqlDeleteRequest| TB.EqlDeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EqlDeleteResponse, TContext>>
|
||||
get: <TEvent = unknown, TContext = unknown>(params: T.EqlGetRequest| TB.EqlGetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EqlGetResponse<TEvent>, TContext>>
|
||||
getStatus: <TContext = unknown>(params: T.EqlGetStatusRequest| TB.EqlGetStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EqlGetStatusResponse, TContext>>
|
||||
search: <TEvent = unknown, TContext = unknown>(params: T.EqlSearchRequest| TB.EqlSearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.EqlSearchResponse<TEvent>, TContext>>
|
||||
}
|
||||
exists: <TContext = unknown>(params: T.ExistsRequest| TB.ExistsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ExistsResponse, TContext>>
|
||||
existsSource: <TContext = unknown>(params: T.ExistsSourceRequest| TB.ExistsSourceRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ExistsSourceResponse, TContext>>
|
||||
explain: <TDocument = unknown, TContext = unknown>(params: T.ExplainRequest| TB.ExplainRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ExplainResponse<TDocument>, TContext>>
|
||||
features: {
|
||||
getFeatures: <TContext = unknown>(params?: T.FeaturesGetFeaturesRequest| TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.FeaturesGetFeaturesResponse, TContext>>
|
||||
resetFeatures: <TContext = unknown>(params?: T.FeaturesResetFeaturesRequest| TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.FeaturesResetFeaturesResponse, TContext>>
|
||||
}
|
||||
fieldCaps: <TContext = unknown>(params: T.FieldCapsRequest| TB.FieldCapsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.FieldCapsResponse, TContext>>
|
||||
fleet: {
|
||||
globalCheckpoints: <TContext = unknown>(params: T.FleetGlobalCheckpointsRequest| TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.FleetGlobalCheckpointsResponse, TContext>>
|
||||
msearch: <TDocument = unknown, TContext = unknown>(params: T.FleetMsearchRequest| TB.FleetMsearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.FleetMsearchResponse<TDocument>, TContext>>
|
||||
search: <TDocument = unknown, TContext = unknown>(params: T.FleetSearchRequest| TB.FleetSearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.FleetSearchResponse<TDocument>, TContext>>
|
||||
}
|
||||
get: <TDocument = unknown, TContext = unknown>(params: T.GetRequest| TB.GetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.GetResponse<TDocument>, TContext>>
|
||||
getScript: <TContext = unknown>(params: T.GetScriptRequest| TB.GetScriptRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.GetScriptResponse, TContext>>
|
||||
getScriptContext: <TContext = unknown>(params?: T.GetScriptContextRequest| TB.GetScriptContextRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.GetScriptContextResponse, TContext>>
|
||||
getScriptLanguages: <TContext = unknown>(params?: T.GetScriptLanguagesRequest| TB.GetScriptLanguagesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.GetScriptLanguagesResponse, TContext>>
|
||||
getSource: <TDocument = unknown, TContext = unknown>(params: T.GetSourceRequest| TB.GetSourceRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.GetSourceResponse<TDocument>, TContext>>
|
||||
graph: {
|
||||
explore: <TContext = unknown>(params: T.GraphExploreRequest| TB.GraphExploreRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.GraphExploreResponse, TContext>>
|
||||
}
|
||||
ilm: {
|
||||
deleteLifecycle: <TContext = unknown>(params: T.IlmDeleteLifecycleRequest| TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmDeleteLifecycleResponse, TContext>>
|
||||
explainLifecycle: <TContext = unknown>(params: T.IlmExplainLifecycleRequest| TB.IlmExplainLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmExplainLifecycleResponse, TContext>>
|
||||
getLifecycle: <TContext = unknown>(params?: T.IlmGetLifecycleRequest| TB.IlmGetLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmGetLifecycleResponse, TContext>>
|
||||
getStatus: <TContext = unknown>(params?: T.IlmGetStatusRequest| TB.IlmGetStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmGetStatusResponse, TContext>>
|
||||
migrateToDataTiers: <TContext = unknown>(params?: T.IlmMigrateToDataTiersRequest| TB.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmMigrateToDataTiersResponse, TContext>>
|
||||
moveToStep: <TContext = unknown>(params: T.IlmMoveToStepRequest| TB.IlmMoveToStepRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmMoveToStepResponse, TContext>>
|
||||
putLifecycle: <TContext = unknown>(params: T.IlmPutLifecycleRequest| TB.IlmPutLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmPutLifecycleResponse, TContext>>
|
||||
removePolicy: <TContext = unknown>(params: T.IlmRemovePolicyRequest| TB.IlmRemovePolicyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmRemovePolicyResponse, TContext>>
|
||||
retry: <TContext = unknown>(params: T.IlmRetryRequest| TB.IlmRetryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmRetryResponse, TContext>>
|
||||
start: <TContext = unknown>(params?: T.IlmStartRequest| TB.IlmStartRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmStartResponse, TContext>>
|
||||
stop: <TContext = unknown>(params?: T.IlmStopRequest| TB.IlmStopRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IlmStopResponse, TContext>>
|
||||
}
|
||||
index: <TDocument = unknown, TContext = unknown>(params: T.IndexRequest<TDocument>| TB.IndexRequest<TDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.IndexResponse, TContext>>
|
||||
indices: {
|
||||
addBlock: <TContext = unknown>(params: T.IndicesAddBlockRequest| TB.IndicesAddBlockRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesAddBlockResponse, TContext>>
|
||||
analyze: <TContext = unknown>(params?: T.IndicesAnalyzeRequest| TB.IndicesAnalyzeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesAnalyzeResponse, TContext>>
|
||||
clearCache: <TContext = unknown>(params?: T.IndicesClearCacheRequest| TB.IndicesClearCacheRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesClearCacheResponse, TContext>>
|
||||
clone: <TContext = unknown>(params: T.IndicesCloneRequest| TB.IndicesCloneRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesCloneResponse, TContext>>
|
||||
close: <TContext = unknown>(params: T.IndicesCloseRequest| TB.IndicesCloseRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesCloseResponse, TContext>>
|
||||
create: <TContext = unknown>(params: T.IndicesCreateRequest| TB.IndicesCreateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesCreateResponse, TContext>>
|
||||
createDataStream: <TContext = unknown>(params: T.IndicesCreateDataStreamRequest| TB.IndicesCreateDataStreamRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesCreateDataStreamResponse, TContext>>
|
||||
dataStreamsStats: <TContext = unknown>(params?: T.IndicesDataStreamsStatsRequest| TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDataStreamsStatsResponse, TContext>>
|
||||
delete: <TContext = unknown>(params: T.IndicesDeleteRequest| TB.IndicesDeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDeleteResponse, TContext>>
|
||||
deleteAlias: <TContext = unknown>(params: T.IndicesDeleteAliasRequest| TB.IndicesDeleteAliasRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDeleteAliasResponse, TContext>>
|
||||
deleteDataStream: <TContext = unknown>(params: T.IndicesDeleteDataStreamRequest| TB.IndicesDeleteDataStreamRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDeleteDataStreamResponse, TContext>>
|
||||
deleteIndexTemplate: <TContext = unknown>(params: T.IndicesDeleteIndexTemplateRequest| TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDeleteIndexTemplateResponse, TContext>>
|
||||
deleteTemplate: <TContext = unknown>(params: T.IndicesDeleteTemplateRequest| TB.IndicesDeleteTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDeleteTemplateResponse, TContext>>
|
||||
diskUsage: <TContext = unknown>(params: T.IndicesDiskUsageRequest| TB.IndicesDiskUsageRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesDiskUsageResponse, TContext>>
|
||||
exists: <TContext = unknown>(params: T.IndicesExistsRequest| TB.IndicesExistsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesExistsResponse, TContext>>
|
||||
existsAlias: <TContext = unknown>(params: T.IndicesExistsAliasRequest| TB.IndicesExistsAliasRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesExistsAliasResponse, TContext>>
|
||||
existsIndexTemplate: <TContext = unknown>(params: T.IndicesExistsIndexTemplateRequest| TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesExistsIndexTemplateResponse, TContext>>
|
||||
existsTemplate: <TContext = unknown>(params: T.IndicesExistsTemplateRequest| TB.IndicesExistsTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesExistsTemplateResponse, TContext>>
|
||||
fieldUsageStats: <TContext = unknown>(params: T.IndicesFieldUsageStatsRequest| TB.IndicesFieldUsageStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesFieldUsageStatsResponse, TContext>>
|
||||
flush: <TContext = unknown>(params?: T.IndicesFlushRequest| TB.IndicesFlushRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesFlushResponse, TContext>>
|
||||
forcemerge: <TContext = unknown>(params?: T.IndicesForcemergeRequest| TB.IndicesForcemergeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesForcemergeResponse, TContext>>
|
||||
get: <TContext = unknown>(params: T.IndicesGetRequest| TB.IndicesGetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetResponse, TContext>>
|
||||
getAlias: <TContext = unknown>(params?: T.IndicesGetAliasRequest| TB.IndicesGetAliasRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetAliasResponse, TContext>>
|
||||
getDataStream: <TContext = unknown>(params?: T.IndicesGetDataStreamRequest| TB.IndicesGetDataStreamRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetDataStreamResponse, TContext>>
|
||||
getFieldMapping: <TContext = unknown>(params: T.IndicesGetFieldMappingRequest| TB.IndicesGetFieldMappingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetFieldMappingResponse, TContext>>
|
||||
getIndexTemplate: <TContext = unknown>(params?: T.IndicesGetIndexTemplateRequest| TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetIndexTemplateResponse, TContext>>
|
||||
getMapping: <TContext = unknown>(params?: T.IndicesGetMappingRequest| TB.IndicesGetMappingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetMappingResponse, TContext>>
|
||||
getSettings: <TContext = unknown>(params?: T.IndicesGetSettingsRequest| TB.IndicesGetSettingsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetSettingsResponse, TContext>>
|
||||
getTemplate: <TContext = unknown>(params?: T.IndicesGetTemplateRequest| TB.IndicesGetTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesGetTemplateResponse, TContext>>
|
||||
migrateToDataStream: <TContext = unknown>(params: T.IndicesMigrateToDataStreamRequest| TB.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesMigrateToDataStreamResponse, TContext>>
|
||||
modifyDataStream: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
open: <TContext = unknown>(params: T.IndicesOpenRequest| TB.IndicesOpenRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesOpenResponse, TContext>>
|
||||
promoteDataStream: <TContext = unknown>(params: T.IndicesPromoteDataStreamRequest| TB.IndicesPromoteDataStreamRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesPromoteDataStreamResponse, TContext>>
|
||||
putAlias: <TContext = unknown>(params: T.IndicesPutAliasRequest| TB.IndicesPutAliasRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesPutAliasResponse, TContext>>
|
||||
putIndexTemplate: <TContext = unknown>(params: T.IndicesPutIndexTemplateRequest| TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesPutIndexTemplateResponse, TContext>>
|
||||
putMapping: <TContext = unknown>(params: T.IndicesPutMappingRequest| TB.IndicesPutMappingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesPutMappingResponse, TContext>>
|
||||
putSettings: <TContext = unknown>(params?: T.IndicesPutSettingsRequest| TB.IndicesPutSettingsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesPutSettingsResponse, TContext>>
|
||||
putTemplate: <TContext = unknown>(params: T.IndicesPutTemplateRequest| TB.IndicesPutTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesPutTemplateResponse, TContext>>
|
||||
recovery: <TContext = unknown>(params?: T.IndicesRecoveryRequest| TB.IndicesRecoveryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesRecoveryResponse, TContext>>
|
||||
refresh: <TContext = unknown>(params?: T.IndicesRefreshRequest| TB.IndicesRefreshRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesRefreshResponse, TContext>>
|
||||
reloadSearchAnalyzers: <TContext = unknown>(params: T.IndicesReloadSearchAnalyzersRequest| TB.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesReloadSearchAnalyzersResponse, TContext>>
|
||||
resolveIndex: <TContext = unknown>(params: T.IndicesResolveIndexRequest| TB.IndicesResolveIndexRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesResolveIndexResponse, TContext>>
|
||||
rollover: <TContext = unknown>(params: T.IndicesRolloverRequest| TB.IndicesRolloverRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesRolloverResponse, TContext>>
|
||||
segments: <TContext = unknown>(params?: T.IndicesSegmentsRequest| TB.IndicesSegmentsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesSegmentsResponse, TContext>>
|
||||
shardStores: <TContext = unknown>(params?: T.IndicesShardStoresRequest| TB.IndicesShardStoresRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesShardStoresResponse, TContext>>
|
||||
shrink: <TContext = unknown>(params: T.IndicesShrinkRequest| TB.IndicesShrinkRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesShrinkResponse, TContext>>
|
||||
simulateIndexTemplate: <TContext = unknown>(params: T.IndicesSimulateIndexTemplateRequest| TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesSimulateIndexTemplateResponse, TContext>>
|
||||
simulateTemplate: <TContext = unknown>(params?: T.IndicesSimulateTemplateRequest| TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesSimulateTemplateResponse, TContext>>
|
||||
split: <TContext = unknown>(params: T.IndicesSplitRequest| TB.IndicesSplitRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesSplitResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.IndicesStatsRequest| TB.IndicesStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesStatsResponse, TContext>>
|
||||
unfreeze: <TContext = unknown>(params: T.IndicesUnfreezeRequest| TB.IndicesUnfreezeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesUnfreezeResponse, TContext>>
|
||||
updateAliases: <TContext = unknown>(params?: T.IndicesUpdateAliasesRequest| TB.IndicesUpdateAliasesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesUpdateAliasesResponse, TContext>>
|
||||
validateQuery: <TContext = unknown>(params?: T.IndicesValidateQueryRequest| TB.IndicesValidateQueryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IndicesValidateQueryResponse, TContext>>
|
||||
}
|
||||
info: <TContext = unknown>(params?: T.InfoRequest| TB.InfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.InfoResponse, TContext>>
|
||||
ingest: {
|
||||
deletePipeline: <TContext = unknown>(params: T.IngestDeletePipelineRequest| TB.IngestDeletePipelineRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IngestDeletePipelineResponse, TContext>>
|
||||
geoIpStats: <TContext = unknown>(params?: T.IngestGeoIpStatsRequest| TB.IngestGeoIpStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IngestGeoIpStatsResponse, TContext>>
|
||||
getPipeline: <TContext = unknown>(params?: T.IngestGetPipelineRequest| TB.IngestGetPipelineRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IngestGetPipelineResponse, TContext>>
|
||||
processorGrok: <TContext = unknown>(params?: T.IngestProcessorGrokRequest| TB.IngestProcessorGrokRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IngestProcessorGrokResponse, TContext>>
|
||||
putPipeline: <TContext = unknown>(params: T.IngestPutPipelineRequest| TB.IngestPutPipelineRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IngestPutPipelineResponse, TContext>>
|
||||
simulate: <TContext = unknown>(params?: T.IngestSimulateRequest| TB.IngestSimulateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.IngestSimulateResponse, TContext>>
|
||||
}
|
||||
knnSearch: <TDocument = unknown, TContext = unknown>(params: T.KnnSearchRequest| TB.KnnSearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.KnnSearchResponse<TDocument>, TContext>>
|
||||
license: {
|
||||
delete: <TContext = unknown>(params?: T.LicenseDeleteRequest| TB.LicenseDeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicenseDeleteResponse, TContext>>
|
||||
get: <TContext = unknown>(params?: T.LicenseGetRequest| TB.LicenseGetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicenseGetResponse, TContext>>
|
||||
getBasicStatus: <TContext = unknown>(params?: T.LicenseGetBasicStatusRequest| TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicenseGetBasicStatusResponse, TContext>>
|
||||
getTrialStatus: <TContext = unknown>(params?: T.LicenseGetTrialStatusRequest| TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicenseGetTrialStatusResponse, TContext>>
|
||||
post: <TContext = unknown>(params?: T.LicensePostRequest| TB.LicensePostRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicensePostResponse, TContext>>
|
||||
postStartBasic: <TContext = unknown>(params?: T.LicensePostStartBasicRequest| TB.LicensePostStartBasicRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicensePostStartBasicResponse, TContext>>
|
||||
postStartTrial: <TContext = unknown>(params?: T.LicensePostStartTrialRequest| TB.LicensePostStartTrialRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LicensePostStartTrialResponse, TContext>>
|
||||
}
|
||||
logstash: {
|
||||
deletePipeline: <TContext = unknown>(params: T.LogstashDeletePipelineRequest| TB.LogstashDeletePipelineRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LogstashDeletePipelineResponse, TContext>>
|
||||
getPipeline: <TContext = unknown>(params: T.LogstashGetPipelineRequest| TB.LogstashGetPipelineRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LogstashGetPipelineResponse, TContext>>
|
||||
putPipeline: <TContext = unknown>(params: T.LogstashPutPipelineRequest| TB.LogstashPutPipelineRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.LogstashPutPipelineResponse, TContext>>
|
||||
}
|
||||
mget: <TDocument = unknown, TContext = unknown>(params?: T.MgetRequest| TB.MgetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MgetResponse<TDocument>, TContext>>
|
||||
migration: {
|
||||
deprecations: <TContext = unknown>(params?: T.MigrationDeprecationsRequest| TB.MigrationDeprecationsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MigrationDeprecationsResponse, TContext>>
|
||||
getFeatureUpgradeStatus: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
postFeatureUpgrade: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
}
|
||||
ml: {
|
||||
closeJob: <TContext = unknown>(params: T.MlCloseJobRequest| TB.MlCloseJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlCloseJobResponse, TContext>>
|
||||
deleteCalendar: <TContext = unknown>(params: T.MlDeleteCalendarRequest| TB.MlDeleteCalendarRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteCalendarResponse, TContext>>
|
||||
deleteCalendarEvent: <TContext = unknown>(params: T.MlDeleteCalendarEventRequest| TB.MlDeleteCalendarEventRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteCalendarEventResponse, TContext>>
|
||||
deleteCalendarJob: <TContext = unknown>(params: T.MlDeleteCalendarJobRequest| TB.MlDeleteCalendarJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteCalendarJobResponse, TContext>>
|
||||
deleteDataFrameAnalytics: <TContext = unknown>(params: T.MlDeleteDataFrameAnalyticsRequest| TB.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteDataFrameAnalyticsResponse, TContext>>
|
||||
deleteDatafeed: <TContext = unknown>(params: T.MlDeleteDatafeedRequest| TB.MlDeleteDatafeedRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteDatafeedResponse, TContext>>
|
||||
deleteExpiredData: <TContext = unknown>(params?: T.MlDeleteExpiredDataRequest| TB.MlDeleteExpiredDataRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteExpiredDataResponse, TContext>>
|
||||
deleteFilter: <TContext = unknown>(params: T.MlDeleteFilterRequest| TB.MlDeleteFilterRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteFilterResponse, TContext>>
|
||||
deleteForecast: <TContext = unknown>(params: T.MlDeleteForecastRequest| TB.MlDeleteForecastRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteForecastResponse, TContext>>
|
||||
deleteJob: <TContext = unknown>(params: T.MlDeleteJobRequest| TB.MlDeleteJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteJobResponse, TContext>>
|
||||
deleteModelSnapshot: <TContext = unknown>(params: T.MlDeleteModelSnapshotRequest| TB.MlDeleteModelSnapshotRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteModelSnapshotResponse, TContext>>
|
||||
deleteTrainedModel: <TContext = unknown>(params: T.MlDeleteTrainedModelRequest| TB.MlDeleteTrainedModelRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteTrainedModelResponse, TContext>>
|
||||
deleteTrainedModelAlias: <TContext = unknown>(params: T.MlDeleteTrainedModelAliasRequest| TB.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlDeleteTrainedModelAliasResponse, TContext>>
|
||||
estimateModelMemory: <TContext = unknown>(params?: T.MlEstimateModelMemoryRequest| TB.MlEstimateModelMemoryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlEstimateModelMemoryResponse, TContext>>
|
||||
evaluateDataFrame: <TContext = unknown>(params?: T.MlEvaluateDataFrameRequest| TB.MlEvaluateDataFrameRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlEvaluateDataFrameResponse, TContext>>
|
||||
explainDataFrameAnalytics: <TContext = unknown>(params?: T.MlExplainDataFrameAnalyticsRequest| TB.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlExplainDataFrameAnalyticsResponse, TContext>>
|
||||
flushJob: <TContext = unknown>(params: T.MlFlushJobRequest| TB.MlFlushJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlFlushJobResponse, TContext>>
|
||||
forecast: <TContext = unknown>(params: T.MlForecastRequest| TB.MlForecastRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlForecastResponse, TContext>>
|
||||
getBuckets: <TContext = unknown>(params: T.MlGetBucketsRequest| TB.MlGetBucketsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetBucketsResponse, TContext>>
|
||||
getCalendarEvents: <TContext = unknown>(params: T.MlGetCalendarEventsRequest| TB.MlGetCalendarEventsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetCalendarEventsResponse, TContext>>
|
||||
getCalendars: <TContext = unknown>(params?: T.MlGetCalendarsRequest| TB.MlGetCalendarsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetCalendarsResponse, TContext>>
|
||||
getCategories: <TContext = unknown>(params: T.MlGetCategoriesRequest| TB.MlGetCategoriesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetCategoriesResponse, TContext>>
|
||||
getDataFrameAnalytics: <TContext = unknown>(params?: T.MlGetDataFrameAnalyticsRequest| TB.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetDataFrameAnalyticsResponse, TContext>>
|
||||
getDataFrameAnalyticsStats: <TContext = unknown>(params?: T.MlGetDataFrameAnalyticsStatsRequest| TB.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetDataFrameAnalyticsStatsResponse, TContext>>
|
||||
getDatafeedStats: <TContext = unknown>(params?: T.MlGetDatafeedStatsRequest| TB.MlGetDatafeedStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetDatafeedStatsResponse, TContext>>
|
||||
getDatafeeds: <TContext = unknown>(params?: T.MlGetDatafeedsRequest| TB.MlGetDatafeedsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetDatafeedsResponse, TContext>>
|
||||
getFilters: <TContext = unknown>(params?: T.MlGetFiltersRequest| TB.MlGetFiltersRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetFiltersResponse, TContext>>
|
||||
getInfluencers: <TContext = unknown>(params: T.MlGetInfluencersRequest| TB.MlGetInfluencersRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetInfluencersResponse, TContext>>
|
||||
getJobStats: <TContext = unknown>(params?: T.MlGetJobStatsRequest| TB.MlGetJobStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetJobStatsResponse, TContext>>
|
||||
getJobs: <TContext = unknown>(params?: T.MlGetJobsRequest| TB.MlGetJobsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetJobsResponse, TContext>>
|
||||
getModelSnapshotUpgradeStats: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
getModelSnapshots: <TContext = unknown>(params: T.MlGetModelSnapshotsRequest| TB.MlGetModelSnapshotsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetModelSnapshotsResponse, TContext>>
|
||||
getOverallBuckets: <TContext = unknown>(params: T.MlGetOverallBucketsRequest| TB.MlGetOverallBucketsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetOverallBucketsResponse, TContext>>
|
||||
getRecords: <TContext = unknown>(params: T.MlGetRecordsRequest| TB.MlGetRecordsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetRecordsResponse, TContext>>
|
||||
getTrainedModels: <TContext = unknown>(params?: T.MlGetTrainedModelsRequest| TB.MlGetTrainedModelsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetTrainedModelsResponse, TContext>>
|
||||
getTrainedModelsStats: <TContext = unknown>(params?: T.MlGetTrainedModelsStatsRequest| TB.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlGetTrainedModelsStatsResponse, TContext>>
|
||||
inferTrainedModelDeployment: <TContext = unknown>(params: T.MlInferTrainedModelDeploymentRequest| TB.MlInferTrainedModelDeploymentRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlInferTrainedModelDeploymentResponse, TContext>>
|
||||
info: <TContext = unknown>(params?: T.MlInfoRequest| TB.MlInfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlInfoResponse, TContext>>
|
||||
openJob: <TContext = unknown>(params: T.MlOpenJobRequest| TB.MlOpenJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlOpenJobResponse, TContext>>
|
||||
postCalendarEvents: <TContext = unknown>(params: T.MlPostCalendarEventsRequest| TB.MlPostCalendarEventsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPostCalendarEventsResponse, TContext>>
|
||||
postData: <TData = unknown, TContext = unknown>(params: T.MlPostDataRequest<TData>| TB.MlPostDataRequest<TData>, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPostDataResponse, TContext>>
|
||||
previewDataFrameAnalytics: <TContext = unknown>(params?: T.MlPreviewDataFrameAnalyticsRequest| TB.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPreviewDataFrameAnalyticsResponse, TContext>>
|
||||
previewDatafeed: <TDocument = unknown, TContext = unknown>(params?: T.MlPreviewDatafeedRequest| TB.MlPreviewDatafeedRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPreviewDatafeedResponse<TDocument>, TContext>>
|
||||
putCalendar: <TContext = unknown>(params: T.MlPutCalendarRequest| TB.MlPutCalendarRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutCalendarResponse, TContext>>
|
||||
putCalendarJob: <TContext = unknown>(params: T.MlPutCalendarJobRequest| TB.MlPutCalendarJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutCalendarJobResponse, TContext>>
|
||||
putDataFrameAnalytics: <TContext = unknown>(params: T.MlPutDataFrameAnalyticsRequest| TB.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutDataFrameAnalyticsResponse, TContext>>
|
||||
putDatafeed: <TContext = unknown>(params: T.MlPutDatafeedRequest| TB.MlPutDatafeedRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutDatafeedResponse, TContext>>
|
||||
putFilter: <TContext = unknown>(params: T.MlPutFilterRequest| TB.MlPutFilterRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutFilterResponse, TContext>>
|
||||
putJob: <TContext = unknown>(params: T.MlPutJobRequest| TB.MlPutJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutJobResponse, TContext>>
|
||||
putTrainedModel: <TContext = unknown>(params: T.MlPutTrainedModelRequest| TB.MlPutTrainedModelRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutTrainedModelResponse, TContext>>
|
||||
putTrainedModelAlias: <TContext = unknown>(params: T.MlPutTrainedModelAliasRequest| TB.MlPutTrainedModelAliasRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutTrainedModelAliasResponse, TContext>>
|
||||
putTrainedModelDefinitionPart: <TContext = unknown>(params: T.MlPutTrainedModelDefinitionPartRequest| TB.MlPutTrainedModelDefinitionPartRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutTrainedModelDefinitionPartResponse, TContext>>
|
||||
putTrainedModelVocabulary: <TContext = unknown>(params: T.MlPutTrainedModelVocabularyRequest| TB.MlPutTrainedModelVocabularyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlPutTrainedModelVocabularyResponse, TContext>>
|
||||
resetJob: <TContext = unknown>(params: T.MlResetJobRequest| TB.MlResetJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlResetJobResponse, TContext>>
|
||||
revertModelSnapshot: <TContext = unknown>(params: T.MlRevertModelSnapshotRequest| TB.MlRevertModelSnapshotRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlRevertModelSnapshotResponse, TContext>>
|
||||
setUpgradeMode: <TContext = unknown>(params?: T.MlSetUpgradeModeRequest| TB.MlSetUpgradeModeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlSetUpgradeModeResponse, TContext>>
|
||||
startDataFrameAnalytics: <TContext = unknown>(params: T.MlStartDataFrameAnalyticsRequest| TB.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlStartDataFrameAnalyticsResponse, TContext>>
|
||||
startDatafeed: <TContext = unknown>(params: T.MlStartDatafeedRequest| TB.MlStartDatafeedRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlStartDatafeedResponse, TContext>>
|
||||
startTrainedModelDeployment: <TContext = unknown>(params: T.MlStartTrainedModelDeploymentRequest| TB.MlStartTrainedModelDeploymentRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlStartTrainedModelDeploymentResponse, TContext>>
|
||||
stopDataFrameAnalytics: <TContext = unknown>(params: T.MlStopDataFrameAnalyticsRequest| TB.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlStopDataFrameAnalyticsResponse, TContext>>
|
||||
stopDatafeed: <TContext = unknown>(params: T.MlStopDatafeedRequest| TB.MlStopDatafeedRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlStopDatafeedResponse, TContext>>
|
||||
stopTrainedModelDeployment: <TContext = unknown>(params: T.MlStopTrainedModelDeploymentRequest| TB.MlStopTrainedModelDeploymentRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlStopTrainedModelDeploymentResponse, TContext>>
|
||||
updateDataFrameAnalytics: <TContext = unknown>(params: T.MlUpdateDataFrameAnalyticsRequest| TB.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlUpdateDataFrameAnalyticsResponse, TContext>>
|
||||
updateDatafeed: <TContext = unknown>(params: T.MlUpdateDatafeedRequest| TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlUpdateDatafeedResponse, TContext>>
|
||||
updateFilter: <TContext = unknown>(params: T.MlUpdateFilterRequest| TB.MlUpdateFilterRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlUpdateFilterResponse, TContext>>
|
||||
updateJob: <TContext = unknown>(params: T.MlUpdateJobRequest| TB.MlUpdateJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlUpdateJobResponse, TContext>>
|
||||
updateModelSnapshot: <TContext = unknown>(params: T.MlUpdateModelSnapshotRequest| TB.MlUpdateModelSnapshotRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlUpdateModelSnapshotResponse, TContext>>
|
||||
upgradeJobSnapshot: <TContext = unknown>(params: T.MlUpgradeJobSnapshotRequest| TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlUpgradeJobSnapshotResponse, TContext>>
|
||||
validate: <TContext = unknown>(params?: T.MlValidateRequest| TB.MlValidateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlValidateResponse, TContext>>
|
||||
validateDetector: <TContext = unknown>(params?: T.MlValidateDetectorRequest| TB.MlValidateDetectorRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlValidateDetectorResponse, TContext>>
|
||||
}
|
||||
monitoring: {
|
||||
bulk: <TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.MonitoringBulkRequest<TDocument, TPartialDocument>| TB.MonitoringBulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.MonitoringBulkResponse, TContext>>
|
||||
}
|
||||
msearch: <TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>, TContext = unknown>(params?: T.MsearchRequest| TB.MsearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MsearchResponse<TDocument, TAggregations>, TContext>>
|
||||
msearchTemplate: <TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>, TContext = unknown>(params?: T.MsearchTemplateRequest| TB.MsearchTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MsearchTemplateResponse<TDocument, TAggregations>, TContext>>
|
||||
mtermvectors: <TContext = unknown>(params?: T.MtermvectorsRequest| TB.MtermvectorsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MtermvectorsResponse, TContext>>
|
||||
nodes: {
|
||||
clearRepositoriesMeteringArchive: <TContext = unknown>(params: T.NodesClearRepositoriesMeteringArchiveRequest| TB.NodesClearRepositoriesMeteringArchiveRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesClearRepositoriesMeteringArchiveResponse, TContext>>
|
||||
getRepositoriesMeteringInfo: <TContext = unknown>(params: T.NodesGetRepositoriesMeteringInfoRequest| TB.NodesGetRepositoriesMeteringInfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesGetRepositoriesMeteringInfoResponse, TContext>>
|
||||
hotThreads: <TContext = unknown>(params?: T.NodesHotThreadsRequest| TB.NodesHotThreadsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesHotThreadsResponse, TContext>>
|
||||
info: <TContext = unknown>(params?: T.NodesInfoRequest| TB.NodesInfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesInfoResponse, TContext>>
|
||||
reloadSecureSettings: <TContext = unknown>(params?: T.NodesReloadSecureSettingsRequest| TB.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesReloadSecureSettingsResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.NodesStatsRequest| TB.NodesStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesStatsResponse, TContext>>
|
||||
usage: <TContext = unknown>(params?: T.NodesUsageRequest| TB.NodesUsageRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.NodesUsageResponse, TContext>>
|
||||
}
|
||||
openPointInTime: <TContext = unknown>(params: T.OpenPointInTimeRequest| TB.OpenPointInTimeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.OpenPointInTimeResponse, TContext>>
|
||||
ping: <TContext = unknown>(params?: T.PingRequest| TB.PingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.PingResponse, TContext>>
|
||||
putScript: <TContext = unknown>(params: T.PutScriptRequest| TB.PutScriptRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.PutScriptResponse, TContext>>
|
||||
rankEval: <TContext = unknown>(params: T.RankEvalRequest| TB.RankEvalRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RankEvalResponse, TContext>>
|
||||
reindex: <TContext = unknown>(params?: T.ReindexRequest| TB.ReindexRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ReindexResponse, TContext>>
|
||||
reindexRethrottle: <TContext = unknown>(params: T.ReindexRethrottleRequest| TB.ReindexRethrottleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ReindexRethrottleResponse, TContext>>
|
||||
renderSearchTemplate: <TContext = unknown>(params?: T.RenderSearchTemplateRequest| TB.RenderSearchTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RenderSearchTemplateResponse, TContext>>
|
||||
rollup: {
|
||||
deleteJob: <TContext = unknown>(params: T.RollupDeleteJobRequest| TB.RollupDeleteJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupDeleteJobResponse, TContext>>
|
||||
getJobs: <TContext = unknown>(params?: T.RollupGetJobsRequest| TB.RollupGetJobsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupGetJobsResponse, TContext>>
|
||||
getRollupCaps: <TContext = unknown>(params?: T.RollupGetRollupCapsRequest| TB.RollupGetRollupCapsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupGetRollupCapsResponse, TContext>>
|
||||
getRollupIndexCaps: <TContext = unknown>(params: T.RollupGetRollupIndexCapsRequest| TB.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupGetRollupIndexCapsResponse, TContext>>
|
||||
putJob: <TContext = unknown>(params: T.RollupPutJobRequest| TB.RollupPutJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupPutJobResponse, TContext>>
|
||||
rollup: <TContext = unknown>(params: T.RollupRollupRequest| TB.RollupRollupRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupRollupResponse, TContext>>
|
||||
rollupSearch: <TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>, TContext = unknown>(params: T.RollupRollupSearchRequest| TB.RollupRollupSearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupRollupSearchResponse<TDocument, TAggregations>, TContext>>
|
||||
startJob: <TContext = unknown>(params: T.RollupStartJobRequest| TB.RollupStartJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupStartJobResponse, TContext>>
|
||||
stopJob: <TContext = unknown>(params: T.RollupStopJobRequest| TB.RollupStopJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.RollupStopJobResponse, TContext>>
|
||||
}
|
||||
scriptsPainlessExecute: <TResult = unknown, TContext = unknown>(params?: T.ScriptsPainlessExecuteRequest| TB.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ScriptsPainlessExecuteResponse<TResult>, TContext>>
|
||||
scroll: <TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>, TContext = unknown>(params?: T.ScrollRequest| TB.ScrollRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ScrollResponse<TDocument, TAggregations>, TContext>>
|
||||
search: <TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>, TContext = unknown>(params?: T.SearchRequest| TB.SearchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchResponse<TDocument, TAggregations>, TContext>>
|
||||
searchMvt: <TContext = unknown>(params: T.SearchMvtRequest| TB.SearchMvtRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchMvtResponse, TContext>>
|
||||
searchShards: <TContext = unknown>(params?: T.SearchShardsRequest| TB.SearchShardsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchShardsResponse, TContext>>
|
||||
searchTemplate: <TDocument = unknown, TContext = unknown>(params?: T.SearchTemplateRequest| TB.SearchTemplateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchTemplateResponse<TDocument>, TContext>>
|
||||
searchableSnapshots: {
|
||||
cacheStats: <TContext = unknown>(params?: T.SearchableSnapshotsCacheStatsRequest| TB.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchableSnapshotsCacheStatsResponse, TContext>>
|
||||
clearCache: <TContext = unknown>(params?: T.SearchableSnapshotsClearCacheRequest| TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchableSnapshotsClearCacheResponse, TContext>>
|
||||
mount: <TContext = unknown>(params: T.SearchableSnapshotsMountRequest| TB.SearchableSnapshotsMountRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchableSnapshotsMountResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.SearchableSnapshotsStatsRequest| TB.SearchableSnapshotsStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SearchableSnapshotsStatsResponse, TContext>>
|
||||
}
|
||||
security: {
|
||||
authenticate: <TContext = unknown>(params?: T.SecurityAuthenticateRequest| TB.SecurityAuthenticateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityAuthenticateResponse, TContext>>
|
||||
changePassword: <TContext = unknown>(params?: T.SecurityChangePasswordRequest| TB.SecurityChangePasswordRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityChangePasswordResponse, TContext>>
|
||||
clearApiKeyCache: <TContext = unknown>(params: T.SecurityClearApiKeyCacheRequest| TB.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityClearApiKeyCacheResponse, TContext>>
|
||||
clearCachedPrivileges: <TContext = unknown>(params: T.SecurityClearCachedPrivilegesRequest| TB.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityClearCachedPrivilegesResponse, TContext>>
|
||||
clearCachedRealms: <TContext = unknown>(params: T.SecurityClearCachedRealmsRequest| TB.SecurityClearCachedRealmsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityClearCachedRealmsResponse, TContext>>
|
||||
clearCachedRoles: <TContext = unknown>(params: T.SecurityClearCachedRolesRequest| TB.SecurityClearCachedRolesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityClearCachedRolesResponse, TContext>>
|
||||
clearCachedServiceTokens: <TContext = unknown>(params: T.SecurityClearCachedServiceTokensRequest| TB.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityClearCachedServiceTokensResponse, TContext>>
|
||||
createApiKey: <TContext = unknown>(params?: T.SecurityCreateApiKeyRequest| TB.SecurityCreateApiKeyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityCreateApiKeyResponse, TContext>>
|
||||
createServiceToken: <TContext = unknown>(params: T.SecurityCreateServiceTokenRequest| TB.SecurityCreateServiceTokenRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityCreateServiceTokenResponse, TContext>>
|
||||
deletePrivileges: <TContext = unknown>(params: T.SecurityDeletePrivilegesRequest| TB.SecurityDeletePrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityDeletePrivilegesResponse, TContext>>
|
||||
deleteRole: <TContext = unknown>(params: T.SecurityDeleteRoleRequest| TB.SecurityDeleteRoleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityDeleteRoleResponse, TContext>>
|
||||
deleteRoleMapping: <TContext = unknown>(params: T.SecurityDeleteRoleMappingRequest| TB.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityDeleteRoleMappingResponse, TContext>>
|
||||
deleteServiceToken: <TContext = unknown>(params: T.SecurityDeleteServiceTokenRequest| TB.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityDeleteServiceTokenResponse, TContext>>
|
||||
deleteUser: <TContext = unknown>(params: T.SecurityDeleteUserRequest| TB.SecurityDeleteUserRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityDeleteUserResponse, TContext>>
|
||||
disableUser: <TContext = unknown>(params: T.SecurityDisableUserRequest| TB.SecurityDisableUserRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityDisableUserResponse, TContext>>
|
||||
enableUser: <TContext = unknown>(params: T.SecurityEnableUserRequest| TB.SecurityEnableUserRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityEnableUserResponse, TContext>>
|
||||
enrollKibana: <TContext = unknown>(params?: T.SecurityEnrollKibanaRequest| TB.SecurityEnrollKibanaRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityEnrollKibanaResponse, TContext>>
|
||||
enrollNode: <TContext = unknown>(params?: T.SecurityEnrollNodeRequest| TB.SecurityEnrollNodeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityEnrollNodeResponse, TContext>>
|
||||
getApiKey: <TContext = unknown>(params?: T.SecurityGetApiKeyRequest| TB.SecurityGetApiKeyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetApiKeyResponse, TContext>>
|
||||
getBuiltinPrivileges: <TContext = unknown>(params?: T.SecurityGetBuiltinPrivilegesRequest| TB.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetBuiltinPrivilegesResponse, TContext>>
|
||||
getPrivileges: <TContext = unknown>(params?: T.SecurityGetPrivilegesRequest| TB.SecurityGetPrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetPrivilegesResponse, TContext>>
|
||||
getRole: <TContext = unknown>(params?: T.SecurityGetRoleRequest| TB.SecurityGetRoleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetRoleResponse, TContext>>
|
||||
getRoleMapping: <TContext = unknown>(params?: T.SecurityGetRoleMappingRequest| TB.SecurityGetRoleMappingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetRoleMappingResponse, TContext>>
|
||||
getServiceAccounts: <TContext = unknown>(params?: T.SecurityGetServiceAccountsRequest| TB.SecurityGetServiceAccountsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetServiceAccountsResponse, TContext>>
|
||||
getServiceCredentials: <TContext = unknown>(params: T.SecurityGetServiceCredentialsRequest| TB.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetServiceCredentialsResponse, TContext>>
|
||||
getToken: <TContext = unknown>(params?: T.SecurityGetTokenRequest| TB.SecurityGetTokenRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetTokenResponse, TContext>>
|
||||
getUser: <TContext = unknown>(params?: T.SecurityGetUserRequest| TB.SecurityGetUserRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetUserResponse, TContext>>
|
||||
getUserPrivileges: <TContext = unknown>(params?: T.SecurityGetUserPrivilegesRequest| TB.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGetUserPrivilegesResponse, TContext>>
|
||||
grantApiKey: <TContext = unknown>(params?: T.SecurityGrantApiKeyRequest| TB.SecurityGrantApiKeyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityGrantApiKeyResponse, TContext>>
|
||||
hasPrivileges: <TContext = unknown>(params?: T.SecurityHasPrivilegesRequest| TB.SecurityHasPrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityHasPrivilegesResponse, TContext>>
|
||||
invalidateApiKey: <TContext = unknown>(params?: T.SecurityInvalidateApiKeyRequest| TB.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityInvalidateApiKeyResponse, TContext>>
|
||||
invalidateToken: <TContext = unknown>(params?: T.SecurityInvalidateTokenRequest| TB.SecurityInvalidateTokenRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityInvalidateTokenResponse, TContext>>
|
||||
oidcAuthenticate: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
oidcLogout: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
oidcPrepareAuthentication: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
putPrivileges: <TContext = unknown>(params?: T.SecurityPutPrivilegesRequest| TB.SecurityPutPrivilegesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityPutPrivilegesResponse, TContext>>
|
||||
putRole: <TContext = unknown>(params: T.SecurityPutRoleRequest| TB.SecurityPutRoleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityPutRoleResponse, TContext>>
|
||||
putRoleMapping: <TContext = unknown>(params: T.SecurityPutRoleMappingRequest| TB.SecurityPutRoleMappingRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityPutRoleMappingResponse, TContext>>
|
||||
putUser: <TContext = unknown>(params: T.SecurityPutUserRequest| TB.SecurityPutUserRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityPutUserResponse, TContext>>
|
||||
queryApiKeys: <TContext = unknown>(params?: T.SecurityQueryApiKeysRequest| TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecurityQueryApiKeysResponse, TContext>>
|
||||
samlAuthenticate: <TContext = unknown>(params?: T.SecuritySamlAuthenticateRequest| TB.SecuritySamlAuthenticateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecuritySamlAuthenticateResponse, TContext>>
|
||||
samlCompleteLogout: <TContext = unknown>(params?: T.SecuritySamlCompleteLogoutRequest| TB.SecuritySamlCompleteLogoutRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecuritySamlCompleteLogoutResponse, TContext>>
|
||||
samlInvalidate: <TContext = unknown>(params?: T.SecuritySamlInvalidateRequest| TB.SecuritySamlInvalidateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecuritySamlInvalidateResponse, TContext>>
|
||||
samlLogout: <TContext = unknown>(params?: T.SecuritySamlLogoutRequest| TB.SecuritySamlLogoutRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecuritySamlLogoutResponse, TContext>>
|
||||
samlPrepareAuthentication: <TContext = unknown>(params?: T.SecuritySamlPrepareAuthenticationRequest| TB.SecuritySamlPrepareAuthenticationRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecuritySamlPrepareAuthenticationResponse, TContext>>
|
||||
samlServiceProviderMetadata: <TContext = unknown>(params: T.SecuritySamlServiceProviderMetadataRequest| TB.SecuritySamlServiceProviderMetadataRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SecuritySamlServiceProviderMetadataResponse, TContext>>
|
||||
}
|
||||
shutdown: {
|
||||
deleteNode: <TContext = unknown>(params: T.ShutdownDeleteNodeRequest| TB.ShutdownDeleteNodeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ShutdownDeleteNodeResponse, TContext>>
|
||||
getNode: <TContext = unknown>(params?: T.ShutdownGetNodeRequest| TB.ShutdownGetNodeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ShutdownGetNodeResponse, TContext>>
|
||||
putNode: <TContext = unknown>(params: T.ShutdownPutNodeRequest| TB.ShutdownPutNodeRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.ShutdownPutNodeResponse, TContext>>
|
||||
}
|
||||
slm: {
|
||||
deleteLifecycle: <TContext = unknown>(params: T.SlmDeleteLifecycleRequest| TB.SlmDeleteLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmDeleteLifecycleResponse, TContext>>
|
||||
executeLifecycle: <TContext = unknown>(params: T.SlmExecuteLifecycleRequest| TB.SlmExecuteLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmExecuteLifecycleResponse, TContext>>
|
||||
executeRetention: <TContext = unknown>(params?: T.SlmExecuteRetentionRequest| TB.SlmExecuteRetentionRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmExecuteRetentionResponse, TContext>>
|
||||
getLifecycle: <TContext = unknown>(params?: T.SlmGetLifecycleRequest| TB.SlmGetLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmGetLifecycleResponse, TContext>>
|
||||
getStats: <TContext = unknown>(params?: T.SlmGetStatsRequest| TB.SlmGetStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmGetStatsResponse, TContext>>
|
||||
getStatus: <TContext = unknown>(params?: T.SlmGetStatusRequest| TB.SlmGetStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmGetStatusResponse, TContext>>
|
||||
putLifecycle: <TContext = unknown>(params: T.SlmPutLifecycleRequest| TB.SlmPutLifecycleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmPutLifecycleResponse, TContext>>
|
||||
start: <TContext = unknown>(params?: T.SlmStartRequest| TB.SlmStartRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmStartResponse, TContext>>
|
||||
stop: <TContext = unknown>(params?: T.SlmStopRequest| TB.SlmStopRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SlmStopResponse, TContext>>
|
||||
}
|
||||
snapshot: {
|
||||
cleanupRepository: <TContext = unknown>(params: T.SnapshotCleanupRepositoryRequest| TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotCleanupRepositoryResponse, TContext>>
|
||||
clone: <TContext = unknown>(params: T.SnapshotCloneRequest| TB.SnapshotCloneRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotCloneResponse, TContext>>
|
||||
create: <TContext = unknown>(params: T.SnapshotCreateRequest| TB.SnapshotCreateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotCreateResponse, TContext>>
|
||||
createRepository: <TContext = unknown>(params: T.SnapshotCreateRepositoryRequest| TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotCreateRepositoryResponse, TContext>>
|
||||
delete: <TContext = unknown>(params: T.SnapshotDeleteRequest| TB.SnapshotDeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotDeleteResponse, TContext>>
|
||||
deleteRepository: <TContext = unknown>(params: T.SnapshotDeleteRepositoryRequest| TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotDeleteRepositoryResponse, TContext>>
|
||||
get: <TContext = unknown>(params: T.SnapshotGetRequest| TB.SnapshotGetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotGetResponse, TContext>>
|
||||
getRepository: <TContext = unknown>(params?: T.SnapshotGetRepositoryRequest| TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotGetRepositoryResponse, TContext>>
|
||||
repositoryAnalyze: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
restore: <TContext = unknown>(params: T.SnapshotRestoreRequest| TB.SnapshotRestoreRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotRestoreResponse, TContext>>
|
||||
status: <TContext = unknown>(params?: T.SnapshotStatusRequest| TB.SnapshotStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotStatusResponse, TContext>>
|
||||
verifyRepository: <TContext = unknown>(params: T.SnapshotVerifyRepositoryRequest| TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SnapshotVerifyRepositoryResponse, TContext>>
|
||||
}
|
||||
sql: {
|
||||
clearCursor: <TContext = unknown>(params?: T.SqlClearCursorRequest| TB.SqlClearCursorRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SqlClearCursorResponse, TContext>>
|
||||
deleteAsync: <TContext = unknown>(params: T.SqlDeleteAsyncRequest| TB.SqlDeleteAsyncRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SqlDeleteAsyncResponse, TContext>>
|
||||
getAsync: <TContext = unknown>(params: T.SqlGetAsyncRequest| TB.SqlGetAsyncRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SqlGetAsyncResponse, TContext>>
|
||||
getAsyncStatus: <TContext = unknown>(params: T.SqlGetAsyncStatusRequest| TB.SqlGetAsyncStatusRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SqlGetAsyncStatusResponse, TContext>>
|
||||
query: <TContext = unknown>(params?: T.SqlQueryRequest| TB.SqlQueryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SqlQueryResponse, TContext>>
|
||||
translate: <TContext = unknown>(params?: T.SqlTranslateRequest| TB.SqlTranslateRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SqlTranslateResponse, TContext>>
|
||||
}
|
||||
ssl: {
|
||||
certificates: <TContext = unknown>(params?: T.SslCertificatesRequest| TB.SslCertificatesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.SslCertificatesResponse, TContext>>
|
||||
}
|
||||
tasks: {
|
||||
cancel: <TContext = unknown>(params?: T.TasksCancelRequest| TB.TasksCancelRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TasksCancelResponse, TContext>>
|
||||
get: <TContext = unknown>(params: T.TasksGetRequest| TB.TasksGetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TasksGetResponse, TContext>>
|
||||
list: <TContext = unknown>(params?: T.TasksListRequest| TB.TasksListRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TasksListResponse, TContext>>
|
||||
}
|
||||
termsEnum: <TContext = unknown>(params: T.TermsEnumRequest| TB.TermsEnumRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TermsEnumResponse, TContext>>
|
||||
termvectors: <TDocument = unknown, TContext = unknown>(params: T.TermvectorsRequest<TDocument>| TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.TermvectorsResponse, TContext>>
|
||||
textStructure: {
|
||||
findStructure: <TJsonDocument = unknown, TContext = unknown>(params: T.TextStructureFindStructureRequest<TJsonDocument>| TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.TextStructureFindStructureResponse, TContext>>
|
||||
}
|
||||
transform: {
|
||||
deleteTransform: <TContext = unknown>(params: T.TransformDeleteTransformRequest| TB.TransformDeleteTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformDeleteTransformResponse, TContext>>
|
||||
getTransform: <TContext = unknown>(params?: T.TransformGetTransformRequest| TB.TransformGetTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformGetTransformResponse, TContext>>
|
||||
getTransformStats: <TContext = unknown>(params: T.TransformGetTransformStatsRequest| TB.TransformGetTransformStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformGetTransformStatsResponse, TContext>>
|
||||
previewTransform: <TTransform = unknown, TContext = unknown>(params?: T.TransformPreviewTransformRequest| TB.TransformPreviewTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformPreviewTransformResponse<TTransform>, TContext>>
|
||||
putTransform: <TContext = unknown>(params: T.TransformPutTransformRequest| TB.TransformPutTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformPutTransformResponse, TContext>>
|
||||
resetTransform: <TContext = unknown>(params: T.TransformResetTransformRequest| TB.TransformResetTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformResetTransformResponse, TContext>>
|
||||
startTransform: <TContext = unknown>(params: T.TransformStartTransformRequest| TB.TransformStartTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformStartTransformResponse, TContext>>
|
||||
stopTransform: <TContext = unknown>(params: T.TransformStopTransformRequest| TB.TransformStopTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformStopTransformResponse, TContext>>
|
||||
updateTransform: <TContext = unknown>(params: T.TransformUpdateTransformRequest| TB.TransformUpdateTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformUpdateTransformResponse, TContext>>
|
||||
upgradeTransforms: <TContext = unknown>(params?: T.TransformUpgradeTransformsRequest| TB.TransformUpgradeTransformsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformUpgradeTransformsResponse, TContext>>
|
||||
}
|
||||
update: <TDocumentR = unknown, TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.UpdateRequest<TDocument, TPartialDocument>| TB.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.UpdateResponse<TDocumentR>, TContext>>
|
||||
updateByQuery: <TContext = unknown>(params: T.UpdateByQueryRequest| TB.UpdateByQueryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.UpdateByQueryResponse, TContext>>
|
||||
updateByQueryRethrottle: <TContext = unknown>(params: T.UpdateByQueryRethrottleRequest| TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.UpdateByQueryRethrottleResponse, TContext>>
|
||||
watcher: {
|
||||
ackWatch: <TContext = unknown>(params: T.WatcherAckWatchRequest| TB.WatcherAckWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherAckWatchResponse, TContext>>
|
||||
activateWatch: <TContext = unknown>(params: T.WatcherActivateWatchRequest| TB.WatcherActivateWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherActivateWatchResponse, TContext>>
|
||||
deactivateWatch: <TContext = unknown>(params: T.WatcherDeactivateWatchRequest| TB.WatcherDeactivateWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherDeactivateWatchResponse, TContext>>
|
||||
deleteWatch: <TContext = unknown>(params: T.WatcherDeleteWatchRequest| TB.WatcherDeleteWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherDeleteWatchResponse, TContext>>
|
||||
executeWatch: <TContext = unknown>(params?: T.WatcherExecuteWatchRequest| TB.WatcherExecuteWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherExecuteWatchResponse, TContext>>
|
||||
getWatch: <TContext = unknown>(params: T.WatcherGetWatchRequest| TB.WatcherGetWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherGetWatchResponse, TContext>>
|
||||
putWatch: <TContext = unknown>(params: T.WatcherPutWatchRequest| TB.WatcherPutWatchRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherPutWatchResponse, TContext>>
|
||||
queryWatches: <TContext = unknown>(params?: T.WatcherQueryWatchesRequest| TB.WatcherQueryWatchesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherQueryWatchesResponse, TContext>>
|
||||
start: <TContext = unknown>(params?: T.WatcherStartRequest| TB.WatcherStartRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherStartResponse, TContext>>
|
||||
stats: <TContext = unknown>(params?: T.WatcherStatsRequest| TB.WatcherStatsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherStatsResponse, TContext>>
|
||||
stop: <TContext = unknown>(params?: T.WatcherStopRequest| TB.WatcherStopRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.WatcherStopResponse, TContext>>
|
||||
}
|
||||
xpack: {
|
||||
info: <TContext = unknown>(params?: T.XpackInfoRequest| TB.XpackInfoRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.XpackInfoResponse, TContext>>
|
||||
usage: <TContext = unknown>(params?: T.XpackUsageRequest| TB.XpackUsageRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.XpackUsageResponse, TContext>>
|
||||
}
|
||||
}
|
||||
|
||||
export type { KibanaClient }
|
||||
3265
src/api/types.ts
3265
src/api/types.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@
|
||||
import { ConnectionOptions as TlsConnectionOptions } from 'tls'
|
||||
import { URL } from 'url'
|
||||
import buffer from 'buffer'
|
||||
import os from 'os'
|
||||
import {
|
||||
Transport,
|
||||
UndiciConnection,
|
||||
@ -173,7 +174,9 @@ export default class Client extends API {
|
||||
tls: null,
|
||||
caFingerprint: null,
|
||||
agent: null,
|
||||
headers: {},
|
||||
headers: {
|
||||
'user-agent': `elasticsearch-js/${clientVersion} Node.js ${nodeVersion}; Transport ${transportVersion}; (${os.platform()} ${os.release()} ${os.arch()})`
|
||||
},
|
||||
nodeFilter: null,
|
||||
generateRequestId: null,
|
||||
name: 'elasticsearch-js',
|
||||
@ -186,15 +189,15 @@ export default class Client extends API {
|
||||
maxCompressedResponseSize: null
|
||||
}, opts)
|
||||
|
||||
if (options.caFingerprint != null && isHttpConnection(opts.node ?? opts.nodes)) {
|
||||
if (options.caFingerprint !== null && isHttpConnection(opts.node ?? opts.nodes)) {
|
||||
throw new errors.ConfigurationError('You can\'t configure the caFingerprint with a http connection')
|
||||
}
|
||||
|
||||
if (options.maxResponseSize != null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
|
||||
if (options.maxResponseSize !== null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
|
||||
throw new errors.ConfigurationError(`The maxResponseSize cannot be bigger than ${buffer.constants.MAX_STRING_LENGTH}`)
|
||||
}
|
||||
|
||||
if (options.maxCompressedResponseSize != null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
|
||||
if (options.maxCompressedResponseSize !== null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
|
||||
throw new errors.ConfigurationError(`The maxCompressedResponseSize cannot be bigger than ${buffer.constants.MAX_LENGTH}`)
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
/* eslint-disable @typescript-eslint/promise-function-async */
|
||||
/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
|
||||
|
||||
import assert from 'assert'
|
||||
import { promisify } from 'util'
|
||||
@ -229,6 +228,7 @@ export default class Helpers {
|
||||
rest_total_hits_as_int: params.rest_total_hits_as_int,
|
||||
scroll_id
|
||||
}, options as TransportRequestOptionsWithMeta)
|
||||
// @ts-expect-error
|
||||
response = r as TransportResult<T.ScrollResponse<TDocument, TAggregations>, unknown>
|
||||
assert(response !== undefined, 'The response is undefined, please file a bug report')
|
||||
if (response.statusCode !== 429) break
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
Yes.
|
||||
|
||||
## Background
|
||||
Elasticsearch offers its entire API via HTTP REST endpoints. You can find the whole API specification for every version [here](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/api).<br/>
|
||||
To support different languages at the same time, the Elasticsearch team decided to provide a [YAML specification](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/test) to test every endpoint, body, headers, warning, error and so on.<br/>
|
||||
Elasticsearch offers its entire API via HTTP REST endpoints. You can find the whole API specification for every version [here](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api).<br/>
|
||||
To support different languages at the same time, the Elasticsearch team decided to provide a [YAML specification](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test) to test every endpoint, body, headers, warning, error and so on.<br/>
|
||||
This testing suite uses that specification to generate the test for the specified version of Elasticsearch on the fly.
|
||||
|
||||
## Run
|
||||
@ -20,45 +20,20 @@ Once the Elasticsearch repository has been cloned, the testing suite will connec
|
||||
|
||||
The specification does not allow the test to be run in parallel, so it might take a while to run the entire testing suite; on my machine, `MacBookPro15,2 core i7 2.7GHz 16GB of RAM` it takes around four minutes.
|
||||
|
||||
### Running locally
|
||||
|
||||
If you want to run the integration tests on your development machine, you must have an Elasticsearch instance running first.
|
||||
A local instance can be spun up in a Docker container by running the [`.ci/run-elasticsearch.sh`](/.ci/run-elasticsearch.sh) script.
|
||||
This is the same script CI jobs use to run Elasticsearch for integration tests, so your results should be relatively consistent.
|
||||
|
||||
To simplify the process of starting a container, testing, and cleaning up the container, you can run the `make integration` target:
|
||||
|
||||
```sh
|
||||
# set some parameters
|
||||
export STACK_VERSION=8.7.0
|
||||
export TEST_SUITE=free # can be `free` or `platinum`
|
||||
make integration
|
||||
```
|
||||
|
||||
If Elasticsearch doesn't come up, run `make integration-cleanup` and then `DETACH=false .ci/run-elasticsearch.sh` manually to read the startup logs.
|
||||
|
||||
If you get an error about `vm.max_map_count` being too low, run `sudo sysctl -w vm.max_map_count=262144` to update the setting until the next reboot, or `sudo sysctl -w vm.max_map_count=262144; echo 'vm.max_map_count=262144' | sudo tee -a /etc/sysctl.conf` to update the setting permanently.
|
||||
|
||||
### Exit on the first failure
|
||||
|
||||
By default the suite will run all the tests, even if one assertion has failed. If you want to stop the test at the first failure, use the bailout option:
|
||||
|
||||
Bu default the suite will run all the test, even if one assertion has failed. If you want to stop the test at the first failure, use the bailout option:
|
||||
```sh
|
||||
npm run test:integration -- --bail
|
||||
```
|
||||
|
||||
### Calculate the code coverage
|
||||
|
||||
If you want to calculate the code coverage just run the testing suite with the following parameters, once the test ends, it will open a browser window with the results.
|
||||
|
||||
```sh
|
||||
npm run test:integration -- --cov --coverage-report=html
|
||||
```
|
||||
|
||||
## How does this thing work?
|
||||
|
||||
At first sight, it might seem complicated, but once you understand what the moving parts are, it's quite easy.
|
||||
|
||||
1. Connects to the given Elasticsearch instance
|
||||
1. Gets the ES version and build hash
|
||||
1. Checkout to the given hash (and clone the repository if it is not present)
|
||||
@ -71,4 +46,7 @@ At first sight, it might seem complicated, but once you understand what the movi
|
||||
|
||||
Inside the `index.js` file, you will find the connection, cloning, reading and parsing part of the test, while inside the `test-runner.js` file you will find the function to handle the assertions. Inside `test-runner.js`, we use a [queue](https://github.com/delvedor/workq) to be sure that everything is run in the correct order.
|
||||
|
||||
Check out the [rest-api-spec readme](https://github.com/elastic/elasticsearch/blob/main/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc) if you want to know more about how the assertions work.
|
||||
Checkout the [rest-api-spec readme](https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc) if you want to know more about how the assertions work.
|
||||
|
||||
#### Why are we running the test with the `--harmony` flag?
|
||||
Because on Node v6 the regex lookbehinds are not supported.
|
||||
|
||||
@ -27,9 +27,9 @@ process.on('unhandledRejection', function (err) {
|
||||
const { writeFileSync, readFileSync, readdirSync, statSync } = require('fs')
|
||||
const { join, sep } = require('path')
|
||||
const yaml = require('js-yaml')
|
||||
const minimist = require('minimist')
|
||||
const ms = require('ms')
|
||||
const { Client } = require('../../index')
|
||||
const { kProductCheck } = require('@elastic/transport/lib/symbols')
|
||||
const build = require('./test-runner')
|
||||
const { sleep } = require('./helper')
|
||||
const createJunitReporter = require('./reporter')
|
||||
@ -42,21 +42,8 @@ const MAX_API_TIME = 1000 * 90
|
||||
const MAX_FILE_TIME = 1000 * 30
|
||||
const MAX_TEST_TIME = 1000 * 3
|
||||
|
||||
const options = minimist(process.argv.slice(2), {
|
||||
boolean: ['bail'],
|
||||
string: ['suite', 'test'],
|
||||
})
|
||||
|
||||
const freeSkips = {
|
||||
// not supported yet
|
||||
'/free/cluster.desired_nodes/10_basic.yml': ['*'],
|
||||
|
||||
// Cannot find methods on `Internal` object
|
||||
'/free/cluster.desired_balance/10_basic.yml': ['*'],
|
||||
'/free/cluster.desired_nodes/20_dry_run.yml': ['*'],
|
||||
'/free/cluster.prevalidate_node_removal/10_basic.yml': ['*'],
|
||||
|
||||
// the v8 client never sends the scroll_id in querystring,
|
||||
// the v8 client never sends the scroll_id in querystgring,
|
||||
// the way the test is structured causes a security exception
|
||||
'free/scroll/10_basic.yml': ['Body params override query string'],
|
||||
'free/scroll/11_clear.yml': [
|
||||
@ -65,74 +52,73 @@ const freeSkips = {
|
||||
],
|
||||
'free/cat.allocation/10_basic.yml': ['*'],
|
||||
'free/cat.snapshots/10_basic.yml': ['Test cat snapshots output'],
|
||||
|
||||
// TODO: remove this once 'arbitrary_key' is implemented
|
||||
// https://github.com/elastic/elasticsearch/pull/41492
|
||||
'indices.split/30_copy_settings.yml': ['*'],
|
||||
'indices.stats/50_disk_usage.yml': ['Disk usage stats'],
|
||||
'indices.stats/60_field_usage.yml': ['Field usage stats'],
|
||||
|
||||
// skipping because we are booting ES with `discovery.type=single-node`
|
||||
// and this test will fail because of this configuration
|
||||
'nodes.stats/30_discovery.yml': ['*'],
|
||||
|
||||
// the expected error is returning a 503,
|
||||
// which triggers a retry and the node to be marked as dead
|
||||
'search.aggregation/240_max_buckets.yml': ['*'],
|
||||
|
||||
// long values and json do not play nicely together
|
||||
'search.aggregation/40_range.yml': ['Min and max long range bounds'],
|
||||
|
||||
// the yaml runner assumes that null means "does not exists",
|
||||
// while null is a valid json value, so the check will fail
|
||||
'search/320_disallow_queries.yml': ['Test disallow expensive queries'],
|
||||
'free/tsdb/90_unsupported_operations.yml': ['noop update'],
|
||||
'free/tsdb/90_unsupported_operations.yml': ['noop update']
|
||||
}
|
||||
|
||||
const platinumDenyList = {
|
||||
'api_key/10_basic.yml': ['Test get api key'],
|
||||
const platinumBlackList = {
|
||||
'api_key/20_query.yml': ['*'],
|
||||
'api_key/11_invalidation.yml': ['Test invalidate api key by realm name'],
|
||||
'analytics/histogram.yml': ['Histogram requires values in increasing order'],
|
||||
|
||||
// this two test cases are broken, we should
|
||||
// return on those in the future.
|
||||
'analytics/top_metrics.yml': [
|
||||
'sort by keyword field fails',
|
||||
'sort by string script fails'
|
||||
],
|
||||
'cat.aliases/10_basic.yml': ['Empty cluster'],
|
||||
'index/10_with_id.yml': ['Index with ID'],
|
||||
'indices.get_alias/10_basic.yml': ['Get alias against closed indices'],
|
||||
'indices.get_alias/20_empty.yml': ['Check empty aliases when getting all aliases via /_alias'],
|
||||
'text_structure/find_structure.yml': ['*'],
|
||||
// https://github.com/elastic/elasticsearch/pull/39400
|
||||
'ml/jobs_crud.yml': ['Test put job with id that is already taken'],
|
||||
// object keys must me strings, and `0.0.toString()` is `0`
|
||||
'ml/evaluate_data_frame.yml': [
|
||||
'Test binary_soft_classifition precision',
|
||||
'Test binary_soft_classifition recall',
|
||||
'Test binary_soft_classifition confusion_matrix'
|
||||
],
|
||||
|
||||
// it gets random failures on CI, must investigate
|
||||
'ml/set_upgrade_mode.yml': [
|
||||
'Attempt to open job when upgrade_mode is enabled',
|
||||
'Setting upgrade mode to disabled from enabled'
|
||||
],
|
||||
// The cleanup fails with a index not found when retrieving the jobs
|
||||
'ml/get_datafeed_stats.yml': ['Test get datafeed stats when total_search_time_ms mapping is missing'],
|
||||
'ml/bucket_correlation_agg.yml': ['Test correlation bucket agg simple'],
|
||||
|
||||
// start should be a string
|
||||
'ml/jobs_get_result_overall_buckets.yml': ['Test overall buckets given epoch start and end params'],
|
||||
|
||||
// this can't happen with the client
|
||||
'ml/start_data_frame_analytics.yml': ['Test start with inconsistent body/param ids'],
|
||||
'ml/stop_data_frame_analytics.yml': ['Test stop with inconsistent body/param ids'],
|
||||
'ml/preview_datafeed.yml': ['*'],
|
||||
|
||||
// Investigate why is failing
|
||||
'ml/inference_crud.yml': ['*'],
|
||||
'ml/categorization_agg.yml': ['Test categorization aggregation with poor settings'],
|
||||
'ml/filter_crud.yml': ['*'],
|
||||
|
||||
// investigate why this is failing
|
||||
'monitoring/bulk/10_basic.yml': ['*'],
|
||||
'monitoring/bulk/20_privileges.yml': ['*'],
|
||||
'license/20_put_license.yml': ['*'],
|
||||
'snapshot/10_basic.yml': ['*'],
|
||||
'snapshot/20_operator_privileges_disabled.yml': ['*'],
|
||||
|
||||
// the body is correct, but the regex is failing
|
||||
'sql/sql.yml': ['Getting textual representation'],
|
||||
'searchable_snapshots/10_usage.yml': ['*'],
|
||||
'service_accounts/10_basic.yml': ['*'],
|
||||
|
||||
// we are setting two certificates in the docker config
|
||||
'ssl/10_basic.yml': ['*'],
|
||||
'token/10_basic.yml': ['*'],
|
||||
'token/11_invalidation.yml': ['*'],
|
||||
|
||||
// very likely, the index template has not been loaded yet.
|
||||
// we should run a indices.existsTemplate, but the name of the
|
||||
// template may vary during time.
|
||||
@ -150,20 +136,16 @@ const platinumDenyList = {
|
||||
'transforms_stats.yml': ['*'],
|
||||
'transforms_stats_continuous.yml': ['*'],
|
||||
'transforms_update.yml': ['*'],
|
||||
|
||||
// js does not support ulongs
|
||||
'unsigned_long/10_basic.yml': ['*'],
|
||||
'unsigned_long/20_null_value.yml': ['*'],
|
||||
'unsigned_long/30_multi_fields.yml': ['*'],
|
||||
'unsigned_long/40_different_numeric.yml': ['*'],
|
||||
'unsigned_long/50_script_values.yml': ['*'],
|
||||
|
||||
// the v8 client flattens the body into the parent object
|
||||
'platinum/users/10_basic.yml': ['Test put user with different username in body'],
|
||||
|
||||
// docker issue?
|
||||
'watcher/execute_watch/60_http_input.yml': ['*'],
|
||||
|
||||
// the checks are correct, but for some reason the test is failing on js side
|
||||
// I bet is because the backslashes in the rg
|
||||
'watcher/execute_watch/70_invalid.yml': ['*'],
|
||||
@ -177,9 +159,8 @@ const platinumDenyList = {
|
||||
'platinum/ml/delete_job_force.yml': ['Test force delete an open job that is referred by a started datafeed'],
|
||||
'platinum/ml/evaluate_data_frame.yml': ['*'],
|
||||
'platinum/ml/get_datafeed_stats.yml': ['*'],
|
||||
|
||||
// start should be a string in the yaml test
|
||||
'platinum/ml/start_stop_datafeed.yml': ['*'],
|
||||
'platinum/ml/start_stop_datafeed.yml': ['*']
|
||||
}
|
||||
|
||||
function runner (opts = {}) {
|
||||
@ -191,6 +172,8 @@ function runner (opts = {}) {
|
||||
}
|
||||
}
|
||||
const client = new Client(options)
|
||||
// TODO: remove the following line once https://github.com/elastic/elasticsearch/issues/82358 is fixed
|
||||
client.transport[kProductCheck] = null
|
||||
log('Loading yaml suite')
|
||||
start({ client, isXPack: opts.isXPack })
|
||||
.catch(err => {
|
||||
@ -295,21 +278,13 @@ async function start ({ client, isXPack }) {
|
||||
}
|
||||
|
||||
const cleanPath = file.slice(file.lastIndexOf(apiName))
|
||||
|
||||
// skip if --suite CLI arg doesn't match
|
||||
if (options.suite && !cleanPath.endsWith(options.suite)) continue
|
||||
|
||||
log(' ' + cleanPath)
|
||||
const junitTestSuite = junitTestSuites.testsuite(apiName.slice(1) + ' - ' + cleanPath)
|
||||
|
||||
for (const test of tests) {
|
||||
const testTime = now()
|
||||
const name = Object.keys(test)[0]
|
||||
|
||||
// skip setups, teardowns and anything that doesn't match --test flag when present
|
||||
if (name === 'setup' || name === 'teardown') continue
|
||||
if (options.test && !name.endsWith(options.test)) continue
|
||||
|
||||
const junitTestCase = junitTestSuite.testcase(name)
|
||||
|
||||
stats.total += 1
|
||||
@ -330,12 +305,7 @@ async function start ({ client, isXPack }) {
|
||||
junitTestSuites.end()
|
||||
generateJunitXmlReport(junit, isXPack ? 'platinum' : 'free')
|
||||
console.error(err)
|
||||
|
||||
if (options.bail) {
|
||||
process.exit(1)
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
process.exit(1)
|
||||
}
|
||||
const totalTestTime = now() - testTime
|
||||
junitTestCase.end()
|
||||
@ -399,8 +369,7 @@ function generateJunitXmlReport (junit, suite) {
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
const scheme = process.env.TEST_SUITE === 'platinum' ? 'https' : 'http'
|
||||
const node = process.env.TEST_ES_SERVER || `${scheme}://elastic:changeme@localhost:9200`
|
||||
const node = process.env.TEST_ES_SERVER || 'http://elastic:changeme@localhost:9200'
|
||||
const opts = {
|
||||
node,
|
||||
isXPack: process.env.TEST_SUITE !== 'free'
|
||||
@ -409,28 +378,26 @@ if (require.main === module) {
|
||||
}
|
||||
|
||||
const shouldSkip = (isXPack, file, name) => {
|
||||
if (options.suite || options.test) return false
|
||||
|
||||
let list = Object.keys(freeSkips)
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const freeTest = freeSkips[list[i]]
|
||||
for (let j = 0; j < freeTest.length; j++) {
|
||||
if (file.endsWith(list[i]) && (name === freeTest[j] || freeTest[j] === '*')) {
|
||||
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
|
||||
log(`Skipping test ${testName} because it is denylisted in the free test suite`)
|
||||
log(`Skipping test ${testName} because is blacklisted in the free test`)
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (file.includes('x-pack') || isXPack) {
|
||||
list = Object.keys(platinumDenyList)
|
||||
list = Object.keys(platinumBlackList)
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
const platTest = platinumDenyList[list[i]]
|
||||
const platTest = platinumBlackList[list[i]]
|
||||
for (let j = 0; j < platTest.length; j++) {
|
||||
if (file.endsWith(list[i]) && (name === platTest[j] || platTest[j] === '*')) {
|
||||
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
|
||||
log(`Skipping test ${testName} because it is denylisted in the platinum test suite`)
|
||||
log(`Skipping test ${testName} because is blacklisted in the platinum test`)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,45 +188,6 @@ function build (opts = {}) {
|
||||
client, 'tasks.cancel',
|
||||
tasks.map(id => ({ task_id: id }))
|
||||
)
|
||||
|
||||
// cleanup ml
|
||||
const jobsList = await client.ml.getJobs()
|
||||
const jobsIds = jobsList.jobs.map(j => j.job_id)
|
||||
await helper.runInParallel(
|
||||
client, 'ml.deleteJob',
|
||||
jobsIds.map(j => ({ job_id: j, force: true }))
|
||||
)
|
||||
|
||||
const dataFrame = await client.ml.getDataFrameAnalytics()
|
||||
const dataFrameIds = dataFrame.data_frame_analytics.map(d => d.id)
|
||||
await helper.runInParallel(
|
||||
client, 'ml.deleteDataFrameAnalytics',
|
||||
dataFrameIds.map(d => ({ id: d, force: true }))
|
||||
)
|
||||
|
||||
const calendars = await client.ml.getCalendars()
|
||||
const calendarsId = calendars.calendars.map(c => c.calendar_id)
|
||||
await helper.runInParallel(
|
||||
client, 'ml.deleteCalendar',
|
||||
calendarsId.map(c => ({ calendar_id: c }))
|
||||
)
|
||||
|
||||
const training = await client.ml.getTrainedModels()
|
||||
const trainingId = training.trained_model_configs
|
||||
.filter(t => t.created_by !== '_xpack')
|
||||
.map(t => t.model_id)
|
||||
await helper.runInParallel(
|
||||
client, 'ml.deleteTrainedModel',
|
||||
trainingId.map(t => ({ model_id: t, force: true }))
|
||||
)
|
||||
|
||||
// cleanup transforms
|
||||
const transforms = await client.transform.getTransform()
|
||||
const transformsId = transforms.transforms.map(t => t.id)
|
||||
await helper.runInParallel(
|
||||
client, 'transform.deleteTransform',
|
||||
transformsId.map(t => ({ transform_id: t, force: true }))
|
||||
)
|
||||
}
|
||||
|
||||
const shutdownNodes = await client.shutdown.getNode()
|
||||
|
||||
@ -432,3 +432,12 @@ test('caFingerprint can\'t be configured over http / 2', t => {
|
||||
)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('user agent is in the correct format', t => {
|
||||
const client = new Client({ node: 'http://localhost:9200' })
|
||||
const agentRaw = client.transport[symbols.kHeaders]['user-agent'] || ''
|
||||
const agentSplit = agentRaw.split(/\s+/)
|
||||
t.equal(agentSplit[0].split('/')[0], 'elasticsearch-js')
|
||||
t.ok(/^\d+\.\d+\.\d+/.test(agentSplit[0].split('/')[1]))
|
||||
t.end()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user