Compare commits

..

22 Commits

Author SHA1 Message Date
537b5b0de9 Bumped v7.9.1 2020-09-23 15:06:08 +02:00
d24fff058e API generation 2020-09-23 11:45:00 +02:00
bd7b38b24e Improve child performances (#1314) 2020-09-23 11:43:25 +02:00
bd8892c37d Improved cleanup yaml tests (#1306) 2020-09-23 11:40:34 +02:00
360fe7b442 Fixed code generation 2020-09-23 11:40:20 +02:00
59203811dd Avoid the release of Zalgo (#1295) 2020-09-23 11:39:54 +02:00
457c30eb89 Fix maxRetries request option handling (#1296) 2020-09-23 11:39:45 +02:00
8c1646a662 Fix RequestOptions.body type to include null (#1300)
Fixes #1291
2020-09-23 11:39:37 +02:00
9d747121e8 Helper param fix (#1284)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2020-09-23 11:39:16 +02:00
2907a84334 Bumped v7.9.0 2020-08-19 17:56:57 +02:00
d966a06a62 API generation 2020-08-19 17:54:32 +02:00
4bca80bafc API generation 2020-08-03 12:02:03 +02:00
080c3af904 Generate response type as boolean if the request is HEAD only (#1275) 2020-08-03 11:54:42 +02:00
14536d6855 API generation 2020-07-29 08:32:03 +02:00
11b4cea493 Bumped v7.9.0-rc.2 2020-07-20 16:48:44 +02:00
3673255959 API generation 2020-07-20 14:10:27 +02:00
e0fc57766d Fix errors in type definitions (#1263) 2020-07-20 14:03:13 +02:00
9c2ec755d3 Bumped v7.9.0-rc.1 2020-07-17 08:46:29 +02:00
a221a84a58 Updated ci configuration 2020-07-17 08:12:53 +02:00
7d78dceed5 Fixed type test 2020-07-15 15:48:58 +02:00
c3832dc081 Updated ci configuration 2020-07-15 15:44:17 +02:00
af5c978131 API generation 2020-07-15 15:43:04 +02:00
224 changed files with 5000 additions and 36345 deletions

View File

@ -1,13 +1,9 @@
ARG NODE_JS_VERSION=16
ARG NODE_JS_VERSION=10
FROM node:${NODE_JS_VERSION}
# Create app directory
WORKDIR /usr/src/app
RUN apt-get clean -y
RUN apt-get update -y
RUN apt-get install -y zip
# Install app dependencies
COPY package*.json ./
RUN npm install

View File

@ -18,7 +18,7 @@ require_stack_version
if [[ -z $es_node_name ]]; then
# only set these once
set -euo pipefail
export TEST_SUITE=${TEST_SUITE-free}
export TEST_SUITE=${TEST_SUITE-oss}
export RUNSCRIPTS=${RUNSCRIPTS-}
export DETACH=${DETACH-false}
export CLEANUP=${CLEANUP-false}
@ -26,11 +26,11 @@ if [[ -z $es_node_name ]]; then
export es_node_name=instance
export elastic_password=changeme
export elasticsearch_image=elasticsearch
export elasticsearch_scheme="https"
if [[ $TEST_SUITE != "platinum" ]]; then
export elasticsearch_scheme="http"
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
if [[ $TEST_SUITE != "xpack" ]]; then
export elasticsearch_image=elasticsearch-${TEST_SUITE}
export elasticsearch_url=http://${es_node_name}:9200
fi
export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"

View File

@ -1,107 +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 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 [version] = args
await $`node scripts/generate --version ${version}`
}
function onError (err) {
console.log(err)
process.exit(1)
}

View File

@ -1,178 +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/../")
# 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 /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

View File

@ -4,22 +4,16 @@
# to form a cluster suitable for running the REST API tests.
#
# Export the STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'.
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
# Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'.
# Export the NUMBER_OF_NODES variable to start more than 1 node
# Version 1.6.0
# Version 1.1.0
# - Initial version of the run-elasticsearch.sh script
# - Deleting the volume should not dependent on the container still running
# - Fixed `ES_JAVA_OPTS` config
# - Moved to STACK_VERSION and TEST_VERSION
# - Refactored into functions and imports
# - Support NUMBER_OF_NODES
# - Added 5 retries on docker pull for fixing transient network errors
# - Added flags to make local CCR configurations work
# - Added action.destructive_requires_name=false as the default will be true in v8
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
# - Use https only when TEST_SUITE is "platinum", when "free" use http
script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
@ -33,8 +27,6 @@ cluster_name=${moniker}${suffix}
declare -a volumes
environment=($(cat <<-END
--env ELASTIC_PASSWORD=$elastic_password
--env xpack.security.enabled=true
--env node.name=$es_node_name
--env cluster.name=$cluster_name
--env cluster.initial_master_nodes=$master_node_name
@ -44,21 +36,19 @@ environment=($(cat <<-END
--env node.attr.testattr=test
--env path.repo=/tmp
--env repositories.url.allowed_urls=http://snapshot.test*
--env action.destructive_requires_name=false
--env ingest.geoip.downloader.enabled=false
--env cluster.deprecation_indexing.enabled=false
END
))
if [[ "$TEST_SUITE" == "platinum" ]]; then
if [[ "$TEST_SUITE" == "xpack" ]]; then
environment+=($(cat <<-END
--env ELASTIC_PASSWORD=$elastic_password
--env xpack.license.self_generated.type=trial
--env xpack.security.enabled=true
--env xpack.security.http.ssl.enabled=true
--env xpack.security.http.ssl.verification_mode=certificate
--env xpack.security.http.ssl.key=certs/testnode.key
--env xpack.security.http.ssl.certificate=certs/testnode.crt
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
--env xpack.security.transport.ssl.enabled=true
--env xpack.security.transport.ssl.verification_mode=certificate
--env xpack.security.transport.ssl.key=certs/testnode.key
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
@ -70,29 +60,13 @@ END
--volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
END
))
else
environment+=($(cat <<-END
--env xpack.security.http.ssl.enabled=false
END
))
fi
cert_validation_flags=""
if [[ "$TEST_SUITE" == "platinum" ]]; then
if [[ "$TEST_SUITE" == "xpack" ]]; then
cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1"
fi
# Pull the container, retry on failures up to 5 times with
# short delays between each attempt. Fixes most transient network errors.
docker_pull_attempts=0
until [ "$docker_pull_attempts" -ge 5 ]
do
docker pull docker.elastic.co/elasticsearch/"$elasticsearch_container" && break
docker_pull_attempts=$((docker_pull_attempts+1))
echo "Failed to pull image, retrying in 10 seconds (retry $docker_pull_attempts/5)..."
sleep 10
done
NUMBER_OF_NODES=${NUMBER_OF_NODES-1}
http_port=9200
for (( i=0; i<$NUMBER_OF_NODES; i++, http_port++ )); do
@ -118,7 +92,7 @@ END
docker run \
--name "$node_name" \
--network "$network_name" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g -da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions" \
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
"${environment[@]}" \
"${volumes[@]}" \
--publish "$http_port":9200 \

View File

@ -2,7 +2,7 @@
# parameters are available to this script
# STACK_VERSION -- version e.g Major.Minor.Patch(-Prelease)
# TEST_SUITE -- which test suite to run: free or platinum
# TEST_SUITE -- which test suite to run: oss or xpack
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE
# NODE_JS_VERSION -- node js version (defined in test-matrix.yml, a default is hardcoded here)
script_path=$(dirname $(realpath -s $0))
@ -30,14 +30,17 @@ docker build \
echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
repo=$(realpath $(dirname $(realpath -s $0))/../)
run_script_args=""
if [[ "$NODE_JS_VERSION" == "8" ]]; then
run_script_args="--harmony-async-iteration"
fi
docker run \
--network=${network_name} \
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
--env "TEST_SUITE=${TEST_SUITE}" \
--volume $repo:/usr/src/app \
--volume /usr/src/app/node_modules \
--name elasticsearch-js \
--rm \
elastic/elasticsearch-js \
npm run test:integration
node ${run_script_args} test/integration/index.js

View File

@ -1,14 +1,15 @@
---
STACK_VERSION:
- "7.17.12-SNAPSHOT"
- 7.9.0-SNAPSHOT
NODE_JS_VERSION:
- 16
- 14
- 12
- 10
- 8
TEST_SUITE:
- free
- platinum
- oss
- xpack
exclude: ~

View File

@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [10.x, 12.x, 14.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
@ -40,13 +40,38 @@ jobs:
run: |
npm run test:types
test-node-v8:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [8.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install
- name: Test
run: |
npm run test:node8
helpers-integration-test:
name: Helpers integration test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
@ -61,7 +86,7 @@ jobs:
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.16-SNAPSHOT
stack-version: 7.9.0-SNAPSHOT
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
@ -93,7 +118,7 @@ jobs:
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.16-SNAPSHOT
stack-version: 8.0.0-SNAPSHOT
- name: Use Node.js 14.x
uses: actions/setup-node@v1
@ -119,34 +144,13 @@ jobs:
npm start --prefix test/bundlers/rollup-test
npm start --prefix test/bundlers/webpack-test
mock-support:
name: Mock support
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install
run: |
npm install
npm install --prefix test/mock
- name: Run test
run: |
npm test --prefix test/mock
code-coverage:
name: Code coverage
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [12.x]
steps:
- uses: actions/checkout@v2
@ -180,7 +184,7 @@ jobs:
strategy:
matrix:
node-version: [14.x]
node-version: [12.x]
steps:
- uses: actions/checkout@v2

1
.gitignore vendored
View File

@ -60,4 +60,3 @@ test/benchmarks/macro/fixtures/*
.cache
test/bundlers/**/bundle.js
test/bundlers/parcel-test/.parcel-cache

View File

@ -70,7 +70,3 @@ certs
.github
CODE_OF_CONDUCT.md
CONTRIBUTING.md
# CANARY-PACKAGE
api/kibana.d.ts
# /CANARY-PACKAGE

View File

@ -58,24 +58,14 @@ Once your changes are ready to submit for review:
### Code generation
The contents of the API folder and the `docs/reference.asciidoc` file are generated by a script.<br/>
To run the script, use the following command:
The entire content of the API folder is generated as well as the `docs/reference.asciidoc` file.<br/>
If you want to run the code generation you should run the following command:
```sh
node scripts/generate --version <version name>
```
For example:
```sh
node scripts/generate --version 7.15.0
```
To run the script for an unreleased snapshot version, append `-SNAPSHOT` to the version name. For example:
```sh
node scripts/generate --version 8.0.0-SNAPSHOT
node scripts/generate --tag <tag name>
# or
node scripts/generate --branch <branch name>
```
Then you should copy the content of `api/generated.d.ts` into the `index.d.ts` file *(automate this step would be a nice pr!)*.
### Testing
There are different test scripts, usually during development you only need to run `npm test`, but if you want you can run just a part of the suite, following you will find all the testing scripts and what they do.

View File

@ -26,36 +26,11 @@ The official Node.js client for Elasticsearch.
npm install @elastic/elasticsearch
```
### Node.js support
NOTE: The minimum supported version of Node.js is `v12`.
The client versioning follows the Elastc Stack versioning, this means that
major, minor, and patch releases are done following a precise schedule that
often does not coincide with the [Node.js release](https://nodejs.org/en/about/releases/) times.
To avoid support insecure and unsupported versions of Node.js, the
client **will drop the support of EOL versions of Node.js between minor releases**.
Typically, as soon as a Node.js version goes into EOL, the client will continue
to support that version for at least another minor release. If you are using the client
with a version of Node.js that will be unsupported soon, you will see a warning
in your logs (the client will start logging the warning with two minors in advance).
Unless you are **always** using a supported version of Node.js,
we recommend defining the client dependency in your
`package.json` with the `~` instead of `^`. In this way, you will lock the
dependency on the minor release and not the major. (for example, `~7.10.0` instead
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) |
### Compatibility
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch.
Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
The minimum supported version of Node.js is `v8`.
The library is compatible with all Elasticsearch versions since 5.x, and you should use the same major version of the Elasticsearch instance that you are using.
| Elasticsearch Version | Client Version |
| --------------------- |----------------|
@ -72,7 +47,7 @@ npm install @elastic/elasticsearch@<major>
#### Browser
WARNING: There is no official support for the browser environment. It exposes your Elasticsearch instance to everyone, which could lead to security issues.
We recommend that you write a lightweight proxy that uses this client instead, you can see a proxy example [here](./docs/examples/proxy).
We recommend that you write a lightweight proxy that uses this client instead.
## Documentation

View File

@ -35,15 +35,15 @@ AsyncSearchApi.prototype.delete = function asyncSearchDeleteApi (params, options
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
@ -62,15 +62,15 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
@ -85,40 +85,13 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
return this.transport.request(request, options, callback)
}
AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_async_search' + '/' + 'status' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
AsyncSearchApi.prototype.submit = function asyncSearchSubmitApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_async_search'

View File

@ -35,15 +35,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
@ -58,15 +58,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
return this.transport.request(request, options, callback)
}
AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (params, options, callback) {
AutoscalingApi.prototype.getAutoscalingDecision = function autoscalingGetAutoscalingDecisionApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_autoscaling' + '/' + 'capacity'
path = '/' + '_autoscaling' + '/' + 'decision'
// build request object
const request = {
@ -83,15 +83,15 @@ AutoscalingApi.prototype.getAutoscalingPolicy = function autoscalingGetAutoscali
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
@ -110,19 +110,19 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
@ -139,7 +139,7 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
Object.defineProperties(AutoscalingApi.prototype, {
delete_autoscaling_policy: { get () { return this.deleteAutoscalingPolicy } },
get_autoscaling_capacity: { get () { return this.getAutoscalingCapacity } },
get_autoscaling_decision: { get () { return this.getAutoscalingDecision } },
get_autoscaling_policy: { get () { return this.getAutoscalingPolicy } },
put_autoscaling_policy: { get () { return this.putAutoscalingPolicy } }
})

View File

@ -23,28 +23,28 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' }
function bulkApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from', 'size', 'full_id', 'include_bootstrap', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'nodes', 'actions', 'parent_task_id']
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs', fullId: 'full_id', includeBootstrap: 'include_bootstrap', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', parentTaskId: 'parent_task_id' }
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'full_id', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'node_id', 'actions', 'parent_task', 'size', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from']
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', fullId: 'full_id', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', nodeId: 'node_id', parentTask: 'parent_task', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs' }
function CatApi (transport, ConfigurationError) {
this.transport = transport
@ -34,10 +34,10 @@ function CatApi (transport, ConfigurationError) {
CatApi.prototype.aliases = function catAliasesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name)
@ -60,10 +60,10 @@ CatApi.prototype.aliases = function catAliasesApi (params, options, callback) {
CatApi.prototype.allocation = function catAllocationApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, ...querystring } = params
var { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId)
@ -86,10 +86,10 @@ CatApi.prototype.allocation = function catAllocationApi (params, options, callba
CatApi.prototype.count = function catCountApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index)
@ -112,10 +112,10 @@ CatApi.prototype.count = function catCountApi (params, options, callback) {
CatApi.prototype.fielddata = function catFielddataApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, fields, ...querystring } = params
var { method, body, fields, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((fields) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields)
@ -138,10 +138,10 @@ CatApi.prototype.fielddata = function catFielddataApi (params, options, callback
CatApi.prototype.health = function catHealthApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'health'
@ -159,10 +159,10 @@ CatApi.prototype.health = function catHealthApi (params, options, callback) {
CatApi.prototype.help = function catHelpApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat'
@ -180,10 +180,10 @@ CatApi.prototype.help = function catHelpApi (params, options, callback) {
CatApi.prototype.indices = function catIndicesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index)
@ -206,10 +206,10 @@ CatApi.prototype.indices = function catIndicesApi (params, options, callback) {
CatApi.prototype.master = function catMasterApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'master'
@ -224,117 +224,13 @@ CatApi.prototype.master = function catMasterApi (params, options, callback) {
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, datafeedId, datafeed_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((datafeed_id || datafeedId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, jobId, job_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((job_id || jobId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, modelId, model_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((model_id || modelId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'nodeattrs'
@ -352,10 +248,10 @@ CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback
CatApi.prototype.nodes = function catNodesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'nodes'
@ -373,10 +269,10 @@ CatApi.prototype.nodes = function catNodesApi (params, options, callback) {
CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'pending_tasks'
@ -394,10 +290,10 @@ CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, ca
CatApi.prototype.plugins = function catPluginsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'plugins'
@ -415,10 +311,10 @@ CatApi.prototype.plugins = function catPluginsApi (params, options, callback) {
CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
@ -441,10 +337,10 @@ CatApi.prototype.recovery = function catRecoveryApi (params, options, callback)
CatApi.prototype.repositories = function catRepositoriesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'repositories'
@ -462,10 +358,10 @@ CatApi.prototype.repositories = function catRepositoriesApi (params, options, ca
CatApi.prototype.segments = function catSegmentsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
@ -488,10 +384,10 @@ CatApi.prototype.segments = function catSegmentsApi (params, options, callback)
CatApi.prototype.shards = function catShardsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
@ -514,10 +410,10 @@ CatApi.prototype.shards = function catShardsApi (params, options, callback) {
CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((repository) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
@ -540,10 +436,10 @@ CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback
CatApi.prototype.tasks = function catTasksApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'tasks'
@ -561,10 +457,10 @@ CatApi.prototype.tasks = function catTasksApi (params, options, callback) {
CatApi.prototype.templates = function catTemplatesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
@ -587,10 +483,10 @@ CatApi.prototype.templates = function catTemplatesApi (params, options, callback
CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
var { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((thread_pool_patterns || threadPoolPatterns) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
@ -610,13 +506,117 @@ CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callba
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
var path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
var { method, body, datafeedId, datafeed_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
var path = ''
if ((datafeed_id || datafeedId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
var { method, body, jobId, job_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
var path = ''
if ((job_id || jobId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
var { method, body, modelId, model_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
var path = ''
if ((model_id || modelId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.transforms = function catTransformsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((transform_id || transformId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
@ -637,12 +637,12 @@ CatApi.prototype.transforms = function catTransformsApi (params, options, callba
}
Object.defineProperties(CatApi.prototype, {
pending_tasks: { get () { return this.pendingTasks } },
thread_pool: { get () { return this.threadPool } },
ml_data_frame_analytics: { get () { return this.mlDataFrameAnalytics } },
ml_datafeeds: { get () { return this.mlDatafeeds } },
ml_jobs: { get () { return this.mlJobs } },
ml_trained_models: { get () { return this.mlTrainedModels } },
pending_tasks: { get () { return this.pendingTasks } },
thread_pool: { get () { return this.threadPool } }
ml_trained_models: { get () { return this.mlTrainedModels } }
})
module.exports = CatApi

View File

@ -35,15 +35,15 @@ CcrApi.prototype.deleteAutoFollowPattern = function ccrDeleteAutoFollowPatternAp
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
@ -62,19 +62,19 @@ CcrApi.prototype.follow = function ccrFollowApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
@ -93,15 +93,15 @@ CcrApi.prototype.followInfo = function ccrFollowInfoApi (params, options, callba
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
@ -120,15 +120,15 @@ CcrApi.prototype.followStats = function ccrFollowStatsApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
@ -147,19 +147,19 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'
@ -177,10 +177,10 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options
CcrApi.prototype.getAutoFollowPattern = function ccrGetAutoFollowPatternApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
@ -204,15 +204,15 @@ CcrApi.prototype.pauseAutoFollowPattern = function ccrPauseAutoFollowPatternApi
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'pause'
@ -231,15 +231,15 @@ CcrApi.prototype.pauseFollow = function ccrPauseFollowApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
@ -258,19 +258,19 @@ CcrApi.prototype.putAutoFollowPattern = function ccrPutAutoFollowPatternApi (par
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
@ -289,15 +289,15 @@ CcrApi.prototype.resumeAutoFollowPattern = function ccrResumeAutoFollowPatternAp
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'resume'
@ -316,15 +316,15 @@ CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
@ -342,10 +342,10 @@ CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, ca
CcrApi.prototype.stats = function ccrStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_ccr' + '/' + 'stats'
@ -364,15 +364,15 @@ CcrApi.prototype.unfollow = function ccrUnfollowApi (params, options, callback)
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function clearScrollApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, scrollId, scroll_id, ...querystring } = params
var { method, body, scrollId, scroll_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((scroll_id || scrollId) != null) {
if (method == null) method = 'DELETE'
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)

View File

@ -1,50 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function closePointInTimeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_pit'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
module.exports = closePointInTimeApi

View File

@ -34,10 +34,10 @@ function ClusterApi (transport, ConfigurationError) {
ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
@ -56,15 +56,15 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
@ -82,10 +82,10 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe
ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
@ -104,15 +104,15 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'HEAD'
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
@ -130,10 +130,10 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe
ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
@ -156,10 +156,10 @@ ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplate
ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cluster' + '/' + 'settings'
@ -177,10 +177,10 @@ ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, optio
ClusterApi.prototype.health = function clusterHealthApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index)
@ -203,10 +203,10 @@ ClusterApi.prototype.health = function clusterHealthApi (params, options, callba
ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_cluster' + '/' + 'pending_tasks'
@ -224,10 +224,10 @@ ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, opt
ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
@ -246,19 +246,19 @@ ClusterApi.prototype.putComponentTemplate = function clusterPutComponentTemplate
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
@ -277,15 +277,15 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_cluster' + '/' + 'settings'
@ -303,10 +303,10 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio
ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_remote' + '/' + 'info'
@ -324,10 +324,10 @@ ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options
ClusterApi.prototype.reroute = function clusterRerouteApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_cluster' + '/' + 'reroute'
@ -346,15 +346,15 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.index != null && (params.metric == null)) {
if (params['index'] != null && (params['metric'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: metric')
return handleError(err, callback)
}
let { method, body, metric, index, ...querystring } = params
var { method, body, metric, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((metric) != null && (index) != null) {
if (method == null) method = 'GET'
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index)
@ -380,10 +380,10 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback
ClusterApi.prototype.stats = function clusterStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, ...querystring } = params
var { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)

View File

@ -30,15 +30,15 @@ function countApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'

View File

@ -30,23 +30,23 @@ function createApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'PUT'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'

View File

@ -35,15 +35,15 @@ DanglingIndicesApi.prototype.deleteDanglingIndex = function danglingIndicesDelet
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index_uuid == null && params.indexUuid == null) {
if (params['index_uuid'] == null && params['indexUuid'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid')
return handleError(err, callback)
}
let { method, body, indexUuid, index_uuid, ...querystring } = params
var { method, body, indexUuid, index_uuid, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
@ -62,15 +62,15 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index_uuid == null && params.indexUuid == null) {
if (params['index_uuid'] == null && params['indexUuid'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid')
return handleError(err, callback)
}
let { method, body, indexUuid, index_uuid, ...querystring } = params
var { method, body, indexUuid, index_uuid, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
@ -88,10 +88,10 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor
DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_dangling'

View File

@ -30,19 +30,19 @@ function deleteApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'DELETE'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)

View File

@ -23,32 +23,32 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
function deleteByQueryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'

View File

@ -30,19 +30,19 @@ function deleteByQueryRethrottleApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.task_id == null && params.taskId == null) {
if (params['task_id'] == null && params['taskId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
return handleError(err, callback)
}
if (params.requests_per_second == null && params.requestsPerSecond == null) {
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
return handleError(err, callback)
}
let { method, body, taskId, task_id, ...querystring } = params
var { method, body, taskId, task_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'

View File

@ -30,15 +30,15 @@ function deleteScriptApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_scripts' + '/' + encodeURIComponent(id)

View File

@ -35,15 +35,15 @@ EnrichApi.prototype.deletePolicy = function enrichDeletePolicyApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
@ -62,15 +62,15 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + '/' + '_execute'
@ -88,10 +88,10 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt
EnrichApi.prototype.getPolicy = function enrichGetPolicyApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
@ -115,19 +115,19 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
@ -145,10 +145,10 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca
EnrichApi.prototype.stats = function enrichStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_enrich' + '/' + '_stats'

View File

@ -35,15 +35,15 @@ EqlApi.prototype.delete = function eqlDeleteApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
@ -62,15 +62,15 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
@ -85,50 +85,23 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
return this.transport.request(request, options, callback)
}
EqlApi.prototype.getStatus = function eqlGetStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_eql' + '/' + 'search' + '/' + 'status' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_eql' + '/' + 'search'
@ -143,8 +116,4 @@ EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
return this.transport.request(request, options, callback)
}
Object.defineProperties(EqlApi.prototype, {
get_status: { get () { return this.getStatus } }
})
module.exports = EqlApi

View File

@ -30,19 +30,19 @@ function existsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'HEAD'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)

View File

@ -30,28 +30,28 @@ function existsSourceApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
// check required url components
if (params.id != null && (params.type == null || params.index == null)) {
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: type, index')
return handleError(err, callback)
} else if (params.type != null && (params.index == null)) {
} else if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'HEAD'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'

View File

@ -30,19 +30,19 @@ function explainApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'

View File

@ -1,81 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['master_timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' }
function FeaturesApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
FeaturesApi.prototype.getFeatures = function featuresGetFeaturesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_features'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
FeaturesApi.prototype.resetFeatures = function featuresResetFeaturesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_features' + '/' + '_reset'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(FeaturesApi.prototype, {
get_features: { get () { return this.getFeatures } },
reset_features: { get () { return this.resetFeatures } }
})
module.exports = FeaturesApi

View File

@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al
function fieldCapsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_field_caps'

View File

@ -1,124 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_checkpoints', 'wait_for_checkpoints_timeout', 'allow_partial_search_results']
const snakeCase = { waitForAdvance: 'wait_for_advance', waitForIndex: 'wait_for_index', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCheckpoints: 'wait_for_checkpoints', waitForCheckpointsTimeout: 'wait_for_checkpoints_timeout', allowPartialSearchResults: 'allow_partial_search_results' }
function FleetApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
FleetApi.prototype.globalCheckpoints = function fleetGlobalCheckpointsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + 'global_checkpoints'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
FleetApi.prototype.msearch = function fleetMsearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((index) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_fleet_msearch'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_fleet' + '/' + '_fleet_msearch'
}
// build request object
const request = {
method,
path,
bulkBody: body,
querystring
}
return this.transport.request(request, options, callback)
}
FleetApi.prototype.search = function fleetSearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_fleet_search'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(FleetApi.prototype, {
global_checkpoints: { get () { return this.globalCheckpoints } }
})
module.exports = FleetApi

View File

@ -30,19 +30,19 @@ function getApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)

View File

@ -30,15 +30,15 @@ function getScriptApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_scripts' + '/' + encodeURIComponent(id)

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function getScriptContextApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_script_context'

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function getScriptLanguagesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_script_language'

View File

@ -30,19 +30,19 @@ function getSourceApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'

View File

@ -35,21 +35,21 @@ GraphApi.prototype.explore = function graphExploreApi (params, options, callback
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors', 'dry_run']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors', dryRun: 'dry_run' }
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors' }
function IlmApi (transport, ConfigurationError) {
this.transport = transport
@ -35,15 +35,15 @@ IlmApi.prototype.deleteLifecycle = function ilmDeleteLifecycleApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.policy == null) {
if (params['policy'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: policy')
return handleError(err, callback)
}
let { method, body, policy, ...querystring } = params
var { method, body, policy, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
@ -62,15 +62,15 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
@ -88,10 +88,10 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, policy, ...querystring } = params
var { method, body, policy, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((policy) != null) {
if (method == null) method = 'GET'
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
@ -114,10 +114,10 @@ IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, ca
IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_ilm' + '/' + 'status'
@ -132,40 +132,19 @@ IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback
return this.transport.request(request, options, callback)
}
IlmApi.prototype.migrateToDataTiers = function ilmMigrateToDataTiersApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_ilm' + '/' + 'migrate_to_data_tiers'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IlmApi.prototype.moveToStep = function ilmMoveToStepApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
@ -184,15 +163,15 @@ IlmApi.prototype.putLifecycle = function ilmPutLifecycleApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.policy == null) {
if (params['policy'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: policy')
return handleError(err, callback)
}
let { method, body, policy, ...querystring } = params
var { method, body, policy, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
@ -211,15 +190,15 @@ IlmApi.prototype.removePolicy = function ilmRemovePolicyApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
@ -238,15 +217,15 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
@ -264,10 +243,10 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_ilm' + '/' + 'start'
@ -285,10 +264,10 @@ IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
IlmApi.prototype.stop = function ilmStopApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_ilm' + '/' + 'stop'
@ -308,7 +287,6 @@ Object.defineProperties(IlmApi.prototype, {
explain_lifecycle: { get () { return this.explainLifecycle } },
get_lifecycle: { get () { return this.getLifecycle } },
get_status: { get () { return this.getStatus } },
migrate_to_data_tiers: { get () { return this.migrateToDataTiers } },
move_to_step: { get () { return this.moveToStep } },
put_lifecycle: { get () { return this.putLifecycle } },
remove_policy: { get () { return this.removePolicy } }

View File

@ -23,26 +23,26 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['wait_for_active_shards', 'op_type', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'if_seq_no', 'if_primary_term', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', opType: 'op_type', versionType: 'version_type', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['wait_for_active_shards', 'op_type', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'if_seq_no', 'if_primary_term', 'pipeline', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', opType: 'op_type', versionType: 'version_type', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', errorTrace: 'error_trace', filterPath: 'filter_path' }
function indexApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'PUT'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)

File diff suppressed because it is too large Load Diff

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function infoApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/'

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'summary', 'if_version', 'verbose']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', ifVersion: 'if_version' }
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'verbose']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' }
function IngestApi (transport, ConfigurationError) {
this.transport = transport
@ -35,15 +35,15 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
@ -58,34 +58,13 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o
return this.transport.request(request, options, callback)
}
IngestApi.prototype.geoIpStats = function ingestGeoIpStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_ingest' + '/' + 'geoip' + '/' + 'stats'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
@ -108,10 +87,10 @@ IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options
IngestApi.prototype.processorGrok = function ingestProcessorGrokApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok'
@ -130,19 +109,19 @@ IngestApi.prototype.putPipeline = function ingestPutPipelineApi (params, options
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
@ -161,15 +140,15 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate'
@ -191,7 +170,6 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call
Object.defineProperties(IngestApi.prototype, {
delete_pipeline: { get () { return this.deletePipeline } },
geo_ip_stats: { get () { return this.geoIpStats } },
get_pipeline: { get () { return this.getPipeline } },
processor_grok: { get () { return this.processorGrok } },
put_pipeline: { get () { return this.putPipeline } }

View File

@ -34,10 +34,10 @@ function LicenseApi (transport, ConfigurationError) {
LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_license'
@ -55,10 +55,10 @@ LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callba
LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_license'
@ -76,10 +76,10 @@ LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_license' + '/' + 'basic_status'
@ -97,10 +97,10 @@ LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params,
LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_license' + '/' + 'trial_status'
@ -118,10 +118,10 @@ LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params,
LicenseApi.prototype.post = function licensePostApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_license'
@ -139,10 +139,10 @@ LicenseApi.prototype.post = function licensePostApi (params, options, callback)
LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_license' + '/' + 'start_basic'
@ -160,10 +160,10 @@ LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params,
LicenseApi.prototype.postStartTrial = function licensePostStartTrialApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_license' + '/' + 'start_trial'

View File

@ -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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function LogstashApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
LogstashApi.prototype.deletePipeline = function logstashDeletePipelineApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_logstash' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
LogstashApi.prototype.getPipeline = function logstashGetPipelineApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_logstash' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
LogstashApi.prototype.putPipeline = function logstashPutPipelineApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'PUT'
path = '/' + '_logstash' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(LogstashApi.prototype, {
delete_pipeline: { get () { return this.deletePipeline } },
get_pipeline: { get () { return this.getPipeline } },
put_pipeline: { get () { return this.putPipeline } }
})
module.exports = LogstashApi

View File

@ -30,21 +30,21 @@ function mgetApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'

View File

@ -34,10 +34,10 @@ function MigrationApi (transport, ConfigurationError) {
MigrationApi.prototype.deprecations = function migrationDeprecationsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations'
@ -57,51 +57,4 @@ MigrationApi.prototype.deprecations = function migrationDeprecationsApi (params,
return this.transport.request(request, options, callback)
}
MigrationApi.prototype.getFeatureUpgradeStatus = function migrationGetFeatureUpgradeStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_migration' + '/' + 'system_features'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
MigrationApi.prototype.postFeatureUpgrade = function migrationPostFeatureUpgradeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_migration' + '/' + 'system_features'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(MigrationApi.prototype, {
get_feature_upgrade_status: { get () { return this.getFeatureUpgradeStatus } },
post_feature_upgrade: { get () { return this.postFeatureUpgrade } }
})
module.exports = MigrationApi

File diff suppressed because it is too large Load Diff

View File

@ -35,15 +35,15 @@ MonitoringApi.prototype.bulk = function monitoringBulkApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, type, ...querystring } = params
var { method, body, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((type) != null) {
if (method == null) method = 'POST'
path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'

View File

@ -30,21 +30,21 @@ function msearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'

View File

@ -30,21 +30,21 @@ function msearchTemplateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'

View File

@ -30,15 +30,15 @@ function mtermvectorsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'

View File

@ -23,85 +23,21 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'sort', 'timeout', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', ignoreIdleThreads: 'ignore_idle_threads', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments' }
const acceptedQuerystring = ['interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes']
const snakeCase = { ignoreIdleThreads: 'ignore_idle_threads', errorTrace: 'error_trace', filterPath: 'filter_path', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes' }
function NodesApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
NodesApi.prototype.clearRepositoriesMeteringArchive = function nodesClearRepositoriesMeteringArchiveApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.node_id == null && params.nodeId == null) {
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
return handleError(err, callback)
}
if (params.max_archive_version == null && params.maxArchiveVersion == null) {
const err = new this[kConfigurationError]('Missing required parameter: max_archive_version or maxArchiveVersion')
return handleError(err, callback)
}
// check required url components
if ((params.max_archive_version != null || params.maxArchiveVersion != null) && ((params.node_id == null && params.nodeId == null))) {
const err = new this[kConfigurationError]('Missing required parameter of the url: node_id')
return handleError(err, callback)
}
let { method, body, nodeId, node_id, maxArchiveVersion, max_archive_version, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + '_repositories_metering' + '/' + encodeURIComponent(max_archive_version || maxArchiveVersion)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
NodesApi.prototype.getRepositoriesMeteringInfo = function nodesGetRepositoriesMeteringInfoApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.node_id == null && params.nodeId == null) {
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
return handleError(err, callback)
}
let { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + '_repositories_metering'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, ...querystring } = params
var { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null) {
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
@ -133,10 +69,10 @@ NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, ca
NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, metric, ...querystring } = params
var { method, body, nodeId, node_id, metric, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null && (metric) != null) {
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + encodeURIComponent(metric)
@ -165,10 +101,10 @@ NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, ...querystring } = params
var { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null) {
if (method == null) method = 'POST'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings'
@ -191,10 +127,10 @@ NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi
NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params
var { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) {
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
@ -229,10 +165,10 @@ NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, metric, ...querystring } = params
var { method, body, nodeId, node_id, metric, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((node_id || nodeId) != null && (metric) != null) {
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage' + '/' + encodeURIComponent(metric)
@ -259,8 +195,6 @@ NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) {
}
Object.defineProperties(NodesApi.prototype, {
clear_repositories_metering_archive: { get () { return this.clearRepositoriesMeteringArchive } },
get_repositories_metering_info: { get () { return this.getRepositoriesMeteringInfo } },
hot_threads: { get () { return this.hotThreads } },
reload_secure_settings: { get () { return this.reloadSecureSettings } }
})

View File

@ -1,60 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['preference', 'routing', 'ignore_unavailable', 'expand_wildcards', 'keep_alive', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { ignoreUnavailable: 'ignore_unavailable', expandWildcards: 'expand_wildcards', keepAlive: 'keep_alive', errorTrace: 'error_trace', filterPath: 'filter_path' }
function openPointInTimeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.keep_alive == null && params.keepAlive == null) {
const err = new this[kConfigurationError]('Missing required parameter: keep_alive or keepAlive')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_pit'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
module.exports = openPointInTimeApi

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function pingApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'HEAD'
path = '/'

View File

@ -30,25 +30,25 @@ function putScriptApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.context != null && (params.id == null)) {
if (params['context'] != null && (params['id'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: id')
return handleError(err, callback)
}
let { method, body, id, context, ...querystring } = params
var { method, body, id, context, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null && (context) != null) {
if (method == null) method = 'PUT'
path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context)

View File

@ -30,15 +30,15 @@ function rankEvalApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'

View File

@ -30,15 +30,15 @@ function reindexApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_reindex'

View File

@ -30,19 +30,19 @@ function reindexRethrottleApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.task_id == null && params.taskId == null) {
if (params['task_id'] == null && params['taskId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
return handleError(err, callback)
}
if (params.requests_per_second == null && params.requestsPerSecond == null) {
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
return handleError(err, callback)
}
let { method, body, taskId, task_id, ...querystring } = params
var { method, body, taskId, task_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function renderSearchTemplateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id)

View File

@ -35,15 +35,15 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
@ -61,10 +61,10 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
@ -87,10 +87,10 @@ RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callba
RollupApi.prototype.getRollupCaps = function rollupGetRollupCapsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id)
@ -114,15 +114,15 @@ RollupApi.prototype.getRollupIndexCaps = function rollupGetRollupIndexCapsApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data'
@ -141,19 +141,19 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
@ -168,70 +168,29 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
return this.transport.request(request, options, callback)
}
RollupApi.prototype.rollup = function rollupRollupApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.rollup_index == null && params.rollupIndex == null) {
const err = new this[kConfigurationError]('Missing required parameter: rollup_index or rollupIndex')
return handleError(err, callback)
}
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if ((params.rollup_index != null || params.rollupIndex != null) && (params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, rollupIndex, rollup_index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + encodeURIComponent(rollup_index || rollupIndex)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
RollupApi.prototype.rollupSearch = function rollupRollupSearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search'
@ -255,15 +214,15 @@ RollupApi.prototype.startJob = function rollupStartJobApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start'
@ -282,15 +241,15 @@ RollupApi.prototype.stopJob = function rollupStopJobApi (params, options, callba
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop'

View File

@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function scriptsPainlessExecuteApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'

View File

@ -29,10 +29,10 @@ const snakeCase = { scrollId: 'scroll_id', restTotalHitsAsInt: 'rest_total_hits_
function scrollApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, scrollId, scroll_id, ...querystring } = params
var { method, body, scrollId, scroll_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((scroll_id || scrollId) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)

View File

@ -23,22 +23,22 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'min_compatible_shard_node', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', minCompatibleShardNode: 'min_compatible_shard_node', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', errorTrace: 'error_trace', filterPath: 'filter_path' }
function searchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'

View File

@ -1,87 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'track_total_hits', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { exactBounds: 'exact_bounds', gridPrecision: 'grid_precision', gridType: 'grid_type', trackTotalHits: 'track_total_hits', errorTrace: 'error_trace', filterPath: 'filter_path' }
function searchMvtApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.field == null) {
const err = new this[kConfigurationError]('Missing required parameter: field')
return handleError(err, callback)
}
if (params.zoom == null) {
const err = new this[kConfigurationError]('Missing required parameter: zoom')
return handleError(err, callback)
}
if (params.x == null) {
const err = new this[kConfigurationError]('Missing required parameter: x')
return handleError(err, callback)
}
if (params.y == null) {
const err = new this[kConfigurationError]('Missing required parameter: y')
return handleError(err, callback)
}
// check required url components
if (params.y != null && (params.x == null || params.zoom == null || params.field == null || params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: x, zoom, field, index')
return handleError(err, callback)
} else if (params.x != null && (params.zoom == null || params.field == null || params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: zoom, field, index')
return handleError(err, callback)
} else if (params.zoom != null && (params.field == null || params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: field, index')
return handleError(err, callback)
} else if (params.field != null && (params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, field, zoom, x, y, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_mvt' + '/' + encodeURIComponent(field) + '/' + encodeURIComponent(zoom) + '/' + encodeURIComponent(x) + '/' + encodeURIComponent(y)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
module.exports = searchMvtApi

View File

@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al
function searchShardsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_search_shards'

View File

@ -30,21 +30,21 @@ function searchTemplateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'

View File

@ -23,47 +23,21 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', 'master_timeout', 'wait_for_completion', 'storage', 'level']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', masterTimeout: 'master_timeout', waitForCompletion: 'wait_for_completion' }
const acceptedQuerystring = ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'master_timeout', 'wait_for_completion']
const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForCompletion: 'wait_for_completion' }
function SearchableSnapshotsApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
SearchableSnapshotsApi.prototype.cacheStats = function searchableSnapshotsCacheStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((node_id || nodeId) != null) {
if (method == null) method = 'GET'
path = '/' + '_searchable_snapshots' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'cache' + '/' + 'stats'
} else {
if (method == null) method = 'GET'
path = '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'stats'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
SearchableSnapshotsApi.prototype.clearCache = function searchableSnapshotsClearCacheApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear'
@ -87,29 +61,29 @@ SearchableSnapshotsApi.prototype.mount = function searchableSnapshotsMountApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.snapshot == null) {
if (params['snapshot'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if (params.snapshot != null && (params.repository == null)) {
if (params['snapshot'] != null && (params['repository'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, ...querystring } = params
var { method, body, repository, snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_mount'
@ -128,15 +102,15 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_stats'
@ -154,10 +128,10 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR
SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, index, ...querystring } = params
var { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null) {
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'stats'
@ -178,7 +152,6 @@ SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (p
}
Object.defineProperties(SearchableSnapshotsApi.prototype, {
cache_stats: { get () { return this.cacheStats } },
clear_cache: { get () { return this.clearCache } },
repository_stats: { get () { return this.repositoryStats } }
})

View File

@ -34,10 +34,10 @@ function SecurityApi (transport, ConfigurationError) {
SecurityApi.prototype.authenticate = function securityAuthenticateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + '_authenticate'
@ -56,15 +56,15 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, username, ...querystring } = params
var { method, body, username, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((username) != null) {
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password'
@ -84,46 +84,19 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.ids == null) {
const err = new this[kConfigurationError]('Missing required parameter: ids')
return handleError(err, callback)
}
let { method, body, ids, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivilegesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.application == null) {
if (params['application'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: application')
return handleError(err, callback)
}
let { method, body, application, ...querystring } = params
var { method, body, application, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_clear_cache'
@ -142,15 +115,15 @@ SecurityApi.prototype.clearCachedRealms = function securityClearCachedRealmsApi
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.realms == null) {
if (params['realms'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: realms')
return handleError(err, callback)
}
let { method, body, realms, ...querystring } = params
var { method, body, realms, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache'
@ -169,15 +142,15 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
@ -192,63 +165,19 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.clearCachedServiceTokens = function securityClearCachedServiceTokensApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.namespace == null) {
const err = new this[kConfigurationError]('Missing required parameter: namespace')
return handleError(err, callback)
}
if (params.service == null) {
const err = new this[kConfigurationError]('Missing required parameter: service')
return handleError(err, callback)
}
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
// check required url components
if (params.name != null && (params.service == null || params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
return handleError(err, callback)
} else if (params.service != null && (params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
return handleError(err, callback)
}
let { method, body, namespace, service, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'api_key'
@ -263,74 +192,29 @@ SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, o
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.createServiceToken = function securityCreateServiceTokenApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.namespace == null) {
const err = new this[kConfigurationError]('Missing required parameter: namespace')
return handleError(err, callback)
}
if (params.service == null) {
const err = new this[kConfigurationError]('Missing required parameter: service')
return handleError(err, callback)
}
// check required url components
if (params.name != null && (params.service == null || params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
return handleError(err, callback)
} else if (params.service != null && (params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
return handleError(err, callback)
}
let { method, body, namespace, service, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((namespace) != null && (service) != null && (name) != null) {
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name)
} else {
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token'
}
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.deletePrivileges = function securityDeletePrivilegesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.application == null) {
if (params['application'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: application')
return handleError(err, callback)
}
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
// check required url components
if (params.name != null && (params.application == null)) {
if (params['name'] != null && (params['application'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
return handleError(err, callback)
}
let { method, body, application, name, ...querystring } = params
var { method, body, application, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
@ -349,15 +233,15 @@ SecurityApi.prototype.deleteRole = function securityDeleteRoleApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
@ -376,15 +260,15 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
@ -399,63 +283,19 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.deleteServiceToken = function securityDeleteServiceTokenApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.namespace == null) {
const err = new this[kConfigurationError]('Missing required parameter: namespace')
return handleError(err, callback)
}
if (params.service == null) {
const err = new this[kConfigurationError]('Missing required parameter: service')
return handleError(err, callback)
}
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
// check required url components
if (params.name != null && (params.service == null || params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
return handleError(err, callback)
} else if (params.service != null && (params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
return handleError(err, callback)
}
let { method, body, namespace, service, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.deleteUser = function securityDeleteUserApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.username == null) {
if (params['username'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: username')
return handleError(err, callback)
}
let { method, body, username, ...querystring } = params
var { method, body, username, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
@ -474,15 +314,15 @@ SecurityApi.prototype.disableUser = function securityDisableUserApi (params, opt
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.username == null) {
if (params['username'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: username')
return handleError(err, callback)
}
let { method, body, username, ...querystring } = params
var { method, body, username, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
@ -501,15 +341,15 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.username == null) {
if (params['username'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: username')
return handleError(err, callback)
}
let { method, body, username, ...querystring } = params
var { method, body, username, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable'
@ -527,10 +367,10 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio
SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'api_key'
@ -548,10 +388,10 @@ SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options
SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin'
@ -570,15 +410,15 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params,
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.name != null && (params.application == null)) {
if (params['name'] != null && (params['application'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
return handleError(err, callback)
}
let { method, body, application, name, ...querystring } = params
var { method, body, application, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((application) != null && (name) != null) {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
@ -604,10 +444,10 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params,
SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
@ -630,10 +470,10 @@ SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, ca
SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((name) != null) {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
@ -653,91 +493,19 @@ SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (param
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.getServiceAccounts = function securityGetServiceAccountsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.service != null && (params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
return handleError(err, callback)
}
let { method, body, namespace, service, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((namespace) != null && (service) != null) {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service)
} else if ((namespace) != null) {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace)
} else {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'service'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.getServiceCredentials = function securityGetServiceCredentialsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.namespace == null) {
const err = new this[kConfigurationError]('Missing required parameter: namespace')
return handleError(err, callback)
}
if (params.service == null) {
const err = new this[kConfigurationError]('Missing required parameter: service')
return handleError(err, callback)
}
// check required url components
if (params.service != null && (params.namespace == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
return handleError(err, callback)
}
let { method, body, namespace, service, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
@ -755,10 +523,10 @@ SecurityApi.prototype.getToken = function securityGetTokenApi (params, options,
SecurityApi.prototype.getUser = function securityGetUserApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, username, ...querystring } = params
var { method, body, username, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((username) != null) {
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
@ -781,10 +549,10 @@ SecurityApi.prototype.getUser = function securityGetUserApi (params, options, ca
SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
@ -799,46 +567,19 @@ SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.grantApiKey = function securityGrantApiKeyApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, user, ...querystring } = params
var { method, body, user, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((user) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
@ -862,15 +603,15 @@ SecurityApi.prototype.invalidateApiKey = function securityInvalidateApiKeyApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'api_key'
@ -889,15 +630,15 @@ SecurityApi.prototype.invalidateToken = function securityInvalidateTokenApi (par
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
@ -916,15 +657,15 @@ SecurityApi.prototype.putPrivileges = function securityPutPrivilegesApi (params,
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'privilege'
@ -943,19 +684,19 @@ SecurityApi.prototype.putRole = function securityPutRoleApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
@ -974,19 +715,19 @@ SecurityApi.prototype.putRoleMapping = function securityPutRoleMappingApi (param
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
if (params['name'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
var { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
@ -1005,19 +746,19 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.username == null) {
if (params['username'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: username')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, username, ...querystring } = params
var { method, body, username, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
@ -1032,202 +773,15 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.queryApiKeys = function securityQueryApiKeysApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_security' + '/' + '_query' + '/' + 'api_key'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.samlAuthenticate = function securitySamlAuthenticateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'saml' + '/' + 'authenticate'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.samlCompleteLogout = function securitySamlCompleteLogoutApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'saml' + '/' + 'complete_logout'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.samlInvalidate = function securitySamlInvalidateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'saml' + '/' + 'invalidate'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.samlLogout = function securitySamlLogoutApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'saml' + '/' + 'logout'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.samlPrepareAuthentication = function securitySamlPrepareAuthenticationApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_security' + '/' + 'saml' + '/' + 'prepare'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SecurityApi.prototype.samlServiceProviderMetadata = function securitySamlServiceProviderMetadataApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.realm_name == null && params.realmName == null) {
const err = new this[kConfigurationError]('Missing required parameter: realm_name or realmName')
return handleError(err, callback)
}
let { method, body, realmName, realm_name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_security' + '/' + 'saml' + '/' + 'metadata' + '/' + encodeURIComponent(realm_name || realmName)
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(SecurityApi.prototype, {
change_password: { get () { return this.changePassword } },
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
clear_cached_realms: { get () { return this.clearCachedRealms } },
clear_cached_roles: { get () { return this.clearCachedRoles } },
clear_cached_service_tokens: { get () { return this.clearCachedServiceTokens } },
create_api_key: { get () { return this.createApiKey } },
create_service_token: { get () { return this.createServiceToken } },
delete_privileges: { get () { return this.deletePrivileges } },
delete_role: { get () { return this.deleteRole } },
delete_role_mapping: { get () { return this.deleteRoleMapping } },
delete_service_token: { get () { return this.deleteServiceToken } },
delete_user: { get () { return this.deleteUser } },
disable_user: { get () { return this.disableUser } },
enable_user: { get () { return this.enableUser } },
@ -1236,26 +790,16 @@ Object.defineProperties(SecurityApi.prototype, {
get_privileges: { get () { return this.getPrivileges } },
get_role: { get () { return this.getRole } },
get_role_mapping: { get () { return this.getRoleMapping } },
get_service_accounts: { get () { return this.getServiceAccounts } },
get_service_credentials: { get () { return this.getServiceCredentials } },
get_token: { get () { return this.getToken } },
get_user: { get () { return this.getUser } },
get_user_privileges: { get () { return this.getUserPrivileges } },
grant_api_key: { get () { return this.grantApiKey } },
has_privileges: { get () { return this.hasPrivileges } },
invalidate_api_key: { get () { return this.invalidateApiKey } },
invalidate_token: { get () { return this.invalidateToken } },
put_privileges: { get () { return this.putPrivileges } },
put_role: { get () { return this.putRole } },
put_role_mapping: { get () { return this.putRoleMapping } },
put_user: { get () { return this.putUser } },
query_api_keys: { get () { return this.queryApiKeys } },
saml_authenticate: { get () { return this.samlAuthenticate } },
saml_complete_logout: { get () { return this.samlCompleteLogout } },
saml_invalidate: { get () { return this.samlInvalidate } },
saml_logout: { get () { return this.samlLogout } },
saml_prepare_authentication: { get () { return this.samlPrepareAuthentication } },
saml_service_provider_metadata: { get () { return this.samlServiceProviderMetadata } }
put_user: { get () { return this.putUser } }
})
module.exports = SecurityApi

View File

@ -1,124 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function ShutdownApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
ShutdownApi.prototype.deleteNode = function shutdownDeleteNodeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.node_id == null && params.nodeId == null) {
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
return handleError(err, callback)
}
let { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
ShutdownApi.prototype.getNode = function shutdownGetNodeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((node_id || nodeId) != null) {
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'
} else {
if (method == null) method = 'GET'
path = '/' + '_nodes' + '/' + 'shutdown'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
ShutdownApi.prototype.putNode = function shutdownPutNodeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.node_id == null && params.nodeId == null) {
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
return handleError(err, callback)
}
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, nodeId, node_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'PUT'
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(ShutdownApi.prototype, {
delete_node: { get () { return this.deleteNode } },
get_node: { get () { return this.getNode } },
put_node: { get () { return this.putNode } }
})
module.exports = ShutdownApi

View File

@ -35,15 +35,15 @@ SlmApi.prototype.deleteLifecycle = function slmDeleteLifecycleApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.policy_id == null && params.policyId == null) {
if (params['policy_id'] == null && params['policyId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
return handleError(err, callback)
}
let { method, body, policyId, policy_id, ...querystring } = params
var { method, body, policyId, policy_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
@ -62,15 +62,15 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.policy_id == null && params.policyId == null) {
if (params['policy_id'] == null && params['policyId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
return handleError(err, callback)
}
let { method, body, policyId, policy_id, ...querystring } = params
var { method, body, policyId, policy_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) + '/' + '_execute'
@ -88,10 +88,10 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt
SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_slm' + '/' + '_execute_retention'
@ -109,10 +109,10 @@ SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, opt
SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, policyId, policy_id, ...querystring } = params
var { method, body, policyId, policy_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((policy_id || policyId) != null) {
if (method == null) method = 'GET'
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
@ -135,10 +135,10 @@ SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, ca
SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_slm' + '/' + 'stats'
@ -156,10 +156,10 @@ SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback)
SlmApi.prototype.getStatus = function slmGetStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_slm' + '/' + 'status'
@ -178,15 +178,15 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.policy_id == null && params.policyId == null) {
if (params['policy_id'] == null && params['policyId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
return handleError(err, callback)
}
let { method, body, policyId, policy_id, ...querystring } = params
var { method, body, policyId, policy_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
@ -204,10 +204,10 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
SlmApi.prototype.start = function slmStartApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_slm' + '/' + 'start'
@ -225,10 +225,10 @@ SlmApi.prototype.start = function slmStartApi (params, options, callback) {
SlmApi.prototype.stop = function slmStopApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_slm' + '/' + 'stop'

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'index_details', 'include_repository', 'sort', 'size', 'order', 'from_sort_value', 'after', 'offset', 'slm_policy_filter', 'verbose', 'local', 'blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'detailed', 'rarely_abort_writes']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable', indexDetails: 'index_details', includeRepository: 'include_repository', fromSortValue: 'from_sort_value', slmPolicyFilter: 'slm_policy_filter', blobCount: 'blob_count', readNodeCount: 'read_node_count', earlyReadNodeCount: 'early_read_node_count', rareActionProbability: 'rare_action_probability', maxBlobSize: 'max_blob_size', maxTotalDataSize: 'max_total_data_size', rarelyAbortWrites: 'rarely_abort_writes' }
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'verbose', 'local']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable' }
function SnapshotApi (transport, ConfigurationError) {
this.transport = transport
@ -35,15 +35,15 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup'
@ -58,77 +58,29 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi
return this.transport.request(request, options, callback)
}
SnapshotApi.prototype.clone = function snapshotCloneApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.snapshot == null) {
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
return handleError(err, callback)
}
if (params.target_snapshot == null && params.targetSnapshot == null) {
const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot')
return handleError(err, callback)
}
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
// check required url components
if ((params.target_snapshot != null || params.targetSnapshot != null) && (params.snapshot == null || params.repository == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: snapshot, repository')
return handleError(err, callback)
} else if (params.snapshot != null && (params.repository == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'PUT'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SnapshotApi.prototype.create = function snapshotCreateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.snapshot == null) {
if (params['snapshot'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
return handleError(err, callback)
}
// check required url components
if (params.snapshot != null && (params.repository == null)) {
if (params['snapshot'] != null && (params['repository'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, ...querystring } = params
var { method, body, repository, snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
@ -147,19 +99,19 @@ SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
@ -178,25 +130,25 @@ SnapshotApi.prototype.delete = function snapshotDeleteApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.snapshot == null) {
if (params['snapshot'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
return handleError(err, callback)
}
// check required url components
if (params.snapshot != null && (params.repository == null)) {
if (params['snapshot'] != null && (params['repository'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, ...querystring } = params
var { method, body, repository, snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
@ -215,15 +167,15 @@ SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
@ -242,25 +194,25 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.snapshot == null) {
if (params['snapshot'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
return handleError(err, callback)
}
// check required url components
if (params.snapshot != null && (params.repository == null)) {
if (params['snapshot'] != null && (params['repository'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, ...querystring } = params
var { method, body, repository, snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
@ -278,10 +230,10 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((repository) != null) {
if (method == null) method = 'GET'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
@ -301,56 +253,29 @@ SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params,
return this.transport.request(request, options, callback)
}
SnapshotApi.prototype.repositoryAnalyze = function snapshotRepositoryAnalyzeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
let { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_analyze'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SnapshotApi.prototype.restore = function snapshotRestoreApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
if (params.snapshot == null) {
if (params['snapshot'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
return handleError(err, callback)
}
// check required url components
if (params.snapshot != null && (params.repository == null)) {
if (params['snapshot'] != null && (params['repository'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, ...querystring } = params
var { method, body, repository, snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore'
@ -369,15 +294,15 @@ SnapshotApi.prototype.status = function snapshotStatusApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required url components
if (params.snapshot != null && (params.repository == null)) {
if (params['snapshot'] != null && (params['repository'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
return handleError(err, callback)
}
let { method, body, repository, snapshot, ...querystring } = params
var { method, body, repository, snapshot, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((repository) != null && (snapshot) != null) {
if (method == null) method = 'GET'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status'
@ -404,15 +329,15 @@ SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.repository == null) {
if (params['repository'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: repository')
return handleError(err, callback)
}
let { method, body, repository, ...querystring } = params
var { method, body, repository, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'
@ -432,7 +357,6 @@ Object.defineProperties(SnapshotApi.prototype, {
create_repository: { get () { return this.createRepository } },
delete_repository: { get () { return this.deleteRepository } },
get_repository: { get () { return this.getRepository } },
repository_analyze: { get () { return this.repositoryAnalyze } },
verify_repository: { get () { return this.verifyRepository } }
})

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'delimiter', 'format', 'keep_alive', 'wait_for_completion_timeout']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', keepAlive: 'keep_alive', waitForCompletionTimeout: 'wait_for_completion_timeout' }
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'format']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function SqlApi (transport, ConfigurationError) {
this.transport = transport
@ -35,15 +35,15 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_sql' + '/' + 'close'
@ -58,100 +58,19 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
return this.transport.request(request, options, callback)
}
SqlApi.prototype.deleteAsync = function sqlDeleteAsyncApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_sql' + '/' + 'async' + '/' + 'delete' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
SqlApi.prototype.getAsync = function sqlGetAsyncApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_sql' + '/' + 'async' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
SqlApi.prototype.getAsyncStatus = function sqlGetAsyncStatusApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_sql' + '/' + 'async' + '/' + 'status' + '/' + encodeURIComponent(id)
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
SqlApi.prototype.query = function sqlQueryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_sql'
@ -170,15 +89,15 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_sql' + '/' + 'translate'
@ -194,10 +113,7 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
}
Object.defineProperties(SqlApi.prototype, {
clear_cursor: { get () { return this.clearCursor } },
delete_async: { get () { return this.deleteAsync } },
get_async: { get () { return this.getAsync } },
get_async_status: { get () { return this.getAsyncStatus } }
clear_cursor: { get () { return this.clearCursor } }
})
module.exports = SqlApi

View File

@ -34,10 +34,10 @@ function SslApi (transport, ConfigurationError) {
SslApi.prototype.certificates = function sslCertificatesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_ssl' + '/' + 'certificates'

View File

@ -34,10 +34,10 @@ function TasksApi (transport, ConfigurationError) {
TasksApi.prototype.cancel = function tasksCancelApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, taskId, task_id, ...querystring } = params
var { method, body, taskId, task_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((task_id || taskId) != null) {
if (method == null) method = 'POST'
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel'
@ -61,15 +61,15 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.task_id == null && params.taskId == null) {
if (params['task_id'] == null && params['taskId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
return handleError(err, callback)
}
let { method, body, taskId, task_id, ...querystring } = params
var { method, body, taskId, task_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId)
@ -87,10 +87,10 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) {
TasksApi.prototype.list = function tasksListApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_tasks'

View File

@ -1,56 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
function termsEnumApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_terms_enum'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
module.exports = termsEnumApi

View File

@ -30,15 +30,15 @@ function termvectorsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, id, type, ...querystring } = params
var { method, body, index, id, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'

View File

@ -1,65 +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.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['lines_to_sample', 'line_merge_size_limit', 'timeout', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { linesToSample: 'lines_to_sample', lineMergeSizeLimit: 'line_merge_size_limit', hasHeaderRow: 'has_header_row', columnNames: 'column_names', shouldTrimFields: 'should_trim_fields', grokPattern: 'grok_pattern', timestampField: 'timestamp_field', timestampFormat: 'timestamp_format', errorTrace: 'error_trace', filterPath: 'filter_path' }
function TextStructureApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
TextStructureApi.prototype.findStructure = function textStructureFindStructureApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_text_structure' + '/' + 'find_structure'
// build request object
const request = {
method,
path,
bulkBody: body,
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(TextStructureApi.prototype, {
find_structure: { get () { return this.findStructure } }
})
module.exports = TextStructureApi

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'wait_for_completion', 'wait_for_checkpoint', 'dry_run']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', excludeGenerated: 'exclude_generated', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint', dryRun: 'dry_run' }
const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint' }
function TransformApi (transport, ConfigurationError) {
this.transport = transport
@ -35,15 +35,15 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.transform_id == null && params.transformId == null) {
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
@ -61,10 +61,10 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
TransformApi.prototype.getTransform = function transformGetTransformApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((transform_id || transformId) != null) {
if (method == null) method = 'GET'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
@ -88,15 +88,15 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.transform_id == null && params.transformId == null) {
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
@ -114,17 +114,18 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
TransformApi.prototype.previewTransform = function transformPreviewTransformApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, transformId, transform_id, ...querystring } = params
// check required parameters
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((transform_id || transformId) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_preview'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_transform' + '/' + '_preview'
}
var path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + '_preview'
// build request object
const request = {
@ -141,19 +142,19 @@ TransformApi.prototype.putTransform = function transformPutTransformApi (params,
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.transform_id == null && params.transformId == null) {
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
@ -172,15 +173,15 @@ TransformApi.prototype.startTransform = function transformStartTransformApi (par
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.transform_id == null && params.transformId == null) {
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
@ -199,15 +200,15 @@ TransformApi.prototype.stopTransform = function transformStopTransformApi (param
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.transform_id == null && params.transformId == null) {
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
@ -226,19 +227,19 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.transform_id == null && params.transformId == null) {
if (params['transform_id'] == null && params['transformId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, transformId, transform_id, ...querystring } = params
var { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
@ -253,27 +254,6 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
return this.transport.request(request, options, callback)
}
TransformApi.prototype.upgradeTransforms = function transformUpgradeTransformsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + '_upgrade'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(TransformApi.prototype, {
delete_transform: { get () { return this.deleteTransform } },
get_transform: { get () { return this.getTransform } },
@ -282,8 +262,7 @@ Object.defineProperties(TransformApi.prototype, {
put_transform: { get () { return this.putTransform } },
start_transform: { get () { return this.startTransform } },
stop_transform: { get () { return this.stopTransform } },
update_transform: { get () { return this.updateTransform } },
upgrade_transforms: { get () { return this.upgradeTransforms } }
update_transform: { get () { return this.updateTransform } }
})
module.exports = TransformApi

View File

@ -23,30 +23,30 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', errorTrace: 'error_trace', filterPath: 'filter_path' }
function updateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body == null) {
if (params['body'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, id, index, type, ...querystring } = params
var { method, body, id, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null && (id) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update'

View File

@ -23,28 +23,28 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
function updateByQueryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
if (params['index'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
// check required url components
if (params.type != null && (params.index == null)) {
if (params['type'] != null && (params['index'] == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, type, ...querystring } = params
var { method, body, index, type, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((index) != null && (type) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'

View File

@ -30,19 +30,19 @@ function updateByQueryRethrottleApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.task_id == null && params.taskId == null) {
if (params['task_id'] == null && params['taskId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
return handleError(err, callback)
}
if (params.requests_per_second == null && params.requestsPerSecond == null) {
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
return handleError(err, callback)
}
let { method, body, taskId, task_id, ...querystring } = params
var { method, body, taskId, task_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'

View File

@ -35,21 +35,21 @@ WatcherApi.prototype.ackWatch = function watcherAckWatchApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.watch_id == null && params.watchId == null) {
if (params['watch_id'] == null && params['watchId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
return handleError(err, callback)
}
// check required url components
if ((params.action_id != null || params.actionId != null) && ((params.watch_id == null && params.watchId == null))) {
if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) {
const err = new this[kConfigurationError]('Missing required parameter of the url: watch_id')
return handleError(err, callback)
}
let { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params
var { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((watch_id || watchId) != null && (action_id || actionId) != null) {
if (method == null) method = 'PUT'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack' + '/' + encodeURIComponent(action_id || actionId)
@ -73,15 +73,15 @@ WatcherApi.prototype.activateWatch = function watcherActivateWatchApi (params, o
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.watch_id == null && params.watchId == null) {
if (params['watch_id'] == null && params['watchId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
return handleError(err, callback)
}
let { method, body, watchId, watch_id, ...querystring } = params
var { method, body, watchId, watch_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_activate'
@ -100,15 +100,15 @@ WatcherApi.prototype.deactivateWatch = function watcherDeactivateWatchApi (param
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.watch_id == null && params.watchId == null) {
if (params['watch_id'] == null && params['watchId'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
return handleError(err, callback)
}
let { method, body, watchId, watch_id, ...querystring } = params
var { method, body, watchId, watch_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_deactivate'
@ -127,15 +127,15 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'DELETE'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
@ -153,10 +153,10 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
WatcherApi.prototype.executeWatch = function watcherExecuteWatchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((id) != null) {
if (method == null) method = 'PUT'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) + '/' + '_execute'
@ -180,15 +180,15 @@ WatcherApi.prototype.getWatch = function watcherGetWatchApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
@ -207,15 +207,15 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.id == null) {
if (params['id'] == null) {
const err = new this[kConfigurationError]('Missing required parameter: id')
return handleError(err, callback)
}
let { method, body, id, ...querystring } = params
var { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'PUT'
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
@ -230,34 +230,13 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
return this.transport.request(request, options, callback)
}
WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_watcher' + '/' + '_query' + '/' + 'watches'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
WatcherApi.prototype.start = function watcherStartApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_watcher' + '/' + '_start'
@ -275,10 +254,10 @@ WatcherApi.prototype.start = function watcherStartApi (params, options, callback
WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, metric, ...querystring } = params
var { method, body, metric, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if ((metric) != null) {
if (method == null) method = 'GET'
path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric)
@ -301,10 +280,10 @@ WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback
WatcherApi.prototype.stop = function watcherStopApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'POST'
path = '/' + '_watcher' + '/' + '_stop'
@ -326,8 +305,7 @@ Object.defineProperties(WatcherApi.prototype, {
delete_watch: { get () { return this.deleteWatch } },
execute_watch: { get () { return this.executeWatch } },
get_watch: { get () { return this.getWatch } },
put_watch: { get () { return this.putWatch } },
query_watches: { get () { return this.queryWatches } }
put_watch: { get () { return this.putWatch } }
})
module.exports = WatcherApi

View File

@ -34,10 +34,10 @@ function XpackApi (transport, ConfigurationError) {
XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_xpack'
@ -55,10 +55,10 @@ XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
XpackApi.prototype.usage = function xpackUsageApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
var { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
var path = ''
if (method == null) method = 'GET'
path = '/' + '_xpack' + '/' + 'usage'

View File

@ -1,31 +1,12 @@
/*
* 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.
*/
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information
'use strict'
const AsyncSearchApi = require('./api/async_search')
const AutoscalingApi = require('./api/autoscaling')
const bulkApi = require('./api/bulk')
const CatApi = require('./api/cat')
const CcrApi = require('./api/ccr')
const clearScrollApi = require('./api/clear_scroll')
const closePointInTimeApi = require('./api/close_point_in_time')
const ClusterApi = require('./api/cluster')
const countApi = require('./api/count')
const createApi = require('./api/create')
@ -34,134 +15,119 @@ const deleteApi = require('./api/delete')
const deleteByQueryApi = require('./api/delete_by_query')
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
const deleteScriptApi = require('./api/delete_script')
const EnrichApi = require('./api/enrich')
const EqlApi = require('./api/eql')
const existsApi = require('./api/exists')
const existsSourceApi = require('./api/exists_source')
const explainApi = require('./api/explain')
const FeaturesApi = require('./api/features')
const fieldCapsApi = require('./api/field_caps')
const FleetApi = require('./api/fleet')
const getApi = require('./api/get')
const getScriptApi = require('./api/get_script')
const getScriptContextApi = require('./api/get_script_context')
const getScriptLanguagesApi = require('./api/get_script_languages')
const getSourceApi = require('./api/get_source')
const GraphApi = require('./api/graph')
const IlmApi = require('./api/ilm')
const indexApi = require('./api/index')
const IndicesApi = require('./api/indices')
const infoApi = require('./api/info')
const IngestApi = require('./api/ingest')
const LicenseApi = require('./api/license')
const LogstashApi = require('./api/logstash')
const mgetApi = require('./api/mget')
const MigrationApi = require('./api/migration')
const MlApi = require('./api/ml')
const MonitoringApi = require('./api/monitoring')
const msearchApi = require('./api/msearch')
const msearchTemplateApi = require('./api/msearch_template')
const mtermvectorsApi = require('./api/mtermvectors')
const NodesApi = require('./api/nodes')
const openPointInTimeApi = require('./api/open_point_in_time')
const pingApi = require('./api/ping')
const putScriptApi = require('./api/put_script')
const rankEvalApi = require('./api/rank_eval')
const reindexApi = require('./api/reindex')
const reindexRethrottleApi = require('./api/reindex_rethrottle')
const renderSearchTemplateApi = require('./api/render_search_template')
const RollupApi = require('./api/rollup')
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
const scrollApi = require('./api/scroll')
const searchApi = require('./api/search')
const searchMvtApi = require('./api/search_mvt')
const searchShardsApi = require('./api/search_shards')
const searchTemplateApi = require('./api/search_template')
const SearchableSnapshotsApi = require('./api/searchable_snapshots')
const SecurityApi = require('./api/security')
const ShutdownApi = require('./api/shutdown')
const SlmApi = require('./api/slm')
const SnapshotApi = require('./api/snapshot')
const SqlApi = require('./api/sql')
const SslApi = require('./api/ssl')
const TasksApi = require('./api/tasks')
const termsEnumApi = require('./api/terms_enum')
const termvectorsApi = require('./api/termvectors')
const TextStructureApi = require('./api/text_structure')
const TransformApi = require('./api/transform')
const updateApi = require('./api/update')
const updateByQueryApi = require('./api/update_by_query')
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle')
const AsyncSearchApi = require('./api/async_search')
const AutoscalingApi = require('./api/autoscaling')
const CcrApi = require('./api/ccr')
const EnrichApi = require('./api/enrich')
const EqlApi = require('./api/eql')
const GraphApi = require('./api/graph')
const IlmApi = require('./api/ilm')
const LicenseApi = require('./api/license')
const MigrationApi = require('./api/migration')
const MlApi = require('./api/ml')
const MonitoringApi = require('./api/monitoring')
const RollupApi = require('./api/rollup')
const SearchableSnapshotsApi = require('./api/searchable_snapshots')
const SecurityApi = require('./api/security')
const SlmApi = require('./api/slm')
const SqlApi = require('./api/sql')
const SslApi = require('./api/ssl')
const TransformApi = require('./api/transform')
const WatcherApi = require('./api/watcher')
const XpackApi = require('./api/xpack')
const { kConfigurationError } = require('./utils')
const kAsyncSearch = Symbol('AsyncSearch')
const kAutoscaling = Symbol('Autoscaling')
const kCat = Symbol('Cat')
const kCcr = Symbol('Ccr')
const kCluster = Symbol('Cluster')
const kDanglingIndices = Symbol('DanglingIndices')
const kEnrich = Symbol('Enrich')
const kEql = Symbol('Eql')
const kFeatures = Symbol('Features')
const kFleet = Symbol('Fleet')
const kGraph = Symbol('Graph')
const kIlm = Symbol('Ilm')
const kIndices = Symbol('Indices')
const kIngest = Symbol('Ingest')
const kNodes = Symbol('Nodes')
const kSnapshot = Symbol('Snapshot')
const kTasks = Symbol('Tasks')
const kAsyncSearch = Symbol('AsyncSearch')
const kAutoscaling = Symbol('Autoscaling')
const kCcr = Symbol('Ccr')
const kEnrich = Symbol('Enrich')
const kEql = Symbol('Eql')
const kGraph = Symbol('Graph')
const kIlm = Symbol('Ilm')
const kLicense = Symbol('License')
const kLogstash = Symbol('Logstash')
const kMigration = Symbol('Migration')
const kMl = Symbol('Ml')
const kMonitoring = Symbol('Monitoring')
const kNodes = Symbol('Nodes')
const kRollup = Symbol('Rollup')
const kSearchableSnapshots = Symbol('SearchableSnapshots')
const kSecurity = Symbol('Security')
const kShutdown = Symbol('Shutdown')
const kSlm = Symbol('Slm')
const kSnapshot = Symbol('Snapshot')
const kSql = Symbol('Sql')
const kSsl = Symbol('Ssl')
const kTasks = Symbol('Tasks')
const kTextStructure = Symbol('TextStructure')
const kTransform = Symbol('Transform')
const kWatcher = Symbol('Watcher')
const kXpack = Symbol('Xpack')
function ESAPI (opts) {
this[kConfigurationError] = opts.ConfigurationError
this[kAsyncSearch] = null
this[kAutoscaling] = null
this[kCat] = null
this[kCcr] = null
this[kCluster] = null
this[kDanglingIndices] = null
this[kEnrich] = null
this[kEql] = null
this[kFeatures] = null
this[kFleet] = null
this[kGraph] = null
this[kIlm] = null
this[kIndices] = null
this[kIngest] = null
this[kNodes] = null
this[kSnapshot] = null
this[kTasks] = null
this[kAsyncSearch] = null
this[kAutoscaling] = null
this[kCcr] = null
this[kEnrich] = null
this[kEql] = null
this[kGraph] = null
this[kIlm] = null
this[kLicense] = null
this[kLogstash] = null
this[kMigration] = null
this[kMl] = null
this[kMonitoring] = null
this[kNodes] = null
this[kRollup] = null
this[kSearchableSnapshots] = null
this[kSecurity] = null
this[kShutdown] = null
this[kSlm] = null
this[kSnapshot] = null
this[kSql] = null
this[kSsl] = null
this[kTasks] = null
this[kTextStructure] = null
this[kTransform] = null
this[kWatcher] = null
this[kXpack] = null
@ -169,7 +135,6 @@ function ESAPI (opts) {
ESAPI.prototype.bulk = bulkApi
ESAPI.prototype.clearScroll = clearScrollApi
ESAPI.prototype.closePointInTime = closePointInTimeApi
ESAPI.prototype.count = countApi
ESAPI.prototype.create = createApi
ESAPI.prototype.delete = deleteApi
@ -191,7 +156,6 @@ ESAPI.prototype.mget = mgetApi
ESAPI.prototype.msearch = msearchApi
ESAPI.prototype.msearchTemplate = msearchTemplateApi
ESAPI.prototype.mtermvectors = mtermvectorsApi
ESAPI.prototype.openPointInTime = openPointInTimeApi
ESAPI.prototype.ping = pingApi
ESAPI.prototype.putScript = putScriptApi
ESAPI.prototype.rankEval = rankEvalApi
@ -201,33 +165,14 @@ ESAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
ESAPI.prototype.scroll = scrollApi
ESAPI.prototype.search = searchApi
ESAPI.prototype.searchMvt = searchMvtApi
ESAPI.prototype.searchShards = searchShardsApi
ESAPI.prototype.searchTemplate = searchTemplateApi
ESAPI.prototype.termsEnum = termsEnumApi
ESAPI.prototype.termvectors = termvectorsApi
ESAPI.prototype.update = updateApi
ESAPI.prototype.updateByQuery = updateByQueryApi
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
Object.defineProperties(ESAPI.prototype, {
asyncSearch: {
get () {
if (this[kAsyncSearch] === null) {
this[kAsyncSearch] = new AsyncSearchApi(this.transport, this[kConfigurationError])
}
return this[kAsyncSearch]
}
},
async_search: { get () { return this.asyncSearch } },
autoscaling: {
get () {
if (this[kAutoscaling] === null) {
this[kAutoscaling] = new AutoscalingApi(this.transport, this[kConfigurationError])
}
return this[kAutoscaling]
}
},
cat: {
get () {
if (this[kCat] === null) {
@ -236,16 +181,7 @@ Object.defineProperties(ESAPI.prototype, {
return this[kCat]
}
},
ccr: {
get () {
if (this[kCcr] === null) {
this[kCcr] = new CcrApi(this.transport, this[kConfigurationError])
}
return this[kCcr]
}
},
clear_scroll: { get () { return this.clearScroll } },
close_point_in_time: { get () { return this.closePointInTime } },
cluster: {
get () {
if (this[kCluster] === null) {
@ -266,60 +202,12 @@ Object.defineProperties(ESAPI.prototype, {
delete_by_query: { get () { return this.deleteByQuery } },
delete_by_query_rethrottle: { get () { return this.deleteByQueryRethrottle } },
delete_script: { get () { return this.deleteScript } },
enrich: {
get () {
if (this[kEnrich] === null) {
this[kEnrich] = new EnrichApi(this.transport, this[kConfigurationError])
}
return this[kEnrich]
}
},
eql: {
get () {
if (this[kEql] === null) {
this[kEql] = new EqlApi(this.transport, this[kConfigurationError])
}
return this[kEql]
}
},
exists_source: { get () { return this.existsSource } },
features: {
get () {
if (this[kFeatures] === null) {
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
}
return this[kFeatures]
}
},
field_caps: { get () { return this.fieldCaps } },
fleet: {
get () {
if (this[kFleet] === null) {
this[kFleet] = new FleetApi(this.transport, this[kConfigurationError])
}
return this[kFleet]
}
},
get_script: { get () { return this.getScript } },
get_script_context: { get () { return this.getScriptContext } },
get_script_languages: { get () { return this.getScriptLanguages } },
get_source: { get () { return this.getSource } },
graph: {
get () {
if (this[kGraph] === null) {
this[kGraph] = new GraphApi(this.transport, this[kConfigurationError])
}
return this[kGraph]
}
},
ilm: {
get () {
if (this[kIlm] === null) {
this[kIlm] = new IlmApi(this.transport, this[kConfigurationError])
}
return this[kIlm]
}
},
indices: {
get () {
if (this[kIndices] === null) {
@ -336,6 +224,97 @@ Object.defineProperties(ESAPI.prototype, {
return this[kIngest]
}
},
msearch_template: { get () { return this.msearchTemplate } },
nodes: {
get () {
if (this[kNodes] === null) {
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
}
return this[kNodes]
}
},
put_script: { get () { return this.putScript } },
rank_eval: { get () { return this.rankEval } },
reindex_rethrottle: { get () { return this.reindexRethrottle } },
render_search_template: { get () { return this.renderSearchTemplate } },
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } },
search_shards: { get () { return this.searchShards } },
search_template: { get () { return this.searchTemplate } },
snapshot: {
get () {
if (this[kSnapshot] === null) {
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
}
return this[kSnapshot]
}
},
tasks: {
get () {
if (this[kTasks] === null) {
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
}
return this[kTasks]
}
},
update_by_query: { get () { return this.updateByQuery } },
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } },
asyncSearch: {
get () {
if (this[kAsyncSearch] === null) {
this[kAsyncSearch] = new AsyncSearchApi(this.transport, this[kConfigurationError])
}
return this[kAsyncSearch]
}
},
async_search: { get () { return this.asyncSearch } },
autoscaling: {
get () {
if (this[kAutoscaling] === null) {
this[kAutoscaling] = new AutoscalingApi(this.transport, this[kConfigurationError])
}
return this[kAutoscaling]
}
},
ccr: {
get () {
if (this[kCcr] === null) {
this[kCcr] = new CcrApi(this.transport, this[kConfigurationError])
}
return this[kCcr]
}
},
enrich: {
get () {
if (this[kEnrich] === null) {
this[kEnrich] = new EnrichApi(this.transport, this[kConfigurationError])
}
return this[kEnrich]
}
},
eql: {
get () {
if (this[kEql] === null) {
this[kEql] = new EqlApi(this.transport, this[kConfigurationError])
}
return this[kEql]
}
},
graph: {
get () {
if (this[kGraph] === null) {
this[kGraph] = new GraphApi(this.transport, this[kConfigurationError])
}
return this[kGraph]
}
},
ilm: {
get () {
if (this[kIlm] === null) {
this[kIlm] = new IlmApi(this.transport, this[kConfigurationError])
}
return this[kIlm]
}
},
license: {
get () {
if (this[kLicense] === null) {
@ -344,14 +323,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kLicense]
}
},
logstash: {
get () {
if (this[kLogstash] === null) {
this[kLogstash] = new LogstashApi(this.transport, this[kConfigurationError])
}
return this[kLogstash]
}
},
migration: {
get () {
if (this[kMigration] === null) {
@ -376,20 +347,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kMonitoring]
}
},
msearch_template: { get () { return this.msearchTemplate } },
nodes: {
get () {
if (this[kNodes] === null) {
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
}
return this[kNodes]
}
},
open_point_in_time: { get () { return this.openPointInTime } },
put_script: { get () { return this.putScript } },
rank_eval: { get () { return this.rankEval } },
reindex_rethrottle: { get () { return this.reindexRethrottle } },
render_search_template: { get () { return this.renderSearchTemplate } },
rollup: {
get () {
if (this[kRollup] === null) {
@ -398,10 +355,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kRollup]
}
},
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } },
search_mvt: { get () { return this.searchMvt } },
search_shards: { get () { return this.searchShards } },
search_template: { get () { return this.searchTemplate } },
searchableSnapshots: {
get () {
if (this[kSearchableSnapshots] === null) {
@ -419,14 +372,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kSecurity]
}
},
shutdown: {
get () {
if (this[kShutdown] === null) {
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
}
return this[kShutdown]
}
},
slm: {
get () {
if (this[kSlm] === null) {
@ -435,14 +380,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kSlm]
}
},
snapshot: {
get () {
if (this[kSnapshot] === null) {
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
}
return this[kSnapshot]
}
},
sql: {
get () {
if (this[kSql] === null) {
@ -459,24 +396,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kSsl]
}
},
tasks: {
get () {
if (this[kTasks] === null) {
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
}
return this[kTasks]
}
},
terms_enum: { get () { return this.termsEnum } },
textStructure: {
get () {
if (this[kTextStructure] === null) {
this[kTextStructure] = new TextStructureApi(this.transport, this[kConfigurationError])
}
return this[kTextStructure]
}
},
text_structure: { get () { return this.textStructure } },
transform: {
get () {
if (this[kTransform] === null) {
@ -485,8 +404,6 @@ Object.defineProperties(ESAPI.prototype, {
return this[kTransform]
}
},
update_by_query: { get () { return this.updateByQuery } },
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } },
watcher: {
get () {
if (this[kWatcher] === null) {

791
api/kibana.d.ts vendored
View File

@ -1,21 +1,6 @@
/*
* 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.
*/
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information
/// <reference types="node" />
@ -32,18 +17,14 @@ import {
import Helpers from '../lib/Helpers'
import {
ApiResponse,
TransportRequestPromise,
RequestBody,
RequestNDBody,
TransportRequestParams,
TransportRequestOptions
TransportRequestOptions,
TransportRequestPromise,
Context
} from '../lib/Transport'
import * as T from './types'
/**
* We are still working on this type, it will arrive soon.
* If it's critical for you, please open an issue.
* https://github.com/elastic/elasticsearch-js
*/
type TODO = Record<string, any>
import * as RequestParams from './requestParams'
// Extend API
interface ClientExtendsCallbackOptions {
@ -78,477 +59,401 @@ interface KibanaClient {
once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this;
once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this;
off(event: string | symbol, listener: (...args: any[]) => void): this;
/* GENERATED */
asyncSearch: {
delete<TContext = unknown>(params: T.AsyncSearchDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchDeleteResponse, TContext>>
get<TDocument = unknown, TContext = unknown>(params: T.AsyncSearchGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchGetResponse<TDocument>, TContext>>
status<TDocument = unknown, TContext = unknown>(params: T.AsyncSearchStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchStatusResponse<TDocument>, TContext>>
submit<TDocument = unknown, TContext = unknown>(params?: T.AsyncSearchSubmitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchSubmitResponse<TDocument>, TContext>>
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
submit<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchSubmit<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
autoscaling: {
deleteAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingDeleteAutoscalingPolicyResponse, TContext>>
getAutoscalingCapacity<TContext = unknown>(params?: T.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingGetAutoscalingCapacityResponse, TContext>>
getAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingGetAutoscalingPolicyResponse, TContext>>
putAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingPutAutoscalingPolicyResponse, TContext>>
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putAutoscalingPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingPutAutoscalingPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
bulk<TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.BulkResponse, TContext>>
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Bulk<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
cat: {
aliases<TContext = unknown>(params?: T.CatAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatAliasesResponse, TContext>>
allocation<TContext = unknown>(params?: T.CatAllocationRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatAllocationResponse, TContext>>
count<TContext = unknown>(params?: T.CatCountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatCountResponse, TContext>>
fielddata<TContext = unknown>(params?: T.CatFielddataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatFielddataResponse, TContext>>
health<TContext = unknown>(params?: T.CatHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatHealthResponse, TContext>>
help<TContext = unknown>(params?: T.CatHelpRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatHelpResponse, TContext>>
indices<TContext = unknown>(params?: T.CatIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatIndicesResponse, TContext>>
master<TContext = unknown>(params?: T.CatMasterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMasterResponse, TContext>>
mlDataFrameAnalytics<TContext = unknown>(params?: T.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlDataFrameAnalyticsResponse, TContext>>
mlDatafeeds<TContext = unknown>(params?: T.CatMlDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlDatafeedsResponse, TContext>>
mlJobs<TContext = unknown>(params?: T.CatMlJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlJobsResponse, TContext>>
mlTrainedModels<TContext = unknown>(params?: T.CatMlTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlTrainedModelsResponse, TContext>>
nodeattrs<TContext = unknown>(params?: T.CatNodeattrsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodeattrsResponse, TContext>>
nodes<TContext = unknown>(params?: T.CatNodesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodesResponse, TContext>>
pendingTasks<TContext = unknown>(params?: T.CatPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPendingTasksResponse, TContext>>
plugins<TContext = unknown>(params?: T.CatPluginsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPluginsResponse, TContext>>
recovery<TContext = unknown>(params?: T.CatRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRecoveryResponse, TContext>>
repositories<TContext = unknown>(params?: T.CatRepositoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRepositoriesResponse, TContext>>
segments<TContext = unknown>(params?: T.CatSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSegmentsResponse, TContext>>
shards<TContext = unknown>(params?: T.CatShardsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatShardsResponse, TContext>>
snapshots<TContext = unknown>(params?: T.CatSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSnapshotsResponse, TContext>>
tasks<TContext = unknown>(params?: T.CatTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTasksResponse, TContext>>
templates<TContext = unknown>(params?: T.CatTemplatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTemplatesResponse, TContext>>
threadPool<TContext = unknown>(params?: T.CatThreadPoolRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatThreadPoolResponse, TContext>>
transforms<TContext = unknown>(params?: T.CatTransformsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTransformsResponse, TContext>>
aliases<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatAliases, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
allocation<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatAllocation, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
count<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatCount, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
fielddata<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatFielddata, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
health<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatHealth, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
help<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatHelp, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
indices<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatIndices, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
master<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMaster, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
mlDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
mlDatafeeds<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlDatafeeds, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
mlJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
mlTrainedModels<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlTrainedModels, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
nodeattrs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatNodeattrs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
nodes<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatNodes, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
pendingTasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatPendingTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
plugins<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatPlugins, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
recovery<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatRecovery, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
repositories<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatRepositories, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
segments<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatSegments, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
shards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
snapshots<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatSnapshots, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
tasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
templates<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTemplates, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
threadPool<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatThreadPool, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
transforms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTransforms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
ccr: {
deleteAutoFollowPattern<TContext = unknown>(params: T.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrDeleteAutoFollowPatternResponse, TContext>>
follow<TContext = unknown>(params: T.CcrFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowResponse, TContext>>
followInfo<TContext = unknown>(params: T.CcrFollowInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowInfoResponse, TContext>>
followStats<TContext = unknown>(params: T.CcrFollowStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowStatsResponse, TContext>>
forgetFollower<TContext = unknown>(params: T.CcrForgetFollowerRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrForgetFollowerResponse, TContext>>
getAutoFollowPattern<TContext = unknown>(params?: T.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrGetAutoFollowPatternResponse, TContext>>
pauseAutoFollowPattern<TContext = unknown>(params: T.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseAutoFollowPatternResponse, TContext>>
pauseFollow<TContext = unknown>(params: T.CcrPauseFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseFollowResponse, TContext>>
putAutoFollowPattern<TContext = unknown>(params: T.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPutAutoFollowPatternResponse, TContext>>
resumeAutoFollowPattern<TContext = unknown>(params: T.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeAutoFollowPatternResponse, TContext>>
resumeFollow<TContext = unknown>(params: T.CcrResumeFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeFollowResponse, TContext>>
stats<TContext = unknown>(params?: T.CcrStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrStatsResponse, TContext>>
unfollow<TContext = unknown>(params: T.CcrUnfollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrUnfollowResponse, TContext>>
deleteAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrDeleteAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
follow<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollow<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
followInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollowInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
followStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollowStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
forgetFollower<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrForgetFollower<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrGetAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
pauseAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPauseAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
pauseFollow<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPauseFollow, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putAutoFollowPattern<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPutAutoFollowPattern<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
resumeAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrResumeAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
resumeFollow<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrResumeFollow<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
unfollow<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrUnfollow, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
clearScroll<TContext = unknown>(params?: T.ClearScrollRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClearScrollResponse, TContext>>
closePointInTime<TContext = unknown>(params?: T.ClosePointInTimeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClosePointInTimeResponse, TContext>>
clearScroll<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClearScroll<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
cluster: {
allocationExplain<TContext = unknown>(params?: T.ClusterAllocationExplainRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterAllocationExplainResponse, TContext>>
deleteComponentTemplate<TContext = unknown>(params: T.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterDeleteComponentTemplateResponse, TContext>>
deleteVotingConfigExclusions<TContext = unknown>(params?: T.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterDeleteVotingConfigExclusionsResponse, TContext>>
existsComponentTemplate<TContext = unknown>(params: T.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterExistsComponentTemplateResponse, TContext>>
getComponentTemplate<TContext = unknown>(params?: T.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetComponentTemplateResponse, TContext>>
getSettings<TContext = unknown>(params?: T.ClusterGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetSettingsResponse, TContext>>
health<TContext = unknown>(params?: T.ClusterHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterHealthResponse, TContext>>
pendingTasks<TContext = unknown>(params?: T.ClusterPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPendingTasksResponse, TContext>>
postVotingConfigExclusions<TContext = unknown>(params?: T.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPostVotingConfigExclusionsResponse, TContext>>
putComponentTemplate<TContext = unknown>(params: T.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutComponentTemplateResponse, TContext>>
putSettings<TContext = unknown>(params?: T.ClusterPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutSettingsResponse, TContext>>
remoteInfo<TContext = unknown>(params?: T.ClusterRemoteInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRemoteInfoResponse, TContext>>
reroute<TContext = unknown>(params?: T.ClusterRerouteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRerouteResponse, TContext>>
state<TContext = unknown>(params?: T.ClusterStateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStateResponse, TContext>>
stats<TContext = unknown>(params?: T.ClusterStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStatsResponse, TContext>>
allocationExplain<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterAllocationExplain<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteComponentTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterDeleteComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteVotingConfigExclusions<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterDeleteVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
existsComponentTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getComponentTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterGetComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
health<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterHealth, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
pendingTasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPendingTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
postVotingConfigExclusions<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPostVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putComponentTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPutComponentTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPutSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
remoteInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterRemoteInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reroute<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterReroute<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
state<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterState, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
count<TContext = unknown>(params?: T.CountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CountResponse, TContext>>
create<TDocument = unknown, TContext = unknown>(params: T.CreateRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CreateResponse, TContext>>
count<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Count<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Create<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
danglingIndices: {
deleteDanglingIndex<TContext = unknown>(params: T.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesDeleteDanglingIndexResponse, TContext>>
importDanglingIndex<TContext = unknown>(params: T.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesImportDanglingIndexResponse, TContext>>
listDanglingIndices<TContext = unknown>(params?: T.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesListDanglingIndicesResponse, TContext>>
deleteDanglingIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesDeleteDanglingIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
importDanglingIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesImportDanglingIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
listDanglingIndices<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesListDanglingIndices, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
dataFrameTransformDeprecated: {
deleteTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getTransformStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
previewTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
putTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
startTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
stopTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
updateTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
}
delete<TContext = unknown>(params: T.DeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteResponse, TContext>>
deleteByQuery<TContext = unknown>(params: T.DeleteByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteByQueryResponse, TContext>>
deleteByQueryRethrottle<TContext = unknown>(params: T.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteByQueryRethrottleResponse, TContext>>
deleteScript<TContext = unknown>(params: T.DeleteScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteScriptResponse, TContext>>
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Delete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteByQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteByQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteByQueryRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteByQueryRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteScript<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteScript, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
enrich: {
deletePolicy<TContext = unknown>(params: T.EnrichDeletePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichDeletePolicyResponse, TContext>>
executePolicy<TContext = unknown>(params: T.EnrichExecutePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichExecutePolicyResponse, TContext>>
getPolicy<TContext = unknown>(params?: T.EnrichGetPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichGetPolicyResponse, TContext>>
putPolicy<TContext = unknown>(params: T.EnrichPutPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichPutPolicyResponse, TContext>>
stats<TContext = unknown>(params?: T.EnrichStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichStatsResponse, TContext>>
deletePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichDeletePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
executePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichExecutePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichGetPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichPutPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
eql: {
delete<TContext = unknown>(params: T.EqlDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlDeleteResponse, TContext>>
get<TEvent = unknown, TContext = unknown>(params: T.EqlGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlGetResponse<TEvent>, TContext>>
getStatus<TContext = unknown>(params: T.EqlGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlGetStatusResponse, TContext>>
search<TEvent = unknown, TContext = unknown>(params: T.EqlSearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlSearchResponse<TEvent>, TContext>>
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.EqlSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
exists<TContext = unknown>(params: T.ExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsResponse, TContext>>
existsSource<TContext = unknown>(params: T.ExistsSourceRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsSourceResponse, TContext>>
explain<TDocument = unknown, TContext = unknown>(params: T.ExplainRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExplainResponse<TDocument>, TContext>>
features: {
getFeatures<TContext = unknown>(params?: T.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FeaturesGetFeaturesResponse, TContext>>
resetFeatures<TContext = unknown>(params?: T.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FeaturesResetFeaturesResponse, TContext>>
}
fieldCaps<TContext = unknown>(params?: T.FieldCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FieldCapsResponse, TContext>>
fleet: {
globalCheckpoints<TContext = unknown>(params: T.FleetGlobalCheckpointsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FleetGlobalCheckpointsResponse, TContext>>
msearch<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
search<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
}
get<TDocument = unknown, TContext = unknown>(params: T.GetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetResponse<TDocument>, TContext>>
getScript<TContext = unknown>(params: T.GetScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptResponse, TContext>>
getScriptContext<TContext = unknown>(params?: T.GetScriptContextRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptContextResponse, TContext>>
getScriptLanguages<TContext = unknown>(params?: T.GetScriptLanguagesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptLanguagesResponse, TContext>>
getSource<TDocument = unknown, TContext = unknown>(params: T.GetSourceRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetSourceResponse<TDocument>, TContext>>
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
existsSource<TResponse = boolean, TContext = Context>(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
explain<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Explain<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
fieldCaps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.FieldCaps<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Get, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getScript<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScript, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getScriptContext<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScriptContext, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getScriptLanguages<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScriptLanguages, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getSource<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetSource, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
graph: {
explore<TContext = unknown>(params: T.GraphExploreRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GraphExploreResponse, TContext>>
explore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.GraphExplore<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
ilm: {
deleteLifecycle<TContext = unknown>(params: T.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmDeleteLifecycleResponse, TContext>>
explainLifecycle<TContext = unknown>(params: T.IlmExplainLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmExplainLifecycleResponse, TContext>>
getLifecycle<TContext = unknown>(params?: T.IlmGetLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmGetLifecycleResponse, TContext>>
getStatus<TContext = unknown>(params?: T.IlmGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmGetStatusResponse, TContext>>
migrateToDataTiers<TContext = unknown>(params?: T.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmMigrateToDataTiersResponse, TContext>>
moveToStep<TContext = unknown>(params: T.IlmMoveToStepRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmMoveToStepResponse, TContext>>
putLifecycle<TContext = unknown>(params: T.IlmPutLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmPutLifecycleResponse, TContext>>
removePolicy<TContext = unknown>(params: T.IlmRemovePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmRemovePolicyResponse, TContext>>
retry<TContext = unknown>(params: T.IlmRetryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmRetryResponse, TContext>>
start<TContext = unknown>(params?: T.IlmStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmStartResponse, TContext>>
stop<TContext = unknown>(params?: T.IlmStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmStopResponse, TContext>>
deleteLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
explainLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmExplainLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmGetLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmGetStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
moveToStep<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmMoveToStep<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putLifecycle<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmPutLifecycle<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
removePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmRemovePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
retry<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmRetry, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
index<TDocument = unknown, TContext = unknown>(params: T.IndexRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndexResponse, TContext>>
index<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Index<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
indices: {
addBlock<TContext = unknown>(params: T.IndicesAddBlockRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesAddBlockResponse, TContext>>
analyze<TContext = unknown>(params?: T.IndicesAnalyzeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesAnalyzeResponse, TContext>>
clearCache<TContext = unknown>(params?: T.IndicesClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesClearCacheResponse, TContext>>
clone<TContext = unknown>(params: T.IndicesCloneRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCloneResponse, TContext>>
close<TContext = unknown>(params: T.IndicesCloseRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCloseResponse, TContext>>
create<TContext = unknown>(params: T.IndicesCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCreateResponse, TContext>>
createDataStream<TContext = unknown>(params: T.IndicesCreateDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCreateDataStreamResponse, TContext>>
dataStreamsStats<TContext = unknown>(params?: T.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDataStreamsStatsResponse, TContext>>
delete<TContext = unknown>(params: T.IndicesDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteResponse, TContext>>
deleteAlias<TContext = unknown>(params: T.IndicesDeleteAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteAliasResponse, TContext>>
deleteDataStream<TContext = unknown>(params: T.IndicesDeleteDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteDataStreamResponse, TContext>>
deleteIndexTemplate<TContext = unknown>(params: T.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteIndexTemplateResponse, TContext>>
deleteTemplate<TContext = unknown>(params: T.IndicesDeleteTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteTemplateResponse, TContext>>
diskUsage<TContext = unknown>(params: T.IndicesDiskUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDiskUsageResponse, TContext>>
exists<TContext = unknown>(params: T.IndicesExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsResponse, TContext>>
existsAlias<TContext = unknown>(params: T.IndicesExistsAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsAliasResponse, TContext>>
existsIndexTemplate<TContext = unknown>(params: T.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsIndexTemplateResponse, TContext>>
existsTemplate<TContext = unknown>(params: T.IndicesExistsTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTemplateResponse, TContext>>
existsType<TContext = unknown>(params: T.IndicesExistsTypeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTypeResponse, TContext>>
fieldUsageStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
flush<TContext = unknown>(params?: T.IndicesFlushRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushResponse, TContext>>
flushSynced<TContext = unknown>(params?: T.IndicesFlushSyncedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushSyncedResponse, TContext>>
forcemerge<TContext = unknown>(params?: T.IndicesForcemergeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesForcemergeResponse, TContext>>
freeze<TContext = unknown>(params: T.IndicesFreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFreezeResponse, TContext>>
get<TContext = unknown>(params: T.IndicesGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetResponse, TContext>>
getAlias<TContext = unknown>(params?: T.IndicesGetAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetAliasResponse, TContext>>
getDataStream<TContext = unknown>(params?: T.IndicesGetDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetDataStreamResponse, TContext>>
getFieldMapping<TContext = unknown>(params: T.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetFieldMappingResponse, TContext>>
getIndexTemplate<TContext = unknown>(params?: T.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetIndexTemplateResponse, TContext>>
getMapping<TContext = unknown>(params?: T.IndicesGetMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetMappingResponse, TContext>>
getSettings<TContext = unknown>(params?: T.IndicesGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetSettingsResponse, TContext>>
getTemplate<TContext = unknown>(params?: T.IndicesGetTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetTemplateResponse, TContext>>
getUpgrade<TContext = unknown>(params?: T.IndicesGetUpgradeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetUpgradeResponse, TContext>>
migrateToDataStream<TContext = unknown>(params: T.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesMigrateToDataStreamResponse, TContext>>
modifyDataStream<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
open<TContext = unknown>(params: T.IndicesOpenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesOpenResponse, TContext>>
promoteDataStream<TContext = unknown>(params: T.IndicesPromoteDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPromoteDataStreamResponse, TContext>>
putAlias<TContext = unknown>(params: T.IndicesPutAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutAliasResponse, TContext>>
putIndexTemplate<TContext = unknown>(params: T.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutIndexTemplateResponse, TContext>>
putMapping<TContext = unknown>(params: T.IndicesPutMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutMappingResponse, TContext>>
putSettings<TContext = unknown>(params?: T.IndicesPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutSettingsResponse, TContext>>
putTemplate<TContext = unknown>(params: T.IndicesPutTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutTemplateResponse, TContext>>
recovery<TContext = unknown>(params?: T.IndicesRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRecoveryResponse, TContext>>
refresh<TContext = unknown>(params?: T.IndicesRefreshRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRefreshResponse, TContext>>
reloadSearchAnalyzers<TContext = unknown>(params: T.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesReloadSearchAnalyzersResponse, TContext>>
resolveIndex<TContext = unknown>(params: T.IndicesResolveIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesResolveIndexResponse, TContext>>
rollover<TContext = unknown>(params: T.IndicesRolloverRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRolloverResponse, TContext>>
segments<TContext = unknown>(params?: T.IndicesSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSegmentsResponse, TContext>>
shardStores<TContext = unknown>(params?: T.IndicesShardStoresRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShardStoresResponse, TContext>>
shrink<TContext = unknown>(params: T.IndicesShrinkRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShrinkResponse, TContext>>
simulateIndexTemplate<TContext = unknown>(params: T.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateIndexTemplateResponse, TContext>>
simulateTemplate<TContext = unknown>(params?: T.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateTemplateResponse, TContext>>
split<TContext = unknown>(params: T.IndicesSplitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSplitResponse, TContext>>
stats<TContext = unknown>(params?: T.IndicesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesStatsResponse, TContext>>
unfreeze<TContext = unknown>(params: T.IndicesUnfreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUnfreezeResponse, TContext>>
updateAliases<TContext = unknown>(params?: T.IndicesUpdateAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUpdateAliasesResponse, TContext>>
upgrade<TContext = unknown>(params?: T.IndicesUpgradeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUpgradeResponse, TContext>>
validateQuery<TContext = unknown>(params?: T.IndicesValidateQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesValidateQueryResponse, TContext>>
addBlock<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesAddBlock, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
analyze<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesAnalyze<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clearCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clone<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClone<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
close<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClose, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
createDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
dataStreamsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteIndexTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
existsAlias<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
existsIndexTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
existsTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
existsType<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
flush<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlush, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
flushSynced<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlushSynced, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
forcemerge<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesForcemerge, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
freeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getFieldMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetFieldMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getIndexTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
open<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesOpen, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putAlias<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutAlias<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putIndexTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutIndexTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putMapping<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutMapping<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
recovery<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRecovery, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
refresh<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRefresh, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reloadSearchAnalyzers<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesReloadSearchAnalyzers, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
resolveIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesResolveIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
rollover<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRollover<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
segments<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSegments, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
shardStores<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesShardStores, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
shrink<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesShrink<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
simulateIndexTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSimulateIndexTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
simulateTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSimulateTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
split<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSplit<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
unfreeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUnfreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpdateAliases<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
validateQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesValidateQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
info<TContext = unknown>(params?: T.InfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.InfoResponse, TContext>>
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Info, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
ingest: {
deletePipeline<TContext = unknown>(params: T.IngestDeletePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestDeletePipelineResponse, TContext>>
geoIpStats<TContext = unknown>(params?: T.IngestGeoIpStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestGeoIpStatsResponse, TContext>>
getPipeline<TContext = unknown>(params?: T.IngestGetPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestGetPipelineResponse, TContext>>
processorGrok<TContext = unknown>(params?: T.IngestProcessorGrokRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestProcessorGrokResponse, TContext>>
putPipeline<TContext = unknown>(params: T.IngestPutPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestPutPipelineResponse, TContext>>
simulate<TContext = unknown>(params?: T.IngestSimulateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestSimulateResponse, TContext>>
deletePipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestDeletePipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getPipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestGetPipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
processorGrok<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestProcessorGrok, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putPipeline<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IngestPutPipeline<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
simulate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IngestSimulate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
license: {
delete<TContext = unknown>(params?: T.LicenseDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseDeleteResponse, TContext>>
get<TContext = unknown>(params?: T.LicenseGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetResponse, TContext>>
getBasicStatus<TContext = unknown>(params?: T.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetBasicStatusResponse, TContext>>
getTrialStatus<TContext = unknown>(params?: T.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetTrialStatusResponse, TContext>>
post<TContext = unknown>(params?: T.LicensePostRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostResponse, TContext>>
postStartBasic<TContext = unknown>(params?: T.LicensePostStartBasicRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostStartBasicResponse, TContext>>
postStartTrial<TContext = unknown>(params?: T.LicensePostStartTrialRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostStartTrialResponse, TContext>>
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getBasicStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGetBasicStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getTrialStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGetTrialStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
post<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePost<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
postStartBasic<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePostStartBasic, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
postStartTrial<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePostStartTrial, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
logstash: {
deletePipeline<TContext = unknown>(params: T.LogstashDeletePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LogstashDeletePipelineResponse, TContext>>
getPipeline<TContext = unknown>(params: T.LogstashGetPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LogstashGetPipelineResponse, TContext>>
putPipeline<TContext = unknown>(params: T.LogstashPutPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LogstashPutPipelineResponse, TContext>>
}
mget<TDocument = unknown, TContext = unknown>(params?: T.MgetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MgetResponse<TDocument>, TContext>>
mget<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Mget<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
migration: {
deprecations<TContext = unknown>(params?: T.MigrationDeprecationsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MigrationDeprecationsResponse, TContext>>
getFeatureUpgradeStatus<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
postFeatureUpgrade<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
deprecations<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationDeprecations, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
ml: {
closeJob<TContext = unknown>(params: T.MlCloseJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlCloseJobResponse, TContext>>
deleteCalendar<TContext = unknown>(params: T.MlDeleteCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarResponse, TContext>>
deleteCalendarEvent<TContext = unknown>(params: T.MlDeleteCalendarEventRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarEventResponse, TContext>>
deleteCalendarJob<TContext = unknown>(params: T.MlDeleteCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarJobResponse, TContext>>
deleteDataFrameAnalytics<TContext = unknown>(params: T.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteDataFrameAnalyticsResponse, TContext>>
deleteDatafeed<TContext = unknown>(params: T.MlDeleteDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteDatafeedResponse, TContext>>
deleteExpiredData<TContext = unknown>(params?: T.MlDeleteExpiredDataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteExpiredDataResponse, TContext>>
deleteFilter<TContext = unknown>(params: T.MlDeleteFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteFilterResponse, TContext>>
deleteForecast<TContext = unknown>(params: T.MlDeleteForecastRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteForecastResponse, TContext>>
deleteJob<TContext = unknown>(params: T.MlDeleteJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteJobResponse, TContext>>
deleteModelSnapshot<TContext = unknown>(params: T.MlDeleteModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteModelSnapshotResponse, TContext>>
deleteTrainedModel<TContext = unknown>(params: T.MlDeleteTrainedModelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteTrainedModelResponse, TContext>>
deleteTrainedModelAlias<TContext = unknown>(params: T.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteTrainedModelAliasResponse, TContext>>
estimateModelMemory<TContext = unknown>(params?: T.MlEstimateModelMemoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlEstimateModelMemoryResponse, TContext>>
evaluateDataFrame<TContext = unknown>(params?: T.MlEvaluateDataFrameRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlEvaluateDataFrameResponse, TContext>>
explainDataFrameAnalytics<TContext = unknown>(params?: T.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlExplainDataFrameAnalyticsResponse, TContext>>
findFileStructure<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
flushJob<TContext = unknown>(params: T.MlFlushJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlFlushJobResponse, TContext>>
forecast<TContext = unknown>(params: T.MlForecastRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlForecastResponse, TContext>>
getBuckets<TContext = unknown>(params: T.MlGetBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetBucketsResponse, TContext>>
getCalendarEvents<TContext = unknown>(params: T.MlGetCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarEventsResponse, TContext>>
getCalendars<TContext = unknown>(params?: T.MlGetCalendarsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarsResponse, TContext>>
getCategories<TContext = unknown>(params: T.MlGetCategoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCategoriesResponse, TContext>>
getDataFrameAnalytics<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsResponse, TContext>>
getDataFrameAnalyticsStats<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsStatsResponse, TContext>>
getDatafeedStats<TContext = unknown>(params?: T.MlGetDatafeedStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedStatsResponse, TContext>>
getDatafeeds<TContext = unknown>(params?: T.MlGetDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedsResponse, TContext>>
getFilters<TContext = unknown>(params?: T.MlGetFiltersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetFiltersResponse, TContext>>
getInfluencers<TContext = unknown>(params: T.MlGetInfluencersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetInfluencersResponse, TContext>>
getJobStats<TContext = unknown>(params?: T.MlGetJobStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobStatsResponse, TContext>>
getJobs<TContext = unknown>(params?: T.MlGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobsResponse, TContext>>
getModelSnapshotUpgradeStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getModelSnapshots<TContext = unknown>(params: T.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetModelSnapshotsResponse, TContext>>
getOverallBuckets<TContext = unknown>(params: T.MlGetOverallBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetOverallBucketsResponse, TContext>>
getRecords<TContext = unknown>(params: T.MlGetRecordsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetRecordsResponse, TContext>>
getTrainedModels<TContext = unknown>(params?: T.MlGetTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsResponse, TContext>>
getTrainedModelsStats<TContext = unknown>(params?: T.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsStatsResponse, TContext>>
info<TContext = unknown>(params?: T.MlInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlInfoResponse, TContext>>
openJob<TContext = unknown>(params: T.MlOpenJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlOpenJobResponse, TContext>>
postCalendarEvents<TContext = unknown>(params: T.MlPostCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostCalendarEventsResponse, TContext>>
postData<TData = unknown, TContext = unknown>(params: T.MlPostDataRequest<TData>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostDataResponse, TContext>>
previewDataFrameAnalytics<TContext = unknown>(params?: T.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDataFrameAnalyticsResponse, TContext>>
previewDatafeed<TDocument = unknown, TContext = unknown>(params?: T.MlPreviewDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDatafeedResponse<TDocument>, TContext>>
putCalendar<TContext = unknown>(params: T.MlPutCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarResponse, TContext>>
putCalendarJob<TContext = unknown>(params: T.MlPutCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarJobResponse, TContext>>
putDataFrameAnalytics<TContext = unknown>(params: T.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDataFrameAnalyticsResponse, TContext>>
putDatafeed<TContext = unknown>(params: T.MlPutDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDatafeedResponse, TContext>>
putFilter<TContext = unknown>(params: T.MlPutFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutFilterResponse, TContext>>
putJob<TContext = unknown>(params: T.MlPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutJobResponse, TContext>>
putTrainedModel<TContext = unknown>(params: T.MlPutTrainedModelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelResponse, TContext>>
putTrainedModelAlias<TContext = unknown>(params: T.MlPutTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelAliasResponse, TContext>>
resetJob<TContext = unknown>(params: T.MlResetJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlResetJobResponse, TContext>>
revertModelSnapshot<TContext = unknown>(params: T.MlRevertModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlRevertModelSnapshotResponse, TContext>>
setUpgradeMode<TContext = unknown>(params?: T.MlSetUpgradeModeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlSetUpgradeModeResponse, TContext>>
startDataFrameAnalytics<TContext = unknown>(params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDataFrameAnalyticsResponse, TContext>>
startDatafeed<TContext = unknown>(params: T.MlStartDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDatafeedResponse, TContext>>
stopDataFrameAnalytics<TContext = unknown>(params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDataFrameAnalyticsResponse, TContext>>
stopDatafeed<TContext = unknown>(params: T.MlStopDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDatafeedResponse, TContext>>
updateDataFrameAnalytics<TContext = unknown>(params: T.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateDataFrameAnalyticsResponse, TContext>>
updateDatafeed<TContext = unknown>(params: T.MlUpdateDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateDatafeedResponse, TContext>>
updateFilter<TContext = unknown>(params: T.MlUpdateFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateFilterResponse, TContext>>
updateJob<TContext = unknown>(params: T.MlUpdateJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateJobResponse, TContext>>
updateModelSnapshot<TContext = unknown>(params: T.MlUpdateModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateModelSnapshotResponse, TContext>>
upgradeJobSnapshot<TContext = unknown>(params: T.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpgradeJobSnapshotResponse, TContext>>
validate<TContext = unknown>(params?: T.MlValidateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlValidateResponse, TContext>>
validateDetector<TContext = unknown>(params?: T.MlValidateDetectorRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlValidateDetectorResponse, TContext>>
closeJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlCloseJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteCalendar<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendar, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteCalendarEvent<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendarEvent, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteCalendarJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendarJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteExpiredData<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteExpiredData<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteFilter<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteFilter, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteForecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteModelSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteModelSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteTrainedModel<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteTrainedModel, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
estimateModelMemory<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEstimateModelMemory<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
evaluateDataFrame<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEvaluateDataFrame<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
explainDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlExplainDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
findFileStructure<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MlFindFileStructure<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
flushJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlFlushJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
forecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getBuckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getCalendarEvents<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCalendarEvents, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getCalendars<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCalendars<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getCategories<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCategories<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getDataFrameAnalyticsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDataFrameAnalyticsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getDatafeedStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDatafeedStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getDatafeeds<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDatafeeds, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getFilters<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetFilters, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getInfluencers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetInfluencers<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getJobStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetJobStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getModelSnapshots<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetModelSnapshots<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getOverallBuckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetOverallBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRecords<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetRecords<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getTrainedModels<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetTrainedModels, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getTrainedModelsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetTrainedModelsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
openJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
postCalendarEvents<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostCalendarEvents<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
postData<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostData<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putCalendar<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendar<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putCalendarJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendarJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putTrainedModel<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutTrainedModel<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
revertModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlRevertModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
setUpgradeMode<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlSetUpgradeMode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
startDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
startDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stopDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stopDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
validateDetector<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidateDetector<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
monitoring: {
bulk<TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.MonitoringBulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MonitoringBulkResponse, TContext>>
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MonitoringBulk<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
msearch<TDocument = unknown, TContext = unknown>(params?: T.MsearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MsearchResponse<TDocument>, TContext>>
msearchTemplate<TDocument = unknown, TContext = unknown>(params?: T.MsearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MsearchTemplateResponse<TDocument>, TContext>>
mtermvectors<TContext = unknown>(params?: T.MtermvectorsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MtermvectorsResponse, TContext>>
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Msearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
msearchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MsearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
mtermvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Mtermvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
nodes: {
clearRepositoriesMeteringArchive<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getRepositoriesMeteringInfo<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
hotThreads<TContext = unknown>(params?: T.NodesHotThreadsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesHotThreadsResponse, TContext>>
info<TContext = unknown>(params?: T.NodesInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesInfoResponse, TContext>>
reloadSecureSettings<TContext = unknown>(params?: T.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesReloadSecureSettingsResponse, TContext>>
stats<TContext = unknown>(params?: T.NodesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesStatsResponse, TContext>>
usage<TContext = unknown>(params?: T.NodesUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesUsageResponse, TContext>>
hotThreads<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesHotThreads, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reloadSecureSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.NodesReloadSecureSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
openPointInTime<TContext = unknown>(params: T.OpenPointInTimeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.OpenPointInTimeResponse, TContext>>
ping<TContext = unknown>(params?: T.PingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PingResponse, TContext>>
putScript<TContext = unknown>(params: T.PutScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PutScriptResponse, TContext>>
rankEval<TContext = unknown>(params: T.RankEvalRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RankEvalResponse, TContext>>
reindex<TContext = unknown>(params?: T.ReindexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ReindexResponse, TContext>>
reindexRethrottle<TContext = unknown>(params: T.ReindexRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ReindexRethrottleResponse, TContext>>
renderSearchTemplate<TContext = unknown>(params?: T.RenderSearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RenderSearchTemplateResponse, TContext>>
ping<TResponse = boolean, TContext = Context>(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putScript<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.PutScript<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
rankEval<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RankEval<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reindex<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Reindex<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reindexRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ReindexRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
renderSearchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RenderSearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
rollup: {
deleteJob<TContext = unknown>(params: T.RollupDeleteJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupDeleteJobResponse, TContext>>
getJobs<TContext = unknown>(params?: T.RollupGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetJobsResponse, TContext>>
getRollupCaps<TContext = unknown>(params?: T.RollupGetRollupCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupCapsResponse, TContext>>
getRollupIndexCaps<TContext = unknown>(params: T.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupIndexCapsResponse, TContext>>
putJob<TContext = unknown>(params: T.RollupPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupPutJobResponse, TContext>>
rollup<TContext = unknown>(params: T.RollupRollupRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupResponse, TContext>>
rollupSearch<TDocument = unknown, TContext = unknown>(params: T.RollupRollupSearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupSearchResponse<TDocument>, TContext>>
startJob<TContext = unknown>(params: T.RollupStartJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStartJobResponse, TContext>>
stopJob<TContext = unknown>(params: T.RollupStopJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStopJobResponse, TContext>>
deleteJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupDeleteJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRollupCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRollupIndexCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupIndexCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
rollupSearch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollupSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
startJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStartJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stopJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStopJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
scriptsPainlessExecute<TResult = unknown, TContext = unknown>(params?: T.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ScriptsPainlessExecuteResponse<TResult>, TContext>>
scroll<TDocument = unknown, TContext = unknown>(params?: T.ScrollRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ScrollResponse<TDocument>, TContext>>
search<TDocument = unknown, TContext = unknown>(params?: T.SearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchResponse<TDocument>, TContext>>
searchMvt<TContext = unknown>(params: T.SearchMvtRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchMvtResponse, TContext>>
searchShards<TContext = unknown>(params?: T.SearchShardsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchShardsResponse, TContext>>
searchTemplate<TDocument = unknown, TContext = unknown>(params?: T.SearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchTemplateResponse<TDocument>, TContext>>
scriptsPainlessExecute<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ScriptsPainlessExecute<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
scroll<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Scroll<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Search<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
searchShards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
searchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
searchableSnapshots: {
cacheStats<TContext = unknown>(params?: T.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsCacheStatsResponse, TContext>>
clearCache<TContext = unknown>(params?: T.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsClearCacheResponse, TContext>>
mount<TContext = unknown>(params: T.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsMountResponse, TContext>>
repositoryStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
stats<TContext = unknown>(params?: T.SearchableSnapshotsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsStatsResponse, TContext>>
clearCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
mount<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsMount<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
repositoryStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsRepositoryStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
security: {
authenticate<TContext = unknown>(params?: T.SecurityAuthenticateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityAuthenticateResponse, TContext>>
changePassword<TContext = unknown>(params?: T.SecurityChangePasswordRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityChangePasswordResponse, TContext>>
clearApiKeyCache<TContext = unknown>(params: T.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearApiKeyCacheResponse, TContext>>
clearCachedPrivileges<TContext = unknown>(params: T.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedPrivilegesResponse, TContext>>
clearCachedRealms<TContext = unknown>(params: T.SecurityClearCachedRealmsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedRealmsResponse, TContext>>
clearCachedRoles<TContext = unknown>(params: T.SecurityClearCachedRolesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedRolesResponse, TContext>>
clearCachedServiceTokens<TContext = unknown>(params: T.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedServiceTokensResponse, TContext>>
createApiKey<TContext = unknown>(params?: T.SecurityCreateApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityCreateApiKeyResponse, TContext>>
createServiceToken<TContext = unknown>(params: T.SecurityCreateServiceTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityCreateServiceTokenResponse, TContext>>
deletePrivileges<TContext = unknown>(params: T.SecurityDeletePrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeletePrivilegesResponse, TContext>>
deleteRole<TContext = unknown>(params: T.SecurityDeleteRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteRoleResponse, TContext>>
deleteRoleMapping<TContext = unknown>(params: T.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteRoleMappingResponse, TContext>>
deleteServiceToken<TContext = unknown>(params: T.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteServiceTokenResponse, TContext>>
deleteUser<TContext = unknown>(params: T.SecurityDeleteUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteUserResponse, TContext>>
disableUser<TContext = unknown>(params: T.SecurityDisableUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDisableUserResponse, TContext>>
enableUser<TContext = unknown>(params: T.SecurityEnableUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityEnableUserResponse, TContext>>
getApiKey<TContext = unknown>(params?: T.SecurityGetApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetApiKeyResponse, TContext>>
getBuiltinPrivileges<TContext = unknown>(params?: T.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetBuiltinPrivilegesResponse, TContext>>
getPrivileges<TContext = unknown>(params?: T.SecurityGetPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetPrivilegesResponse, TContext>>
getRole<TContext = unknown>(params?: T.SecurityGetRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetRoleResponse, TContext>>
getRoleMapping<TContext = unknown>(params?: T.SecurityGetRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetRoleMappingResponse, TContext>>
getServiceAccounts<TContext = unknown>(params?: T.SecurityGetServiceAccountsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetServiceAccountsResponse, TContext>>
getServiceCredentials<TContext = unknown>(params: T.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetServiceCredentialsResponse, TContext>>
getToken<TContext = unknown>(params?: T.SecurityGetTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetTokenResponse, TContext>>
getUser<TContext = unknown>(params?: T.SecurityGetUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetUserResponse, TContext>>
getUserPrivileges<TContext = unknown>(params?: T.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetUserPrivilegesResponse, TContext>>
grantApiKey<TContext = unknown>(params?: T.SecurityGrantApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGrantApiKeyResponse, TContext>>
hasPrivileges<TContext = unknown>(params?: T.SecurityHasPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityHasPrivilegesResponse, TContext>>
invalidateApiKey<TContext = unknown>(params?: T.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityInvalidateApiKeyResponse, TContext>>
invalidateToken<TContext = unknown>(params?: T.SecurityInvalidateTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityInvalidateTokenResponse, TContext>>
putPrivileges<TContext = unknown>(params?: T.SecurityPutPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutPrivilegesResponse, TContext>>
putRole<TContext = unknown>(params: T.SecurityPutRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutRoleResponse, TContext>>
putRoleMapping<TContext = unknown>(params: T.SecurityPutRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutRoleMappingResponse, TContext>>
putUser<TContext = unknown>(params: T.SecurityPutUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutUserResponse, TContext>>
queryApiKeys<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlAuthenticate<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlCompleteLogout<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlInvalidate<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlLogout<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlPrepareAuthentication<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlServiceProviderMetadata<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
}
shutdown: {
deleteNode<TContext = unknown>(params: T.ShutdownDeleteNodeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ShutdownDeleteNodeResponse, TContext>>
getNode<TContext = unknown>(params?: T.ShutdownGetNodeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ShutdownGetNodeResponse, TContext>>
putNode<TContext = unknown>(params: T.ShutdownPutNodeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ShutdownPutNodeResponse, TContext>>
authenticate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityAuthenticate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityChangePassword<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clearCachedPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clearCachedRealms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRealms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRoles, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
createApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityCreateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deletePrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeletePrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteRole<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteRole, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteRoleMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteRoleMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
disableUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDisableUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
enableUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityEnableUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getApiKey<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetApiKey, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getBuiltinPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetBuiltinPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRole<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetRole, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRoleMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetRoleMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getToken<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getUserPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetUserPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
hasPrivileges<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityHasPrivileges<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
invalidateApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityInvalidateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
invalidateToken<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityInvalidateToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putPrivileges<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutPrivileges<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putRole<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutRole<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putRoleMapping<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutRoleMapping<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putUser<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutUser<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
slm: {
deleteLifecycle<TContext = unknown>(params: T.SlmDeleteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmDeleteLifecycleResponse, TContext>>
executeLifecycle<TContext = unknown>(params: T.SlmExecuteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmExecuteLifecycleResponse, TContext>>
executeRetention<TContext = unknown>(params?: T.SlmExecuteRetentionRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmExecuteRetentionResponse, TContext>>
getLifecycle<TContext = unknown>(params?: T.SlmGetLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetLifecycleResponse, TContext>>
getStats<TContext = unknown>(params?: T.SlmGetStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetStatsResponse, TContext>>
getStatus<TContext = unknown>(params?: T.SlmGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetStatusResponse, TContext>>
putLifecycle<TContext = unknown>(params: T.SlmPutLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmPutLifecycleResponse, TContext>>
start<TContext = unknown>(params?: T.SlmStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmStartResponse, TContext>>
stop<TContext = unknown>(params?: T.SlmStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmStopResponse, TContext>>
deleteLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
executeLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmExecuteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
executeRetention<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmExecuteRetention, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putLifecycle<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SlmPutLifecycle<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
snapshot: {
cleanupRepository<TContext = unknown>(params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCleanupRepositoryResponse, TContext>>
clone<TContext = unknown>(params: T.SnapshotCloneRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCloneResponse, TContext>>
create<TContext = unknown>(params: T.SnapshotCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCreateResponse, TContext>>
createRepository<TContext = unknown>(params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCreateRepositoryResponse, TContext>>
delete<TContext = unknown>(params: T.SnapshotDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotDeleteResponse, TContext>>
deleteRepository<TContext = unknown>(params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotDeleteRepositoryResponse, TContext>>
get<TContext = unknown>(params: T.SnapshotGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotGetResponse, TContext>>
getRepository<TContext = unknown>(params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotGetRepositoryResponse, TContext>>
repositoryAnalyze<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
restore<TContext = unknown>(params: T.SnapshotRestoreRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotRestoreResponse, TContext>>
status<TContext = unknown>(params?: T.SnapshotStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotStatusResponse, TContext>>
verifyRepository<TContext = unknown>(params: T.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotVerifyRepositoryResponse, TContext>>
cleanupRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCleanupRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
createRepository<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCreateRepository<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotDeleteRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotGetRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
restore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotRestore<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
verifyRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotVerifyRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
sql: {
clearCursor<TContext = unknown>(params?: T.SqlClearCursorRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlClearCursorResponse, TContext>>
deleteAsync<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getAsync<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getAsyncStatus<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
query<TContext = unknown>(params?: T.SqlQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlQueryResponse, TContext>>
translate<TContext = unknown>(params?: T.SqlTranslateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlTranslateResponse, TContext>>
clearCursor<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlClearCursor<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
translate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlTranslate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
ssl: {
certificates<TContext = unknown>(params?: T.SslCertificatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SslCertificatesResponse, TContext>>
certificates<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SslCertificates, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
tasks: {
cancel<TContext = unknown>(params?: T.TasksCancelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksCancelResponse, TContext>>
get<TContext = unknown>(params: T.TasksGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksGetResponse, TContext>>
list<TContext = unknown>(params?: T.TasksListRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksListResponse, TContext>>
}
termsEnum<TContext = unknown>(params: T.TermsEnumRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TermsEnumResponse, TContext>>
termvectors<TDocument = unknown, TContext = unknown>(params: T.TermvectorsRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TermvectorsResponse, TContext>>
textStructure: {
findStructure<TJsonDocument = unknown, TContext = unknown>(params: T.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TextStructureFindStructureResponse, TContext>>
cancel<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksCancel, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
list<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksList, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Termvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
transform: {
deleteTransform<TContext = unknown>(params: T.TransformDeleteTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformDeleteTransformResponse, TContext>>
getTransform<TContext = unknown>(params?: T.TransformGetTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformGetTransformResponse, TContext>>
getTransformStats<TContext = unknown>(params: T.TransformGetTransformStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformGetTransformStatsResponse, TContext>>
previewTransform<TTransform = unknown, TContext = unknown>(params?: T.TransformPreviewTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformPreviewTransformResponse<TTransform>, TContext>>
putTransform<TContext = unknown>(params: T.TransformPutTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformPutTransformResponse, TContext>>
startTransform<TContext = unknown>(params: T.TransformStartTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformStartTransformResponse, TContext>>
stopTransform<TContext = unknown>(params: T.TransformStopTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformStopTransformResponse, TContext>>
updateTransform<TContext = unknown>(params: T.TransformUpdateTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformUpdateTransformResponse, TContext>>
upgradeTransforms<TContext = unknown>(params?: T.TransformUpgradeTransformsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformUpgradeTransformsResponse, TContext>>
deleteTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformDeleteTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformGetTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getTransformStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformGetTransformStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
previewTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformPreviewTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformPutTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
startTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformStartTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stopTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformStopTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformUpdateTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
update<TDocumentR = unknown, TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateResponse<TDocumentR>, TContext>>
updateByQuery<TContext = unknown>(params: T.UpdateByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateByQueryResponse, TContext>>
updateByQueryRethrottle<TContext = unknown>(params: T.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateByQueryRethrottleResponse, TContext>>
update<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Update<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateByQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.UpdateByQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
updateByQueryRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.UpdateByQueryRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
watcher: {
ackWatch<TContext = unknown>(params: T.WatcherAckWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherAckWatchResponse, TContext>>
activateWatch<TContext = unknown>(params: T.WatcherActivateWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherActivateWatchResponse, TContext>>
deactivateWatch<TContext = unknown>(params: T.WatcherDeactivateWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherDeactivateWatchResponse, TContext>>
deleteWatch<TContext = unknown>(params: T.WatcherDeleteWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherDeleteWatchResponse, TContext>>
executeWatch<TContext = unknown>(params?: T.WatcherExecuteWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherExecuteWatchResponse, TContext>>
getWatch<TContext = unknown>(params: T.WatcherGetWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherGetWatchResponse, TContext>>
putWatch<TContext = unknown>(params: T.WatcherPutWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherPutWatchResponse, TContext>>
queryWatches<TContext = unknown>(params?: T.WatcherQueryWatchesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherQueryWatchesResponse, TContext>>
start<TContext = unknown>(params?: T.WatcherStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStartResponse, TContext>>
stats<TContext = unknown>(params?: T.WatcherStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStatsResponse, TContext>>
stop<TContext = unknown>(params?: T.WatcherStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStopResponse, TContext>>
ackWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherAckWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
activateWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherActivateWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deactivateWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherDeactivateWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherDeleteWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
executeWatch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherExecuteWatch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherGetWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putWatch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherPutWatch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
xpack: {
info<TContext = unknown>(params?: T.XpackInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.XpackInfoResponse, TContext>>
usage<TContext = unknown>(params?: T.XpackUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.XpackUsageResponse, TContext>>
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.XpackInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.XpackUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
}
/* /GENERATED */
}
export { KibanaClient }

1594
api/new.d.ts vendored

File diff suppressed because it is too large Load Diff

445
api/requestParams.d.ts vendored
View File

@ -1,21 +1,6 @@
/*
* 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.
*/
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information
import { RequestBody, RequestNDBody } from '../lib/Transport'
@ -39,10 +24,6 @@ export interface AsyncSearchGet extends Generic {
typed_keys?: boolean;
}
export interface AsyncSearchStatus extends Generic {
id: string;
}
export interface AsyncSearchSubmit<T = RequestBody> extends Generic {
index?: string | string[];
_source_exclude?: string | string[];
@ -95,7 +76,7 @@ export interface AutoscalingDeleteAutoscalingPolicy extends Generic {
name: string;
}
export interface AutoscalingGetAutoscalingCapacity extends Generic {
export interface AutoscalingGetAutoscalingDecision extends Generic {
}
export interface AutoscalingGetAutoscalingPolicy extends Generic {
@ -120,7 +101,6 @@ export interface Bulk<T = RequestNDBody> extends Generic {
_source_excludes?: string | string[];
_source_includes?: string | string[];
pipeline?: string;
require_alias?: boolean;
body: T;
}
@ -222,7 +202,6 @@ export interface CatMlDataFrameAnalytics extends Generic {
export interface CatMlDatafeeds extends Generic {
datafeed_id?: string;
allow_no_match?: boolean;
allow_no_datafeeds?: boolean;
format?: string;
h?: string | string[];
@ -234,7 +213,6 @@ export interface CatMlDatafeeds extends Generic {
export interface CatMlJobs extends Generic {
job_id?: string;
allow_no_match?: boolean;
allow_no_jobs?: boolean;
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
format?: string;
@ -280,7 +258,6 @@ export interface CatNodes extends Generic {
s?: string | string[];
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
v?: boolean;
include_unloaded_segments?: boolean;
}
export interface CatPendingTasks extends Generic {
@ -300,7 +277,6 @@ export interface CatPlugins extends Generic {
master_timeout?: string;
h?: string | string[];
help?: boolean;
include_bootstrap?: boolean;
s?: string | string[];
v?: boolean;
}
@ -365,10 +341,10 @@ export interface CatSnapshots extends Generic {
export interface CatTasks extends Generic {
format?: string;
nodes?: string | string[];
node_id?: string | string[];
actions?: string | string[];
detailed?: boolean;
parent_task_id?: string;
parent_task?: number;
h?: string | string[];
help?: boolean;
s?: string | string[];
@ -473,10 +449,6 @@ export interface ClearScroll<T = RequestBody> extends Generic {
body?: T;
}
export interface ClosePointInTime<T = RequestBody> extends Generic {
body?: T;
}
export interface ClusterAllocationExplain<T = RequestBody> extends Generic {
include_yes_decisions?: boolean;
include_disk_info?: boolean;
@ -567,8 +539,8 @@ export interface ClusterReroute<T = RequestBody> extends Generic {
}
export interface ClusterState extends Generic {
index?: string | string[];
metric?: string | string[];
index?: string | string[];
local?: boolean;
master_timeout?: string;
flat_settings?: boolean;
@ -653,6 +625,8 @@ export interface Delete extends Generic {
export interface DeleteByQuery<T = RequestBody> extends Generic {
index: string | string[];
type?: string | string[];
_source_exclude?: string | string[];
_source_include?: string | string[];
analyzer?: string;
analyze_wildcard?: boolean;
default_operator?: 'AND' | 'OR';
@ -672,6 +646,9 @@ export interface DeleteByQuery<T = RequestBody> extends Generic {
size?: number;
max_docs?: number;
sort?: string | string[];
_source?: string | string[];
_source_excludes?: string | string[];
_source_includes?: string | string[];
terminate_after?: number;
stats?: string | string[];
version?: boolean;
@ -728,10 +705,6 @@ export interface EqlGet extends Generic {
keep_alive?: string;
}
export interface EqlGetStatus extends Generic {
id: string;
}
export interface EqlSearch<T = RequestBody> extends Generic {
index: string;
wait_for_completion_timeout?: string;
@ -796,13 +769,6 @@ export interface Explain<T = RequestBody> extends Generic {
body?: T;
}
export interface FeaturesGetFeatures extends Generic {
master_timeout?: string;
}
export interface FeaturesResetFeatures extends Generic {
}
export interface FieldCaps<T = RequestBody> extends Generic {
index?: string | string[];
fields?: string | string[];
@ -813,27 +779,6 @@ export interface FieldCaps<T = RequestBody> extends Generic {
body?: T;
}
export interface FleetGlobalCheckpoints extends Generic {
index: string;
wait_for_advance?: boolean;
wait_for_index?: boolean;
checkpoints?: string | string[];
timeout?: string;
}
export interface FleetMsearch<T = RequestNDBody> extends Generic {
index?: string;
body: T;
}
export interface FleetSearch<T = RequestBody> extends Generic {
index: string;
wait_for_checkpoints?: string | string[];
wait_for_checkpoints_timeout?: string;
allow_partial_search_results?: boolean;
body?: T;
}
export interface Get extends Generic {
id: string;
index: string;
@ -905,11 +850,6 @@ export interface IlmGetLifecycle extends Generic {
export interface IlmGetStatus extends Generic {
}
export interface IlmMigrateToDataTiers<T = RequestBody> extends Generic {
dry_run?: boolean;
body?: T;
}
export interface IlmMoveToStep<T = RequestBody> extends Generic {
index: string;
body?: T;
@ -948,7 +888,6 @@ export interface Index<T = RequestBody> extends Generic {
if_seq_no?: number;
if_primary_term?: number;
pipeline?: string;
require_alias?: boolean;
body: T;
}
@ -1032,7 +971,6 @@ export interface IndicesDeleteAlias extends Generic {
export interface IndicesDeleteDataStream extends Generic {
name: string | string[];
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
}
export interface IndicesDeleteIndexTemplate extends Generic {
@ -1047,15 +985,6 @@ export interface IndicesDeleteTemplate extends Generic {
master_timeout?: string;
}
export interface IndicesDiskUsage extends Generic {
index: string;
run_expensive_tasks?: boolean;
flush?: boolean;
ignore_unavailable?: boolean;
allow_no_indices?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
}
export interface IndicesExists extends Generic {
index: string | string[];
local?: boolean;
@ -1098,14 +1027,6 @@ export interface IndicesExistsType extends Generic {
local?: boolean;
}
export interface IndicesFieldUsageStats extends Generic {
index: string;
fields?: string | string[];
ignore_unavailable?: boolean;
allow_no_indices?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
}
export interface IndicesFlush extends Generic {
index?: string | string[];
force?: boolean;
@ -1165,7 +1086,6 @@ export interface IndicesGetAlias extends Generic {
export interface IndicesGetDataStream extends Generic {
name?: string | string[];
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
}
export interface IndicesGetFieldMapping extends Generic {
@ -1181,7 +1101,7 @@ export interface IndicesGetFieldMapping extends Generic {
}
export interface IndicesGetIndexTemplate extends Generic {
name?: string;
name?: string | string[];
flat_settings?: boolean;
master_timeout?: string;
local?: boolean;
@ -1225,14 +1145,6 @@ export interface IndicesGetUpgrade extends Generic {
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
}
export interface IndicesMigrateToDataStream extends Generic {
name: string;
}
export interface IndicesModifyDataStream<T = RequestBody> extends Generic {
body: T;
}
export interface IndicesOpen extends Generic {
index: string | string[];
timeout?: string;
@ -1243,10 +1155,6 @@ export interface IndicesOpen extends Generic {
wait_for_active_shards?: string;
}
export interface IndicesPromoteDataStream extends Generic {
name: string;
}
export interface IndicesPutAlias<T = RequestBody> extends Generic {
index: string | string[];
name: string;
@ -1452,12 +1360,8 @@ export interface IngestDeletePipeline extends Generic {
timeout?: string;
}
export interface IngestGeoIpStats extends Generic {
}
export interface IngestGetPipeline extends Generic {
id?: string;
summary?: boolean;
master_timeout?: string;
}
@ -1466,7 +1370,6 @@ export interface IngestProcessorGrok extends Generic {
export interface IngestPutPipeline<T = RequestBody> extends Generic {
id: string;
if_version?: number;
master_timeout?: string;
timeout?: string;
body: T;
@ -1506,19 +1409,6 @@ export interface LicensePostStartTrial extends Generic {
acknowledge?: boolean;
}
export interface LogstashDeletePipeline extends Generic {
id: string;
}
export interface LogstashGetPipeline extends Generic {
id: string;
}
export interface LogstashPutPipeline<T = RequestBody> extends Generic {
id: string;
body: T;
}
export interface Mget<T = RequestBody> extends Generic {
index?: string;
type?: string;
@ -1539,15 +1429,8 @@ export interface MigrationDeprecations extends Generic {
index?: string;
}
export interface MigrationGetFeatureUpgradeStatus extends Generic {
}
export interface MigrationPostFeatureUpgrade extends Generic {
}
export interface MlCloseJob<T = RequestBody> extends Generic {
job_id: string;
allow_no_match?: boolean;
allow_no_jobs?: boolean;
force?: boolean;
timeout?: string;
@ -1612,11 +1495,6 @@ export interface MlDeleteTrainedModel extends Generic {
model_id: string;
}
export interface MlDeleteTrainedModelAlias extends Generic {
model_alias: string;
model_id: string;
}
export interface MlEstimateModelMemory<T = RequestBody> extends Generic {
body: T;
}
@ -1658,12 +1536,11 @@ export interface MlFlushJob<T = RequestBody> extends Generic {
body?: T;
}
export interface MlForecast<T = RequestBody> extends Generic {
export interface MlForecast extends Generic {
job_id: string;
duration?: string;
expires_in?: string;
max_model_memory?: string;
body?: T;
}
export interface MlGetBuckets<T = RequestBody> extends Generic {
@ -1711,7 +1588,6 @@ export interface MlGetDataFrameAnalytics extends Generic {
allow_no_match?: boolean;
from?: number;
size?: number;
exclude_generated?: boolean;
}
export interface MlGetDataFrameAnalyticsStats extends Generic {
@ -1719,20 +1595,16 @@ export interface MlGetDataFrameAnalyticsStats extends Generic {
allow_no_match?: boolean;
from?: number;
size?: number;
verbose?: boolean;
}
export interface MlGetDatafeedStats extends Generic {
datafeed_id?: string;
allow_no_match?: boolean;
allow_no_datafeeds?: boolean;
}
export interface MlGetDatafeeds extends Generic {
datafeed_id?: string;
allow_no_match?: boolean;
allow_no_datafeeds?: boolean;
exclude_generated?: boolean;
}
export interface MlGetFilters extends Generic {
@ -1756,21 +1628,12 @@ export interface MlGetInfluencers<T = RequestBody> extends Generic {
export interface MlGetJobStats extends Generic {
job_id?: string;
allow_no_match?: boolean;
allow_no_jobs?: boolean;
}
export interface MlGetJobs extends Generic {
job_id?: string;
allow_no_match?: boolean;
allow_no_jobs?: boolean;
exclude_generated?: boolean;
}
export interface MlGetModelSnapshotUpgradeStats extends Generic {
job_id: string;
snapshot_id: string;
allow_no_match?: boolean;
}
export interface MlGetModelSnapshots<T = RequestBody> extends Generic {
@ -1793,7 +1656,6 @@ export interface MlGetOverallBuckets<T = RequestBody> extends Generic {
exclude_interim?: boolean;
start?: string;
end?: string;
allow_no_match?: boolean;
allow_no_jobs?: boolean;
body?: T;
}
@ -1814,13 +1676,12 @@ export interface MlGetRecords<T = RequestBody> extends Generic {
export interface MlGetTrainedModels extends Generic {
model_id?: string;
allow_no_match?: boolean;
include?: string;
include_model_definition?: boolean;
decompress_definition?: boolean;
from?: number;
size?: number;
tags?: string | string[];
exclude_generated?: boolean;
for_export?: boolean;
}
export interface MlGetTrainedModelsStats extends Generic {
@ -1833,9 +1694,8 @@ export interface MlGetTrainedModelsStats extends Generic {
export interface MlInfo extends Generic {
}
export interface MlOpenJob<T = RequestBody> extends Generic {
export interface MlOpenJob extends Generic {
job_id: string;
body?: T;
}
export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
@ -1843,21 +1703,15 @@ export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
body: T;
}
export interface MlPostData<T = RequestNDBody> extends Generic {
export interface MlPostData<T = RequestBody> extends Generic {
job_id: string;
reset_start?: string;
reset_end?: string;
body: T;
}
export interface MlPreviewDataFrameAnalytics<T = RequestBody> extends Generic {
id?: string;
body?: T;
}
export interface MlPreviewDatafeed<T = RequestBody> extends Generic {
datafeed_id?: string;
body?: T;
export interface MlPreviewDatafeed extends Generic {
datafeed_id: string;
}
export interface MlPutCalendar<T = RequestBody> extends Generic {
@ -1891,30 +1745,14 @@ export interface MlPutFilter<T = RequestBody> extends Generic {
export interface MlPutJob<T = RequestBody> extends Generic {
job_id: string;
ignore_unavailable?: boolean;
allow_no_indices?: boolean;
ignore_throttled?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
body: T;
}
export interface MlPutTrainedModel<T = RequestBody> extends Generic {
model_id: string;
defer_definition_decompression?: boolean;
body: T;
}
export interface MlPutTrainedModelAlias extends Generic {
model_alias: string;
model_id: string;
reassign?: boolean;
}
export interface MlResetJob extends Generic {
job_id: string;
wait_for_completion?: boolean;
}
export interface MlRevertModelSnapshot<T = RequestBody> extends Generic {
job_id: string;
snapshot_id: string;
@ -1949,13 +1787,11 @@ export interface MlStopDataFrameAnalytics<T = RequestBody> extends Generic {
body?: T;
}
export interface MlStopDatafeed<T = RequestBody> extends Generic {
export interface MlStopDatafeed extends Generic {
datafeed_id: string;
allow_no_match?: boolean;
allow_no_datafeeds?: boolean;
force?: boolean;
timeout?: string;
body?: T;
}
export interface MlUpdateDataFrameAnalytics<T = RequestBody> extends Generic {
@ -1988,13 +1824,6 @@ export interface MlUpdateModelSnapshot<T = RequestBody> extends Generic {
body: T;
}
export interface MlUpgradeJobSnapshot extends Generic {
job_id: string;
snapshot_id: string;
timeout?: string;
wait_for_completion?: boolean;
}
export interface MlValidate<T = RequestBody> extends Generic {
body: T;
}
@ -2014,7 +1843,7 @@ export interface MonitoringBulk<T = RequestNDBody> extends Generic {
export interface Msearch<T = RequestNDBody> extends Generic {
index?: string | string[];
type?: string | string[];
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
max_concurrent_searches?: number;
typed_keys?: boolean;
pre_filter_shard_size?: number;
@ -2027,7 +1856,7 @@ export interface Msearch<T = RequestNDBody> extends Generic {
export interface MsearchTemplate<T = RequestNDBody> extends Generic {
index?: string | string[];
type?: string | string[];
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
typed_keys?: boolean;
max_concurrent_searches?: number;
rest_total_hits_as_int?: boolean;
@ -2053,23 +1882,13 @@ export interface Mtermvectors<T = RequestBody> extends Generic {
body?: T;
}
export interface NodesClearRepositoriesMeteringArchive extends Generic {
node_id: string | string[];
max_archive_version: number;
}
export interface NodesGetRepositoriesMeteringInfo extends Generic {
node_id: string | string[];
}
export interface NodesHotThreads extends Generic {
node_id?: string | string[];
interval?: string;
snapshots?: number;
threads?: number;
ignore_idle_threads?: boolean;
type?: 'cpu' | 'wait' | 'block' | 'mem';
sort?: 'cpu' | 'total';
type?: 'cpu' | 'wait' | 'block';
timeout?: string;
}
@ -2098,7 +1917,6 @@ export interface NodesStats extends Generic {
types?: string | string[];
timeout?: string;
include_segment_file_sizes?: boolean;
include_unloaded_segments?: boolean;
}
export interface NodesUsage extends Generic {
@ -2107,15 +1925,6 @@ export interface NodesUsage extends Generic {
timeout?: string;
}
export interface OpenPointInTime extends Generic {
index: string | string[];
preference?: string;
routing?: string;
ignore_unavailable?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
keep_alive: string;
}
export interface Ping extends Generic {
}
@ -2179,12 +1988,6 @@ export interface RollupPutJob<T = RequestBody> extends Generic {
body: T;
}
export interface RollupRollup<T = RequestBody> extends Generic {
index: string;
rollup_index: string;
body: T;
}
export interface RollupRollupSearch<T = RequestBody> extends Generic {
index: string | string[];
type?: string;
@ -2261,22 +2064,6 @@ export interface Search<T = RequestBody> extends Generic {
max_concurrent_shard_requests?: number;
pre_filter_shard_size?: number;
rest_total_hits_as_int?: boolean;
min_compatible_shard_node?: string;
body?: T;
}
export interface SearchMvt<T = RequestBody> extends Generic {
index: string | string[];
field: string;
zoom: number;
x: number;
y: number;
exact_bounds?: boolean;
extent?: number;
grid_precision?: number;
grid_type?: 'grid' | 'point' | 'centroid';
size?: number;
track_total_hits?: boolean | number;
body?: T;
}
@ -2300,7 +2087,7 @@ export interface SearchTemplate<T = RequestBody> extends Generic {
preference?: string;
routing?: string | string[];
scroll?: string;
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
explain?: boolean;
profile?: boolean;
typed_keys?: boolean;
@ -2309,10 +2096,6 @@ export interface SearchTemplate<T = RequestBody> extends Generic {
body: T;
}
export interface SearchableSnapshotsCacheStats extends Generic {
node_id?: string | string[];
}
export interface SearchableSnapshotsClearCache extends Generic {
index?: string | string[];
ignore_unavailable?: boolean;
@ -2325,7 +2108,6 @@ export interface SearchableSnapshotsMount<T = RequestBody> extends Generic {
snapshot: string;
master_timeout?: string;
wait_for_completion?: boolean;
storage?: string;
body: T;
}
@ -2335,7 +2117,6 @@ export interface SearchableSnapshotsRepositoryStats extends Generic {
export interface SearchableSnapshotsStats extends Generic {
index?: string | string[];
level?: 'cluster' | 'indices' | 'shards';
}
export interface SecurityAuthenticate extends Generic {
@ -2347,10 +2128,6 @@ export interface SecurityChangePassword<T = RequestBody> extends Generic {
body: T;
}
export interface SecurityClearApiKeyCache extends Generic {
ids: string | string[];
}
export interface SecurityClearCachedPrivileges extends Generic {
application: string | string[];
}
@ -2364,24 +2141,11 @@ export interface SecurityClearCachedRoles extends Generic {
name: string | string[];
}
export interface SecurityClearCachedServiceTokens extends Generic {
namespace: string;
service: string;
name: string | string[];
}
export interface SecurityCreateApiKey<T = RequestBody> extends Generic {
refresh?: 'wait_for' | boolean;
body: T;
}
export interface SecurityCreateServiceToken extends Generic {
namespace: string;
service: string;
name?: string;
refresh?: 'wait_for' | boolean;
}
export interface SecurityDeletePrivileges extends Generic {
application: string;
name: string;
@ -2398,13 +2162,6 @@ export interface SecurityDeleteRoleMapping extends Generic {
refresh?: 'wait_for' | boolean;
}
export interface SecurityDeleteServiceToken extends Generic {
namespace: string;
service: string;
name: string;
refresh?: 'wait_for' | boolean;
}
export interface SecurityDeleteUser extends Generic {
username: string;
refresh?: 'wait_for' | boolean;
@ -2437,21 +2194,11 @@ export interface SecurityGetPrivileges extends Generic {
}
export interface SecurityGetRole extends Generic {
name?: string | string[];
name?: string;
}
export interface SecurityGetRoleMapping extends Generic {
name?: string | string[];
}
export interface SecurityGetServiceAccounts extends Generic {
namespace?: string;
service?: string;
}
export interface SecurityGetServiceCredentials extends Generic {
namespace: string;
service: string;
name?: string;
}
export interface SecurityGetToken<T = RequestBody> extends Generic {
@ -2465,11 +2212,6 @@ export interface SecurityGetUser extends Generic {
export interface SecurityGetUserPrivileges extends Generic {
}
export interface SecurityGrantApiKey<T = RequestBody> extends Generic {
refresh?: 'wait_for' | boolean;
body: T;
}
export interface SecurityHasPrivileges<T = RequestBody> extends Generic {
user?: string;
body: T;
@ -2506,47 +2248,6 @@ export interface SecurityPutUser<T = RequestBody> extends Generic {
body: T;
}
export interface SecurityQueryApiKeys<T = RequestBody> extends Generic {
body?: T;
}
export interface SecuritySamlAuthenticate<T = RequestBody> extends Generic {
body: T;
}
export interface SecuritySamlCompleteLogout<T = RequestBody> extends Generic {
body: T;
}
export interface SecuritySamlInvalidate<T = RequestBody> extends Generic {
body: T;
}
export interface SecuritySamlLogout<T = RequestBody> extends Generic {
body: T;
}
export interface SecuritySamlPrepareAuthentication<T = RequestBody> extends Generic {
body: T;
}
export interface SecuritySamlServiceProviderMetadata extends Generic {
realm_name: string;
}
export interface ShutdownDeleteNode extends Generic {
node_id: string;
}
export interface ShutdownGetNode extends Generic {
node_id?: string;
}
export interface ShutdownPutNode<T = RequestBody> extends Generic {
node_id: string;
body: T;
}
export interface SlmDeleteLifecycle extends Generic {
policy_id: string;
}
@ -2585,14 +2286,6 @@ export interface SnapshotCleanupRepository extends Generic {
timeout?: string;
}
export interface SnapshotClone<T = RequestBody> extends Generic {
repository: string;
snapshot: string;
target_snapshot: string;
master_timeout?: string;
body: T;
}
export interface SnapshotCreate<T = RequestBody> extends Generic {
repository: string;
snapshot: string;
@ -2626,15 +2319,6 @@ export interface SnapshotGet extends Generic {
snapshot: string | string[];
master_timeout?: string;
ignore_unavailable?: boolean;
index_details?: boolean;
include_repository?: boolean;
sort?: 'start_time' | 'duration' | 'name' | 'repository' | 'index_count' | 'shard_count' | 'failed_shard_count';
size?: number;
order?: 'asc' | 'desc';
from_sort_value?: string;
after?: string;
offset?: number;
slm_policy_filter?: string;
verbose?: boolean;
}
@ -2644,21 +2328,6 @@ export interface SnapshotGetRepository extends Generic {
local?: boolean;
}
export interface SnapshotRepositoryAnalyze extends Generic {
repository: string;
blob_count?: number;
concurrency?: number;
read_node_count?: number;
early_read_node_count?: number;
seed?: number;
rare_action_probability?: number;
max_blob_size?: string;
max_total_data_size?: string;
timeout?: string;
detailed?: boolean;
rarely_abort_writes?: boolean;
}
export interface SnapshotRestore<T = RequestBody> extends Generic {
repository: string;
snapshot: string;
@ -2684,22 +2353,6 @@ export interface SqlClearCursor<T = RequestBody> extends Generic {
body: T;
}
export interface SqlDeleteAsync extends Generic {
id: string;
}
export interface SqlGetAsync extends Generic {
id: string;
delimiter?: string;
format?: string;
keep_alive?: string;
wait_for_completion_timeout?: string;
}
export interface SqlGetAsyncStatus extends Generic {
id: string;
}
export interface SqlQuery<T = RequestBody> extends Generic {
format?: string;
body: T;
@ -2736,11 +2389,6 @@ export interface TasksList extends Generic {
timeout?: string;
}
export interface TermsEnum<T = RequestBody> extends Generic {
index: string | string[];
body?: T;
}
export interface Termvectors<T = RequestBody> extends Generic {
index: string;
id?: string;
@ -2759,28 +2407,9 @@ export interface Termvectors<T = RequestBody> extends Generic {
body?: T;
}
export interface TextStructureFindStructure<T = RequestNDBody> extends Generic {
lines_to_sample?: number;
line_merge_size_limit?: number;
timeout?: string;
charset?: string;
format?: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text';
has_header_row?: boolean;
column_names?: string | string[];
delimiter?: string;
quote?: string;
should_trim_fields?: boolean;
grok_pattern?: string;
timestamp_field?: string;
timestamp_format?: string;
explain?: boolean;
body: T;
}
export interface TransformDeleteTransform extends Generic {
transform_id: string;
force?: boolean;
timeout?: string;
}
export interface TransformGetTransform extends Generic {
@ -2788,7 +2417,6 @@ export interface TransformGetTransform extends Generic {
from?: number;
size?: number;
allow_no_match?: boolean;
exclude_generated?: boolean;
}
export interface TransformGetTransformStats extends Generic {
@ -2799,15 +2427,12 @@ export interface TransformGetTransformStats extends Generic {
}
export interface TransformPreviewTransform<T = RequestBody> extends Generic {
transform_id?: string;
timeout?: string;
body?: T;
body: T;
}
export interface TransformPutTransform<T = RequestBody> extends Generic {
transform_id: string;
defer_validation?: boolean;
timeout?: string;
body: T;
}
@ -2828,15 +2453,9 @@ export interface TransformStopTransform extends Generic {
export interface TransformUpdateTransform<T = RequestBody> extends Generic {
transform_id: string;
defer_validation?: boolean;
timeout?: string;
body: T;
}
export interface TransformUpgradeTransforms extends Generic {
dry_run?: boolean;
timeout?: string;
}
export interface Update<T = RequestBody> extends Generic {
id: string;
index: string;
@ -2854,13 +2473,14 @@ export interface Update<T = RequestBody> extends Generic {
timeout?: string;
if_seq_no?: number;
if_primary_term?: number;
require_alias?: boolean;
body: T;
}
export interface UpdateByQuery<T = RequestBody> extends Generic {
index: string | string[];
type?: string | string[];
_source_exclude?: string | string[];
_source_include?: string | string[];
analyzer?: string;
analyze_wildcard?: boolean;
default_operator?: 'AND' | 'OR';
@ -2881,6 +2501,9 @@ export interface UpdateByQuery<T = RequestBody> extends Generic {
size?: number;
max_docs?: number;
sort?: string | string[];
_source?: string | string[];
_source_excludes?: string | string[];
_source_includes?: string | string[];
terminate_after?: number;
stats?: string | string[];
version?: boolean;
@ -2937,10 +2560,6 @@ export interface WatcherPutWatch<T = RequestBody> extends Generic {
body?: T;
}
export interface WatcherQueryWatches<T = RequestBody> extends Generic {
body?: T;
}
export interface WatcherStart extends Generic {
}

16864
api/types.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@ -31,10 +31,10 @@ function handleError (err, callback) {
}
function snakeCaseKeys (acceptedQuerystring, snakeCase, querystring) {
const target = {}
const keys = Object.keys(querystring)
for (let i = 0, len = keys.length; i < len; i++) {
const key = keys[i]
var target = {}
var keys = Object.keys(querystring)
for (var i = 0, len = keys.length; i < len; i++) {
var key = keys[i]
target[snakeCase[key] || key] = querystring[key]
}
return target

View File

@ -1,100 +0,0 @@
[[advanced-config]]
=== Advanced configuration
If you need to customize the client behavior heavily, you are in the right
place! The client enables you to customize the following internals:
* `ConnectionPool` class
* `Connection` class
* `Serializer` class
NOTE: For information about the `Transport` class, refer to <<transport>>.
[discrete]
==== `ConnectionPool`
This class is responsible for keeping in memory all the {es} Connection that you
are using. There is a single Connection for every node. The connection pool
handles the resurrection strategies and the updates of the pool.
[source,js]
----
const { Client, ConnectionPool } = require('@elastic/elasticsearch')
class MyConnectionPool extends ConnectionPool {
markAlive (connection) {
// your code
super.markAlive(connection)
}
}
const client = new Client({
ConnectionPool: MyConnectionPool
})
----
[discrete]
==== `Connection`
This class represents a single node, it holds every information we have on the
node, such as roles, id, URL, custom headers and so on. The actual HTTP request
is performed here, this means that if you want to swap the default HTTP client
(Node.js core), you should override the `request` method of this class.
[source,js]
----
const { Client, Connection } = require('@elastic/elasticsearch')
class MyConnection extends Connection {
request (params, callback) {
// your code
}
}
const client = new Client({
Connection: MyConnection
})
----
[discrete]
==== `Serializer`
This class is responsible for the serialization of every request, it offers the
following methods:
* `serialize(object: any): string;` serializes request objects.
* `deserialize(json: string): any;` deserializes response strings.
* `ndserialize(array: any[]): string;` serializes bulk request objects.
* `qserialize(object: any): string;` serializes request query parameters.
[source,js]
----
const { Client, Serializer } = require('@elastic/elasticsearch')
class MySerializer extends Serializer {
serialize (object) {
// your code
}
}
const client = new Client({
Serializer: MySerializer
})
----
[discrete]
==== Migrate to v8
The Node.js client can be configured to emit an HTTP header
``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
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``.

View File

@ -0,0 +1,129 @@
[[auth-reference]]
== Authentication
This document contains code snippets to show you how to connect to various {es}
providers.
=== Elastic Cloud
If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers
an easy way to connect to it via the `cloud` option. You must pass the Cloud ID
that you can find in the cloud console, then your username and password inside
the `auth` option.
NOTE: When connecting to Elastic Cloud, the client will automatically enable
both request and response compression by default, since it yields significant
throughput improvements. Moreover, the client will also set the ssl option
`secureProtocol` to `TLSv1_2_method` unless specified otherwise. You can still
override this option by configuring them.
IMPORTANT: Do not enable sniffing when using Elastic Cloud, since the nodes are
behind a load balancer, Elastic Cloud will take care of everything for you.
Take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here]
to know more.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
cloud: {
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
},
auth: {
username: 'elastic',
password: 'changeme'
}
})
----
=== Basic authentication
You can provide your credentials by passing the `username` and `password`
parameters via the `auth` option.
NOTE: If you provide both basic authentication credentials and the Api Key configuration, the Api Key will take precedence.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://localhost:9200',
auth: {
username: 'elastic',
password: 'changeme'
}
})
----
Otherwise, you can provide your credentials in the node(s) URL.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://username:password@localhost:9200'
})
----
=== ApiKey authentication
You can use the
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[ApiKey]
authentication by passing the `apiKey` parameter via the `auth` option. The
`apiKey` parameter can be either a base64 encoded string or an object with the
values that you can obtain from the
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[create api key endpoint].
NOTE: If you provide both basic authentication credentials and the Api Key configuration, the Api Key will take precedence.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://localhost:9200',
auth: {
apiKey: 'base64EncodedKey'
}
})
----
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://localhost:9200',
auth: {
apiKey: {
id: 'foo',
api_key: 'bar'
}
}
})
----
=== SSL configuration
Without any additional configuration you can specify `https://` node urls, and
the certificates used to sign these requests will be verified. To turn off certificate verification, you must specify an `ssl` object in the top level config and set `rejectUnauthorized: false`. The default `ssl` values are the same that Node.js's https://nodejs.org/api/tls.html#tls_tls_connect_options_callback[`tls.connect()`]
uses.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://localhost:9200',
auth: {
username: 'elastic',
password: 'changeme'
},
ssl: {
ca: fs.readFileSync('./cacert.pem'),
rejectUnauthorized: false
}
})
----

View File

@ -1,290 +0,0 @@
[[basic-config]]
=== Basic configuration
This page shows you the possible basic configuration options that the clients
offers.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'http://localhost:9200',
maxRetries: 5,
requestTimeout: 60000,
sniffOnStart: true
})
----
[cols=2*]
|===
|`node` or `nodes`
a|The Elasticsearch endpoint to use. +
It can be a single string or an array of strings:
[source,js]
----
node: 'http://localhost:9200'
----
Or it can be an object (or an array of objects) that represents the node:
[source,js]
----
node: {
url: new URL('http://localhost:9200'),
ssl: 'ssl options',
agent: 'http agent options',
id: 'custom node id',
headers: { 'custom': 'headers' }
roles: {
master: true,
data: true,
ingest: true,
ml: false
}
}
----
|`auth`
a|Your authentication data. You can use both basic authentication and
{ref}/security-api-create-api-key.html[ApiKey]. +
See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
for more details. +
_Default:_ `null`
Basic authentication:
[source,js]
----
auth: {
username: 'elastic',
password: 'changeme'
}
----
{ref}/security-api-create-api-key.html[ApiKey] authentication:
[source,js]
----
auth: {
apiKey: 'base64EncodedKey'
}
----
Bearer authentication, useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens]. Be aware that it does not handle automatic token refresh:
[source,js]
----
auth: {
bearer: 'token'
}
----
|`maxRetries`
|`number` - Max number of retries for each request. +
_Default:_ `3`
|`requestTimeout`
|`number` - Max request timeout in milliseconds for each request. +
_Default:_ `30000`
|`pingTimeout`
|`number` - Max ping request timeout in milliseconds for each request. +
_Default:_ `3000`
|`sniffInterval`
|`number, boolean` - Perform a sniff operation every `n` milliseconds. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
_Default:_ `false`
|`sniffOnStart`
|`boolean` - Perform a sniff once the client is started. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
_Default:_ `false`
|`sniffEndpoint`
|`string` - Endpoint to ping during a sniff. +
_Default:_ `'_nodes/_all/http'`
|`sniffOnConnectionFault`
|`boolean` - Perform a sniff on connection fault. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
_Default:_ `false`
|`resurrectStrategy`
|`string` - Configure the node resurrection strategy. +
_Options:_ `'ping'`, `'optimistic'`, `'none'` +
_Default:_ `'ping'`
|`suggestCompression`
|`boolean` - Adds `accept-encoding` header to every request. +
_Default:_ `false`
|`compression`
|`string, boolean` - Enables gzip request body compression. +
_Options:_ `'gzip'`, `false` +
_Default:_ `false`
|`ssl`
|`http.SecureContextOptions` - ssl https://nodejs.org/api/tls.html[configuraton]. +
_Default:_ `null`
|`proxy`
a|`string, URL` - If you are using an http(s) proxy, you can put its url here.
The client will automatically handle the connection to it. +
_Default:_ `null`
[source,js]
----
const client = new Client({
node: 'http://localhost:9200',
proxy: 'http://localhost:8080'
})
// Proxy with basic authentication
const client = new Client({
node: 'http://localhost:9200',
proxy: 'http://user:pwd@localhost:8080'
})
----
|`agent`
a|`http.AgentOptions, function` - http agent https://nodejs.org/api/http.html#http_new_agent_options[options],
or a function that returns an actual http agent instance. If you want to disable the http agent use entirely
(and disable the `keep-alive` feature), set the agent to `false`. +
_Default:_ `null`
[source,js]
----
const client = new Client({
node: 'http://localhost:9200',
agent: { agent: 'options' }
})
const client = new Client({
node: 'http://localhost:9200',
// the function takes as parameter the option
// object passed to the Connection constructor
agent: (opts) => new CustomAgent()
})
const client = new Client({
node: 'http://localhost:9200',
// Disable agent and keep-alive
agent: false
})
----
|`nodeFilter`
a|`function` - Filters which node not to use for a request. +
_Default:_
[source,js]
----
function defaultNodeFilter (node) {
// avoid master only nodes
if (node.roles.master === true &&
node.roles.data === false &&
node.roles.ingest === false) {
return false
}
return true
}
----
|`nodeSelector`
a|`function` - custom selection strategy. +
_Options:_ `'round-robin'`, `'random'`, custom function +
_Default:_ `'round-robin'` +
_Custom function example:_
[source,js]
----
function nodeSelector (connections) {
const index = calculateIndex()
return connections[index]
}
----
|`generateRequestId`
a|`function` - function to generate the request id for every request, it takes
two parameters, the request parameters and options. +
By default it generates an incremental integer for every request. +
_Custom function example:_
[source,js]
----
function generateRequestId (params, options) {
// your id generation logic
// must be syncronous
return 'id'
}
----
|`name`
|`string, symbol` - The name to identify the client instance in the events. +
_Default:_ `elasticsearch-js`
|`opaqueIdPrefix`
|`string` - A string that will be use to prefix any `X-Opaque-Id` header. +
See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html#_x-opaque-id_support[`X-Opaque-Id` support] for more details. +
_Default:_ `null`
|`headers`
|`object` - A set of custom headers to send in every request. +
_Default:_ `{}`
|`context`
|`object` - A custom object that you can use for observability in your events.
It will be merged with the API level context option. +
_Default:_ `null`
|`enableMetaHeader`
|`boolean` - If true, adds an header named `'x-elastic-client-meta'`, containing some minimal telemetry data,
such as the client and platform version. +
_Default:_ `true`
|`cloud`
a|`object` - Custom configuration for connecting to
https://cloud.elastic.co[Elastic Cloud]. See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
for more details. +
_Default:_ `null` +
_Cloud configuration example:_
[source,js]
----
const client = new Client({
cloud: {
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA=='
},
auth: {
username: 'elastic',
password: 'changeme'
}
})
----
|`disablePrototypePoisoningProtection`
|`boolean`, `'proto'`, `'constructor'` - By the default the client will protect you against prototype poisoning attacks. Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more. If needed you can disable prototype poisoning protection entirely or one of the two checks. Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more. +
_Default:_ `false`
|`caFingerprint`
|`string` - If configured, verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied fingerprint. Only accepts SHA256 digest fingerprints. +
_Default:_ `null`
|`maxResponseSize`
|`number` - When configured, it verifies that the uncompressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_STRING_LENTGH +
_Default:_ `null`
|`maxCompressedResponseSize`
|`number` - When configured, it verifies that the compressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_LENTGH +
_Default:_ `null`
|===
[discrete]
==== Performances considerations
By default, the client will protection you against prototype poisoning attacks.
Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more.
If needed you can disable prototype poisoning protection entirely or one of the two checks.
Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more.
While it's good to be safe, you should know that security always comes with a cost.
With big enough payloads, this security check could causea drop in the overall performances,
which might be a problem for your application.
If you know you can trust the data stored in Elasticsearch, you can safely disable this check.
[source,js]
----
const client = new Client({
disablePrototypePoisoningProtection: true
})
----

View File

@ -1,21 +1,19 @@
[[breaking-changes]]
=== Breaking changes coming from the old client
== Breaking changes coming from the old client
If you were already using the previous version of this client the one you used
to install with `npm install elasticsearch` you will encounter some breaking
changes.
[discrete]
==== Dont panic!
=== Dont panic!
Every breaking change was carefully weighed, and each is justified. Furthermore,
the new codebase has been rewritten with modern JavaScript and has been
carefully designed to be easy to maintain.
[discrete]
==== Breaking changes
=== Breaking changes
* Minimum supported version of Node.js is `v8`.
@ -211,8 +209,7 @@ client.transport.request({
})
----
[discrete]
==== Talk is cheap. Show me the code.
=== Talk is cheap. Show me the code.
You can find a code snippet with the old client below followed by the same code
logic but with the new client.

View File

@ -1,579 +1,19 @@
[[changelog-client]]
== Release notes
== Changelog
[discrete]
=== 7.17.12
[discrete]
==== Notes
This is the first 7.x release where patch versions of the client will no longer (intentionally) align with patch versions of Elasticsearch. The latest patch release of the client will always be compatible with the corresponding minor release of Elasticsearch.
[discrete]
==== Fixes
[discrete]
===== TypeScript build failure
Fixes a type declaration bug that caused TypeScript builds to fail. https://github.com/elastic/elasticsearch-js/pull/1927[#1927]
[discrete]
===== Add TypeScript type declarations to exports
Adds TypeScript type declarations file to package.json `exports` https://github.com/elastic/elasticsearch-js/pull/1930[#1930]
[discrete]
=== 7.17.11
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.17.11`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/release-notes-7.17.11.html[here].
[discrete]
==== Fixes
[discrete]
===== Fix index drift bug in bulk helper https://github.com/elastic/elasticsearch-js/pull/1759[#1759]
Fixes a bug in the bulk helper that would cause `onDrop` to send back the wrong JSON document or error on a nonexistent document when an error occurred on a bulk HTTP request that contained a `delete` action.
[discrete]
=== 7.17.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.17`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/release-notes-7.17.0.html[here].
[discrete]
=== 7.16.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.16`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.16/release-notes-7.16.0.html[here].
[discrete]
==== Fixes
[discrete]
===== Fixed "Cannot read property 'then' of null" https://github.com/elastic/elasticsearch-js/pull/1594[#1594]
[discrete]
===== Fixed export field deprecation log https://github.com/elastic/elasticsearch-js/pull/1593#[#1593]
[discrete]
=== 7.15.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.15`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.15/release-notes-7.15.0.html[here].
[discrete]
===== Support mapbox content type https://github.com/elastic/elasticsearch-js/pull/1500[#1500]
If you call an API that returns a mapbox content type, the response body will be a buffer.
[discrete]
===== Support CA fingerprint validation https://github.com/elastic/elasticsearch-js/pull/1499[#1499]
You can configure the client to only trust certificates that are signed by a specific CA certificate ( CA certificate pinning ) by providing a `caFingerprint` option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value.
a `caFingerprint` option, which will verify the supplied certificate authority fingerprint.
You must configure a SHA256 digest.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://example.com'
auth: { ... },
// the fingerprint (SHA256) of the CA certificate that is used to sign the certificate that the Elasticsearch node presents for TLS.
caFingerprint: '20:0D:CA:FA:76:...',
ssl: {
// might be required if it's a self-signed certificate
rejectUnauthorized: false
}
})
----
[discrete]
===== Show the body as string if the response error can't be read as ES error https://github.com/elastic/elasticsearch-js/pull/1509[#1509]
Useful if the errored response does not come from Elasticsearch, but a proxy in the middle for example.
[discrete]
===== Always display request params and options in request event https://github.com/elastic/elasticsearch-js/pull/1531[#1531]
In some edge cases the params and options weren't available in observabilty events, now they are always defined.
[discrete]
===== Always emit request aborted event https://github.com/elastic/elasticsearch-js/pull/1534[#1534]
If the client is busy running an async operation, the `.abort()` call might be executed before sending the actual request. In such case, the error was swallowed, now it will always be emitted, either in the `request` or `response` event.
[discrete]
=== 7.14.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.14`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.14/release-notes-7.14.0.html[here].
[discrete]
===== Verify connection to Elasticsearch https://github.com/elastic/elasticsearch-js/pull/1487[#1487]
The client will verify if it's working with a supported release of Elasticsearch.
Elastic language clients are guaranteed to be able to communicate with Elasticsearch or Elastic solutions running on the same major version and greater or equal minor version.
Language clients are forward compatible; meaning that clients support communicating with greater minor versions of Elasticsearch. Elastic language clients are not guaranteed to be backwards compatible.
[discrete]
===== Add api compatibility header support https://github.com/elastic/elasticsearch-js/pull/1478[#1478]
If you configure the `ELASTIC_CLIENT_APIVERSIONING` to `true` the client will send a compatibility header
to allow you to use a 7.x client against a 8.x cluster. In this way it will be easier to migrate your code to a newer release of Elasticsearch.
[discrete]
===== Add support for bearer auth https://github.com/elastic/elasticsearch-js/pull/1488[#1488]
Bearer authentication, useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens].
Be aware that it does not handle automatic token refresh:
[source,js]
----
auth: {
bearer: 'token'
}
----
[discrete]
===== Bulk update improvements https://github.com/elastic/elasticsearch-js/pull/1428[#1428]
The final stats object will let you know how many `noop` operations happened.
Also, a new `.stats` getter has been added to allow you to read the stats before
the operation finishes.
[source,js]
----
const b = client.helpers.bulk({ ... })
...
console.log(b.stats)
----
[discrete]
=== 7.13.0
[discrete]
==== Breaking changes
[discrete]
===== Remove Node.js v10 support https://github.com/elastic/elasticsearch-js/pull/1471[#1471]
According to our
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html#nodejs-support[support matrix].
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.13`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.13/release-notes-7.13.0.html[here].
[discrete]
===== Added new TypeScript definitions
The new type definition is more advanced compared to the legacy one.
In the legacy type definitions you were expected to configure via generics both request and response bodies.
The new type definitions comes with a complete type definition for every Elasticsearch endpoint.
You can see how to use them now https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/typescript.html[here].
[discrete]
===== Improve response error message https://github.com/elastic/elasticsearch-js/pull/1457[#1457]
In case of Elasticsearch errors, now the error message show more info about the underlying issue,
improving the debugging experience.
[discrete]
==== Fixes
[discrete]
===== Catch HEAD errors https://github.com/elastic/elasticsearch-js/pull/1460[#1460]
In case of http errors in HEAD request, the client was swalling the response body.
This is now fixed and in case of error you will get the full body response.
[discrete]
=== 7.12.0
[discrete]
==== Breaking changes
[discrete]
===== Remove Node.js v8 support https://github.com/elastic/elasticsearch-js/pull/1402[#1402]
According to our
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html#nodejs-support[support matrix].
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.12`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.12/release-notes-7.12.0.html[here].
[discrete]
===== Add support for transport options to all helpers https://github.com/elastic/elasticsearch-js/pull/1400[#1400]
You can now pass Transport specific options to the helpers as well.
[discrete]
==== Fixes
[discrete]
===== Add `.finally` method to the Promise API https://github.com/elastic/elasticsearch-js/pull/1415[#1415]
The client returns a thenable object when you are not configuring a callback.
Now the thenable offers a `.finally` method as well.
[discrete]
=== 7.11.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.11`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.11/release-notes-7.11.0.html[here].
[discrete]
===== Added new observability events https://github.com/elastic/elasticsearch-js/pull/1365[#1365]
Two new observability events has been introduced: `serialization` and
`deserialization`. 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.
----
serialization
│ (serialization and compression happens between those two events)
└─▶ request
│ (actual time spent over the wire)
└─▶ deserialization
│ (deserialization and decompression happens between those two events)
└─▶ response
----
[discrete]
===== Added x-elastic-client-meta header https://github.com/elastic/elasticsearch-js/pull/1373[#1373]
Adds the `x-elastic-client-meta` HTTP header which is used by Elastic Cloud and
can be disabled with the `enableMetaHeader` parameter set to `false`.
[discrete]
==== Fixes
[discrete]
===== Fixes req.abort() with a body that is a stream calls callback(err) twice https://github.com/elastic/elasticsearch-js/pull/1376[#1376]
When using a body that is a stream to client.search(), and calling req.abort(),
the callback is called twice. Once for the RequestAbortedError, as expected, and
once for a "premature close" error from end-of-stream, used by pump, used by the
client. This issue has now been fixed.
[discrete]
=== 7.10.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.10`.
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.10/release-notes-7.10.0.html[here].
[discrete]
===== Added proxy support https://github.com/elastic/elasticsearch-js/pull/1260[#1260]
If you need to pass through an http(s) proxy for connecting to {es}, the client
offers out of the box a handy configuration for helping you with it. Under the
hood it uses the https://github.com/delvedor/hpagent[`hpagent`] module.
[source,js]
----
const client = new Client({
node: 'http://localhost:9200',
proxy: 'http://localhost:8080'
})
----
Basic authentication is supported as well:
[source,js]
----
const client = new Client({
node: 'http://localhost:9200',
proxy: 'http://user:pwd@localhost:8080'
})
----
[discrete]
==== Fixes
[discrete]
===== Scroll search should clear the scroll at the end https://github.com/elastic/elasticsearch-js/pull/1331[#1331]
From now on the scroll search helper will automatically close the scroll on
{es}, by doing so, {es} will free resources faster.
[discrete]
===== Handle connectivity issues while reading the body https://github.com/elastic/elasticsearch-js/pull/1343[#1343]
It might happen that the underlying socket stops working due to an external
cause while reading the body. This could lead to an unwanted
`DeserialzationError`. From now, this will be handled as a generic
`ConnectionError`.
[discrete]
==== Warnings
[discrete]
===== Add warning log about nodejs version support https://github.com/elastic/elasticsearch-js/pull/1349[#1349]
`7.11` will be the last version of the client that will support Node.js v8,
while `7.12` will be the last one that supports Node.js v10. If you are using
this versions you will see a `DeprecationWaring` in your logs. We strongly
recommend to upgrade to newer versions of Node.js as usng an EOL version will
expose you to securty risks.
Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for
additional information.
[discrete]
=== 7.9.1
[discrete]
==== Fixes
[discrete]
===== Improve child performances https://github.com/elastic/elasticsearch-js/pull/1314[#1314]
The client code has been refactored to speed up the performances of the child
method. Before this pr, creating many children per second would have caused a
high memory consumption and a spike in CPU usage. This pr changes the way the
client is created by refactoring the code generation, now the clients methods
are no longer added to the instance with a for loop but via prototypal
inheritance. Thus, the overall performances are way better, now creating a child
is ~5 times faster, and it consumes ~70% less memory.
This change should not cause any breaking change unless you were mocking the
client methods. In such case you should refactor it, or use
https://github.com/elastic/elasticsearch-js-mock[elasticsearch-js-mock].
Finally, this change should also fix once and of all the bundlers support.
[discrete]
===== Throw all errors asynchronously https://github.com/elastic/elasticsearch-js/pull/1295[#1295]
Some validation errors were thrown synchronously, causing the callback to be
called in th same tick. This issue is known as _"The release fo Zalgo"_ (see
https://blog.izs.me/2013/08/designing-apis-for-asynchrony[here]).
[discrete]
===== Fix `maxRetries` request option handling https://github.com/elastic/elasticsearch-js/pull/1296[#1296]
The `maxRetries` parameter can be configured on a per requets basis, if set to
zero it was defaulting to the client default. Now the client is honoring the
request specific configuration.
[discrete]
===== Fix RequestOptions.body type to include null https://github.com/elastic/elasticsearch-js/pull/1300[#1300]
The Connection requets option types were not accepting `null` as valid value.
[discrete]
===== Fixed `size` and `maxRetries` parameters in helpers https://github.com/elastic/elasticsearch-js/pull/1284[#1284]
The `size` parameter was being passed too the scroll request, which was causing
an error. Value of `maxRetries` set to 0 was resulting in no request at all.
[discrete]
=== 7.9.0
[discrete]
==== Features
[discrete]
===== Add ability to disable the http agent https://github.com/elastic/elasticsearch-js/pull/1251[#1251]
If needed, the http agent can be disabled by setting it to `false`.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'http://localhost:9200'.
agent: false
})
----
[discrete]
===== Add support for a global context option https://github.com/elastic/elasticsearch-js/pull/1256[#1256]
Before this, you could set a `context` option in each request, but there was no
way of setting it globally. Now you can by configuring the `context` object in
the global configuration, that will be merged with the local one.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'http://localhost:9200'.
context: { meta: 'data' }
})
----
[discrete]
===== ESM support https://github.com/elastic/elasticsearch-js/pull/1235[#1235]
If you are using ES Modules, now you can easily import the client!
[source,js]
----
import { Client } from '@elastic/elasticsearch'
----
[discrete]
==== Fixes
[discrete]
===== Allow the client name to be a symbol https://github.com/elastic/elasticsearch-js/pull/1254[#1254]
It was possible in plain JavaScript, but not in TypeScript, now you can do it in
TypeScript as well.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'http://localhost:9200',
name: Symbol('unique')
})
----
[discrete]
===== Fixed transport.request querystring type https://github.com/elastic/elasticsearch-js/pull/1240[#1240]
Only `Record<string, any>` was allowed. Now `string` is allowed as well.
[discrete]
===== Fixed type definitions https://github.com/elastic/elasticsearch-js/pull/1263[#1263]
* The `transport.request` defintion was incorrect, it was returning a
`Promise<T>` instead of `TransportRequestPromise<T>`.
* The `refresh` parameter of most APIs was declared as
`'true' | 'false' | 'wait_for'`, which was clunky. Now is
`'wait_for' | boolean`.
[discrete]
===== Generate response type as boolean if the request is HEAD only https://github.com/elastic/elasticsearch-js/pull/1275[#1275]
All HEAD request will have the body casted to a boolean value, `true` in case of
a 200 response, `false` in case of a 404 response. The type definitions were not
reflecting this behavior.
[source,ts]
----
import { Client } from '@elastic/elasticsearch'
const client = new Client({
node: 'http://localhost:9200'
})
const { body } = await client.exist({ index: 'my-index', id: 'my-id' })
console.log(body) // either `true` or `false`
----
[discrete]
==== Internals
[discrete]
===== Updated default http agent configuration https://github.com/elastic/elasticsearch-js/pull/1242[#1242]
Added the scheduling: 'lifo' option to the default HTTP agent configuration to
avoid maximizing the open sockets against {es} and lowering the risk of
encountering socket timeouts. This feature is only available from Node v14.5+,
but it should be backported to v10 and v12
(https://github.com/nodejs/node/pull/33278[nodejs/node#33278]).
[discrete]
===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245]
This pr introduce two changes which should not impact the surface API:
* Refactored the `client.child` API to allocate fewer objects, this change
improves memory consumption over time and improves the child creation
performances by ~12%.
* The client no longer inherits from the EventEmitter class, but instead has an
internal event emitter and exposes only the API useful for the users, namely
`emit, `on`, `once`, and `off`. The type definitions have been updated
accordingly.
[discrete]
=== 7.8.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.8`.
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.8/release-notes-7.8.0.html[here].
[discrete]
===== Added multi search helper https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
If you are sending search request at a high rate, this helper might be useful
for you. It will use the mutli search API under the hood to batch the requests
and improve the overall performances of your application. The `result` exposes a
`documents` property as well, which allows you to access directly the hits
sources.
If you are sending search request at a high rate, this helper might be useful for you.
It will use the mutli search API under the hood to batch the requests and improve the overall performances of your application. +
The `result` exposes a `documents` property as well, which allows you to access directly the hits sources.
[source,js]
----
@ -601,14 +41,10 @@ m.search(
)
----
[discrete]
===== Added timeout support in bulk and msearch helpers https://github.com/elastic/elasticsearch-js/pull/1206[#1206]
If there is a slow producer, the bulk helper might send data with a very large
period of time, and if the process crashes for any reason, the data would be
lost. This pr introduces a `flushInterval` option in the bulk helper to avoid
this issue. By default, the bulk helper will flush the data automatically every
30 seconds, unless the threshold has been reached before.
If there is a slow producer, the bulk helper might send data with a very large period of time, and if the process crashes for any reason, the data would be lost.
This pr introduces a `flushInterval` option in the bulk helper to avoid this issue. By default, the bulk helper will flush the data automatically every 30 seconds, unless the threshold has been reached before.
[source,js]
----
@ -617,9 +53,7 @@ const b = client.helpers.bulk({
})
----
The same problem might happen with the multi search helper, where the user is
not sending search requests fast enough. A `flushInterval` options has been
added as well, with a default value of 500 milliseconds.
The same problem might happen with the multi search helper, where the user is not sending search requests fast enough. A `flushInterval` options has been added as well, with a default value of 500 milliseconds.
[source,js]
----
@ -628,63 +62,43 @@ const m = client.helpers.msearch({
})
----
[discrete]
==== Internals
[discrete]
===== Use filter_path for improving the search helpers performances https://github.com/elastic/elasticsearch-js/pull/1199[#1199]
From now on, all he search helpers will use the `filter_path` option
automatically when needed to retrieve only the hits source. This change will
result in less netwprk traffic and improved deserialization performances.
From now on, all he search helpers will use the `filter_path` option automatically when needed to retrieve only the hits source. This change will result in less netwprk traffic and improved deserialization performances.
[discrete]
===== Search helpers documents getter https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
Before this, the `documents` key that you can access in any search helper was
computed as soon as we got the search result from Elasticsearch. With this
change the `documents` key is now a getter, which makes this process lazy,
resulting in better performances and lower memory impact.
Before this, the `documents` key that you can access in any search helper was computed as soon as we got the search result from Elasticsearch. With this change the `documents` key is now a getter, which makes this procees lazy, resulting in better performances and lower memory impact.
[discrete]
=== 7.7.1
[discrete]
==== Fixes
[discrete]
===== Disable client Helpers in Node.js < 10 - https://github.com/elastic/elasticsearch-js/pull/1194[#1194]
The client helpers can't be used in Node.js < 10 because it needs a custom flag
to be able to use them. Given that not every provider allows the user to specify
custom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
The client helpers can't be used in Node.js < 10 because it needs a custom flag to be able to use them.
Given that not every provider allows the user to specify cuatom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
[discrete]
===== Force lowercase in all headers - https://github.com/elastic/elasticsearch-js/pull/1187[#1187]
Now all the user-provided headers names will be lowercased by default, so there
will be no conflicts in case of the same header with different casing.
Now all the user-provided headers names will be lowercased by default, so there will be no conflicts in case of the same header with different casing.
[discrete]
=== 7.7.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.7`.
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.7/release-notes-7.7.0.html[here].
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.7/release-notes-7.7.0.html[here].
[discrete]
===== Introduced client helpers - https://github.com/elastic/elasticsearch-js/pull/1107[#1107]
From now on, the client comes with an handy collection of helpers to give you a
more comfortable experience with some APIs.
From now on, the client comes with an handy collection of helpers to give you a more comfortable experience with some APIs.
CAUTION: The client helpers are experimental, and the API may change in the next
minor releases.
CAUTION: The client helpers are experimental, and the API may change in the next minor releases.
The following helpers has been introduced:
@ -693,20 +107,14 @@ The following helpers has been introduced:
- `client.helpers.scrollSearch`
- `client.helpers.scrollDocuments`
[discrete]
===== The `ConnectionPool.getConnection` now always returns a `Connection` - https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
What does this mean? It means that you will see less `NoLivingConnectionError`,
which now can only be caused if you set a selector/filter too strict. For
improving the debugging experience, the `NoLivingConnectionsError` error message
has been updated.
What does this mean? It means that you will see less `NoLivingConnectionError`, which now can only be caused if you set a selector/filter too strict.
For improving the debugging experience, the `NoLivingConnectionsError` error message has been updated.
[discrete]
===== Abortable promises - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
From now on, it will be possible to abort a request generated with the
promise-styl API. If you abort a request generated from a promise, the promise
will be rejected with a `RequestAbortedError`.
From now on, it will be possible to abort a request generated with the promise-styl API. If you abort a request generated from a promise, the promise will be rejected with a `RequestAbortedError`.
[source,js]
@ -724,13 +132,9 @@ promise
promise.abort()
----
[discrete]
===== Major refactor of the Type Definitions - https://github.com/elastic/elasticsearch-js/pull/1119[#1119] https://github.com/elastic/elasticsearch-js/issues/1130[#1130] https://github.com/elastic/elasticsearch-js/pull/1132[#1132]
Now every API makes better use of the generics and overloading, so you can (or
not, by default request/response bodies are `Record<string, any>`) define the
request/response bodies in the generics.
Now every API makes better use of the generics and overloading, so you can (or not, by default request/response bodies are `Record<string, any>`) define the request/response bodies in the generics.
[source,ts]
----
// request and response bodies are generics
@ -741,93 +145,57 @@ client.search<SearchResponse>(...)
client.search<SearchResponse, SearchBody>(...)
----
This *should* not be a breaking change, as every generics defaults to `any`. It
might happen to some users that the code breaks, but our test didn't detect any
of it, probably because they were not robust enough. However, given the gigantic
improvement in the developer experience, we have decided to release this change
in the 7.x line.
This *should* not be a breaking change, as every generics defaults to `any`. It might happen to some users that the code breaks, but our test didn't detect any of it, probably because they were not robust enough. However, given the gigantic improvement in the developer experience, we have decided to release this change in the 7.x line.
[discrete]
==== Fixes
[discrete]
===== The `ConnectionPool.update` method now cleans the `dead` list - https://github.com/elastic/elasticsearch-js/issues/1122[#1122] https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
It can happen in a situation where we are updating the connections list and
running sniff, leaving the `dead` list in a dirty state. Now the
`ConnectionPool.update` cleans up the `dead` list every time, which makes way
more sense given that all the new connections are alive.
It can happen in a situation where we are updating the connections list and running sniff, leaving the `dead` list in a dirty state. Now the `ConnectionPool.update` cleans up the `dead` list every time, which makes way more sense given that all the new connections are alive.
[discrete]
===== `ConnectionPoolmarkDead` should ignore connections that no longer exists - https://github.com/elastic/elasticsearch-js/pull/1159[#1159]
It might happen that markDead is called just after a pool update, and in such
case, the client was adding the dead list a node that no longer exists, causing
unhandled exceptions later.
It might happen that markDead is called just after a pool update, and in such case, the clint was adding the dead list a node that no longer exists, causing unhandled exceptions later.
[discrete]
===== Do not retry a request if the body is a stream - https://github.com/elastic/elasticsearch-js/pull/1143[#1143]
The client should not retry if it's sending a stream body, because it should
store in memory a copy of the stream to be able to send it again, but since it
doesn't know in advance the size of the stream, it risks to take too much
memory. Furthermore, copying everytime the stream is very an expensive
operation.
The client should not retry if it's sending a stream body, because it should store in memory a copy of the stream to be able to send it again, but since it doesn't know in advance the size of the stream, it risks to take too much memory.
Furthermore, copying everytime the stream is very an expensive operation.
[discrete]
===== Return an error if the request has been aborted - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
Until now, aborting a request was blocking the HTTP request, but never calling
the callback or resolving the promise to notify the user. This is a bug because
it could lead to dangerous memory leaks. From now on if the user calls the
`request.abort()` method, the callback style API will be called with a
`RequestAbortedError`, the promise will be rejected with `RequestAbortedError`
as well.
Until now, aborting a request was blocking the HTTP request, but never calling the callback or resolving the promise to notify the user. This is a bug because it could lead to dangerous memory leaks. From now on if the user calls the `request.abort()` method, the callback style API will be called with a `RequestAbortedError`, the promise will be rejected with `RequestAbortedError` as well.
[discrete]
=== 7.6.1
**Fixes:**
- Secure json parsing -
https://github.com/elastic/elasticsearch-js/pull/1110[#1110]
- ApiKey should take precedence over basic auth -
https://github.com/elastic/elasticsearch-js/pull/1115[#1115]
- Secure json parsing - https://github.com/elastic/elasticsearch-js/pull/1110[#1110]
- ApiKey should take precedence over basic auth - https://github.com/elastic/elasticsearch-js/pull/1115[#1115]
**Documentation:**
- Fix typo in api reference -
https://github.com/elastic/elasticsearch-js/pull/1109[#1109]
- Fix typo in api reference - https://github.com/elastic/elasticsearch-js/pull/1109[#1109]
[discrete]
=== 7.6.0
Support for Elasticsearch `v7.6`.
[discrete]
=== 7.5.1
**Fixes:**
- Skip compression in case of empty string body -
https://github.com/elastic/elasticsearch-js/pull/1080[#1080]
- Fix typo in NoLivingConnectionsError -
https://github.com/elastic/elasticsearch-js/pull/1045[#1045]
- Change TransportRequestOptions.ignore to number[] -
https://github.com/elastic/elasticsearch-js/pull/1053[#1053]
- ClientOptions["cloud"] should have optional auth fields -
https://github.com/elastic/elasticsearch-js/pull/1032[#1032]
- Skip compression in case of empty string body - https://github.com/elastic/elasticsearch-js/pull/1080[#1080]
- Fix typo in NoLivingConnectionsError - https://github.com/elastic/elasticsearch-js/pull/1045[#1045]
- Change TransportRequestOptions.ignore to number[] - https://github.com/elastic/elasticsearch-js/pull/1053[#1053]
- ClientOptions["cloud"] should have optional auth fields - https://github.com/elastic/elasticsearch-js/pull/1032[#1032]
**Documentation:**
- Docs: Return super in example Transport subclass -
https://github.com/elastic/elasticsearch-js/pull/980[#980]
- Add examples to reference -
https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
- Added new examples -
https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
- Docs: Return super in example Transport subclass - https://github.com/elastic/elasticsearch-js/pull/980[#980]
- Add examples to reference - https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
- Added new examples - https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
[discrete]
=== 7.5.0
Support for Elasticsearch `v7.5`.
@ -836,102 +204,73 @@ Support for Elasticsearch `v7.5`.
- X-Opaque-Id support https://github.com/elastic/elasticsearch-js/pull/997[#997]
[discrete]
=== 7.4.0
Support for Elasticsearch `v7.4`.
**Fixes:**
- Fix issue; node roles are defaulting to true when undefined is breaking usage
of nodeFilter option -
https://github.com/elastic/elasticsearch-js/pull/967[#967]
- Fix issue; node roles are defaulting to true when undefined is breaking usage of nodeFilter option - https://github.com/elastic/elasticsearch-js/pull/967[#967]
**Documentation:**
- Updated API reference doc -
https://github.com/elastic/elasticsearch-js/pull/945[#945],
https://github.com/elastic/elasticsearch-js/pull/969[#969]
- Fix inaccurate description sniffEndpoint -
https://github.com/elastic/elasticsearch-js/pull/959[#959]
- Updated API reference doc - https://github.com/elastic/elasticsearch-js/pull/945[#945] https://github.com/elastic/elasticsearch-js/pull/969[#969]
- Fix inaccurate description sniffEndpoint - https://github.com/elastic/elasticsearch-js/pull/959[#959]
**Internals:**
- Update code generation
https://github.com/elastic/elasticsearch-js/pull/969[#969]
- Update code generation https://github.com/elastic/elasticsearch-js/pull/969[#969]
[discrete]
=== 7.3.0
Support for Elasticsearch `v7.3`.
**Features:**
- Added `auth` option -
https://github.com/elastic/elasticsearch-js/pull/908[#908]
- Added support for `ApiKey` authentication -
https://github.com/elastic/elasticsearch-js/pull/908[#908]
- Added `auth` option - https://github.com/elastic/elasticsearch-js/pull/908[#908]
- Added support for `ApiKey` authentication - https://github.com/elastic/elasticsearch-js/pull/908[#908]
**Fixes:**
- fix(Typings): sniffInterval can also be boolean -
https://github.com/elastic/elasticsearch-js/pull/914[#914]
- fix(Typings): sniffInterval can also be boolean - https://github.com/elastic/elasticsearch-js/pull/914[#914]
**Internals:**
- Refactored connection pool -
https://github.com/elastic/elasticsearch-js/pull/913[#913]
- Refactored connection pool - https://github.com/elastic/elasticsearch-js/pull/913[#913]
**Documentation:**
- Better reference code examples -
https://github.com/elastic/elasticsearch-js/pull/920[#920]
- Improve README -
https://github.com/elastic/elasticsearch-js/pull/909[#909]
- Better reference code examples - https://github.com/elastic/elasticsearch-js/pull/920[#920]
- Improve README - https://github.com/elastic/elasticsearch-js/pull/909[#909]
[discrete]
=== 7.2.0
Support for Elasticsearch `v7.2`
**Fixes:**
- Remove auth data from inspect and toJSON in connection class -
https://github.com/elastic/elasticsearch-js/pull/887[#887]
- Remove auth data from inspect and toJSON in connection class - https://github.com/elastic/elasticsearch-js/pull/887[#887]
[discrete]
=== 7.1.0
Support for Elasticsearch `v7.1`
**Fixes:**
- Support for non-friendly chars in url username and password -
https://github.com/elastic/elasticsearch-js/pull/858[#858]
- Patch deprecated parameters -
https://github.com/elastic/elasticsearch-js/pull/851[#851]
- Support for non-friendly chars in url username and password - https://github.com/elastic/elasticsearch-js/pull/858[#858]
- Patch deprecated parameters - https://github.com/elastic/elasticsearch-js/pull/851[#851]
[discrete]
=== 7.0.1
**Fixes:**
- Fix TypeScript export *(issue
https://github.com/elastic/elasticsearch-js/pull/841[#841])* -
https://github.com/elastic/elasticsearch-js/pull/842[#842]
- Fix http and https port handling *(issue
https://github.com/elastic/elasticsearch-js/pull/843[#843])* -
https://github.com/elastic/elasticsearch-js/pull/845[#845]
- Fix TypeScript definiton *(issue
https://github.com/elastic/elasticsearch-js/pull/803[#803])* -
https://github.com/elastic/elasticsearch-js/pull/846[#846]
- Added toJSON method to Connection class *(issue
https://github.com/elastic/elasticsearch-js/pull/848[#848])* -
https://github.com/elastic/elasticsearch-js/pull/849[#849]
- Fix TypeScript export *(issue https://github.com/elastic/elasticsearch-js/pull/841[#841])* - https://github.com/elastic/elasticsearch-js/pull/842[#842]
- Fix http and https port handling *(issue https://github.com/elastic/elasticsearch-js/pull/843[#843])* - https://github.com/elastic/elasticsearch-js/pull/845[#845]
- Fix TypeScript definiton *(issue https://github.com/elastic/elasticsearch-js/pull/803[#803])* - https://github.com/elastic/elasticsearch-js/pull/846[#846]
- Added toJSON method to Connection class *(issue https://github.com/elastic/elasticsearch-js/pull/848[#848])* - https://github.com/elastic/elasticsearch-js/pull/849[#849]
[discrete]
=== 7.0.0
Support for Elasticsearch `v7.0`
- Stable release.
- Stable release.

View File

@ -1,5 +1,5 @@
[[child]]
=== Creating a child client
[[child-client]]
== Creating a child client
There are some use cases where you may need multiple instances of the client.
You can easily do that by calling `new Client()` as many times as you need, but

View File

@ -1,12 +1,341 @@
[[client-configuration]]
== Configuration
== Client configuration
The client is designed to be easily configured for your needs. In the following
section, you can see the possible options that you can use to configure it.
section, you can see the possible basic options that you can use to configure
it.
* <<basic-config>>
* <<advanced-config>>
* <<child>>
* <<extend>>
* <<client-testing>>
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'http://localhost:9200',
maxRetries: 5,
requestTimeout: 60000,
sniffOnStart: true
})
----
=== Basic options
[cols=2*]
|===
|`node` or `nodes`
a|The Elasticsearch endpoint to use. +
It can be a single string or an array of strings:
[source,js]
----
node: 'http://localhost:9200'
----
Or it can be an object (or an array of objects) that represents the node:
[source,js]
----
node: {
url: new URL('http://localhost:9200'),
ssl: 'ssl options',
agent: 'http agent options',
id: 'custom node id',
headers: { 'custom': 'headers' }
roles: {
master: true,
data: true,
ingest: true,
ml: false
}
}
----
|`auth`
a|Your authentication data. You can use both basic authentication and
{ref}/security-api-create-api-key.html[ApiKey]. +
See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
for more details. +
_Default:_ `null`
Basic authentication:
[source,js]
----
auth: {
username: 'elastic',
password: 'changeme'
}
----
{ref}/security-api-create-api-key.html[ApiKey] authentication:
[source,js]
----
auth: {
apiKey: 'base64EncodedKey'
}
----
|`maxRetries`
|`number` - Max number of retries for each request. +
_Default:_ `3`
|`requestTimeout`
|`number` - Max request timeout in milliseconds for each request. +
_Default:_ `30000`
|`pingTimeout`
|`number` - Max ping request timeout in milliseconds for each request. +
_Default:_ `3000`
|`sniffInterval`
|`number, boolean` - Perform a sniff operation every `n` milliseconds. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
_Default:_ `false`
|`sniffOnStart`
|`boolean` - Perform a sniff once the client is started. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
_Default:_ `false`
|`sniffEndpoint`
|`string` - Endpoint to ping during a sniff. +
_Default:_ `'_nodes/_all/http'`
|`sniffOnConnectionFault`
|`boolean` - Perform a sniff on connection fault. Sniffing might not be the best solution for you, take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here] to know more. +
_Default:_ `false`
|`resurrectStrategy`
|`string` - Configure the node resurrection strategy. +
_Options:_ `'ping'`, `'optimistic'`, `'none'` +
_Default:_ `'ping'`
|`suggestCompression`
|`boolean` - Adds `accept-encoding` header to every request. +
_Default:_ `false`
|`compression`
|`string, boolean` - Enables gzip request body compression. +
_Options:_ `'gzip'`, `false` +
_Default:_ `false`
|`ssl`
|`http.SecureContextOptions` - ssl https://nodejs.org/api/tls.html[configuraton]. +
_Default:_ `null`
|`agent`
a|`http.AgentOptions, function` - http agent https://nodejs.org/api/http.html#http_new_agent_options[options],
or a function that returns an actual http agent instance. If you want to disable the http agent use entirely
(and disable the `keep-alive` feature), set the agent to `false`. +
_Default:_ `null`
[source,js]
----
const client = new Client({
node: 'http://localhost:9200',
agent: { agent: 'options' }
})
const client = new Client({
node: 'http://localhost:9200',
agent: () => new CustomAgent()
})
const client = new Client({
node: 'http://localhost:9200',
// Disable agent and keep-alive
agent: false
})
----
|`nodeFilter`
a|`function` - Filters which node not to use for a request. +
_Default:_
[source,js]
----
function defaultNodeFilter (node) {
// avoid master only nodes
if (node.roles.master === true &&
node.roles.data === false &&
node.roles.ingest === false) {
return false
}
return true
}
----
|`nodeSelector`
a|`function` - custom selection strategy. +
_Options:_ `'round-robin'`, `'random'`, custom function +
_Default:_ `'round-robin'` +
_Custom function example:_
[source,js]
----
function nodeSelector (connections) {
const index = calculateIndex()
return connections[index]
}
----
|`generateRequestId`
a|`function` - function to generate the request id for every request, it takes
two parameters, the request parameters and options. +
By default it generates an incremental integer for every request. +
_Custom function example:_
[source,js]
----
function generateRequestId (params, options) {
// your id generation logic
// must be syncronous
return 'id'
}
----
|`name`
|`string | symbol` - The name to identify the client instance in the events. +
_Default:_ `elasticsearch-js`
|`opaqueIdPrefix`
|`string` - A string that will be use to prefix any `X-Opaque-Id` header. +
See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html#_x-opaque-id_support[`X-Opaque-Id` support] for more details. +
_Default:_ `null`
|`headers`
|`object` - A set of custom headers to send in every request. +
_Default:_ `{}`
|`context`
|`object` - A custom object that you can use for observability in yoru events.
It will be merged with the API level context option. +
_Default:_ `null`
|`cloud`
a|`object` - Custom configuration for connecting to
https://cloud.elastic.co[Elastic Cloud]. See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
for more details. +
_Default:_ `null` +
_Cloud configuration example:_
[source,js]
----
const client = new Client({
cloud: {
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA=='
},
auth: {
username: 'elastic',
password: 'changeme'
}
})
----
|===
=== Advanced configuration
If you need to customize the client behavior heavily, you are in the right
place! The client allows you to customize the following internals:
* `Transport` class
* `ConnectionPool` class
* `Connection` class
* `Serializer` class
=== `Transport`
This class is responsible for performing the request to {es} and handling
errors, it also handles the sniffing.
[source,js]
----
const { Client, Transport } = require('@elastic/elasticsearch')
class MyTransport extends Transport {
request (params, options, callback) {
// your code
}
}
const client = new Client({
Transport: MyTransport
})
----
Sometimes you need to inject a small snippet of your code and then continue to
use the usual client code. In such cases, call `super.method`:
[source,js]
----
class MyTransport extends Transport {
request (params, options, callback) {
// your code
return super.request(params, options, callback)
}
}
----
=== `ConnectionPool`
This class is responsible for keeping in memory all the {es} Connection that we
are using. There is a single Connection for every node. The connection pool
handles the resurrection strategies and the updates of the pool.
[source,js]
----
const { Client, ConnectionPool } = require('@elastic/elasticsearch')
class MyConnectionPool extends ConnectionPool {
markAlive (connection) {
// your code
super.markAlive(connection)
}
}
const client = new Client({
ConnectionPool: MyConnectionPool
})
----
=== `Connection`
This class represents a single node, it holds every information we have on the
node, such as roles, id, URL, custom headers and so on. The actual HTTP request
is performed here, this means that if you want to swap the default HTTP client
(Node.js core), you should override the `request` method of this class.
[source,js]
----
const { Client, Connection } = require('@elastic/elasticsearch')
class MyConnection extends Connection {
request (params, callback) {
// your code
}
}
const client = new Client({
Connection: MyConnection
})
----
=== `Serializer`
This class is responsible for the serialization of every request, it offers the
following methods:
* `serialize(object: any): string;` serializes request objects.
* `deserialize(json: string): any;` deserializes response strings.
* `ndserialize(array: any[]): string;` serializes bulk request objects.
* `qserialize(object: any): string;` serializes request query parameters.
[source,js]
----
const { Client, Serializer } = require('@elastic/elasticsearch')
class MySerializer extends Serializer {
serialize (object) {
// your code
}
}
const client = new Client({
Serializer: MySerializer
})
----

Some files were not shown because too many files have changed in this diff Show More