Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a8c8d2c712 | |||
| 4a88f2d5e5 | |||
| acbd146d53 | |||
| 9eb3df5d28 | |||
| 3d3263eaf4 | |||
| 56e28766c8 | |||
| a59227bea8 | |||
| 4dd2354b9d | |||
| 0b5d9ed3b1 | |||
| 1b17df3d67 | |||
| b68d71a528 | |||
| 64caf21ea2 | |||
| 1ab2d86787 | |||
| c1c4ebc607 | |||
| 10e15039f4 | |||
| 7f13a73bd3 | |||
| 14d0dfc488 | |||
| 4fe4530cef | |||
| 2d26ea7f46 | |||
| fc8413b3d9 | |||
| de5ac5c7d0 | |||
| 23030139af | |||
| 6020625912 | |||
| 0652f5ab31 | |||
| fa91d1a832 | |||
| bb7393a084 | |||
| dc905aaabc | |||
| 4e2f25b5cd | |||
| 249d2a6398 | |||
| d0a421b25c | |||
| e6eeeeb6af | |||
| d2ee3be9e0 | |||
| cb7421ecfc | |||
| a5f48d0962 | |||
| 54642b9c9d | |||
| 9ff5fc34bc | |||
| 1ad8501d73 | |||
| 158ea917e2 | |||
| 26887ca76b | |||
| 53ba8ba726 | |||
| 8ad6d993e6 | |||
| fb363fe5c3 | |||
| 1e7ccfab33 | |||
| 1362fb568e | |||
| 34a168dd99 | |||
| be1c0f235c | |||
| da0bfd2fb5 | |||
| 9daf8f360c | |||
| f6180fae6b | |||
| 996ee29009 | |||
| bb8f397742 | |||
| 7c69f043e5 | |||
| 93a7e52be0 | |||
| 642b15cd5c | |||
| ee867daad0 | |||
| ef11962ad4 | |||
| 65fabb267d | |||
| c520967790 | |||
| f555329496 | |||
| c55b287c63 | |||
| 1a2665b13b | |||
| 791cfdb186 | |||
| f3a2cbffe9 | |||
| 1777d091bb | |||
| 37c2959e92 | |||
| 6aaba8af07 | |||
| 64f62c91e0 | |||
| 432df0c3db | |||
| 0f35880143 | |||
| 3bd3748feb | |||
| 559acd32be | |||
| a48ebc9442 | |||
| 563b7746cd | |||
| a287c71147 | |||
| db5476ad5d | |||
| e8b4eb8b9b | |||
| 67db0c57bf | |||
| 743c53dfe0 | |||
| adc5c2b146 | |||
| 7358fd0c83 | |||
| 9baa42ac1b | |||
| 28d8ff799e | |||
| ea2c8d2d4d | |||
| 2f0aeec108 | |||
| 74c6e187a2 | |||
| 7bf627f76b | |||
| 496887cec0 | |||
| 1040e76ce2 | |||
| b3ca264a0b | |||
| ea3df650f1 | |||
| 51594424d5 | |||
| a2614bd84e | |||
| 4ec32601e7 | |||
| 1e5d143d0c | |||
| 9a021f8445 | |||
| aad5fdf144 | |||
| bc607ffbd1 | |||
| ecff306004 | |||
| 9b0f45f390 | |||
| 2016dd2ef6 | |||
| 95daf256f6 | |||
| 7ef266bdb0 | |||
| f7450de64e | |||
| f7c9c64e1d | |||
| 4441de678f | |||
| c9808fb067 | |||
| b812c51dce | |||
| 7a83df8445 | |||
| bfae6066af | |||
| 23ababaffc | |||
| fe3ec491de | |||
| 1889691a43 | |||
| 146fde308a | |||
| a0786f2705 | |||
| 4ab53eee4b | |||
| 17b3d63428 | |||
| 8b946af6ce | |||
| d6dbaf1ab9 | |||
| 1db476f716 | |||
| 93231e621e | |||
| e198511327 | |||
| cba4affb82 | |||
| 3d2720d3c8 | |||
| b53466e41c | |||
| f138b077e3 | |||
| f7edb80df7 | |||
| 66693f30ab | |||
| e0e3267ca0 | |||
| 416b221b1e | |||
| 528b90d19a | |||
| 9fe088589c | |||
| 7d776c15f7 | |||
| 0e2ae5452d | |||
| 2ebe2d8b7f | |||
| b759e621db | |||
| 28370acf49 | |||
| ae3bb7031f | |||
| f38db62ab3 | |||
| 5a25b7cba2 | |||
| e1d7134398 | |||
| 31b4d41dc5 | |||
| 252bab6476 | |||
| 88b787bf38 | |||
| f4f7c733d1 | |||
| 20b7e93475 | |||
| 176d823593 | |||
| 7448cd3d24 | |||
| eeacdffd45 | |||
| 5eab7e9c75 | |||
| 2be23c0946 | |||
| 86660ddf4f |
@ -1,9 +1,13 @@
|
|||||||
ARG NODE_JS_VERSION=10
|
ARG NODE_JS_VERSION=16
|
||||||
FROM node:${NODE_JS_VERSION}
|
FROM node:${NODE_JS_VERSION}
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
RUN apt-get clean -y
|
||||||
|
RUN apt-get update -y
|
||||||
|
RUN apt-get install -y zip
|
||||||
|
|
||||||
# Install app dependencies
|
# Install app dependencies
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|||||||
@ -26,10 +26,11 @@ if [[ -z $es_node_name ]]; then
|
|||||||
export es_node_name=instance
|
export es_node_name=instance
|
||||||
export elastic_password=changeme
|
export elastic_password=changeme
|
||||||
export elasticsearch_image=elasticsearch
|
export elasticsearch_image=elasticsearch
|
||||||
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
|
export elasticsearch_scheme="https"
|
||||||
if [[ $TEST_SUITE != "platinum" ]]; then
|
if [[ $TEST_SUITE != "platinum" ]]; then
|
||||||
export elasticsearch_url=http://${es_node_name}:9200
|
export elasticsearch_scheme="http"
|
||||||
fi
|
fi
|
||||||
|
export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200
|
||||||
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
|
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
|
||||||
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"
|
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"
|
||||||
|
|
||||||
|
|||||||
107
.ci/make.mjs
Normal file
107
.ci/make.mjs
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
}
|
||||||
178
.ci/make.sh
Executable file
178
.ci/make.sh
Executable file
@ -0,0 +1,178 @@
|
|||||||
|
#!/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
|
||||||
@ -7,7 +7,7 @@
|
|||||||
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
|
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
|
||||||
# Export the NUMBER_OF_NODES variable to start more than 1 node
|
# Export the NUMBER_OF_NODES variable to start more than 1 node
|
||||||
|
|
||||||
# Version 1.2.0
|
# Version 1.6.0
|
||||||
# - Initial version of the run-elasticsearch.sh script
|
# - Initial version of the run-elasticsearch.sh script
|
||||||
# - Deleting the volume should not dependent on the container still running
|
# - Deleting the volume should not dependent on the container still running
|
||||||
# - Fixed `ES_JAVA_OPTS` config
|
# - Fixed `ES_JAVA_OPTS` config
|
||||||
@ -15,6 +15,11 @@
|
|||||||
# - Refactored into functions and imports
|
# - Refactored into functions and imports
|
||||||
# - Support NUMBER_OF_NODES
|
# - Support NUMBER_OF_NODES
|
||||||
# - Added 5 retries on docker pull for fixing transient network errors
|
# - 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))
|
script_path=$(dirname $(realpath -s $0))
|
||||||
source $script_path/functions/imports.sh
|
source $script_path/functions/imports.sh
|
||||||
@ -28,6 +33,8 @@ cluster_name=${moniker}${suffix}
|
|||||||
|
|
||||||
declare -a volumes
|
declare -a volumes
|
||||||
environment=($(cat <<-END
|
environment=($(cat <<-END
|
||||||
|
--env ELASTIC_PASSWORD=$elastic_password
|
||||||
|
--env xpack.security.enabled=true
|
||||||
--env node.name=$es_node_name
|
--env node.name=$es_node_name
|
||||||
--env cluster.name=$cluster_name
|
--env cluster.name=$cluster_name
|
||||||
--env cluster.initial_master_nodes=$master_node_name
|
--env cluster.initial_master_nodes=$master_node_name
|
||||||
@ -37,19 +44,21 @@ environment=($(cat <<-END
|
|||||||
--env node.attr.testattr=test
|
--env node.attr.testattr=test
|
||||||
--env path.repo=/tmp
|
--env path.repo=/tmp
|
||||||
--env repositories.url.allowed_urls=http://snapshot.test*
|
--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
|
END
|
||||||
))
|
))
|
||||||
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
||||||
environment+=($(cat <<-END
|
environment+=($(cat <<-END
|
||||||
--env ELASTIC_PASSWORD=$elastic_password
|
|
||||||
--env xpack.license.self_generated.type=trial
|
--env xpack.license.self_generated.type=trial
|
||||||
--env xpack.security.enabled=true
|
|
||||||
--env xpack.security.http.ssl.enabled=true
|
--env xpack.security.http.ssl.enabled=true
|
||||||
--env xpack.security.http.ssl.verification_mode=certificate
|
--env xpack.security.http.ssl.verification_mode=certificate
|
||||||
--env xpack.security.http.ssl.key=certs/testnode.key
|
--env xpack.security.http.ssl.key=certs/testnode.key
|
||||||
--env xpack.security.http.ssl.certificate=certs/testnode.crt
|
--env xpack.security.http.ssl.certificate=certs/testnode.crt
|
||||||
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
|
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
|
||||||
--env xpack.security.transport.ssl.enabled=true
|
--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.key=certs/testnode.key
|
||||||
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
|
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
|
||||||
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
|
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
|
||||||
@ -61,6 +70,11 @@ END
|
|||||||
--volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
|
--volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
|
||||||
END
|
END
|
||||||
))
|
))
|
||||||
|
else
|
||||||
|
environment+=($(cat <<-END
|
||||||
|
--env xpack.security.http.ssl.enabled=false
|
||||||
|
END
|
||||||
|
))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cert_validation_flags=""
|
cert_validation_flags=""
|
||||||
@ -104,7 +118,7 @@ END
|
|||||||
docker run \
|
docker run \
|
||||||
--name "$node_name" \
|
--name "$node_name" \
|
||||||
--network "$network_name" \
|
--network "$network_name" \
|
||||||
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
|
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g -da:org.elasticsearch.xpack.ccr.index.engine.FollowingEngineAssertions" \
|
||||||
"${environment[@]}" \
|
"${environment[@]}" \
|
||||||
"${volumes[@]}" \
|
"${volumes[@]}" \
|
||||||
--publish "$http_port":9200 \
|
--publish "$http_port":9200 \
|
||||||
|
|||||||
@ -30,17 +30,14 @@ docker build \
|
|||||||
echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
|
echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
|
||||||
|
|
||||||
repo=$(realpath $(dirname $(realpath -s $0))/../)
|
repo=$(realpath $(dirname $(realpath -s $0))/../)
|
||||||
run_script_args=""
|
|
||||||
if [[ "$NODE_JS_VERSION" == "8" ]]; then
|
|
||||||
run_script_args="--harmony-async-iteration"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
--network=${network_name} \
|
--network=${network_name} \
|
||||||
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
|
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
|
||||||
|
--env "TEST_SUITE=${TEST_SUITE}" \
|
||||||
--volume $repo:/usr/src/app \
|
--volume $repo:/usr/src/app \
|
||||||
--volume /usr/src/app/node_modules \
|
--volume /usr/src/app/node_modules \
|
||||||
--name elasticsearch-js \
|
--name elasticsearch-js \
|
||||||
--rm \
|
--rm \
|
||||||
elastic/elasticsearch-js \
|
elastic/elasticsearch-js \
|
||||||
node ${run_script_args} test/integration/index.js
|
npm run test:integration
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
---
|
---
|
||||||
STACK_VERSION:
|
STACK_VERSION:
|
||||||
- 7.11.0-SNAPSHOT
|
- "7.17.11-SNAPSHOT"
|
||||||
|
|
||||||
NODE_JS_VERSION:
|
NODE_JS_VERSION:
|
||||||
|
- 16
|
||||||
- 14
|
- 14
|
||||||
- 12
|
- 12
|
||||||
- 10
|
|
||||||
- 8
|
|
||||||
|
|
||||||
TEST_SUITE:
|
TEST_SUITE:
|
||||||
- free
|
- free
|
||||||
|
|||||||
58
.github/workflows/nodejs.yml
vendored
58
.github/workflows/nodejs.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [10.x, 12.x, 14.x, 15.x]
|
node-version: [12.x, 14.x, 16.x]
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -40,38 +40,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
npm run test:types
|
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:
|
helpers-integration-test:
|
||||||
name: Helpers integration test
|
name: Helpers integration test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [10.x, 12.x, 14.x]
|
node-version: [12.x, 14.x, 16.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -86,7 +61,7 @@ jobs:
|
|||||||
- name: Runs Elasticsearch
|
- name: Runs Elasticsearch
|
||||||
uses: elastic/elastic-github-actions/elasticsearch@master
|
uses: elastic/elastic-github-actions/elasticsearch@master
|
||||||
with:
|
with:
|
||||||
stack-version: 7.11.0-SNAPSHOT
|
stack-version: 7.16-SNAPSHOT
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
@ -118,7 +93,7 @@ jobs:
|
|||||||
- name: Runs Elasticsearch
|
- name: Runs Elasticsearch
|
||||||
uses: elastic/elastic-github-actions/elasticsearch@master
|
uses: elastic/elastic-github-actions/elasticsearch@master
|
||||||
with:
|
with:
|
||||||
stack-version: 8.0.0-SNAPSHOT
|
stack-version: 7.16-SNAPSHOT
|
||||||
|
|
||||||
- name: Use Node.js 14.x
|
- name: Use Node.js 14.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
@ -144,13 +119,34 @@ jobs:
|
|||||||
npm start --prefix test/bundlers/rollup-test
|
npm start --prefix test/bundlers/rollup-test
|
||||||
npm start --prefix test/bundlers/webpack-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:
|
code-coverage:
|
||||||
name: Code coverage
|
name: Code coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.x]
|
node-version: [14.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -184,7 +180,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [12.x]
|
node-version: [14.x]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -60,3 +60,4 @@ test/benchmarks/macro/fixtures/*
|
|||||||
.cache
|
.cache
|
||||||
|
|
||||||
test/bundlers/**/bundle.js
|
test/bundlers/**/bundle.js
|
||||||
|
test/bundlers/parcel-test/.parcel-cache
|
||||||
|
|||||||
@ -70,3 +70,7 @@ certs
|
|||||||
.github
|
.github
|
||||||
CODE_OF_CONDUCT.md
|
CODE_OF_CONDUCT.md
|
||||||
CONTRIBUTING.md
|
CONTRIBUTING.md
|
||||||
|
|
||||||
|
# CANARY-PACKAGE
|
||||||
|
api/kibana.d.ts
|
||||||
|
# /CANARY-PACKAGE
|
||||||
|
|||||||
@ -58,14 +58,24 @@ Once your changes are ready to submit for review:
|
|||||||
|
|
||||||
### Code generation
|
### Code generation
|
||||||
|
|
||||||
The entire content of the API folder is generated as well as the `docs/reference.asciidoc` file.<br/>
|
The contents of the API folder and the `docs/reference.asciidoc` file are generated by a script.<br/>
|
||||||
If you want to run the code generation you should run the following command:
|
To run the script, use the following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
node scripts/generate --tag <tag name>
|
node scripts/generate --version <version name>
|
||||||
# or
|
```
|
||||||
node scripts/generate --branch <branch 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
|
||||||
```
|
```
|
||||||
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
|
### 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.
|
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.
|
||||||
|
|||||||
@ -28,7 +28,7 @@ npm install @elastic/elasticsearch
|
|||||||
|
|
||||||
### Node.js support
|
### Node.js support
|
||||||
|
|
||||||
NOTE: The minimum supported version of Node.js is `v8`.
|
NOTE: The minimum supported version of Node.js is `v12`.
|
||||||
|
|
||||||
The client versioning follows the Elastc Stack versioning, this means that
|
The client versioning follows the Elastc Stack versioning, this means that
|
||||||
major, minor, and patch releases are done following a precise schedule that
|
major, minor, and patch releases are done following a precise schedule that
|
||||||
@ -49,12 +49,13 @@ of `^7.10.0`).
|
|||||||
|
|
||||||
| Node.js Version | Node.js EOL date | End of support |
|
| Node.js Version | Node.js EOL date | End of support |
|
||||||
| --------------- |------------------| ---------------------- |
|
| --------------- |------------------| ---------------------- |
|
||||||
| `8.x` | `December 2019` | `7.11` (early 2021) |
|
| `8.x` | `December 2019` | `7.11` (early 2021) |
|
||||||
| `10.x` | `Apri 2021` | `7.12` (mid 2021) |
|
| `10.x` | `April 2021` | `7.12` (mid 2021) |
|
||||||
|
|
||||||
### Compatibility
|
### Compatibility
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
| Elasticsearch Version | Client Version |
|
| Elasticsearch Version | Client Version |
|
||||||
| --------------------- |----------------|
|
| --------------------- |----------------|
|
||||||
|
|||||||
@ -35,15 +35,15 @@ AsyncSearchApi.prototype.delete = function asyncSearchDeleteApi (params, options
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -62,15 +62,15 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -89,15 +89,15 @@ AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_async_search' + '/' + 'status' + '/' + encodeURIComponent(id)
|
path = '/' + '_async_search' + '/' + 'status' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -115,10 +115,10 @@ AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options
|
|||||||
AsyncSearchApi.prototype.submit = function asyncSearchSubmitApi (params, options, callback) {
|
AsyncSearchApi.prototype.submit = function asyncSearchSubmitApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_async_search'
|
path = '/' + encodeURIComponent(index) + '/' + '_async_search'
|
||||||
|
|||||||
@ -35,15 +35,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -61,10 +61,10 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
|
|||||||
AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (params, options, callback) {
|
AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_autoscaling' + '/' + 'capacity'
|
path = '/' + '_autoscaling' + '/' + 'capacity'
|
||||||
|
|
||||||
@ -83,15 +83,15 @@ AutoscalingApi.prototype.getAutoscalingPolicy = function autoscalingGetAutoscali
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -110,19 +110,19 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
|
|||||||
@ -30,21 +30,21 @@ function bulkApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'
|
||||||
|
|||||||
626
api/api/cat.js
626
api/api/cat.js
@ -23,8 +23,8 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
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', 'full_id', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'nodes', 'actions', 'parent_task_id', 'size', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from']
|
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', fullId: 'full_id', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', parentTaskId: 'parent_task_id', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs' }
|
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' }
|
||||||
|
|
||||||
function CatApi (transport, ConfigurationError) {
|
function CatApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
@ -34,10 +34,10 @@ function CatApi (transport, ConfigurationError) {
|
|||||||
CatApi.prototype.aliases = function catAliasesApi (params, options, callback) {
|
CatApi.prototype.aliases = function catAliasesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name)
|
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) {
|
CatApi.prototype.allocation = function catAllocationApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, ...querystring } = params
|
let { method, body, nodeId, node_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null) {
|
if ((node_id || nodeId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId)
|
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) {
|
CatApi.prototype.count = function catCountApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index)
|
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) {
|
CatApi.prototype.fielddata = function catFielddataApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, fields, ...querystring } = params
|
let { method, body, fields, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((fields) != null) {
|
if ((fields) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields)
|
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) {
|
CatApi.prototype.health = function catHealthApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'health'
|
path = '/' + '_cat' + '/' + 'health'
|
||||||
|
|
||||||
@ -159,10 +159,10 @@ CatApi.prototype.health = function catHealthApi (params, options, callback) {
|
|||||||
CatApi.prototype.help = function catHelpApi (params, options, callback) {
|
CatApi.prototype.help = function catHelpApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat'
|
path = '/' + '_cat'
|
||||||
|
|
||||||
@ -180,10 +180,10 @@ CatApi.prototype.help = function catHelpApi (params, options, callback) {
|
|||||||
CatApi.prototype.indices = function catIndicesApi (params, options, callback) {
|
CatApi.prototype.indices = function catIndicesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index)
|
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) {
|
CatApi.prototype.master = function catMasterApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'master'
|
path = '/' + '_cat' + '/' + 'master'
|
||||||
|
|
||||||
@ -224,295 +224,13 @@ CatApi.prototype.master = function catMasterApi (params, options, callback) {
|
|||||||
return this.transport.request(request, options, callback)
|
return this.transport.request(request, options, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'nodeattrs'
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.nodes = function catNodesApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'nodes'
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.pendingTasks = function catPendingTasksApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'pending_tasks'
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.plugins = function catPluginsApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'plugins'
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if ((index) != null) {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'recovery'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.repositories = function catRepositoriesApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'repositories'
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.segments = function catSegmentsApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if ((index) != null) {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'segments'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.shards = function catShardsApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if ((index) != null) {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'shards'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if ((repository) != null) {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'snapshots'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.tasks = function catTasksApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'tasks'
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.templates = function catTemplatesApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if ((name) != null) {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'templates'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callback) {
|
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
|
||||||
|
|
||||||
var { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params
|
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
|
||||||
|
|
||||||
var path = ''
|
|
||||||
if ((thread_pool_patterns || threadPoolPatterns) != null) {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'GET'
|
|
||||||
path = '/' + '_cat' + '/' + 'thread_pool'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
|
||||||
const request = {
|
|
||||||
method,
|
|
||||||
path,
|
|
||||||
body: null,
|
|
||||||
querystring
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.transport.request(request, options, callback)
|
|
||||||
}
|
|
||||||
|
|
||||||
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
|
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
|
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
|
||||||
@ -535,10 +253,10 @@ CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (par
|
|||||||
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
|
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, datafeedId, datafeed_id, ...querystring } = params
|
let { method, body, datafeedId, datafeed_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((datafeed_id || datafeedId) != null) {
|
if ((datafeed_id || datafeedId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
|
||||||
@ -561,10 +279,10 @@ CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, call
|
|||||||
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
|
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, jobId, job_id, ...querystring } = params
|
let { method, body, jobId, job_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((job_id || jobId) != null) {
|
if ((job_id || jobId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
|
||||||
@ -587,10 +305,10 @@ CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
|
|||||||
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
|
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, modelId, model_id, ...querystring } = params
|
let { method, body, modelId, model_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((model_id || modelId) != null) {
|
if ((model_id || modelId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
|
||||||
@ -610,13 +328,295 @@ CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, optio
|
|||||||
return this.transport.request(request, options, callback)
|
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
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'nodeattrs'
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.nodes = function catNodesApi (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 = '/' + '_cat' + '/' + 'nodes'
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.pendingTasks = function catPendingTasksApi (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 = '/' + '_cat' + '/' + 'pending_tasks'
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.plugins = function catPluginsApi (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 = '/' + '_cat' + '/' + 'plugins'
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.recovery = function catRecoveryApi (params, options, callback) {
|
||||||
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
|
let { method, body, index, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'recovery'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.repositories = function catRepositoriesApi (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 = '/' + '_cat' + '/' + 'repositories'
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.segments = function catSegmentsApi (params, options, callback) {
|
||||||
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
|
let { method, body, index, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'segments'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.shards = function catShardsApi (params, options, callback) {
|
||||||
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
|
let { method, body, index, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if ((index) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'shards'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.snapshots = function catSnapshotsApi (params, options, callback) {
|
||||||
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
|
let { method, body, repository, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if ((repository) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'snapshots'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.tasks = function catTasksApi (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 = '/' + '_cat' + '/' + 'tasks'
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, options, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
CatApi.prototype.templates = function catTemplatesApi (params, options, callback) {
|
||||||
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
|
let { method, body, name, ...querystring } = params
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if ((name) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'templates'
|
||||||
|
}
|
||||||
|
|
||||||
|
// build request object
|
||||||
|
const request = {
|
||||||
|
method,
|
||||||
|
path,
|
||||||
|
body: null,
|
||||||
|
querystring
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.transport.request(request, 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
|
||||||
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
|
let path = ''
|
||||||
|
if ((thread_pool_patterns || threadPoolPatterns) != null) {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'thread_pool' + '/' + encodeURIComponent(thread_pool_patterns || threadPoolPatterns)
|
||||||
|
} else {
|
||||||
|
if (method == null) method = 'GET'
|
||||||
|
path = '/' + '_cat' + '/' + 'thread_pool'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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) {
|
CatApi.prototype.transforms = function catTransformsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((transform_id || transformId) != null) {
|
if ((transform_id || transformId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cat' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_cat' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
@ -637,12 +637,12 @@ CatApi.prototype.transforms = function catTransformsApi (params, options, callba
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperties(CatApi.prototype, {
|
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_data_frame_analytics: { get () { return this.mlDataFrameAnalytics } },
|
||||||
ml_datafeeds: { get () { return this.mlDatafeeds } },
|
ml_datafeeds: { get () { return this.mlDatafeeds } },
|
||||||
ml_jobs: { get () { return this.mlJobs } },
|
ml_jobs: { get () { return this.mlJobs } },
|
||||||
ml_trained_models: { get () { return this.mlTrainedModels } }
|
ml_trained_models: { get () { return this.mlTrainedModels } },
|
||||||
|
pending_tasks: { get () { return this.pendingTasks } },
|
||||||
|
thread_pool: { get () { return this.threadPool } }
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = CatApi
|
module.exports = CatApi
|
||||||
|
|||||||
@ -35,15 +35,15 @@ CcrApi.prototype.deleteAutoFollowPattern = function ccrDeleteAutoFollowPatternAp
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
|
||||||
|
|
||||||
@ -93,15 +93,15 @@ CcrApi.prototype.followInfo = function ccrFollowInfoApi (params, options, callba
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
|
||||||
|
|
||||||
@ -120,15 +120,15 @@ CcrApi.prototype.followStats = function ccrFollowStatsApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
|
||||||
|
|
||||||
@ -147,19 +147,19 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'
|
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) {
|
CcrApi.prototype.getAutoFollowPattern = function ccrGetAutoFollowPatternApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||||
@ -204,15 +204,15 @@ CcrApi.prototype.pauseAutoFollowPattern = function ccrPauseAutoFollowPatternApi
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'pause'
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
|
||||||
|
|
||||||
@ -258,19 +258,19 @@ CcrApi.prototype.putAutoFollowPattern = function ccrPutAutoFollowPatternApi (par
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -289,15 +289,15 @@ CcrApi.prototype.resumeAutoFollowPattern = function ccrResumeAutoFollowPatternAp
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'resume'
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
|
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) {
|
CcrApi.prototype.stats = function ccrStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ccr' + '/' + 'stats'
|
path = '/' + '_ccr' + '/' + 'stats'
|
||||||
|
|
||||||
@ -364,15 +364,15 @@ CcrApi.prototype.unfollow = function ccrUnfollowApi (params, options, callback)
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
|
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function clearScrollApi (params, options, callback) {
|
function clearScrollApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, scrollId, scroll_id, ...querystring } = params
|
let { method, body, scrollId, scroll_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((scroll_id || scrollId) != null) {
|
if ((scroll_id || scrollId) != null) {
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function closePointInTimeApi (params, options, callback) {
|
function closePointInTimeApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_pit'
|
path = '/' + '_pit'
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function ClusterApi (transport, ConfigurationError) {
|
|||||||
ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi (params, options, callback) {
|
ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
|
path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
|
||||||
|
|
||||||
@ -56,15 +56,15 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -82,10 +82,10 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe
|
|||||||
ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi (params, options, callback) {
|
ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
|
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
|
||||||
|
|
||||||
@ -104,15 +104,15 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'HEAD'
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -130,10 +130,10 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe
|
|||||||
ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi (params, options, callback) {
|
ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||||
@ -156,10 +156,10 @@ ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplate
|
|||||||
ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, options, callback) {
|
ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'settings'
|
path = '/' + '_cluster' + '/' + 'settings'
|
||||||
|
|
||||||
@ -177,10 +177,10 @@ ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, optio
|
|||||||
ClusterApi.prototype.health = function clusterHealthApi (params, options, callback) {
|
ClusterApi.prototype.health = function clusterHealthApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index)
|
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) {
|
ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'pending_tasks'
|
path = '/' + '_cluster' + '/' + 'pending_tasks'
|
||||||
|
|
||||||
@ -224,10 +224,10 @@ ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, opt
|
|||||||
ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi (params, options, callback) {
|
ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
|
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
|
||||||
|
|
||||||
@ -246,19 +246,19 @@ ClusterApi.prototype.putComponentTemplate = function clusterPutComponentTemplate
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -277,15 +277,15 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_cluster' + '/' + 'settings'
|
path = '/' + '_cluster' + '/' + 'settings'
|
||||||
|
|
||||||
@ -303,10 +303,10 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio
|
|||||||
ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options, callback) {
|
ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_remote' + '/' + 'info'
|
path = '/' + '_remote' + '/' + 'info'
|
||||||
|
|
||||||
@ -324,10 +324,10 @@ ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options
|
|||||||
ClusterApi.prototype.reroute = function clusterRerouteApi (params, options, callback) {
|
ClusterApi.prototype.reroute = function clusterRerouteApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_cluster' + '/' + 'reroute'
|
path = '/' + '_cluster' + '/' + 'reroute'
|
||||||
|
|
||||||
@ -346,15 +346,15 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: metric')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, metric, index, ...querystring } = params
|
let { method, body, metric, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((metric) != null && (index) != null) {
|
if ((metric) != null && (index) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index)
|
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) {
|
ClusterApi.prototype.stats = function clusterStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, ...querystring } = params
|
let { method, body, nodeId, node_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null) {
|
if ((node_id || nodeId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)
|
path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)
|
||||||
|
|||||||
@ -30,15 +30,15 @@ function countApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'
|
||||||
|
|||||||
@ -30,23 +30,23 @@ function createApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
||||||
|
|||||||
@ -35,15 +35,15 @@ DanglingIndicesApi.prototype.deleteDanglingIndex = function danglingIndicesDelet
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, indexUuid, index_uuid, ...querystring } = params
|
let { method, body, indexUuid, index_uuid, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
|
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
|
||||||
|
|
||||||
@ -62,15 +62,15 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, indexUuid, index_uuid, ...querystring } = params
|
let { method, body, indexUuid, index_uuid, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
|
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor
|
|||||||
DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi (params, options, callback) {
|
DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_dangling'
|
path = '/' + '_dangling'
|
||||||
|
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function deleteApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
|
|||||||
@ -23,32 +23,32 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
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', '_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 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', _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' }
|
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' }
|
||||||
|
|
||||||
function deleteByQueryApi (params, options, callback) {
|
function deleteByQueryApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function deleteByQueryRethrottleApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||||
return handleError(err, callback)
|
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')
|
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, taskId, task_id, ...querystring } = params
|
let { method, body, taskId, task_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
path = '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
||||||
|
|
||||||
|
|||||||
@ -30,15 +30,15 @@ function deleteScriptApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,15 @@ EnrichApi.prototype.deletePolicy = function enrichDeletePolicyApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -62,15 +62,15 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + '/' + '_execute'
|
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) {
|
EnrichApi.prototype.getPolicy = function enrichGetPolicyApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||||
@ -115,19 +115,19 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
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) {
|
EnrichApi.prototype.stats = function enrichStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_enrich' + '/' + '_stats'
|
path = '/' + '_enrich' + '/' + '_stats'
|
||||||
|
|
||||||
|
|||||||
@ -35,15 +35,15 @@ EqlApi.prototype.delete = function eqlDeleteApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
|
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -62,15 +62,15 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
|
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -85,23 +85,50 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
|
|||||||
return this.transport.request(request, 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) {
|
EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_eql' + '/' + 'search'
|
path = '/' + encodeURIComponent(index) + '/' + '_eql' + '/' + 'search'
|
||||||
|
|
||||||
@ -116,4 +143,8 @@ EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
|
|||||||
return this.transport.request(request, options, callback)
|
return this.transport.request(request, options, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Object.defineProperties(EqlApi.prototype, {
|
||||||
|
get_status: { get () { return this.getStatus } }
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = EqlApi
|
module.exports = EqlApi
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function existsApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'HEAD'
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
|
|||||||
@ -30,28 +30,28 @@ function existsSourceApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: type, index')
|
||||||
return handleError(err, callback)
|
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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'HEAD'
|
if (method == null) method = 'HEAD'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function explainApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_explain'
|
||||||
|
|||||||
81
api/api/features.js
Normal file
81
api/api/features.js
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al
|
|||||||
function fieldCapsApi (params, options, callback) {
|
function fieldCapsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_field_caps'
|
path = '/' + encodeURIComponent(index) + '/' + '_field_caps'
|
||||||
|
|||||||
124
api/api/fleet.js
Normal file
124
api/api/fleet.js
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -30,19 +30,19 @@ function getApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
|
|||||||
@ -30,15 +30,15 @@ function getScriptApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function getScriptContextApi (params, options, callback) {
|
function getScriptContextApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_script_context'
|
path = '/' + '_script_context'
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function getScriptLanguagesApi (params, options, callback) {
|
function getScriptLanguagesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_script_language'
|
path = '/' + '_script_language'
|
||||||
|
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function getSourceApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||||
|
|||||||
@ -35,21 +35,21 @@ GraphApi.prototype.explore = function graphExploreApi (params, options, callback
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||||
|
|||||||
@ -23,8 +23,8 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors']
|
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' }
|
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: 'only_errors', dryRun: 'dry_run' }
|
||||||
|
|
||||||
function IlmApi (transport, ConfigurationError) {
|
function IlmApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
@ -35,15 +35,15 @@ IlmApi.prototype.deleteLifecycle = function ilmDeleteLifecycleApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['policy'] == null) {
|
if (params.policy == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, policy, ...querystring } = params
|
let { method, body, policy, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||||
|
|
||||||
@ -62,15 +62,15 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
|
|||||||
IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, callback) {
|
IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, policy, ...querystring } = params
|
let { method, body, policy, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((policy) != null) {
|
if ((policy) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
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) {
|
IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ilm' + '/' + 'status'
|
path = '/' + '_ilm' + '/' + 'status'
|
||||||
|
|
||||||
@ -132,19 +132,40 @@ IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback
|
|||||||
return this.transport.request(request, 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) {
|
IlmApi.prototype.moveToStep = function ilmMoveToStepApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
|
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
|
||||||
|
|
||||||
@ -163,15 +184,15 @@ IlmApi.prototype.putLifecycle = function ilmPutLifecycleApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['policy'] == null) {
|
if (params.policy == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, policy, ...querystring } = params
|
let { method, body, policy, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||||
|
|
||||||
@ -190,15 +211,15 @@ IlmApi.prototype.removePolicy = function ilmRemovePolicyApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
|
||||||
|
|
||||||
@ -217,15 +238,15 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
|
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'retry'
|
||||||
|
|
||||||
@ -243,10 +264,10 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
|
|||||||
IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
|
IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ilm' + '/' + 'start'
|
path = '/' + '_ilm' + '/' + 'start'
|
||||||
|
|
||||||
@ -264,10 +285,10 @@ IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
|
|||||||
IlmApi.prototype.stop = function ilmStopApi (params, options, callback) {
|
IlmApi.prototype.stop = function ilmStopApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_ilm' + '/' + 'stop'
|
path = '/' + '_ilm' + '/' + 'stop'
|
||||||
|
|
||||||
@ -287,6 +308,7 @@ Object.defineProperties(IlmApi.prototype, {
|
|||||||
explain_lifecycle: { get () { return this.explainLifecycle } },
|
explain_lifecycle: { get () { return this.explainLifecycle } },
|
||||||
get_lifecycle: { get () { return this.getLifecycle } },
|
get_lifecycle: { get () { return this.getLifecycle } },
|
||||||
get_status: { get () { return this.getStatus } },
|
get_status: { get () { return this.getStatus } },
|
||||||
|
migrate_to_data_tiers: { get () { return this.migrateToDataTiers } },
|
||||||
move_to_step: { get () { return this.moveToStep } },
|
move_to_step: { get () { return this.moveToStep } },
|
||||||
put_lifecycle: { get () { return this.putLifecycle } },
|
put_lifecycle: { get () { return this.putLifecycle } },
|
||||||
remove_policy: { get () { return this.removePolicy } }
|
remove_policy: { get () { return this.removePolicy } }
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function indexApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function infoApi (params, options, callback) {
|
function infoApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/'
|
path = '/'
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,8 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||||
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'verbose']
|
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' }
|
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', ifVersion: 'if_version' }
|
||||||
|
|
||||||
function IngestApi (transport, ConfigurationError) {
|
function IngestApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
@ -35,15 +35,15 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -58,13 +58,34 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
||||||
@ -87,10 +108,10 @@ IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options
|
|||||||
IngestApi.prototype.processorGrok = function ingestProcessorGrokApi (params, options, callback) {
|
IngestApi.prototype.processorGrok = function ingestProcessorGrokApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok'
|
path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok'
|
||||||
|
|
||||||
@ -109,19 +130,19 @@ IngestApi.prototype.putPipeline = function ingestPutPipelineApi (params, options
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -140,15 +161,15 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate'
|
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate'
|
||||||
@ -170,6 +191,7 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call
|
|||||||
|
|
||||||
Object.defineProperties(IngestApi.prototype, {
|
Object.defineProperties(IngestApi.prototype, {
|
||||||
delete_pipeline: { get () { return this.deletePipeline } },
|
delete_pipeline: { get () { return this.deletePipeline } },
|
||||||
|
geo_ip_stats: { get () { return this.geoIpStats } },
|
||||||
get_pipeline: { get () { return this.getPipeline } },
|
get_pipeline: { get () { return this.getPipeline } },
|
||||||
processor_grok: { get () { return this.processorGrok } },
|
processor_grok: { get () { return this.processorGrok } },
|
||||||
put_pipeline: { get () { return this.putPipeline } }
|
put_pipeline: { get () { return this.putPipeline } }
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function LicenseApi (transport, ConfigurationError) {
|
|||||||
LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callback) {
|
LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_license'
|
path = '/' + '_license'
|
||||||
|
|
||||||
@ -55,10 +55,10 @@ LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callba
|
|||||||
LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
|
LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_license'
|
path = '/' + '_license'
|
||||||
|
|
||||||
@ -76,10 +76,10 @@ LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
|
|||||||
LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params, options, callback) {
|
LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_license' + '/' + 'basic_status'
|
path = '/' + '_license' + '/' + 'basic_status'
|
||||||
|
|
||||||
@ -97,10 +97,10 @@ LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params,
|
|||||||
LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params, options, callback) {
|
LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_license' + '/' + 'trial_status'
|
path = '/' + '_license' + '/' + 'trial_status'
|
||||||
|
|
||||||
@ -118,10 +118,10 @@ LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params,
|
|||||||
LicenseApi.prototype.post = function licensePostApi (params, options, callback) {
|
LicenseApi.prototype.post = function licensePostApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_license'
|
path = '/' + '_license'
|
||||||
|
|
||||||
@ -139,10 +139,10 @@ LicenseApi.prototype.post = function licensePostApi (params, options, callback)
|
|||||||
LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params, options, callback) {
|
LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_license' + '/' + 'start_basic'
|
path = '/' + '_license' + '/' + 'start_basic'
|
||||||
|
|
||||||
@ -160,10 +160,10 @@ LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params,
|
|||||||
LicenseApi.prototype.postStartTrial = function licensePostStartTrialApi (params, options, callback) {
|
LicenseApi.prototype.postStartTrial = function licensePostStartTrialApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_license' + '/' + 'start_trial'
|
path = '/' + '_license' + '/' + 'start_trial'
|
||||||
|
|
||||||
|
|||||||
125
api/api/logstash.js
Normal file
125
api/api/logstash.js
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -30,21 +30,21 @@ function mgetApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function MigrationApi (transport, ConfigurationError) {
|
|||||||
MigrationApi.prototype.deprecations = function migrationDeprecationsApi (params, options, callback) {
|
MigrationApi.prototype.deprecations = function migrationDeprecationsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations'
|
path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations'
|
||||||
@ -57,4 +57,51 @@ MigrationApi.prototype.deprecations = function migrationDeprecationsApi (params,
|
|||||||
return this.transport.request(request, options, callback)
|
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
|
module.exports = MigrationApi
|
||||||
|
|||||||
586
api/api/ml.js
586
api/api/ml.js
File diff suppressed because it is too large
Load Diff
@ -35,15 +35,15 @@ MonitoringApi.prototype.bulk = function monitoringBulkApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, type, ...querystring } = params
|
let { method, body, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((type) != null) {
|
if ((type) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'
|
path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'
|
||||||
|
|||||||
@ -30,21 +30,21 @@ function msearchApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
|
||||||
|
|||||||
@ -30,21 +30,21 @@ function msearchTemplateApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
|
||||||
|
|||||||
@ -30,15 +30,15 @@ function mtermvectorsApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
|
||||||
|
|||||||
@ -23,21 +23,85 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||||
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 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 = { ignoreIdleThreads: 'ignore_idle_threads', errorTrace: 'error_trace', filterPath: 'filter_path', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes' }
|
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' }
|
||||||
|
|
||||||
function NodesApi (transport, ConfigurationError) {
|
function NodesApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
this[kConfigurationError] = ConfigurationError
|
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) {
|
NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, ...querystring } = params
|
let { method, body, nodeId, node_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null) {
|
if ((node_id || nodeId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'
|
||||||
@ -69,10 +133,10 @@ NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, ca
|
|||||||
NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
|
NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, metric, ...querystring } = params
|
let { method, body, nodeId, node_id, metric, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null && (metric) != null) {
|
if ((node_id || nodeId) != null && (metric) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + encodeURIComponent(metric)
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + encodeURIComponent(metric)
|
||||||
@ -101,10 +165,10 @@ NodesApi.prototype.info = function nodesInfoApi (params, options, callback) {
|
|||||||
NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi (params, options, callback) {
|
NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, ...querystring } = params
|
let { method, body, nodeId, node_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null) {
|
if ((node_id || nodeId) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings'
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings'
|
||||||
@ -127,10 +191,10 @@ NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi
|
|||||||
NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
|
NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params
|
let { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) {
|
if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
|
||||||
@ -165,10 +229,10 @@ NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
|
|||||||
NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) {
|
NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, nodeId, node_id, metric, ...querystring } = params
|
let { method, body, nodeId, node_id, metric, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((node_id || nodeId) != null && (metric) != null) {
|
if ((node_id || nodeId) != null && (metric) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage' + '/' + encodeURIComponent(metric)
|
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage' + '/' + encodeURIComponent(metric)
|
||||||
@ -195,6 +259,8 @@ NodesApi.prototype.usage = function nodesUsageApi (params, options, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperties(NodesApi.prototype, {
|
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 } },
|
hot_threads: { get () { return this.hotThreads } },
|
||||||
reload_secure_settings: { get () { return this.reloadSecureSettings } }
|
reload_secure_settings: { get () { return this.reloadSecureSettings } }
|
||||||
})
|
})
|
||||||
|
|||||||
@ -29,17 +29,22 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', expandWildcards: 'e
|
|||||||
function openPointInTimeApi (params, options, callback) {
|
function openPointInTimeApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
// 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)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if (method == null) method = 'POST'
|
||||||
if (method == null) method = 'POST'
|
path = '/' + encodeURIComponent(index) + '/' + '_pit'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_pit'
|
|
||||||
} else {
|
|
||||||
if (method == null) method = 'POST'
|
|
||||||
path = '/' + '_pit'
|
|
||||||
}
|
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function pingApi (params, options, callback) {
|
function pingApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'HEAD'
|
if (method == null) method = 'HEAD'
|
||||||
path = '/'
|
path = '/'
|
||||||
|
|
||||||
|
|||||||
@ -30,25 +30,25 @@ function putScriptApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, context, ...querystring } = params
|
let { method, body, id, context, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null && (context) != null) {
|
if ((id) != null && (context) != null) {
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context)
|
path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context)
|
||||||
|
|||||||
@ -30,15 +30,15 @@ function rankEvalApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'
|
path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'
|
||||||
|
|||||||
@ -30,15 +30,15 @@ function reindexApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_reindex'
|
path = '/' + '_reindex'
|
||||||
|
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function reindexRethrottleApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||||
return handleError(err, callback)
|
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')
|
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, taskId, task_id, ...querystring } = params
|
let { method, body, taskId, task_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function renderSearchTemplateApi (params, options, callback) {
|
function renderSearchTemplateApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id)
|
path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id)
|
||||||
|
|||||||
@ -35,15 +35,15 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
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) {
|
RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
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) {
|
RollupApi.prototype.getRollupCaps = function rollupGetRollupCapsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id)
|
path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id)
|
||||||
@ -114,15 +114,15 @@ RollupApi.prototype.getRollupIndexCaps = function rollupGetRollupIndexCapsApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data'
|
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data'
|
||||||
|
|
||||||
@ -141,19 +141,19 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -172,29 +172,29 @@ RollupApi.prototype.rollup = function rollupRollupApi (params, options, callback
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['rollup_index'] == null && params['rollupIndex'] == null) {
|
if (params.rollup_index == null && params.rollupIndex == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: rollup_index or rollupIndex')
|
const err = new this[kConfigurationError]('Missing required parameter: rollup_index or rollupIndex')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if ((params['rollup_index'] != null || params['rollupIndex'] != null) && (params['index'] == null)) {
|
if ((params.rollup_index != null || params.rollupIndex != null) && (params.index == null)) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, rollupIndex, rollup_index, ...querystring } = params
|
let { method, body, index, rollupIndex, rollup_index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + encodeURIComponent(rollup_index || rollupIndex)
|
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + encodeURIComponent(rollup_index || rollupIndex)
|
||||||
|
|
||||||
@ -213,25 +213,25 @@ RollupApi.prototype.rollupSearch = function rollupRollupSearchApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search'
|
||||||
@ -255,15 +255,15 @@ RollupApi.prototype.startJob = function rollupStartJobApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start'
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start'
|
||||||
|
|
||||||
@ -282,15 +282,15 @@ RollupApi.prototype.stopJob = function rollupStopJobApi (params, options, callba
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop'
|
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop'
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
|||||||
function scriptsPainlessExecuteApi (params, options, callback) {
|
function scriptsPainlessExecuteApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'
|
path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'
|
||||||
|
|
||||||
|
|||||||
@ -29,10 +29,10 @@ const snakeCase = { scrollId: 'scroll_id', restTotalHitsAsInt: 'rest_total_hits_
|
|||||||
function scrollApi (params, options, callback) {
|
function scrollApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, scrollId, scroll_id, ...querystring } = params
|
let { method, body, scrollId, scroll_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((scroll_id || scrollId) != null) {
|
if ((scroll_id || scrollId) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
||||||
|
|||||||
@ -23,22 +23,22 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
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', 'pretty', 'human', 'error_trace', 'source', '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', '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', errorTrace: 'error_trace', filterPath: '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' }
|
||||||
|
|
||||||
function searchApi (params, options, callback) {
|
function searchApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'
|
||||||
|
|||||||
87
api/api/search_mvt.js
Normal file
87
api/api/search_mvt.js
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -29,10 +29,10 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'al
|
|||||||
function searchShardsApi (params, options, callback) {
|
function searchShardsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_search_shards'
|
path = '/' + encodeURIComponent(index) + '/' + '_search_shards'
|
||||||
|
|||||||
@ -30,21 +30,21 @@ function searchTemplateApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|
||||||
|
|||||||
@ -23,21 +23,47 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||||
const acceptedQuerystring = ['ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'master_timeout', 'wait_for_completion']
|
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 = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForCompletion: 'wait_for_completion' }
|
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' }
|
||||||
|
|
||||||
function SearchableSnapshotsApi (transport, ConfigurationError) {
|
function SearchableSnapshotsApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
this[kConfigurationError] = ConfigurationError
|
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) {
|
SearchableSnapshotsApi.prototype.clearCache = function searchableSnapshotsClearCacheApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear'
|
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear'
|
||||||
@ -61,29 +87,29 @@ SearchableSnapshotsApi.prototype.mount = function searchableSnapshotsMountApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['snapshot'] == null) {
|
if (params.snapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_mount'
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_mount'
|
||||||
|
|
||||||
@ -102,15 +128,15 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
let { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_stats'
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_stats'
|
||||||
|
|
||||||
@ -128,10 +154,10 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR
|
|||||||
SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (params, options, callback) {
|
SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, index, ...querystring } = params
|
let { method, body, index, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null) {
|
if ((index) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'stats'
|
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'stats'
|
||||||
@ -152,6 +178,7 @@ SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (p
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperties(SearchableSnapshotsApi.prototype, {
|
Object.defineProperties(SearchableSnapshotsApi.prototype, {
|
||||||
|
cache_stats: { get () { return this.cacheStats } },
|
||||||
clear_cache: { get () { return this.clearCache } },
|
clear_cache: { get () { return this.clearCache } },
|
||||||
repository_stats: { get () { return this.repositoryStats } }
|
repository_stats: { get () { return this.repositoryStats } }
|
||||||
})
|
})
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function SecurityApi (transport, ConfigurationError) {
|
|||||||
SecurityApi.prototype.authenticate = function securityAuthenticateApi (params, options, callback) {
|
SecurityApi.prototype.authenticate = function securityAuthenticateApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + '_authenticate'
|
path = '/' + '_security' + '/' + '_authenticate'
|
||||||
|
|
||||||
@ -56,15 +56,15 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, username, ...querystring } = params
|
let { method, body, username, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((username) != null) {
|
if ((username) != null) {
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password'
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password'
|
||||||
@ -88,15 +88,15 @@ SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['ids'] == null) {
|
if (params.ids == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: ids')
|
const err = new this[kConfigurationError]('Missing required parameter: ids')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ids, ...querystring } = params
|
let { method, body, ids, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
|
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
|
||||||
|
|
||||||
@ -115,15 +115,15 @@ SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivil
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['application'] == null) {
|
if (params.application == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: application')
|
const err = new this[kConfigurationError]('Missing required parameter: application')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, application, ...querystring } = params
|
let { method, body, application, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_clear_cache'
|
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_clear_cache'
|
||||||
|
|
||||||
@ -142,15 +142,15 @@ SecurityApi.prototype.clearCachedRealms = function securityClearCachedRealmsApi
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['realms'] == null) {
|
if (params.realms == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: realms')
|
const err = new this[kConfigurationError]('Missing required parameter: realms')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, realms, ...querystring } = params
|
let { method, body, realms, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache'
|
path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache'
|
||||||
|
|
||||||
@ -169,15 +169,15 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
|
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
|
||||||
|
|
||||||
@ -192,19 +192,63 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'api_key'
|
path = '/' + '_security' + '/' + 'api_key'
|
||||||
|
|
||||||
@ -219,29 +263,74 @@ SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, o
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
SecurityApi.prototype.deletePrivileges = function securityDeletePrivilegesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['application'] == null) {
|
if (params.application == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: application')
|
const err = new this[kConfigurationError]('Missing required parameter: application')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, application, name, ...querystring } = params
|
let { method, body, application, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -260,15 +349,15 @@ SecurityApi.prototype.deleteRole = function securityDeleteRoleApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -287,15 +376,15 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -310,19 +399,63 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
SecurityApi.prototype.deleteUser = function securityDeleteUserApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['username'] == null) {
|
if (params.username == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, username, ...querystring } = params
|
let { method, body, username, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
||||||
|
|
||||||
@ -341,15 +474,15 @@ SecurityApi.prototype.disableUser = function securityDisableUserApi (params, opt
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['username'] == null) {
|
if (params.username == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, username, ...querystring } = params
|
let { method, body, username, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
|
||||||
|
|
||||||
@ -368,15 +501,15 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['username'] == null) {
|
if (params.username == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, username, ...querystring } = params
|
let { method, body, username, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable'
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_enable'
|
||||||
|
|
||||||
@ -394,10 +527,10 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio
|
|||||||
SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) {
|
SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'api_key'
|
path = '/' + '_security' + '/' + 'api_key'
|
||||||
|
|
||||||
@ -415,10 +548,10 @@ SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options
|
|||||||
SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (params, options, callback) {
|
SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin'
|
path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin'
|
||||||
|
|
||||||
@ -437,15 +570,15 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params,
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, application, name, ...querystring } = params
|
let { method, body, application, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((application) != null && (name) != null) {
|
if ((application) != null && (name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
|
||||||
@ -471,10 +604,10 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params,
|
|||||||
SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, callback) {
|
SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
||||||
@ -497,10 +630,10 @@ SecurityApi.prototype.getRole = function securityGetRoleApi (params, options, ca
|
|||||||
SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (params, options, callback) {
|
SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((name) != null) {
|
if ((name) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
||||||
@ -520,19 +653,91 @@ SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (param
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
||||||
|
|
||||||
@ -550,10 +755,10 @@ SecurityApi.prototype.getToken = function securityGetTokenApi (params, options,
|
|||||||
SecurityApi.prototype.getUser = function securityGetUserApi (params, options, callback) {
|
SecurityApi.prototype.getUser = function securityGetUserApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, username, ...querystring } = params
|
let { method, body, username, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((username) != null) {
|
if ((username) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
||||||
@ -576,10 +781,10 @@ SecurityApi.prototype.getUser = function securityGetUserApi (params, options, ca
|
|||||||
SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi (params, options, callback) {
|
SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
|
path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
|
||||||
|
|
||||||
@ -598,15 +803,15 @@ SecurityApi.prototype.grantApiKey = function securityGrantApiKeyApi (params, opt
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant'
|
path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant'
|
||||||
|
|
||||||
@ -625,15 +830,15 @@ SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params,
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, user, ...querystring } = params
|
let { method, body, user, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((user) != null) {
|
if ((user) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
|
||||||
@ -657,15 +862,15 @@ SecurityApi.prototype.invalidateApiKey = function securityInvalidateApiKeyApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_security' + '/' + 'api_key'
|
path = '/' + '_security' + '/' + 'api_key'
|
||||||
|
|
||||||
@ -684,15 +889,15 @@ SecurityApi.prototype.invalidateToken = function securityInvalidateTokenApi (par
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
||||||
|
|
||||||
@ -711,15 +916,15 @@ SecurityApi.prototype.putPrivileges = function securityPutPrivilegesApi (params,
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'privilege'
|
path = '/' + '_security' + '/' + 'privilege'
|
||||||
|
|
||||||
@ -738,19 +943,19 @@ SecurityApi.prototype.putRole = function securityPutRoleApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -769,19 +974,19 @@ SecurityApi.prototype.putRoleMapping = function securityPutRoleMappingApi (param
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['name'] == null) {
|
if (params.name == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, name, ...querystring } = params
|
let { method, body, name, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
||||||
|
|
||||||
@ -800,19 +1005,19 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['username'] == null) {
|
if (params.username == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, username, ...querystring } = params
|
let { method, body, username, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
||||||
|
|
||||||
@ -827,16 +1032,202 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
|
|||||||
return this.transport.request(request, options, callback)
|
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, {
|
Object.defineProperties(SecurityApi.prototype, {
|
||||||
change_password: { get () { return this.changePassword } },
|
change_password: { get () { return this.changePassword } },
|
||||||
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
|
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
|
||||||
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
|
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
|
||||||
clear_cached_realms: { get () { return this.clearCachedRealms } },
|
clear_cached_realms: { get () { return this.clearCachedRealms } },
|
||||||
clear_cached_roles: { get () { return this.clearCachedRoles } },
|
clear_cached_roles: { get () { return this.clearCachedRoles } },
|
||||||
|
clear_cached_service_tokens: { get () { return this.clearCachedServiceTokens } },
|
||||||
create_api_key: { get () { return this.createApiKey } },
|
create_api_key: { get () { return this.createApiKey } },
|
||||||
|
create_service_token: { get () { return this.createServiceToken } },
|
||||||
delete_privileges: { get () { return this.deletePrivileges } },
|
delete_privileges: { get () { return this.deletePrivileges } },
|
||||||
delete_role: { get () { return this.deleteRole } },
|
delete_role: { get () { return this.deleteRole } },
|
||||||
delete_role_mapping: { get () { return this.deleteRoleMapping } },
|
delete_role_mapping: { get () { return this.deleteRoleMapping } },
|
||||||
|
delete_service_token: { get () { return this.deleteServiceToken } },
|
||||||
delete_user: { get () { return this.deleteUser } },
|
delete_user: { get () { return this.deleteUser } },
|
||||||
disable_user: { get () { return this.disableUser } },
|
disable_user: { get () { return this.disableUser } },
|
||||||
enable_user: { get () { return this.enableUser } },
|
enable_user: { get () { return this.enableUser } },
|
||||||
@ -845,6 +1236,8 @@ Object.defineProperties(SecurityApi.prototype, {
|
|||||||
get_privileges: { get () { return this.getPrivileges } },
|
get_privileges: { get () { return this.getPrivileges } },
|
||||||
get_role: { get () { return this.getRole } },
|
get_role: { get () { return this.getRole } },
|
||||||
get_role_mapping: { get () { return this.getRoleMapping } },
|
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_token: { get () { return this.getToken } },
|
||||||
get_user: { get () { return this.getUser } },
|
get_user: { get () { return this.getUser } },
|
||||||
get_user_privileges: { get () { return this.getUserPrivileges } },
|
get_user_privileges: { get () { return this.getUserPrivileges } },
|
||||||
@ -855,7 +1248,14 @@ Object.defineProperties(SecurityApi.prototype, {
|
|||||||
put_privileges: { get () { return this.putPrivileges } },
|
put_privileges: { get () { return this.putPrivileges } },
|
||||||
put_role: { get () { return this.putRole } },
|
put_role: { get () { return this.putRole } },
|
||||||
put_role_mapping: { get () { return this.putRoleMapping } },
|
put_role_mapping: { get () { return this.putRoleMapping } },
|
||||||
put_user: { get () { return this.putUser } }
|
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 } }
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = SecurityApi
|
module.exports = SecurityApi
|
||||||
|
|||||||
124
api/api/shutdown.js
Normal file
124
api/api/shutdown.js
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -35,15 +35,15 @@ SlmApi.prototype.deleteLifecycle = function slmDeleteLifecycleApi (params, optio
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, policyId, policy_id, ...querystring } = params
|
let { method, body, policyId, policy_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, policyId, policy_id, ...querystring } = params
|
let { method, body, policyId, policy_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) + '/' + '_execute'
|
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) {
|
SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_slm' + '/' + '_execute_retention'
|
path = '/' + '_slm' + '/' + '_execute_retention'
|
||||||
|
|
||||||
@ -109,10 +109,10 @@ SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, opt
|
|||||||
SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, callback) {
|
SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, policyId, policy_id, ...querystring } = params
|
let { method, body, policyId, policy_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((policy_id || policyId) != null) {
|
if ((policy_id || policyId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
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) {
|
SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_slm' + '/' + 'stats'
|
path = '/' + '_slm' + '/' + 'stats'
|
||||||
|
|
||||||
@ -156,10 +156,10 @@ SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback)
|
|||||||
SlmApi.prototype.getStatus = function slmGetStatusApi (params, options, callback) {
|
SlmApi.prototype.getStatus = function slmGetStatusApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_slm' + '/' + 'status'
|
path = '/' + '_slm' + '/' + 'status'
|
||||||
|
|
||||||
@ -178,15 +178,15 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, policyId, policy_id, ...querystring } = params
|
let { method, body, policyId, policy_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
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) {
|
SlmApi.prototype.start = function slmStartApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_slm' + '/' + 'start'
|
path = '/' + '_slm' + '/' + 'start'
|
||||||
|
|
||||||
@ -225,10 +225,10 @@ SlmApi.prototype.start = function slmStartApi (params, options, callback) {
|
|||||||
SlmApi.prototype.stop = function slmStopApi (params, options, callback) {
|
SlmApi.prototype.stop = function slmStopApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_slm' + '/' + 'stop'
|
path = '/' + '_slm' + '/' + 'stop'
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,8 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
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', 'verbose', 'local']
|
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' }
|
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' }
|
||||||
|
|
||||||
function SnapshotApi (transport, ConfigurationError) {
|
function SnapshotApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
@ -35,15 +35,15 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
let { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup'
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup'
|
||||||
|
|
||||||
@ -62,36 +62,36 @@ SnapshotApi.prototype.clone = function snapshotCloneApi (params, options, callba
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['snapshot'] == null) {
|
if (params.snapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['target_snapshot'] == null && params['targetSnapshot'] == null) {
|
if (params.target_snapshot == null && params.targetSnapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// check required url components
|
||||||
if ((params['target_snapshot'] != null || params['targetSnapshot'] != null) && (params['snapshot'] == null || params['repository'] == null)) {
|
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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: snapshot, repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
} else if (params['snapshot'] != null && (params['repository'] == null)) {
|
} else if (params.snapshot != null && (params.repository == null)) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot)
|
||||||
|
|
||||||
@ -110,25 +110,25 @@ SnapshotApi.prototype.create = function snapshotCreateApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['snapshot'] == null) {
|
if (params.snapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||||
|
|
||||||
@ -147,19 +147,19 @@ SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
let { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
||||||
|
|
||||||
@ -178,25 +178,25 @@ SnapshotApi.prototype.delete = function snapshotDeleteApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['snapshot'] == null) {
|
if (params.snapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||||
|
|
||||||
@ -215,15 +215,15 @@ SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
let { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
||||||
|
|
||||||
@ -242,25 +242,25 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['snapshot'] == null) {
|
if (params.snapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||||
|
|
||||||
@ -278,10 +278,10 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
|
|||||||
SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params, options, callback) {
|
SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
let { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((repository) != null) {
|
if ((repository) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
||||||
@ -301,29 +301,56 @@ SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params,
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
SnapshotApi.prototype.restore = function snapshotRestoreApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['snapshot'] == null) {
|
if (params.snapshot == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore'
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore'
|
||||||
|
|
||||||
@ -342,15 +369,15 @@ SnapshotApi.prototype.status = function snapshotStatusApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, snapshot, ...querystring } = params
|
let { method, body, repository, snapshot, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((repository) != null && (snapshot) != null) {
|
if ((repository) != null && (snapshot) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status'
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status'
|
||||||
@ -377,15 +404,15 @@ SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['repository'] == null) {
|
if (params.repository == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, repository, ...querystring } = params
|
let { method, body, repository, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'
|
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'
|
||||||
|
|
||||||
@ -405,6 +432,7 @@ Object.defineProperties(SnapshotApi.prototype, {
|
|||||||
create_repository: { get () { return this.createRepository } },
|
create_repository: { get () { return this.createRepository } },
|
||||||
delete_repository: { get () { return this.deleteRepository } },
|
delete_repository: { get () { return this.deleteRepository } },
|
||||||
get_repository: { get () { return this.getRepository } },
|
get_repository: { get () { return this.getRepository } },
|
||||||
|
repository_analyze: { get () { return this.repositoryAnalyze } },
|
||||||
verify_repository: { get () { return this.verifyRepository } }
|
verify_repository: { get () { return this.verifyRepository } }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
108
api/api/sql.js
108
api/api/sql.js
@ -23,8 +23,8 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'format']
|
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' }
|
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', keepAlive: 'keep_alive', waitForCompletionTimeout: 'wait_for_completion_timeout' }
|
||||||
|
|
||||||
function SqlApi (transport, ConfigurationError) {
|
function SqlApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
@ -35,15 +35,15 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_sql' + '/' + 'close'
|
path = '/' + '_sql' + '/' + 'close'
|
||||||
|
|
||||||
@ -58,19 +58,100 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
|
|||||||
return this.transport.request(request, options, callback)
|
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) {
|
SqlApi.prototype.query = function sqlQueryApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_sql'
|
path = '/' + '_sql'
|
||||||
|
|
||||||
@ -89,15 +170,15 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_sql' + '/' + 'translate'
|
path = '/' + '_sql' + '/' + 'translate'
|
||||||
|
|
||||||
@ -113,7 +194,10 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object.defineProperties(SqlApi.prototype, {
|
Object.defineProperties(SqlApi.prototype, {
|
||||||
clear_cursor: { get () { return this.clearCursor } }
|
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 } }
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = SqlApi
|
module.exports = SqlApi
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function SslApi (transport, ConfigurationError) {
|
|||||||
SslApi.prototype.certificates = function sslCertificatesApi (params, options, callback) {
|
SslApi.prototype.certificates = function sslCertificatesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_ssl' + '/' + 'certificates'
|
path = '/' + '_ssl' + '/' + 'certificates'
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function TasksApi (transport, ConfigurationError) {
|
|||||||
TasksApi.prototype.cancel = function tasksCancelApi (params, options, callback) {
|
TasksApi.prototype.cancel = function tasksCancelApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, taskId, task_id, ...querystring } = params
|
let { method, body, taskId, task_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((task_id || taskId) != null) {
|
if ((task_id || taskId) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel'
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, taskId, task_id, ...querystring } = params
|
let { method, body, taskId, task_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId)
|
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) {
|
TasksApi.prototype.list = function tasksListApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_tasks'
|
path = '/' + '_tasks'
|
||||||
|
|
||||||
|
|||||||
56
api/api/terms_enum.js
Normal file
56
api/api/terms_enum.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -30,15 +30,15 @@ function termvectorsApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, id, type, ...querystring } = params
|
let { method, body, index, id, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_termvectors'
|
||||||
|
|||||||
65
api/api/text_structure.js
Normal file
65
api/api/text_structure.js
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
@ -23,8 +23,8 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||||
const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint']
|
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' }
|
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' }
|
||||||
|
|
||||||
function TransformApi (transport, ConfigurationError) {
|
function TransformApi (transport, ConfigurationError) {
|
||||||
this.transport = transport
|
this.transport = transport
|
||||||
@ -35,15 +35,15 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
|
|
||||||
@ -61,10 +61,10 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
|
|||||||
TransformApi.prototype.getTransform = function transformGetTransformApi (params, options, callback) {
|
TransformApi.prototype.getTransform = function transformGetTransformApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((transform_id || transformId) != null) {
|
if ((transform_id || transformId) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
@ -88,15 +88,15 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
|
||||||
|
|
||||||
@ -114,18 +114,17 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
|
|||||||
TransformApi.prototype.previewTransform = function transformPreviewTransformApi (params, options, callback) {
|
TransformApi.prototype.previewTransform = function transformPreviewTransformApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
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)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if ((transform_id || transformId) != null) {
|
||||||
path = '/' + '_transform' + '/' + '_preview'
|
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'
|
||||||
|
}
|
||||||
|
|
||||||
// build request object
|
// build request object
|
||||||
const request = {
|
const request = {
|
||||||
@ -142,19 +141,19 @@ TransformApi.prototype.putTransform = function transformPutTransformApi (params,
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
||||||
|
|
||||||
@ -173,15 +172,15 @@ TransformApi.prototype.startTransform = function transformStartTransformApi (par
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
|
||||||
|
|
||||||
@ -200,15 +199,15 @@ TransformApi.prototype.stopTransform = function transformStopTransformApi (param
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
|
||||||
|
|
||||||
@ -227,19 +226,19 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, transformId, transform_id, ...querystring } = params
|
let { method, body, transformId, transform_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
|
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
|
||||||
|
|
||||||
@ -254,6 +253,27 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
|
|||||||
return this.transport.request(request, options, callback)
|
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, {
|
Object.defineProperties(TransformApi.prototype, {
|
||||||
delete_transform: { get () { return this.deleteTransform } },
|
delete_transform: { get () { return this.deleteTransform } },
|
||||||
get_transform: { get () { return this.getTransform } },
|
get_transform: { get () { return this.getTransform } },
|
||||||
@ -262,7 +282,8 @@ Object.defineProperties(TransformApi.prototype, {
|
|||||||
put_transform: { get () { return this.putTransform } },
|
put_transform: { get () { return this.putTransform } },
|
||||||
start_transform: { get () { return this.startTransform } },
|
start_transform: { get () { return this.startTransform } },
|
||||||
stop_transform: { get () { return this.stopTransform } },
|
stop_transform: { get () { return this.stopTransform } },
|
||||||
update_transform: { get () { return this.updateTransform } }
|
update_transform: { get () { return this.updateTransform } },
|
||||||
|
upgrade_transforms: { get () { return this.upgradeTransforms } }
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = TransformApi
|
module.exports = TransformApi
|
||||||
|
|||||||
@ -30,23 +30,23 @@ function updateApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
if (params['body'] == null) {
|
if (params.body == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, index, type, ...querystring } = params
|
let { method, body, id, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null && (id) != null) {
|
if ((index) != null && (type) != null && (id) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update'
|
||||||
|
|||||||
@ -23,28 +23,28 @@
|
|||||||
/* eslint no-unused-vars: 0 */
|
/* eslint no-unused-vars: 0 */
|
||||||
|
|
||||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
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', '_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 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', _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' }
|
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' }
|
||||||
|
|
||||||
function updateByQueryApi (params, options, callback) {
|
function updateByQueryApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['index'] == null) {
|
if (params.index == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, index, type, ...querystring } = params
|
let { method, body, index, type, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((index) != null && (type) != null) {
|
if ((index) != null && (type) != null) {
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
|
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
|
||||||
|
|||||||
@ -30,19 +30,19 @@ function updateByQueryRethrottleApi (params, options, callback) {
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||||
return handleError(err, callback)
|
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')
|
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, taskId, task_id, ...querystring } = params
|
let { method, body, taskId, task_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
path = '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
||||||
|
|
||||||
|
|||||||
@ -35,21 +35,21 @@ WatcherApi.prototype.ackWatch = function watcherAckWatchApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
// check required url components
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter of the url: watch_id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params
|
let { method, body, watchId, watch_id, actionId, action_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((watch_id || watchId) != null && (action_id || actionId) != null) {
|
if ((watch_id || watchId) != null && (action_id || actionId) != null) {
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack' + '/' + encodeURIComponent(action_id || actionId)
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, watchId, watch_id, ...querystring } = params
|
let { method, body, watchId, watch_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_activate'
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// 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')
|
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, watchId, watch_id, ...querystring } = params
|
let { method, body, watchId, watch_id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_deactivate'
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'DELETE'
|
if (method == null) method = 'DELETE'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -153,10 +153,10 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
|
|||||||
WatcherApi.prototype.executeWatch = function watcherExecuteWatchApi (params, options, callback) {
|
WatcherApi.prototype.executeWatch = function watcherExecuteWatchApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((id) != null) {
|
if ((id) != null) {
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) + '/' + '_execute'
|
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)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -207,15 +207,15 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
|
|||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
// check required parameters
|
// check required parameters
|
||||||
if (params['id'] == null) {
|
if (params.id == null) {
|
||||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||||
return handleError(err, callback)
|
return handleError(err, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
var { method, body, id, ...querystring } = params
|
let { method, body, id, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'PUT'
|
if (method == null) method = 'PUT'
|
||||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
||||||
|
|
||||||
@ -233,10 +233,10 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
|
|||||||
WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, options, callback) {
|
WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||||
path = '/' + '_watcher' + '/' + '_query' + '/' + 'watches'
|
path = '/' + '_watcher' + '/' + '_query' + '/' + 'watches'
|
||||||
|
|
||||||
@ -254,10 +254,10 @@ WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, opt
|
|||||||
WatcherApi.prototype.start = function watcherStartApi (params, options, callback) {
|
WatcherApi.prototype.start = function watcherStartApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_watcher' + '/' + '_start'
|
path = '/' + '_watcher' + '/' + '_start'
|
||||||
|
|
||||||
@ -275,10 +275,10 @@ WatcherApi.prototype.start = function watcherStartApi (params, options, callback
|
|||||||
WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback) {
|
WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, metric, ...querystring } = params
|
let { method, body, metric, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if ((metric) != null) {
|
if ((metric) != null) {
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric)
|
path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric)
|
||||||
@ -301,10 +301,10 @@ WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback
|
|||||||
WatcherApi.prototype.stop = function watcherStopApi (params, options, callback) {
|
WatcherApi.prototype.stop = function watcherStopApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'POST'
|
if (method == null) method = 'POST'
|
||||||
path = '/' + '_watcher' + '/' + '_stop'
|
path = '/' + '_watcher' + '/' + '_stop'
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,10 @@ function XpackApi (transport, ConfigurationError) {
|
|||||||
XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
|
XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_xpack'
|
path = '/' + '_xpack'
|
||||||
|
|
||||||
@ -55,10 +55,10 @@ XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
|
|||||||
XpackApi.prototype.usage = function xpackUsageApi (params, options, callback) {
|
XpackApi.prototype.usage = function xpackUsageApi (params, options, callback) {
|
||||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||||
|
|
||||||
var { method, body, ...querystring } = params
|
let { method, body, ...querystring } = params
|
||||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||||
|
|
||||||
var path = ''
|
let path = ''
|
||||||
if (method == null) method = 'GET'
|
if (method == null) method = 'GET'
|
||||||
path = '/' + '_xpack' + '/' + 'usage'
|
path = '/' + '_xpack' + '/' + 'usage'
|
||||||
|
|
||||||
|
|||||||
302
api/index.js
302
api/index.js
@ -19,9 +19,13 @@
|
|||||||
|
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
|
const AsyncSearchApi = require('./api/async_search')
|
||||||
|
const AutoscalingApi = require('./api/autoscaling')
|
||||||
const bulkApi = require('./api/bulk')
|
const bulkApi = require('./api/bulk')
|
||||||
const CatApi = require('./api/cat')
|
const CatApi = require('./api/cat')
|
||||||
|
const CcrApi = require('./api/ccr')
|
||||||
const clearScrollApi = require('./api/clear_scroll')
|
const clearScrollApi = require('./api/clear_scroll')
|
||||||
|
const closePointInTimeApi = require('./api/close_point_in_time')
|
||||||
const ClusterApi = require('./api/cluster')
|
const ClusterApi = require('./api/cluster')
|
||||||
const countApi = require('./api/count')
|
const countApi = require('./api/count')
|
||||||
const createApi = require('./api/create')
|
const createApi = require('./api/create')
|
||||||
@ -30,121 +34,134 @@ const deleteApi = require('./api/delete')
|
|||||||
const deleteByQueryApi = require('./api/delete_by_query')
|
const deleteByQueryApi = require('./api/delete_by_query')
|
||||||
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
|
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
|
||||||
const deleteScriptApi = require('./api/delete_script')
|
const deleteScriptApi = require('./api/delete_script')
|
||||||
|
const EnrichApi = require('./api/enrich')
|
||||||
|
const EqlApi = require('./api/eql')
|
||||||
const existsApi = require('./api/exists')
|
const existsApi = require('./api/exists')
|
||||||
const existsSourceApi = require('./api/exists_source')
|
const existsSourceApi = require('./api/exists_source')
|
||||||
const explainApi = require('./api/explain')
|
const explainApi = require('./api/explain')
|
||||||
|
const FeaturesApi = require('./api/features')
|
||||||
const fieldCapsApi = require('./api/field_caps')
|
const fieldCapsApi = require('./api/field_caps')
|
||||||
|
const FleetApi = require('./api/fleet')
|
||||||
const getApi = require('./api/get')
|
const getApi = require('./api/get')
|
||||||
const getScriptApi = require('./api/get_script')
|
const getScriptApi = require('./api/get_script')
|
||||||
const getScriptContextApi = require('./api/get_script_context')
|
const getScriptContextApi = require('./api/get_script_context')
|
||||||
const getScriptLanguagesApi = require('./api/get_script_languages')
|
const getScriptLanguagesApi = require('./api/get_script_languages')
|
||||||
const getSourceApi = require('./api/get_source')
|
const getSourceApi = require('./api/get_source')
|
||||||
|
const GraphApi = require('./api/graph')
|
||||||
|
const IlmApi = require('./api/ilm')
|
||||||
const indexApi = require('./api/index')
|
const indexApi = require('./api/index')
|
||||||
const IndicesApi = require('./api/indices')
|
const IndicesApi = require('./api/indices')
|
||||||
const infoApi = require('./api/info')
|
const infoApi = require('./api/info')
|
||||||
const IngestApi = require('./api/ingest')
|
const IngestApi = require('./api/ingest')
|
||||||
|
const LicenseApi = require('./api/license')
|
||||||
|
const LogstashApi = require('./api/logstash')
|
||||||
const mgetApi = require('./api/mget')
|
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 msearchApi = require('./api/msearch')
|
||||||
const msearchTemplateApi = require('./api/msearch_template')
|
const msearchTemplateApi = require('./api/msearch_template')
|
||||||
const mtermvectorsApi = require('./api/mtermvectors')
|
const mtermvectorsApi = require('./api/mtermvectors')
|
||||||
const NodesApi = require('./api/nodes')
|
const NodesApi = require('./api/nodes')
|
||||||
|
const openPointInTimeApi = require('./api/open_point_in_time')
|
||||||
const pingApi = require('./api/ping')
|
const pingApi = require('./api/ping')
|
||||||
const putScriptApi = require('./api/put_script')
|
const putScriptApi = require('./api/put_script')
|
||||||
const rankEvalApi = require('./api/rank_eval')
|
const rankEvalApi = require('./api/rank_eval')
|
||||||
const reindexApi = require('./api/reindex')
|
const reindexApi = require('./api/reindex')
|
||||||
const reindexRethrottleApi = require('./api/reindex_rethrottle')
|
const reindexRethrottleApi = require('./api/reindex_rethrottle')
|
||||||
const renderSearchTemplateApi = require('./api/render_search_template')
|
const renderSearchTemplateApi = require('./api/render_search_template')
|
||||||
|
const RollupApi = require('./api/rollup')
|
||||||
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
|
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
|
||||||
const scrollApi = require('./api/scroll')
|
const scrollApi = require('./api/scroll')
|
||||||
const searchApi = require('./api/search')
|
const searchApi = require('./api/search')
|
||||||
|
const searchMvtApi = require('./api/search_mvt')
|
||||||
const searchShardsApi = require('./api/search_shards')
|
const searchShardsApi = require('./api/search_shards')
|
||||||
const searchTemplateApi = require('./api/search_template')
|
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 SnapshotApi = require('./api/snapshot')
|
||||||
|
const SqlApi = require('./api/sql')
|
||||||
|
const SslApi = require('./api/ssl')
|
||||||
const TasksApi = require('./api/tasks')
|
const TasksApi = require('./api/tasks')
|
||||||
|
const termsEnumApi = require('./api/terms_enum')
|
||||||
const termvectorsApi = require('./api/termvectors')
|
const termvectorsApi = require('./api/termvectors')
|
||||||
|
const TextStructureApi = require('./api/text_structure')
|
||||||
|
const TransformApi = require('./api/transform')
|
||||||
const updateApi = require('./api/update')
|
const updateApi = require('./api/update')
|
||||||
const updateByQueryApi = require('./api/update_by_query')
|
const updateByQueryApi = require('./api/update_by_query')
|
||||||
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle')
|
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 closePointInTimeApi = require('./api/close_point_in_time')
|
|
||||||
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 openPointInTimeApi = require('./api/open_point_in_time')
|
|
||||||
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 WatcherApi = require('./api/watcher')
|
||||||
const XpackApi = require('./api/xpack')
|
const XpackApi = require('./api/xpack')
|
||||||
|
|
||||||
const { kConfigurationError } = require('./utils')
|
const { kConfigurationError } = require('./utils')
|
||||||
const kCat = Symbol('Cat')
|
|
||||||
const kCluster = Symbol('Cluster')
|
|
||||||
const kDanglingIndices = Symbol('DanglingIndices')
|
|
||||||
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 kAsyncSearch = Symbol('AsyncSearch')
|
||||||
const kAutoscaling = Symbol('Autoscaling')
|
const kAutoscaling = Symbol('Autoscaling')
|
||||||
|
const kCat = Symbol('Cat')
|
||||||
const kCcr = Symbol('Ccr')
|
const kCcr = Symbol('Ccr')
|
||||||
|
const kCluster = Symbol('Cluster')
|
||||||
|
const kDanglingIndices = Symbol('DanglingIndices')
|
||||||
const kEnrich = Symbol('Enrich')
|
const kEnrich = Symbol('Enrich')
|
||||||
const kEql = Symbol('Eql')
|
const kEql = Symbol('Eql')
|
||||||
|
const kFeatures = Symbol('Features')
|
||||||
|
const kFleet = Symbol('Fleet')
|
||||||
const kGraph = Symbol('Graph')
|
const kGraph = Symbol('Graph')
|
||||||
const kIlm = Symbol('Ilm')
|
const kIlm = Symbol('Ilm')
|
||||||
|
const kIndices = Symbol('Indices')
|
||||||
|
const kIngest = Symbol('Ingest')
|
||||||
const kLicense = Symbol('License')
|
const kLicense = Symbol('License')
|
||||||
|
const kLogstash = Symbol('Logstash')
|
||||||
const kMigration = Symbol('Migration')
|
const kMigration = Symbol('Migration')
|
||||||
const kMl = Symbol('Ml')
|
const kMl = Symbol('Ml')
|
||||||
const kMonitoring = Symbol('Monitoring')
|
const kMonitoring = Symbol('Monitoring')
|
||||||
|
const kNodes = Symbol('Nodes')
|
||||||
const kRollup = Symbol('Rollup')
|
const kRollup = Symbol('Rollup')
|
||||||
const kSearchableSnapshots = Symbol('SearchableSnapshots')
|
const kSearchableSnapshots = Symbol('SearchableSnapshots')
|
||||||
const kSecurity = Symbol('Security')
|
const kSecurity = Symbol('Security')
|
||||||
|
const kShutdown = Symbol('Shutdown')
|
||||||
const kSlm = Symbol('Slm')
|
const kSlm = Symbol('Slm')
|
||||||
|
const kSnapshot = Symbol('Snapshot')
|
||||||
const kSql = Symbol('Sql')
|
const kSql = Symbol('Sql')
|
||||||
const kSsl = Symbol('Ssl')
|
const kSsl = Symbol('Ssl')
|
||||||
|
const kTasks = Symbol('Tasks')
|
||||||
|
const kTextStructure = Symbol('TextStructure')
|
||||||
const kTransform = Symbol('Transform')
|
const kTransform = Symbol('Transform')
|
||||||
const kWatcher = Symbol('Watcher')
|
const kWatcher = Symbol('Watcher')
|
||||||
const kXpack = Symbol('Xpack')
|
const kXpack = Symbol('Xpack')
|
||||||
|
|
||||||
function ESAPI (opts) {
|
function ESAPI (opts) {
|
||||||
this[kConfigurationError] = opts.ConfigurationError
|
this[kConfigurationError] = opts.ConfigurationError
|
||||||
this[kCat] = null
|
|
||||||
this[kCluster] = null
|
|
||||||
this[kDanglingIndices] = null
|
|
||||||
this[kIndices] = null
|
|
||||||
this[kIngest] = null
|
|
||||||
this[kNodes] = null
|
|
||||||
this[kSnapshot] = null
|
|
||||||
this[kTasks] = null
|
|
||||||
this[kAsyncSearch] = null
|
this[kAsyncSearch] = null
|
||||||
this[kAutoscaling] = null
|
this[kAutoscaling] = null
|
||||||
|
this[kCat] = null
|
||||||
this[kCcr] = null
|
this[kCcr] = null
|
||||||
|
this[kCluster] = null
|
||||||
|
this[kDanglingIndices] = null
|
||||||
this[kEnrich] = null
|
this[kEnrich] = null
|
||||||
this[kEql] = null
|
this[kEql] = null
|
||||||
|
this[kFeatures] = null
|
||||||
|
this[kFleet] = null
|
||||||
this[kGraph] = null
|
this[kGraph] = null
|
||||||
this[kIlm] = null
|
this[kIlm] = null
|
||||||
|
this[kIndices] = null
|
||||||
|
this[kIngest] = null
|
||||||
this[kLicense] = null
|
this[kLicense] = null
|
||||||
|
this[kLogstash] = null
|
||||||
this[kMigration] = null
|
this[kMigration] = null
|
||||||
this[kMl] = null
|
this[kMl] = null
|
||||||
this[kMonitoring] = null
|
this[kMonitoring] = null
|
||||||
|
this[kNodes] = null
|
||||||
this[kRollup] = null
|
this[kRollup] = null
|
||||||
this[kSearchableSnapshots] = null
|
this[kSearchableSnapshots] = null
|
||||||
this[kSecurity] = null
|
this[kSecurity] = null
|
||||||
|
this[kShutdown] = null
|
||||||
this[kSlm] = null
|
this[kSlm] = null
|
||||||
|
this[kSnapshot] = null
|
||||||
this[kSql] = null
|
this[kSql] = null
|
||||||
this[kSsl] = null
|
this[kSsl] = null
|
||||||
|
this[kTasks] = null
|
||||||
|
this[kTextStructure] = null
|
||||||
this[kTransform] = null
|
this[kTransform] = null
|
||||||
this[kWatcher] = null
|
this[kWatcher] = null
|
||||||
this[kXpack] = null
|
this[kXpack] = null
|
||||||
@ -152,6 +169,7 @@ function ESAPI (opts) {
|
|||||||
|
|
||||||
ESAPI.prototype.bulk = bulkApi
|
ESAPI.prototype.bulk = bulkApi
|
||||||
ESAPI.prototype.clearScroll = clearScrollApi
|
ESAPI.prototype.clearScroll = clearScrollApi
|
||||||
|
ESAPI.prototype.closePointInTime = closePointInTimeApi
|
||||||
ESAPI.prototype.count = countApi
|
ESAPI.prototype.count = countApi
|
||||||
ESAPI.prototype.create = createApi
|
ESAPI.prototype.create = createApi
|
||||||
ESAPI.prototype.delete = deleteApi
|
ESAPI.prototype.delete = deleteApi
|
||||||
@ -173,6 +191,7 @@ ESAPI.prototype.mget = mgetApi
|
|||||||
ESAPI.prototype.msearch = msearchApi
|
ESAPI.prototype.msearch = msearchApi
|
||||||
ESAPI.prototype.msearchTemplate = msearchTemplateApi
|
ESAPI.prototype.msearchTemplate = msearchTemplateApi
|
||||||
ESAPI.prototype.mtermvectors = mtermvectorsApi
|
ESAPI.prototype.mtermvectors = mtermvectorsApi
|
||||||
|
ESAPI.prototype.openPointInTime = openPointInTimeApi
|
||||||
ESAPI.prototype.ping = pingApi
|
ESAPI.prototype.ping = pingApi
|
||||||
ESAPI.prototype.putScript = putScriptApi
|
ESAPI.prototype.putScript = putScriptApi
|
||||||
ESAPI.prototype.rankEval = rankEvalApi
|
ESAPI.prototype.rankEval = rankEvalApi
|
||||||
@ -182,16 +201,33 @@ ESAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
|
|||||||
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
|
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
|
||||||
ESAPI.prototype.scroll = scrollApi
|
ESAPI.prototype.scroll = scrollApi
|
||||||
ESAPI.prototype.search = searchApi
|
ESAPI.prototype.search = searchApi
|
||||||
|
ESAPI.prototype.searchMvt = searchMvtApi
|
||||||
ESAPI.prototype.searchShards = searchShardsApi
|
ESAPI.prototype.searchShards = searchShardsApi
|
||||||
ESAPI.prototype.searchTemplate = searchTemplateApi
|
ESAPI.prototype.searchTemplate = searchTemplateApi
|
||||||
|
ESAPI.prototype.termsEnum = termsEnumApi
|
||||||
ESAPI.prototype.termvectors = termvectorsApi
|
ESAPI.prototype.termvectors = termvectorsApi
|
||||||
ESAPI.prototype.update = updateApi
|
ESAPI.prototype.update = updateApi
|
||||||
ESAPI.prototype.updateByQuery = updateByQueryApi
|
ESAPI.prototype.updateByQuery = updateByQueryApi
|
||||||
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
||||||
ESAPI.prototype.closePointInTime = closePointInTimeApi
|
|
||||||
ESAPI.prototype.openPointInTime = openPointInTimeApi
|
|
||||||
|
|
||||||
Object.defineProperties(ESAPI.prototype, {
|
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: {
|
cat: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kCat] === null) {
|
if (this[kCat] === null) {
|
||||||
@ -200,7 +236,16 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kCat]
|
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 } },
|
clear_scroll: { get () { return this.clearScroll } },
|
||||||
|
close_point_in_time: { get () { return this.closePointInTime } },
|
||||||
cluster: {
|
cluster: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kCluster] === null) {
|
if (this[kCluster] === null) {
|
||||||
@ -221,88 +266,6 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
delete_by_query: { get () { return this.deleteByQuery } },
|
delete_by_query: { get () { return this.deleteByQuery } },
|
||||||
delete_by_query_rethrottle: { get () { return this.deleteByQueryRethrottle } },
|
delete_by_query_rethrottle: { get () { return this.deleteByQueryRethrottle } },
|
||||||
delete_script: { get () { return this.deleteScript } },
|
delete_script: { get () { return this.deleteScript } },
|
||||||
exists_source: { get () { return this.existsSource } },
|
|
||||||
field_caps: { get () { return this.fieldCaps } },
|
|
||||||
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 } },
|
|
||||||
indices: {
|
|
||||||
get () {
|
|
||||||
if (this[kIndices] === null) {
|
|
||||||
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError])
|
|
||||||
}
|
|
||||||
return this[kIndices]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
ingest: {
|
|
||||||
get () {
|
|
||||||
if (this[kIngest] === null) {
|
|
||||||
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError])
|
|
||||||
}
|
|
||||||
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]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
close_point_in_time: { get () { return this.closePointInTime } },
|
|
||||||
enrich: {
|
enrich: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kEnrich] === null) {
|
if (this[kEnrich] === null) {
|
||||||
@ -319,6 +282,28 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kEql]
|
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: {
|
graph: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kGraph] === null) {
|
if (this[kGraph] === null) {
|
||||||
@ -335,6 +320,22 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kIlm]
|
return this[kIlm]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
indices: {
|
||||||
|
get () {
|
||||||
|
if (this[kIndices] === null) {
|
||||||
|
this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError])
|
||||||
|
}
|
||||||
|
return this[kIndices]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
ingest: {
|
||||||
|
get () {
|
||||||
|
if (this[kIngest] === null) {
|
||||||
|
this[kIngest] = new IngestApi(this.transport, this[kConfigurationError])
|
||||||
|
}
|
||||||
|
return this[kIngest]
|
||||||
|
}
|
||||||
|
},
|
||||||
license: {
|
license: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kLicense] === null) {
|
if (this[kLicense] === null) {
|
||||||
@ -343,6 +344,14 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kLicense]
|
return this[kLicense]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
logstash: {
|
||||||
|
get () {
|
||||||
|
if (this[kLogstash] === null) {
|
||||||
|
this[kLogstash] = new LogstashApi(this.transport, this[kConfigurationError])
|
||||||
|
}
|
||||||
|
return this[kLogstash]
|
||||||
|
}
|
||||||
|
},
|
||||||
migration: {
|
migration: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kMigration] === null) {
|
if (this[kMigration] === null) {
|
||||||
@ -367,7 +376,20 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kMonitoring]
|
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 } },
|
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: {
|
rollup: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kRollup] === null) {
|
if (this[kRollup] === null) {
|
||||||
@ -376,6 +398,10 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kRollup]
|
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: {
|
searchableSnapshots: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kSearchableSnapshots] === null) {
|
if (this[kSearchableSnapshots] === null) {
|
||||||
@ -393,6 +419,14 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kSecurity]
|
return this[kSecurity]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
shutdown: {
|
||||||
|
get () {
|
||||||
|
if (this[kShutdown] === null) {
|
||||||
|
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
|
||||||
|
}
|
||||||
|
return this[kShutdown]
|
||||||
|
}
|
||||||
|
},
|
||||||
slm: {
|
slm: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kSlm] === null) {
|
if (this[kSlm] === null) {
|
||||||
@ -401,6 +435,14 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kSlm]
|
return this[kSlm]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
snapshot: {
|
||||||
|
get () {
|
||||||
|
if (this[kSnapshot] === null) {
|
||||||
|
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
|
||||||
|
}
|
||||||
|
return this[kSnapshot]
|
||||||
|
}
|
||||||
|
},
|
||||||
sql: {
|
sql: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kSql] === null) {
|
if (this[kSql] === null) {
|
||||||
@ -417,6 +459,24 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kSsl]
|
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: {
|
transform: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kTransform] === null) {
|
if (this[kTransform] === null) {
|
||||||
@ -425,6 +485,8 @@ Object.defineProperties(ESAPI.prototype, {
|
|||||||
return this[kTransform]
|
return this[kTransform]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
update_by_query: { get () { return this.updateByQuery } },
|
||||||
|
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } },
|
||||||
watcher: {
|
watcher: {
|
||||||
get () {
|
get () {
|
||||||
if (this[kWatcher] === null) {
|
if (this[kWatcher] === null) {
|
||||||
|
|||||||
781
api/kibana.d.ts
vendored
781
api/kibana.d.ts
vendored
@ -32,14 +32,18 @@ import {
|
|||||||
import Helpers from '../lib/Helpers'
|
import Helpers from '../lib/Helpers'
|
||||||
import {
|
import {
|
||||||
ApiResponse,
|
ApiResponse,
|
||||||
RequestBody,
|
|
||||||
RequestNDBody,
|
|
||||||
TransportRequestParams,
|
|
||||||
TransportRequestOptions,
|
|
||||||
TransportRequestPromise,
|
TransportRequestPromise,
|
||||||
Context
|
TransportRequestParams,
|
||||||
|
TransportRequestOptions
|
||||||
} from '../lib/Transport'
|
} from '../lib/Transport'
|
||||||
import * as RequestParams from './requestParams'
|
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>
|
||||||
|
|
||||||
// Extend API
|
// Extend API
|
||||||
interface ClientExtendsCallbackOptions {
|
interface ClientExtendsCallbackOptions {
|
||||||
@ -74,412 +78,477 @@ interface KibanaClient {
|
|||||||
once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this;
|
once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this;
|
||||||
once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this;
|
once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this;
|
||||||
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||||
/* GENERATED */
|
|
||||||
asyncSearch: {
|
asyncSearch: {
|
||||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
delete<TContext = unknown>(params: T.AsyncSearchDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchDeleteResponse, TContext>>
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get<TDocument = unknown, TContext = unknown>(params: T.AsyncSearchGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchGetResponse<TDocument>, TContext>>
|
||||||
status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
status<TDocument = unknown, TContext = unknown>(params: T.AsyncSearchStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchStatusResponse<TDocument>, TContext>>
|
||||||
submit<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchSubmit<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
submit<TDocument = unknown, TContext = unknown>(params?: T.AsyncSearchSubmitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchSubmitResponse<TDocument>, TContext>>
|
||||||
}
|
}
|
||||||
autoscaling: {
|
autoscaling: {
|
||||||
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingDeleteAutoscalingPolicyResponse, TContext>>
|
||||||
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getAutoscalingCapacity<TContext = unknown>(params?: T.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingGetAutoscalingCapacityResponse, TContext>>
|
||||||
getAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingGetAutoscalingPolicyResponse, TContext>>
|
||||||
putAutoscalingPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingPutAutoscalingPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingPutAutoscalingPolicyResponse, TContext>>
|
||||||
}
|
}
|
||||||
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Bulk<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>>
|
||||||
cat: {
|
cat: {
|
||||||
aliases<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatAliases, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
aliases<TContext = unknown>(params?: T.CatAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatAliasesResponse, TContext>>
|
||||||
allocation<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatAllocation, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
allocation<TContext = unknown>(params?: T.CatAllocationRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatAllocationResponse, TContext>>
|
||||||
count<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatCount, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
count<TContext = unknown>(params?: T.CatCountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatCountResponse, TContext>>
|
||||||
fielddata<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatFielddata, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
fielddata<TContext = unknown>(params?: T.CatFielddataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatFielddataResponse, TContext>>
|
||||||
health<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatHealth, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
health<TContext = unknown>(params?: T.CatHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatHealthResponse, TContext>>
|
||||||
help<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatHelp, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
help<TContext = unknown>(params?: T.CatHelpRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatHelpResponse, TContext>>
|
||||||
indices<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatIndices, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
indices<TContext = unknown>(params?: T.CatIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatIndicesResponse, TContext>>
|
||||||
master<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMaster, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
master<TContext = unknown>(params?: T.CatMasterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMasterResponse, TContext>>
|
||||||
mlDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
mlDataFrameAnalytics<TContext = unknown>(params?: T.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlDataFrameAnalyticsResponse, TContext>>
|
||||||
mlDatafeeds<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlDatafeeds, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
mlDatafeeds<TContext = unknown>(params?: T.CatMlDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlDatafeedsResponse, TContext>>
|
||||||
mlJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
mlJobs<TContext = unknown>(params?: T.CatMlJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlJobsResponse, TContext>>
|
||||||
mlTrainedModels<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlTrainedModels, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
mlTrainedModels<TContext = unknown>(params?: T.CatMlTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlTrainedModelsResponse, TContext>>
|
||||||
nodeattrs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatNodeattrs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
nodeattrs<TContext = unknown>(params?: T.CatNodeattrsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodeattrsResponse, TContext>>
|
||||||
nodes<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatNodes, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
nodes<TContext = unknown>(params?: T.CatNodesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodesResponse, TContext>>
|
||||||
pendingTasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatPendingTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
pendingTasks<TContext = unknown>(params?: T.CatPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPendingTasksResponse, TContext>>
|
||||||
plugins<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatPlugins, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
plugins<TContext = unknown>(params?: T.CatPluginsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPluginsResponse, TContext>>
|
||||||
recovery<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatRecovery, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
recovery<TContext = unknown>(params?: T.CatRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRecoveryResponse, TContext>>
|
||||||
repositories<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatRepositories, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
repositories<TContext = unknown>(params?: T.CatRepositoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRepositoriesResponse, TContext>>
|
||||||
segments<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatSegments, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
segments<TContext = unknown>(params?: T.CatSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSegmentsResponse, TContext>>
|
||||||
shards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
shards<TContext = unknown>(params?: T.CatShardsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatShardsResponse, TContext>>
|
||||||
snapshots<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatSnapshots, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
snapshots<TContext = unknown>(params?: T.CatSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSnapshotsResponse, TContext>>
|
||||||
tasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
tasks<TContext = unknown>(params?: T.CatTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTasksResponse, TContext>>
|
||||||
templates<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTemplates, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
templates<TContext = unknown>(params?: T.CatTemplatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTemplatesResponse, TContext>>
|
||||||
threadPool<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatThreadPool, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
threadPool<TContext = unknown>(params?: T.CatThreadPoolRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatThreadPoolResponse, TContext>>
|
||||||
transforms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTransforms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
transforms<TContext = unknown>(params?: T.CatTransformsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTransformsResponse, TContext>>
|
||||||
}
|
}
|
||||||
ccr: {
|
ccr: {
|
||||||
deleteAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrDeleteAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteAutoFollowPattern<TContext = unknown>(params: T.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrDeleteAutoFollowPatternResponse, TContext>>
|
||||||
follow<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollow<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
follow<TContext = unknown>(params: T.CcrFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowResponse, TContext>>
|
||||||
followInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollowInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
followInfo<TContext = unknown>(params: T.CcrFollowInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowInfoResponse, TContext>>
|
||||||
followStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollowStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
followStats<TContext = unknown>(params: T.CcrFollowStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowStatsResponse, TContext>>
|
||||||
forgetFollower<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrForgetFollower<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
forgetFollower<TContext = unknown>(params: T.CcrForgetFollowerRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrForgetFollowerResponse, TContext>>
|
||||||
getAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrGetAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getAutoFollowPattern<TContext = unknown>(params?: T.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrGetAutoFollowPatternResponse, TContext>>
|
||||||
pauseAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPauseAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
pauseAutoFollowPattern<TContext = unknown>(params: T.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseAutoFollowPatternResponse, TContext>>
|
||||||
pauseFollow<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPauseFollow, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
pauseFollow<TContext = unknown>(params: T.CcrPauseFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseFollowResponse, TContext>>
|
||||||
putAutoFollowPattern<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPutAutoFollowPattern<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putAutoFollowPattern<TContext = unknown>(params: T.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPutAutoFollowPatternResponse, TContext>>
|
||||||
resumeAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrResumeAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
resumeAutoFollowPattern<TContext = unknown>(params: T.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeAutoFollowPatternResponse, TContext>>
|
||||||
resumeFollow<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrResumeFollow<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
resumeFollow<TContext = unknown>(params: T.CcrResumeFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeFollowResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stats<TContext = unknown>(params?: T.CcrStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrStatsResponse, TContext>>
|
||||||
unfollow<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrUnfollow, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
unfollow<TContext = unknown>(params: T.CcrUnfollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrUnfollowResponse, TContext>>
|
||||||
}
|
}
|
||||||
clearScroll<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClearScroll<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearScroll<TContext = unknown>(params?: T.ClearScrollRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClearScrollResponse, TContext>>
|
||||||
closePointInTime<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClosePointInTime<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
closePointInTime<TContext = unknown>(params?: T.ClosePointInTimeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClosePointInTimeResponse, TContext>>
|
||||||
cluster: {
|
cluster: {
|
||||||
allocationExplain<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterAllocationExplain<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
allocationExplain<TContext = unknown>(params?: T.ClusterAllocationExplainRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterAllocationExplainResponse, TContext>>
|
||||||
deleteComponentTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterDeleteComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteComponentTemplate<TContext = unknown>(params: T.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterDeleteComponentTemplateResponse, TContext>>
|
||||||
deleteVotingConfigExclusions<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterDeleteVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteVotingConfigExclusions<TContext = unknown>(params?: T.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterDeleteVotingConfigExclusionsResponse, TContext>>
|
||||||
existsComponentTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
existsComponentTemplate<TContext = unknown>(params: T.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterExistsComponentTemplateResponse, TContext>>
|
||||||
getComponentTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterGetComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getComponentTemplate<TContext = unknown>(params?: T.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetComponentTemplateResponse, TContext>>
|
||||||
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getSettings<TContext = unknown>(params?: T.ClusterGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetSettingsResponse, TContext>>
|
||||||
health<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterHealth, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
health<TContext = unknown>(params?: T.ClusterHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterHealthResponse, TContext>>
|
||||||
pendingTasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPendingTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
pendingTasks<TContext = unknown>(params?: T.ClusterPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPendingTasksResponse, TContext>>
|
||||||
postVotingConfigExclusions<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPostVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
postVotingConfigExclusions<TContext = unknown>(params?: T.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPostVotingConfigExclusionsResponse, TContext>>
|
||||||
putComponentTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPutComponentTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putComponentTemplate<TContext = unknown>(params: T.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutComponentTemplateResponse, TContext>>
|
||||||
putSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPutSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putSettings<TContext = unknown>(params?: T.ClusterPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutSettingsResponse, TContext>>
|
||||||
remoteInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterRemoteInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
remoteInfo<TContext = unknown>(params?: T.ClusterRemoteInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRemoteInfoResponse, TContext>>
|
||||||
reroute<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterReroute<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
reroute<TContext = unknown>(params?: T.ClusterRerouteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRerouteResponse, TContext>>
|
||||||
state<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterState, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
state<TContext = unknown>(params?: T.ClusterStateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStateResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stats<TContext = unknown>(params?: T.ClusterStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStatsResponse, TContext>>
|
||||||
}
|
}
|
||||||
count<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Count<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
count<TContext = unknown>(params?: T.CountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CountResponse, TContext>>
|
||||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Create<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
create<TDocument = unknown, TContext = unknown>(params: T.CreateRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CreateResponse, TContext>>
|
||||||
danglingIndices: {
|
danglingIndices: {
|
||||||
deleteDanglingIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesDeleteDanglingIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteDanglingIndex<TContext = unknown>(params: T.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesDeleteDanglingIndexResponse, TContext>>
|
||||||
importDanglingIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesImportDanglingIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
importDanglingIndex<TContext = unknown>(params: T.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesImportDanglingIndexResponse, TContext>>
|
||||||
listDanglingIndices<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesListDanglingIndices, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
listDanglingIndices<TContext = unknown>(params?: T.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesListDanglingIndicesResponse, TContext>>
|
||||||
}
|
}
|
||||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Delete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
dataFrameTransformDeprecated: {
|
||||||
deleteByQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteByQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
deleteByQueryRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteByQueryRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
deleteScript<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteScript, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
enrich: {
|
enrich: {
|
||||||
deletePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichDeletePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deletePolicy<TContext = unknown>(params: T.EnrichDeletePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichDeletePolicyResponse, TContext>>
|
||||||
executePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichExecutePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
executePolicy<TContext = unknown>(params: T.EnrichExecutePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichExecutePolicyResponse, TContext>>
|
||||||
getPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichGetPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getPolicy<TContext = unknown>(params?: T.EnrichGetPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichGetPolicyResponse, TContext>>
|
||||||
putPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichPutPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putPolicy<TContext = unknown>(params: T.EnrichPutPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichPutPolicyResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stats<TContext = unknown>(params?: T.EnrichStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichStatsResponse, TContext>>
|
||||||
}
|
}
|
||||||
eql: {
|
eql: {
|
||||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
delete<TContext = unknown>(params: T.EqlDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlDeleteResponse, TContext>>
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get<TEvent = unknown, TContext = unknown>(params: T.EqlGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlGetResponse<TEvent>, TContext>>
|
||||||
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.EqlSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
exists<TContext = unknown>(params: T.ExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsResponse, TContext>>
|
||||||
existsSource<TResponse = boolean, TContext = Context>(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
existsSource<TContext = unknown>(params: T.ExistsSourceRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsSourceResponse, TContext>>
|
||||||
explain<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Explain<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
explain<TDocument = unknown, TContext = unknown>(params: T.ExplainRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExplainResponse<TDocument>, TContext>>
|
||||||
fieldCaps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.FieldCaps<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
features: {
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Get, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getFeatures<TContext = unknown>(params?: T.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FeaturesGetFeaturesResponse, TContext>>
|
||||||
getScript<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScript, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
resetFeatures<TContext = unknown>(params?: T.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FeaturesResetFeaturesResponse, 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>>
|
fieldCaps<TContext = unknown>(params?: T.FieldCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FieldCapsResponse, TContext>>
|
||||||
getSource<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetSource, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
graph: {
|
graph: {
|
||||||
explore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.GraphExplore<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
explore<TContext = unknown>(params: T.GraphExploreRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GraphExploreResponse, TContext>>
|
||||||
}
|
}
|
||||||
ilm: {
|
ilm: {
|
||||||
deleteLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteLifecycle<TContext = unknown>(params: T.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmDeleteLifecycleResponse, TContext>>
|
||||||
explainLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmExplainLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
explainLifecycle<TContext = unknown>(params: T.IlmExplainLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmExplainLifecycleResponse, TContext>>
|
||||||
getLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmGetLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getLifecycle<TContext = unknown>(params?: T.IlmGetLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmGetLifecycleResponse, TContext>>
|
||||||
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmGetStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getStatus<TContext = unknown>(params?: T.IlmGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmGetStatusResponse, TContext>>
|
||||||
moveToStep<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmMoveToStep<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
migrateToDataTiers<TContext = unknown>(params?: T.IlmMigrateToDataTiersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmMigrateToDataTiersResponse, TContext>>
|
||||||
putLifecycle<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmPutLifecycle<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
moveToStep<TContext = unknown>(params: T.IlmMoveToStepRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmMoveToStepResponse, TContext>>
|
||||||
removePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmRemovePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putLifecycle<TContext = unknown>(params: T.IlmPutLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmPutLifecycleResponse, TContext>>
|
||||||
retry<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmRetry, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
removePolicy<TContext = unknown>(params: T.IlmRemovePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmRemovePolicyResponse, TContext>>
|
||||||
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
retry<TContext = unknown>(params: T.IlmRetryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmRetryResponse, TContext>>
|
||||||
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
index<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Index<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
index<TDocument = unknown, TContext = unknown>(params: T.IndexRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndexResponse, TContext>>
|
||||||
indices: {
|
indices: {
|
||||||
addBlock<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesAddBlock, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
addBlock<TContext = unknown>(params: T.IndicesAddBlockRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesAddBlockResponse, TContext>>
|
||||||
analyze<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesAnalyze<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
analyze<TContext = unknown>(params?: T.IndicesAnalyzeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesAnalyzeResponse, TContext>>
|
||||||
clearCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCache<TContext = unknown>(params?: T.IndicesClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesClearCacheResponse, TContext>>
|
||||||
clone<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClone<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clone<TContext = unknown>(params: T.IndicesCloneRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCloneResponse, TContext>>
|
||||||
close<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClose, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
close<TContext = unknown>(params: T.IndicesCloseRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCloseResponse, TContext>>
|
||||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
create<TContext = unknown>(params: T.IndicesCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCreateResponse, TContext>>
|
||||||
createDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
createDataStream<TContext = unknown>(params: T.IndicesCreateDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCreateDataStreamResponse, TContext>>
|
||||||
dataStreamsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
dataStreamsStats<TContext = unknown>(params?: T.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDataStreamsStatsResponse, TContext>>
|
||||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
delete<TContext = unknown>(params: T.IndicesDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteResponse, TContext>>
|
||||||
deleteAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteAlias<TContext = unknown>(params: T.IndicesDeleteAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteAliasResponse, TContext>>
|
||||||
deleteDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteDataStream<TContext = unknown>(params: T.IndicesDeleteDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteDataStreamResponse, TContext>>
|
||||||
deleteIndexTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteIndexTemplate<TContext = unknown>(params: T.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteIndexTemplateResponse, TContext>>
|
||||||
deleteTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteTemplate<TContext = unknown>(params: T.IndicesDeleteTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteTemplateResponse, TContext>>
|
||||||
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
diskUsage<TContext = unknown>(params: T.IndicesDiskUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDiskUsageResponse, TContext>>
|
||||||
existsAlias<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
exists<TContext = unknown>(params: T.IndicesExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsResponse, TContext>>
|
||||||
existsIndexTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
existsAlias<TContext = unknown>(params: T.IndicesExistsAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsAliasResponse, TContext>>
|
||||||
existsTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
existsIndexTemplate<TContext = unknown>(params: T.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsIndexTemplateResponse, TContext>>
|
||||||
existsType<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
existsTemplate<TContext = unknown>(params: T.IndicesExistsTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTemplateResponse, TContext>>
|
||||||
flush<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlush, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
existsType<TContext = unknown>(params: T.IndicesExistsTypeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTypeResponse, TContext>>
|
||||||
flushSynced<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlushSynced, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
fieldUsageStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
forcemerge<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesForcemerge, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
flush<TContext = unknown>(params?: T.IndicesFlushRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushResponse, TContext>>
|
||||||
freeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
flushSynced<TContext = unknown>(params?: T.IndicesFlushSyncedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushSyncedResponse, TContext>>
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
forcemerge<TContext = unknown>(params?: T.IndicesForcemergeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesForcemergeResponse, TContext>>
|
||||||
getAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
freeze<TContext = unknown>(params: T.IndicesFreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFreezeResponse, TContext>>
|
||||||
getDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get<TContext = unknown>(params: T.IndicesGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetResponse, TContext>>
|
||||||
getFieldMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetFieldMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getAlias<TContext = unknown>(params?: T.IndicesGetAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetAliasResponse, TContext>>
|
||||||
getIndexTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getDataStream<TContext = unknown>(params?: T.IndicesGetDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetDataStreamResponse, TContext>>
|
||||||
getMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getFieldMapping<TContext = unknown>(params: T.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetFieldMappingResponse, TContext>>
|
||||||
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getIndexTemplate<TContext = unknown>(params?: T.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetIndexTemplateResponse, TContext>>
|
||||||
getTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getMapping<TContext = unknown>(params?: T.IndicesGetMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetMappingResponse, TContext>>
|
||||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getSettings<TContext = unknown>(params?: T.IndicesGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetSettingsResponse, TContext>>
|
||||||
migrateToDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesMigrateToDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTemplate<TContext = unknown>(params?: T.IndicesGetTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetTemplateResponse, TContext>>
|
||||||
open<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesOpen, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getUpgrade<TContext = unknown>(params?: T.IndicesGetUpgradeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetUpgradeResponse, TContext>>
|
||||||
promoteDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPromoteDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
migrateToDataStream<TContext = unknown>(params: T.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesMigrateToDataStreamResponse, TContext>>
|
||||||
putAlias<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutAlias<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
modifyDataStream<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
putIndexTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutIndexTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
open<TContext = unknown>(params: T.IndicesOpenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesOpenResponse, TContext>>
|
||||||
putMapping<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutMapping<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
promoteDataStream<TContext = unknown>(params: T.IndicesPromoteDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPromoteDataStreamResponse, TContext>>
|
||||||
putSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putAlias<TContext = unknown>(params: T.IndicesPutAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutAliasResponse, TContext>>
|
||||||
putTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putIndexTemplate<TContext = unknown>(params: T.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutIndexTemplateResponse, TContext>>
|
||||||
recovery<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRecovery, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putMapping<TContext = unknown>(params: T.IndicesPutMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutMappingResponse, TContext>>
|
||||||
refresh<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRefresh, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putSettings<TContext = unknown>(params?: T.IndicesPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutSettingsResponse, TContext>>
|
||||||
reloadSearchAnalyzers<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesReloadSearchAnalyzers, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putTemplate<TContext = unknown>(params: T.IndicesPutTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutTemplateResponse, TContext>>
|
||||||
resolveIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesResolveIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
recovery<TContext = unknown>(params?: T.IndicesRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRecoveryResponse, TContext>>
|
||||||
rollover<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRollover<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
refresh<TContext = unknown>(params?: T.IndicesRefreshRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRefreshResponse, TContext>>
|
||||||
segments<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSegments, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
reloadSearchAnalyzers<TContext = unknown>(params: T.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesReloadSearchAnalyzersResponse, TContext>>
|
||||||
shardStores<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesShardStores, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
resolveIndex<TContext = unknown>(params: T.IndicesResolveIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesResolveIndexResponse, TContext>>
|
||||||
shrink<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesShrink<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
rollover<TContext = unknown>(params: T.IndicesRolloverRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRolloverResponse, TContext>>
|
||||||
simulateIndexTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSimulateIndexTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
segments<TContext = unknown>(params?: T.IndicesSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSegmentsResponse, TContext>>
|
||||||
simulateTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSimulateTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
shardStores<TContext = unknown>(params?: T.IndicesShardStoresRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShardStoresResponse, TContext>>
|
||||||
split<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSplit<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
shrink<TContext = unknown>(params: T.IndicesShrinkRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShrinkResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
simulateIndexTemplate<TContext = unknown>(params: T.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateIndexTemplateResponse, TContext>>
|
||||||
unfreeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUnfreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
simulateTemplate<TContext = unknown>(params?: T.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateTemplateResponse, TContext>>
|
||||||
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpdateAliases<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
split<TContext = unknown>(params: T.IndicesSplitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSplitResponse, TContext>>
|
||||||
upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stats<TContext = unknown>(params?: T.IndicesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesStatsResponse, TContext>>
|
||||||
validateQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesValidateQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Info, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
info<TContext = unknown>(params?: T.InfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.InfoResponse, TContext>>
|
||||||
ingest: {
|
ingest: {
|
||||||
deletePipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestDeletePipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deletePipeline<TContext = unknown>(params: T.IngestDeletePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestDeletePipelineResponse, TContext>>
|
||||||
getPipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestGetPipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
geoIpStats<TContext = unknown>(params?: T.IngestGeoIpStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestGeoIpStatsResponse, TContext>>
|
||||||
processorGrok<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestProcessorGrok, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getPipeline<TContext = unknown>(params?: T.IngestGetPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestGetPipelineResponse, TContext>>
|
||||||
putPipeline<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IngestPutPipeline<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
processorGrok<TContext = unknown>(params?: T.IngestProcessorGrokRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestProcessorGrokResponse, TContext>>
|
||||||
simulate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IngestSimulate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
license: {
|
license: {
|
||||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
delete<TContext = unknown>(params?: T.LicenseDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseDeleteResponse, TContext>>
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get<TContext = unknown>(params?: T.LicenseGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetResponse, TContext>>
|
||||||
getBasicStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGetBasicStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getBasicStatus<TContext = unknown>(params?: T.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetBasicStatusResponse, TContext>>
|
||||||
getTrialStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGetTrialStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTrialStatus<TContext = unknown>(params?: T.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetTrialStatusResponse, TContext>>
|
||||||
post<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePost<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
post<TContext = unknown>(params?: T.LicensePostRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostResponse, TContext>>
|
||||||
postStartBasic<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePostStartBasic, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
postStartBasic<TContext = unknown>(params?: T.LicensePostStartBasicRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostStartBasicResponse, TContext>>
|
||||||
postStartTrial<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePostStartTrial, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
postStartTrial<TContext = unknown>(params?: T.LicensePostStartTrialRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostStartTrialResponse, TContext>>
|
||||||
}
|
}
|
||||||
mget<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Mget<TRequestBody>, 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>>
|
||||||
migration: {
|
migration: {
|
||||||
deprecations<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationDeprecations, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
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>>
|
||||||
}
|
}
|
||||||
ml: {
|
ml: {
|
||||||
closeJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlCloseJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
closeJob<TContext = unknown>(params: T.MlCloseJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlCloseJobResponse, TContext>>
|
||||||
deleteCalendar<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendar, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteCalendar<TContext = unknown>(params: T.MlDeleteCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarResponse, TContext>>
|
||||||
deleteCalendarEvent<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendarEvent, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteCalendarEvent<TContext = unknown>(params: T.MlDeleteCalendarEventRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarEventResponse, TContext>>
|
||||||
deleteCalendarJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendarJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteCalendarJob<TContext = unknown>(params: T.MlDeleteCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarJobResponse, TContext>>
|
||||||
deleteDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteDataFrameAnalytics<TContext = unknown>(params: T.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteDataFrameAnalyticsResponse, TContext>>
|
||||||
deleteDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteDatafeed<TContext = unknown>(params: T.MlDeleteDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteDatafeedResponse, TContext>>
|
||||||
deleteExpiredData<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteExpiredData<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteExpiredData<TContext = unknown>(params?: T.MlDeleteExpiredDataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteExpiredDataResponse, TContext>>
|
||||||
deleteFilter<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteFilter, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteFilter<TContext = unknown>(params: T.MlDeleteFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteFilterResponse, TContext>>
|
||||||
deleteForecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteForecast<TContext = unknown>(params: T.MlDeleteForecastRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteForecastResponse, TContext>>
|
||||||
deleteJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteJob<TContext = unknown>(params: T.MlDeleteJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteJobResponse, TContext>>
|
||||||
deleteModelSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteModelSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteModelSnapshot<TContext = unknown>(params: T.MlDeleteModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteModelSnapshotResponse, TContext>>
|
||||||
deleteTrainedModel<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteTrainedModel, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteTrainedModel<TContext = unknown>(params: T.MlDeleteTrainedModelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteTrainedModelResponse, TContext>>
|
||||||
estimateModelMemory<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEstimateModelMemory<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteTrainedModelAlias<TContext = unknown>(params: T.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteTrainedModelAliasResponse, TContext>>
|
||||||
evaluateDataFrame<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEvaluateDataFrame<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
estimateModelMemory<TContext = unknown>(params?: T.MlEstimateModelMemoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlEstimateModelMemoryResponse, TContext>>
|
||||||
explainDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlExplainDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
evaluateDataFrame<TContext = unknown>(params?: T.MlEvaluateDataFrameRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlEvaluateDataFrameResponse, TContext>>
|
||||||
findFileStructure<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MlFindFileStructure<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
explainDataFrameAnalytics<TContext = unknown>(params?: T.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlExplainDataFrameAnalyticsResponse, TContext>>
|
||||||
flushJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlFlushJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
findFileStructure<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
forecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
flushJob<TContext = unknown>(params: T.MlFlushJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlFlushJobResponse, TContext>>
|
||||||
getBuckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
forecast<TContext = unknown>(params: T.MlForecastRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlForecastResponse, TContext>>
|
||||||
getCalendarEvents<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCalendarEvents, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getBuckets<TContext = unknown>(params: T.MlGetBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetBucketsResponse, TContext>>
|
||||||
getCalendars<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCalendars<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getCalendarEvents<TContext = unknown>(params: T.MlGetCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarEventsResponse, TContext>>
|
||||||
getCategories<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCategories<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getCalendars<TContext = unknown>(params?: T.MlGetCalendarsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarsResponse, TContext>>
|
||||||
getDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getCategories<TContext = unknown>(params: T.MlGetCategoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCategoriesResponse, TContext>>
|
||||||
getDataFrameAnalyticsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDataFrameAnalyticsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getDataFrameAnalytics<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsResponse, TContext>>
|
||||||
getDatafeedStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDatafeedStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getDataFrameAnalyticsStats<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsStatsResponse, TContext>>
|
||||||
getDatafeeds<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDatafeeds, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getDatafeedStats<TContext = unknown>(params?: T.MlGetDatafeedStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedStatsResponse, TContext>>
|
||||||
getFilters<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetFilters, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getDatafeeds<TContext = unknown>(params?: T.MlGetDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedsResponse, TContext>>
|
||||||
getInfluencers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetInfluencers<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getFilters<TContext = unknown>(params?: T.MlGetFiltersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetFiltersResponse, TContext>>
|
||||||
getJobStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetJobStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getInfluencers<TContext = unknown>(params: T.MlGetInfluencersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetInfluencersResponse, TContext>>
|
||||||
getJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getJobStats<TContext = unknown>(params?: T.MlGetJobStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobStatsResponse, TContext>>
|
||||||
getModelSnapshots<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetModelSnapshots<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getJobs<TContext = unknown>(params?: T.MlGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobsResponse, TContext>>
|
||||||
getOverallBuckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetOverallBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getModelSnapshotUpgradeStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
getRecords<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetRecords<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getModelSnapshots<TContext = unknown>(params: T.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetModelSnapshotsResponse, TContext>>
|
||||||
getTrainedModels<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetTrainedModels, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getOverallBuckets<TContext = unknown>(params: T.MlGetOverallBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetOverallBucketsResponse, TContext>>
|
||||||
getTrainedModelsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetTrainedModelsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRecords<TContext = unknown>(params: T.MlGetRecordsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetRecordsResponse, TContext>>
|
||||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTrainedModels<TContext = unknown>(params?: T.MlGetTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsResponse, TContext>>
|
||||||
openJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTrainedModelsStats<TContext = unknown>(params?: T.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsStatsResponse, TContext>>
|
||||||
postCalendarEvents<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostCalendarEvents<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
info<TContext = unknown>(params?: T.MlInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlInfoResponse, TContext>>
|
||||||
postData<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostData<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
openJob<TContext = unknown>(params: T.MlOpenJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlOpenJobResponse, TContext>>
|
||||||
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
postCalendarEvents<TContext = unknown>(params: T.MlPostCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostCalendarEventsResponse, TContext>>
|
||||||
putCalendar<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendar<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
postData<TData = unknown, TContext = unknown>(params: T.MlPostDataRequest<TData>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostDataResponse, TContext>>
|
||||||
putCalendarJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendarJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
previewDataFrameAnalytics<TContext = unknown>(params?: T.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDataFrameAnalyticsResponse, TContext>>
|
||||||
putDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
previewDatafeed<TDocument = unknown, TContext = unknown>(params?: T.MlPreviewDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDatafeedResponse<TDocument>, TContext>>
|
||||||
putDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putCalendar<TContext = unknown>(params: T.MlPutCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarResponse, TContext>>
|
||||||
putFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putCalendarJob<TContext = unknown>(params: T.MlPutCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarJobResponse, TContext>>
|
||||||
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putDataFrameAnalytics<TContext = unknown>(params: T.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDataFrameAnalyticsResponse, TContext>>
|
||||||
putTrainedModel<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutTrainedModel<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putDatafeed<TContext = unknown>(params: T.MlPutDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDatafeedResponse, TContext>>
|
||||||
revertModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlRevertModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putFilter<TContext = unknown>(params: T.MlPutFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutFilterResponse, TContext>>
|
||||||
setUpgradeMode<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlSetUpgradeMode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putJob<TContext = unknown>(params: T.MlPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutJobResponse, TContext>>
|
||||||
startDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putTrainedModel<TContext = unknown>(params: T.MlPutTrainedModelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelResponse, TContext>>
|
||||||
startDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putTrainedModelAlias<TContext = unknown>(params: T.MlPutTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelAliasResponse, TContext>>
|
||||||
stopDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
resetJob<TContext = unknown>(params: T.MlResetJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlResetJobResponse, TContext>>
|
||||||
stopDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
revertModelSnapshot<TContext = unknown>(params: T.MlRevertModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlRevertModelSnapshotResponse, TContext>>
|
||||||
updateDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
setUpgradeMode<TContext = unknown>(params?: T.MlSetUpgradeModeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlSetUpgradeModeResponse, TContext>>
|
||||||
updateDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
startDataFrameAnalytics<TContext = unknown>(params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDataFrameAnalyticsResponse, TContext>>
|
||||||
updateFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
startDatafeed<TContext = unknown>(params: T.MlStartDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDatafeedResponse, TContext>>
|
||||||
updateJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stopDataFrameAnalytics<TContext = unknown>(params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDataFrameAnalyticsResponse, TContext>>
|
||||||
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stopDatafeed<TContext = unknown>(params: T.MlStopDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDatafeedResponse, TContext>>
|
||||||
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpgradeJobSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
updateDataFrameAnalytics<TContext = unknown>(params: T.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateDataFrameAnalyticsResponse, TContext>>
|
||||||
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
updateDatafeed<TContext = unknown>(params: T.MlUpdateDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateDatafeedResponse, TContext>>
|
||||||
validateDetector<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidateDetector<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
monitoring: {
|
monitoring: {
|
||||||
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MonitoringBulk<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
bulk<TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.MonitoringBulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MonitoringBulkResponse, TContext>>
|
||||||
}
|
}
|
||||||
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Msearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
msearch<TDocument = unknown, TContext = unknown>(params?: T.MsearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MsearchResponse<TDocument>, TContext>>
|
||||||
msearchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MsearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
msearchTemplate<TDocument = unknown, TContext = unknown>(params?: T.MsearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MsearchTemplateResponse<TDocument>, TContext>>
|
||||||
mtermvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Mtermvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
mtermvectors<TContext = unknown>(params?: T.MtermvectorsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MtermvectorsResponse, TContext>>
|
||||||
nodes: {
|
nodes: {
|
||||||
hotThreads<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesHotThreads, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearRepositoriesMeteringArchive<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRepositoriesMeteringInfo<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
reloadSecureSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.NodesReloadSecureSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
hotThreads<TContext = unknown>(params?: T.NodesHotThreadsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesHotThreadsResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
info<TContext = unknown>(params?: T.NodesInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesInfoResponse, TContext>>
|
||||||
usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
openPointInTime<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.OpenPointInTime, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
openPointInTime<TContext = unknown>(params: T.OpenPointInTimeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.OpenPointInTimeResponse, TContext>>
|
||||||
ping<TResponse = boolean, TContext = Context>(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
ping<TContext = unknown>(params?: T.PingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PingResponse, TContext>>
|
||||||
putScript<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.PutScript<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putScript<TContext = unknown>(params: T.PutScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PutScriptResponse, TContext>>
|
||||||
rankEval<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RankEval<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
rankEval<TContext = unknown>(params: T.RankEvalRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RankEvalResponse, TContext>>
|
||||||
reindex<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Reindex<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
reindex<TContext = unknown>(params?: T.ReindexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ReindexResponse, TContext>>
|
||||||
reindexRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ReindexRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
reindexRethrottle<TContext = unknown>(params: T.ReindexRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ReindexRethrottleResponse, TContext>>
|
||||||
renderSearchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RenderSearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
renderSearchTemplate<TContext = unknown>(params?: T.RenderSearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RenderSearchTemplateResponse, TContext>>
|
||||||
rollup: {
|
rollup: {
|
||||||
deleteJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupDeleteJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteJob<TContext = unknown>(params: T.RollupDeleteJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupDeleteJobResponse, TContext>>
|
||||||
getJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getJobs<TContext = unknown>(params?: T.RollupGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetJobsResponse, TContext>>
|
||||||
getRollupCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRollupCaps<TContext = unknown>(params?: T.RollupGetRollupCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupCapsResponse, TContext>>
|
||||||
getRollupIndexCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupIndexCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRollupIndexCaps<TContext = unknown>(params: T.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupIndexCapsResponse, TContext>>
|
||||||
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putJob<TContext = unknown>(params: T.RollupPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupPutJobResponse, TContext>>
|
||||||
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollup<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
rollup<TContext = unknown>(params: T.RollupRollupRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupResponse, TContext>>
|
||||||
rollupSearch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollupSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
rollupSearch<TDocument = unknown, TContext = unknown>(params: T.RollupRollupSearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupSearchResponse<TDocument>, TContext>>
|
||||||
startJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStartJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
startJob<TContext = unknown>(params: T.RollupStartJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStartJobResponse, TContext>>
|
||||||
stopJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStopJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stopJob<TContext = unknown>(params: T.RollupStopJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStopJobResponse, TContext>>
|
||||||
}
|
}
|
||||||
scriptsPainlessExecute<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ScriptsPainlessExecute<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
scriptsPainlessExecute<TResult = unknown, TContext = unknown>(params?: T.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ScriptsPainlessExecuteResponse<TResult>, TContext>>
|
||||||
scroll<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Scroll<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
scroll<TDocument = unknown, TContext = unknown>(params?: T.ScrollRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ScrollResponse<TDocument>, TContext>>
|
||||||
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Search<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
search<TDocument = unknown, TContext = unknown>(params?: T.SearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchResponse<TDocument>, TContext>>
|
||||||
searchShards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
searchMvt<TContext = unknown>(params: T.SearchMvtRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchMvtResponse, TContext>>
|
||||||
searchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
searchableSnapshots: {
|
searchableSnapshots: {
|
||||||
clearCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
cacheStats<TContext = unknown>(params?: T.SearchableSnapshotsCacheStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsCacheStatsResponse, TContext>>
|
||||||
mount<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsMount<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCache<TContext = unknown>(params?: T.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsClearCacheResponse, TContext>>
|
||||||
repositoryStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsRepositoryStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
mount<TContext = unknown>(params: T.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsMountResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
security: {
|
security: {
|
||||||
authenticate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityAuthenticate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
authenticate<TContext = unknown>(params?: T.SecurityAuthenticateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityAuthenticateResponse, TContext>>
|
||||||
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityChangePassword<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
changePassword<TContext = unknown>(params?: T.SecurityChangePasswordRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityChangePasswordResponse, TContext>>
|
||||||
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearApiKeyCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearApiKeyCache<TContext = unknown>(params: T.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearApiKeyCacheResponse, TContext>>
|
||||||
clearCachedPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCachedPrivileges<TContext = unknown>(params: T.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedPrivilegesResponse, TContext>>
|
||||||
clearCachedRealms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRealms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCachedRealms<TContext = unknown>(params: T.SecurityClearCachedRealmsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedRealmsResponse, TContext>>
|
||||||
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRoles, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCachedRoles<TContext = unknown>(params: T.SecurityClearCachedRolesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedRolesResponse, TContext>>
|
||||||
createApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityCreateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCachedServiceTokens<TContext = unknown>(params: T.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedServiceTokensResponse, TContext>>
|
||||||
deletePrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeletePrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
createApiKey<TContext = unknown>(params?: T.SecurityCreateApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityCreateApiKeyResponse, TContext>>
|
||||||
deleteRole<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteRole, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
createServiceToken<TContext = unknown>(params: T.SecurityCreateServiceTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityCreateServiceTokenResponse, TContext>>
|
||||||
deleteRoleMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteRoleMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deletePrivileges<TContext = unknown>(params: T.SecurityDeletePrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeletePrivilegesResponse, TContext>>
|
||||||
deleteUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteRole<TContext = unknown>(params: T.SecurityDeleteRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteRoleResponse, TContext>>
|
||||||
disableUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDisableUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteRoleMapping<TContext = unknown>(params: T.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteRoleMappingResponse, TContext>>
|
||||||
enableUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityEnableUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteServiceToken<TContext = unknown>(params: T.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteServiceTokenResponse, TContext>>
|
||||||
getApiKey<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetApiKey, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteUser<TContext = unknown>(params: T.SecurityDeleteUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteUserResponse, TContext>>
|
||||||
getBuiltinPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetBuiltinPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
disableUser<TContext = unknown>(params: T.SecurityDisableUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDisableUserResponse, TContext>>
|
||||||
getPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
enableUser<TContext = unknown>(params: T.SecurityEnableUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityEnableUserResponse, TContext>>
|
||||||
getRole<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetRole, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getApiKey<TContext = unknown>(params?: T.SecurityGetApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetApiKeyResponse, TContext>>
|
||||||
getRoleMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetRoleMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getBuiltinPrivileges<TContext = unknown>(params?: T.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetBuiltinPrivilegesResponse, TContext>>
|
||||||
getToken<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getPrivileges<TContext = unknown>(params?: T.SecurityGetPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetPrivilegesResponse, TContext>>
|
||||||
getUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRole<TContext = unknown>(params?: T.SecurityGetRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetRoleResponse, TContext>>
|
||||||
getUserPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetUserPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRoleMapping<TContext = unknown>(params?: T.SecurityGetRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetRoleMappingResponse, TContext>>
|
||||||
grantApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGrantApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getServiceAccounts<TContext = unknown>(params?: T.SecurityGetServiceAccountsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetServiceAccountsResponse, TContext>>
|
||||||
hasPrivileges<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityHasPrivileges<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getServiceCredentials<TContext = unknown>(params: T.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetServiceCredentialsResponse, TContext>>
|
||||||
invalidateApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityInvalidateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getToken<TContext = unknown>(params?: T.SecurityGetTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetTokenResponse, TContext>>
|
||||||
invalidateToken<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityInvalidateToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getUser<TContext = unknown>(params?: T.SecurityGetUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetUserResponse, TContext>>
|
||||||
putPrivileges<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutPrivileges<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getUserPrivileges<TContext = unknown>(params?: T.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetUserPrivilegesResponse, TContext>>
|
||||||
putRole<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutRole<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
grantApiKey<TContext = unknown>(params?: T.SecurityGrantApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGrantApiKeyResponse, TContext>>
|
||||||
putRoleMapping<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutRoleMapping<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
hasPrivileges<TContext = unknown>(params?: T.SecurityHasPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityHasPrivilegesResponse, TContext>>
|
||||||
putUser<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutUser<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
slm: {
|
slm: {
|
||||||
deleteLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteLifecycle<TContext = unknown>(params: T.SlmDeleteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmDeleteLifecycleResponse, TContext>>
|
||||||
executeLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmExecuteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
executeLifecycle<TContext = unknown>(params: T.SlmExecuteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmExecuteLifecycleResponse, TContext>>
|
||||||
executeRetention<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmExecuteRetention, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
executeRetention<TContext = unknown>(params?: T.SlmExecuteRetentionRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmExecuteRetentionResponse, TContext>>
|
||||||
getLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getLifecycle<TContext = unknown>(params?: T.SlmGetLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetLifecycleResponse, TContext>>
|
||||||
getStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getStats<TContext = unknown>(params?: T.SlmGetStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetStatsResponse, TContext>>
|
||||||
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getStatus<TContext = unknown>(params?: T.SlmGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetStatusResponse, TContext>>
|
||||||
putLifecycle<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SlmPutLifecycle<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putLifecycle<TContext = unknown>(params: T.SlmPutLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmPutLifecycleResponse, TContext>>
|
||||||
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
start<TContext = unknown>(params?: T.SlmStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmStartResponse, TContext>>
|
||||||
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stop<TContext = unknown>(params?: T.SlmStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmStopResponse, TContext>>
|
||||||
}
|
}
|
||||||
snapshot: {
|
snapshot: {
|
||||||
cleanupRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCleanupRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
cleanupRepository<TContext = unknown>(params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCleanupRepositoryResponse, TContext>>
|
||||||
clone<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotClone<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clone<TContext = unknown>(params: T.SnapshotCloneRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCloneResponse, TContext>>
|
||||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
create<TContext = unknown>(params: T.SnapshotCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCreateResponse, TContext>>
|
||||||
createRepository<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCreateRepository<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
createRepository<TContext = unknown>(params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCreateRepositoryResponse, TContext>>
|
||||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
delete<TContext = unknown>(params: T.SnapshotDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotDeleteResponse, TContext>>
|
||||||
deleteRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotDeleteRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteRepository<TContext = unknown>(params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotDeleteRepositoryResponse, TContext>>
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get<TContext = unknown>(params: T.SnapshotGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotGetResponse, TContext>>
|
||||||
getRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotGetRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getRepository<TContext = unknown>(params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotGetRepositoryResponse, TContext>>
|
||||||
restore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotRestore<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
repositoryAnalyze<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
restore<TContext = unknown>(params: T.SnapshotRestoreRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotRestoreResponse, TContext>>
|
||||||
verifyRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotVerifyRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
sql: {
|
sql: {
|
||||||
clearCursor<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlClearCursor<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
clearCursor<TContext = unknown>(params?: T.SqlClearCursorRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlClearCursorResponse, TContext>>
|
||||||
query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteAsync<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||||
translate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlTranslate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
ssl: {
|
ssl: {
|
||||||
certificates<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SslCertificates, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
certificates<TContext = unknown>(params?: T.SslCertificatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SslCertificatesResponse, TContext>>
|
||||||
}
|
}
|
||||||
tasks: {
|
tasks: {
|
||||||
cancel<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksCancel, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
cancel<TContext = unknown>(params?: T.TasksCancelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksCancelResponse, TContext>>
|
||||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
get<TContext = unknown>(params: T.TasksGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksGetResponse, TContext>>
|
||||||
list<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksList, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Termvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
|
||||||
transform: {
|
transform: {
|
||||||
deleteTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformDeleteTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteTransform<TContext = unknown>(params: T.TransformDeleteTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformDeleteTransformResponse, TContext>>
|
||||||
getTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformGetTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTransform<TContext = unknown>(params?: T.TransformGetTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformGetTransformResponse, TContext>>
|
||||||
getTransformStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformGetTransformStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getTransformStats<TContext = unknown>(params: T.TransformGetTransformStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformGetTransformStatsResponse, TContext>>
|
||||||
previewTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformPreviewTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
previewTransform<TTransform = unknown, TContext = unknown>(params?: T.TransformPreviewTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformPreviewTransformResponse<TTransform>, TContext>>
|
||||||
putTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformPutTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putTransform<TContext = unknown>(params: T.TransformPutTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformPutTransformResponse, TContext>>
|
||||||
startTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformStartTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
startTransform<TContext = unknown>(params: T.TransformStartTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformStartTransformResponse, TContext>>
|
||||||
stopTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformStopTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stopTransform<TContext = unknown>(params: T.TransformStopTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformStopTransformResponse, TContext>>
|
||||||
updateTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformUpdateTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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>>
|
||||||
}
|
}
|
||||||
update<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Update<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<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.UpdateByQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
updateByQuery<TContext = unknown>(params: T.UpdateByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateByQueryResponse, TContext>>
|
||||||
updateByQueryRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.UpdateByQueryRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
updateByQueryRethrottle<TContext = unknown>(params: T.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateByQueryRethrottleResponse, TContext>>
|
||||||
watcher: {
|
watcher: {
|
||||||
ackWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherAckWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
ackWatch<TContext = unknown>(params: T.WatcherAckWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherAckWatchResponse, TContext>>
|
||||||
activateWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherActivateWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
activateWatch<TContext = unknown>(params: T.WatcherActivateWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherActivateWatchResponse, TContext>>
|
||||||
deactivateWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherDeactivateWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deactivateWatch<TContext = unknown>(params: T.WatcherDeactivateWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherDeactivateWatchResponse, TContext>>
|
||||||
deleteWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherDeleteWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
deleteWatch<TContext = unknown>(params: T.WatcherDeleteWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherDeleteWatchResponse, TContext>>
|
||||||
executeWatch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherExecuteWatch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
executeWatch<TContext = unknown>(params?: T.WatcherExecuteWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherExecuteWatchResponse, TContext>>
|
||||||
getWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherGetWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
getWatch<TContext = unknown>(params: T.WatcherGetWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherGetWatchResponse, TContext>>
|
||||||
putWatch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherPutWatch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
putWatch<TContext = unknown>(params: T.WatcherPutWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherPutWatchResponse, TContext>>
|
||||||
queryWatches<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherQueryWatches<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
queryWatches<TContext = unknown>(params?: T.WatcherQueryWatchesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherQueryWatchesResponse, TContext>>
|
||||||
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
start<TContext = unknown>(params?: T.WatcherStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStartResponse, TContext>>
|
||||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stats<TContext = unknown>(params?: T.WatcherStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStatsResponse, TContext>>
|
||||||
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
stop<TContext = unknown>(params?: T.WatcherStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStopResponse, TContext>>
|
||||||
}
|
}
|
||||||
xpack: {
|
xpack: {
|
||||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.XpackInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
info<TContext = unknown>(params?: T.XpackInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.XpackInfoResponse, TContext>>
|
||||||
usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.XpackUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
usage<TContext = unknown>(params?: T.XpackUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.XpackUsageResponse, TContext>>
|
||||||
}
|
}
|
||||||
/* /GENERATED */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { KibanaClient }
|
export { KibanaClient }
|
||||||
|
|||||||
1594
api/new.d.ts
vendored
Normal file
1594
api/new.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
334
api/requestParams.d.ts
vendored
334
api/requestParams.d.ts
vendored
@ -280,6 +280,7 @@ export interface CatNodes extends Generic {
|
|||||||
s?: string | string[];
|
s?: string | string[];
|
||||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||||
v?: boolean;
|
v?: boolean;
|
||||||
|
include_unloaded_segments?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CatPendingTasks extends Generic {
|
export interface CatPendingTasks extends Generic {
|
||||||
@ -299,6 +300,7 @@ export interface CatPlugins extends Generic {
|
|||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
h?: string | string[];
|
h?: string | string[];
|
||||||
help?: boolean;
|
help?: boolean;
|
||||||
|
include_bootstrap?: boolean;
|
||||||
s?: string | string[];
|
s?: string | string[];
|
||||||
v?: boolean;
|
v?: boolean;
|
||||||
}
|
}
|
||||||
@ -565,8 +567,8 @@ export interface ClusterReroute<T = RequestBody> extends Generic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ClusterState extends Generic {
|
export interface ClusterState extends Generic {
|
||||||
metric?: string | string[];
|
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
|
metric?: string | string[];
|
||||||
local?: boolean;
|
local?: boolean;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
flat_settings?: boolean;
|
flat_settings?: boolean;
|
||||||
@ -651,8 +653,6 @@ export interface Delete extends Generic {
|
|||||||
export interface DeleteByQuery<T = RequestBody> extends Generic {
|
export interface DeleteByQuery<T = RequestBody> extends Generic {
|
||||||
index: string | string[];
|
index: string | string[];
|
||||||
type?: string | string[];
|
type?: string | string[];
|
||||||
_source_exclude?: string | string[];
|
|
||||||
_source_include?: string | string[];
|
|
||||||
analyzer?: string;
|
analyzer?: string;
|
||||||
analyze_wildcard?: boolean;
|
analyze_wildcard?: boolean;
|
||||||
default_operator?: 'AND' | 'OR';
|
default_operator?: 'AND' | 'OR';
|
||||||
@ -672,9 +672,6 @@ export interface DeleteByQuery<T = RequestBody> extends Generic {
|
|||||||
size?: number;
|
size?: number;
|
||||||
max_docs?: number;
|
max_docs?: number;
|
||||||
sort?: string | string[];
|
sort?: string | string[];
|
||||||
_source?: string | string[];
|
|
||||||
_source_excludes?: string | string[];
|
|
||||||
_source_includes?: string | string[];
|
|
||||||
terminate_after?: number;
|
terminate_after?: number;
|
||||||
stats?: string | string[];
|
stats?: string | string[];
|
||||||
version?: boolean;
|
version?: boolean;
|
||||||
@ -731,6 +728,10 @@ export interface EqlGet extends Generic {
|
|||||||
keep_alive?: string;
|
keep_alive?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface EqlGetStatus extends Generic {
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface EqlSearch<T = RequestBody> extends Generic {
|
export interface EqlSearch<T = RequestBody> extends Generic {
|
||||||
index: string;
|
index: string;
|
||||||
wait_for_completion_timeout?: string;
|
wait_for_completion_timeout?: string;
|
||||||
@ -795,6 +796,13 @@ export interface Explain<T = RequestBody> extends Generic {
|
|||||||
body?: T;
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface FeaturesGetFeatures extends Generic {
|
||||||
|
master_timeout?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FeaturesResetFeatures extends Generic {
|
||||||
|
}
|
||||||
|
|
||||||
export interface FieldCaps<T = RequestBody> extends Generic {
|
export interface FieldCaps<T = RequestBody> extends Generic {
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
fields?: string | string[];
|
fields?: string | string[];
|
||||||
@ -805,6 +813,27 @@ export interface FieldCaps<T = RequestBody> extends Generic {
|
|||||||
body?: T;
|
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 {
|
export interface Get extends Generic {
|
||||||
id: string;
|
id: string;
|
||||||
index: string;
|
index: string;
|
||||||
@ -876,6 +905,11 @@ export interface IlmGetLifecycle extends Generic {
|
|||||||
export interface IlmGetStatus 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 {
|
export interface IlmMoveToStep<T = RequestBody> extends Generic {
|
||||||
index: string;
|
index: string;
|
||||||
body?: T;
|
body?: T;
|
||||||
@ -1013,6 +1047,15 @@ export interface IndicesDeleteTemplate extends Generic {
|
|||||||
master_timeout?: string;
|
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 {
|
export interface IndicesExists extends Generic {
|
||||||
index: string | string[];
|
index: string | string[];
|
||||||
local?: boolean;
|
local?: boolean;
|
||||||
@ -1055,6 +1098,14 @@ export interface IndicesExistsType extends Generic {
|
|||||||
local?: boolean;
|
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 {
|
export interface IndicesFlush extends Generic {
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
force?: boolean;
|
force?: boolean;
|
||||||
@ -1130,7 +1181,7 @@ export interface IndicesGetFieldMapping extends Generic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IndicesGetIndexTemplate extends Generic {
|
export interface IndicesGetIndexTemplate extends Generic {
|
||||||
name?: string | string[];
|
name?: string;
|
||||||
flat_settings?: boolean;
|
flat_settings?: boolean;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
local?: boolean;
|
local?: boolean;
|
||||||
@ -1178,6 +1229,10 @@ export interface IndicesMigrateToDataStream extends Generic {
|
|||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IndicesModifyDataStream<T = RequestBody> extends Generic {
|
||||||
|
body: T;
|
||||||
|
}
|
||||||
|
|
||||||
export interface IndicesOpen extends Generic {
|
export interface IndicesOpen extends Generic {
|
||||||
index: string | string[];
|
index: string | string[];
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
@ -1397,8 +1452,12 @@ export interface IngestDeletePipeline extends Generic {
|
|||||||
timeout?: string;
|
timeout?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IngestGeoIpStats extends Generic {
|
||||||
|
}
|
||||||
|
|
||||||
export interface IngestGetPipeline extends Generic {
|
export interface IngestGetPipeline extends Generic {
|
||||||
id?: string;
|
id?: string;
|
||||||
|
summary?: boolean;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1407,6 +1466,7 @@ export interface IngestProcessorGrok extends Generic {
|
|||||||
|
|
||||||
export interface IngestPutPipeline<T = RequestBody> extends Generic {
|
export interface IngestPutPipeline<T = RequestBody> extends Generic {
|
||||||
id: string;
|
id: string;
|
||||||
|
if_version?: number;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
body: T;
|
body: T;
|
||||||
@ -1446,6 +1506,19 @@ export interface LicensePostStartTrial extends Generic {
|
|||||||
acknowledge?: boolean;
|
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 {
|
export interface Mget<T = RequestBody> extends Generic {
|
||||||
index?: string;
|
index?: string;
|
||||||
type?: string;
|
type?: string;
|
||||||
@ -1466,6 +1539,12 @@ export interface MigrationDeprecations extends Generic {
|
|||||||
index?: string;
|
index?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface MigrationGetFeatureUpgradeStatus extends Generic {
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MigrationPostFeatureUpgrade extends Generic {
|
||||||
|
}
|
||||||
|
|
||||||
export interface MlCloseJob<T = RequestBody> extends Generic {
|
export interface MlCloseJob<T = RequestBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
allow_no_match?: boolean;
|
allow_no_match?: boolean;
|
||||||
@ -1533,6 +1612,11 @@ export interface MlDeleteTrainedModel extends Generic {
|
|||||||
model_id: string;
|
model_id: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface MlDeleteTrainedModelAlias extends Generic {
|
||||||
|
model_alias: string;
|
||||||
|
model_id: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface MlEstimateModelMemory<T = RequestBody> extends Generic {
|
export interface MlEstimateModelMemory<T = RequestBody> extends Generic {
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
@ -1574,11 +1658,12 @@ export interface MlFlushJob<T = RequestBody> extends Generic {
|
|||||||
body?: T;
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlForecast extends Generic {
|
export interface MlForecast<T = RequestBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
duration?: string;
|
duration?: string;
|
||||||
expires_in?: string;
|
expires_in?: string;
|
||||||
max_model_memory?: string;
|
max_model_memory?: string;
|
||||||
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlGetBuckets<T = RequestBody> extends Generic {
|
export interface MlGetBuckets<T = RequestBody> extends Generic {
|
||||||
@ -1682,6 +1767,12 @@ export interface MlGetJobs extends Generic {
|
|||||||
exclude_generated?: 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 {
|
export interface MlGetModelSnapshots<T = RequestBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
snapshot_id?: string;
|
snapshot_id?: string;
|
||||||
@ -1742,8 +1833,9 @@ export interface MlGetTrainedModelsStats extends Generic {
|
|||||||
export interface MlInfo extends Generic {
|
export interface MlInfo extends Generic {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlOpenJob extends Generic {
|
export interface MlOpenJob<T = RequestBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
|
export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
|
||||||
@ -1751,15 +1843,21 @@ export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
|
|||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlPostData<T = RequestBody> extends Generic {
|
export interface MlPostData<T = RequestNDBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
reset_start?: string;
|
reset_start?: string;
|
||||||
reset_end?: string;
|
reset_end?: string;
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlPreviewDatafeed extends Generic {
|
export interface MlPreviewDataFrameAnalytics<T = RequestBody> extends Generic {
|
||||||
datafeed_id: string;
|
id?: string;
|
||||||
|
body?: T;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MlPreviewDatafeed<T = RequestBody> extends Generic {
|
||||||
|
datafeed_id?: string;
|
||||||
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlPutCalendar<T = RequestBody> extends Generic {
|
export interface MlPutCalendar<T = RequestBody> extends Generic {
|
||||||
@ -1793,14 +1891,30 @@ export interface MlPutFilter<T = RequestBody> extends Generic {
|
|||||||
|
|
||||||
export interface MlPutJob<T = RequestBody> extends Generic {
|
export interface MlPutJob<T = RequestBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
|
ignore_unavailable?: boolean;
|
||||||
|
allow_no_indices?: boolean;
|
||||||
|
ignore_throttled?: boolean;
|
||||||
|
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MlPutTrainedModel<T = RequestBody> extends Generic {
|
export interface MlPutTrainedModel<T = RequestBody> extends Generic {
|
||||||
model_id: string;
|
model_id: string;
|
||||||
|
defer_definition_decompression?: boolean;
|
||||||
body: T;
|
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 {
|
export interface MlRevertModelSnapshot<T = RequestBody> extends Generic {
|
||||||
job_id: string;
|
job_id: string;
|
||||||
snapshot_id: string;
|
snapshot_id: string;
|
||||||
@ -1900,7 +2014,7 @@ export interface MonitoringBulk<T = RequestNDBody> extends Generic {
|
|||||||
export interface Msearch<T = RequestNDBody> extends Generic {
|
export interface Msearch<T = RequestNDBody> extends Generic {
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
type?: string | string[];
|
type?: string | string[];
|
||||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||||
max_concurrent_searches?: number;
|
max_concurrent_searches?: number;
|
||||||
typed_keys?: boolean;
|
typed_keys?: boolean;
|
||||||
pre_filter_shard_size?: number;
|
pre_filter_shard_size?: number;
|
||||||
@ -1913,7 +2027,7 @@ export interface Msearch<T = RequestNDBody> extends Generic {
|
|||||||
export interface MsearchTemplate<T = RequestNDBody> extends Generic {
|
export interface MsearchTemplate<T = RequestNDBody> extends Generic {
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
type?: string | string[];
|
type?: string | string[];
|
||||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||||
typed_keys?: boolean;
|
typed_keys?: boolean;
|
||||||
max_concurrent_searches?: number;
|
max_concurrent_searches?: number;
|
||||||
rest_total_hits_as_int?: boolean;
|
rest_total_hits_as_int?: boolean;
|
||||||
@ -1939,13 +2053,23 @@ export interface Mtermvectors<T = RequestBody> extends Generic {
|
|||||||
body?: T;
|
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 {
|
export interface NodesHotThreads extends Generic {
|
||||||
node_id?: string | string[];
|
node_id?: string | string[];
|
||||||
interval?: string;
|
interval?: string;
|
||||||
snapshots?: number;
|
snapshots?: number;
|
||||||
threads?: number;
|
threads?: number;
|
||||||
ignore_idle_threads?: boolean;
|
ignore_idle_threads?: boolean;
|
||||||
type?: 'cpu' | 'wait' | 'block';
|
type?: 'cpu' | 'wait' | 'block' | 'mem';
|
||||||
|
sort?: 'cpu' | 'total';
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1974,6 +2098,7 @@ export interface NodesStats extends Generic {
|
|||||||
types?: string | string[];
|
types?: string | string[];
|
||||||
timeout?: string;
|
timeout?: string;
|
||||||
include_segment_file_sizes?: boolean;
|
include_segment_file_sizes?: boolean;
|
||||||
|
include_unloaded_segments?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NodesUsage extends Generic {
|
export interface NodesUsage extends Generic {
|
||||||
@ -1983,12 +2108,12 @@ export interface NodesUsage extends Generic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface OpenPointInTime extends Generic {
|
export interface OpenPointInTime extends Generic {
|
||||||
index?: string | string[];
|
index: string | string[];
|
||||||
preference?: string;
|
preference?: string;
|
||||||
routing?: string;
|
routing?: string;
|
||||||
ignore_unavailable?: boolean;
|
ignore_unavailable?: boolean;
|
||||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||||
keep_alive?: string;
|
keep_alive: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Ping extends Generic {
|
export interface Ping extends Generic {
|
||||||
@ -2136,6 +2261,22 @@ export interface Search<T = RequestBody> extends Generic {
|
|||||||
max_concurrent_shard_requests?: number;
|
max_concurrent_shard_requests?: number;
|
||||||
pre_filter_shard_size?: number;
|
pre_filter_shard_size?: number;
|
||||||
rest_total_hits_as_int?: boolean;
|
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;
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2159,7 +2300,7 @@ export interface SearchTemplate<T = RequestBody> extends Generic {
|
|||||||
preference?: string;
|
preference?: string;
|
||||||
routing?: string | string[];
|
routing?: string | string[];
|
||||||
scroll?: string;
|
scroll?: string;
|
||||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||||
explain?: boolean;
|
explain?: boolean;
|
||||||
profile?: boolean;
|
profile?: boolean;
|
||||||
typed_keys?: boolean;
|
typed_keys?: boolean;
|
||||||
@ -2168,6 +2309,10 @@ export interface SearchTemplate<T = RequestBody> extends Generic {
|
|||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SearchableSnapshotsCacheStats extends Generic {
|
||||||
|
node_id?: string | string[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface SearchableSnapshotsClearCache extends Generic {
|
export interface SearchableSnapshotsClearCache extends Generic {
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
ignore_unavailable?: boolean;
|
ignore_unavailable?: boolean;
|
||||||
@ -2180,6 +2325,7 @@ export interface SearchableSnapshotsMount<T = RequestBody> extends Generic {
|
|||||||
snapshot: string;
|
snapshot: string;
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
wait_for_completion?: boolean;
|
wait_for_completion?: boolean;
|
||||||
|
storage?: string;
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2189,6 +2335,7 @@ export interface SearchableSnapshotsRepositoryStats extends Generic {
|
|||||||
|
|
||||||
export interface SearchableSnapshotsStats extends Generic {
|
export interface SearchableSnapshotsStats extends Generic {
|
||||||
index?: string | string[];
|
index?: string | string[];
|
||||||
|
level?: 'cluster' | 'indices' | 'shards';
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SecurityAuthenticate extends Generic {
|
export interface SecurityAuthenticate extends Generic {
|
||||||
@ -2217,11 +2364,24 @@ export interface SecurityClearCachedRoles extends Generic {
|
|||||||
name: string | string[];
|
name: string | string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SecurityClearCachedServiceTokens extends Generic {
|
||||||
|
namespace: string;
|
||||||
|
service: string;
|
||||||
|
name: string | string[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface SecurityCreateApiKey<T = RequestBody> extends Generic {
|
export interface SecurityCreateApiKey<T = RequestBody> extends Generic {
|
||||||
refresh?: 'wait_for' | boolean;
|
refresh?: 'wait_for' | boolean;
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SecurityCreateServiceToken extends Generic {
|
||||||
|
namespace: string;
|
||||||
|
service: string;
|
||||||
|
name?: string;
|
||||||
|
refresh?: 'wait_for' | boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface SecurityDeletePrivileges extends Generic {
|
export interface SecurityDeletePrivileges extends Generic {
|
||||||
application: string;
|
application: string;
|
||||||
name: string;
|
name: string;
|
||||||
@ -2238,6 +2398,13 @@ export interface SecurityDeleteRoleMapping extends Generic {
|
|||||||
refresh?: 'wait_for' | boolean;
|
refresh?: 'wait_for' | boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SecurityDeleteServiceToken extends Generic {
|
||||||
|
namespace: string;
|
||||||
|
service: string;
|
||||||
|
name: string;
|
||||||
|
refresh?: 'wait_for' | boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export interface SecurityDeleteUser extends Generic {
|
export interface SecurityDeleteUser extends Generic {
|
||||||
username: string;
|
username: string;
|
||||||
refresh?: 'wait_for' | boolean;
|
refresh?: 'wait_for' | boolean;
|
||||||
@ -2277,6 +2444,16 @@ export interface SecurityGetRoleMapping extends Generic {
|
|||||||
name?: string | string[];
|
name?: string | string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SecurityGetServiceAccounts extends Generic {
|
||||||
|
namespace?: string;
|
||||||
|
service?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SecurityGetServiceCredentials extends Generic {
|
||||||
|
namespace: string;
|
||||||
|
service: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface SecurityGetToken<T = RequestBody> extends Generic {
|
export interface SecurityGetToken<T = RequestBody> extends Generic {
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
@ -2329,6 +2506,47 @@ export interface SecurityPutUser<T = RequestBody> extends Generic {
|
|||||||
body: T;
|
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 {
|
export interface SlmDeleteLifecycle extends Generic {
|
||||||
policy_id: string;
|
policy_id: string;
|
||||||
}
|
}
|
||||||
@ -2408,6 +2626,15 @@ export interface SnapshotGet extends Generic {
|
|||||||
snapshot: string | string[];
|
snapshot: string | string[];
|
||||||
master_timeout?: string;
|
master_timeout?: string;
|
||||||
ignore_unavailable?: boolean;
|
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;
|
verbose?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2417,6 +2644,21 @@ export interface SnapshotGetRepository extends Generic {
|
|||||||
local?: boolean;
|
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 {
|
export interface SnapshotRestore<T = RequestBody> extends Generic {
|
||||||
repository: string;
|
repository: string;
|
||||||
snapshot: string;
|
snapshot: string;
|
||||||
@ -2442,6 +2684,22 @@ export interface SqlClearCursor<T = RequestBody> extends Generic {
|
|||||||
body: T;
|
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 {
|
export interface SqlQuery<T = RequestBody> extends Generic {
|
||||||
format?: string;
|
format?: string;
|
||||||
body: T;
|
body: T;
|
||||||
@ -2478,6 +2736,11 @@ export interface TasksList extends Generic {
|
|||||||
timeout?: string;
|
timeout?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TermsEnum<T = RequestBody> extends Generic {
|
||||||
|
index: string | string[];
|
||||||
|
body?: T;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Termvectors<T = RequestBody> extends Generic {
|
export interface Termvectors<T = RequestBody> extends Generic {
|
||||||
index: string;
|
index: string;
|
||||||
id?: string;
|
id?: string;
|
||||||
@ -2496,9 +2759,28 @@ export interface Termvectors<T = RequestBody> extends Generic {
|
|||||||
body?: T;
|
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 {
|
export interface TransformDeleteTransform extends Generic {
|
||||||
transform_id: string;
|
transform_id: string;
|
||||||
force?: boolean;
|
force?: boolean;
|
||||||
|
timeout?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TransformGetTransform extends Generic {
|
export interface TransformGetTransform extends Generic {
|
||||||
@ -2517,12 +2799,15 @@ export interface TransformGetTransformStats extends Generic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface TransformPreviewTransform<T = RequestBody> extends Generic {
|
export interface TransformPreviewTransform<T = RequestBody> extends Generic {
|
||||||
body: T;
|
transform_id?: string;
|
||||||
|
timeout?: string;
|
||||||
|
body?: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TransformPutTransform<T = RequestBody> extends Generic {
|
export interface TransformPutTransform<T = RequestBody> extends Generic {
|
||||||
transform_id: string;
|
transform_id: string;
|
||||||
defer_validation?: boolean;
|
defer_validation?: boolean;
|
||||||
|
timeout?: string;
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2543,9 +2828,15 @@ export interface TransformStopTransform extends Generic {
|
|||||||
export interface TransformUpdateTransform<T = RequestBody> extends Generic {
|
export interface TransformUpdateTransform<T = RequestBody> extends Generic {
|
||||||
transform_id: string;
|
transform_id: string;
|
||||||
defer_validation?: boolean;
|
defer_validation?: boolean;
|
||||||
|
timeout?: string;
|
||||||
body: T;
|
body: T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TransformUpgradeTransforms extends Generic {
|
||||||
|
dry_run?: boolean;
|
||||||
|
timeout?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Update<T = RequestBody> extends Generic {
|
export interface Update<T = RequestBody> extends Generic {
|
||||||
id: string;
|
id: string;
|
||||||
index: string;
|
index: string;
|
||||||
@ -2570,8 +2861,6 @@ export interface Update<T = RequestBody> extends Generic {
|
|||||||
export interface UpdateByQuery<T = RequestBody> extends Generic {
|
export interface UpdateByQuery<T = RequestBody> extends Generic {
|
||||||
index: string | string[];
|
index: string | string[];
|
||||||
type?: string | string[];
|
type?: string | string[];
|
||||||
_source_exclude?: string | string[];
|
|
||||||
_source_include?: string | string[];
|
|
||||||
analyzer?: string;
|
analyzer?: string;
|
||||||
analyze_wildcard?: boolean;
|
analyze_wildcard?: boolean;
|
||||||
default_operator?: 'AND' | 'OR';
|
default_operator?: 'AND' | 'OR';
|
||||||
@ -2592,9 +2881,6 @@ export interface UpdateByQuery<T = RequestBody> extends Generic {
|
|||||||
size?: number;
|
size?: number;
|
||||||
max_docs?: number;
|
max_docs?: number;
|
||||||
sort?: string | string[];
|
sort?: string | string[];
|
||||||
_source?: string | string[];
|
|
||||||
_source_excludes?: string | string[];
|
|
||||||
_source_includes?: string | string[];
|
|
||||||
terminate_after?: number;
|
terminate_after?: number;
|
||||||
stats?: string | string[];
|
stats?: string | string[];
|
||||||
version?: boolean;
|
version?: boolean;
|
||||||
|
|||||||
16864
api/types.d.ts
vendored
Normal file
16864
api/types.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -31,10 +31,10 @@ function handleError (err, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function snakeCaseKeys (acceptedQuerystring, snakeCase, querystring) {
|
function snakeCaseKeys (acceptedQuerystring, snakeCase, querystring) {
|
||||||
var target = {}
|
const target = {}
|
||||||
var keys = Object.keys(querystring)
|
const keys = Object.keys(querystring)
|
||||||
for (var i = 0, len = keys.length; i < len; i++) {
|
for (let i = 0, len = keys.length; i < len; i++) {
|
||||||
var key = keys[i]
|
const key = keys[i]
|
||||||
target[snakeCase[key] || key] = querystring[key]
|
target[snakeCase[key] || key] = querystring[key]
|
||||||
}
|
}
|
||||||
return target
|
return target
|
||||||
|
|||||||
100
docs/advanced-config.asciidoc
Normal file
100
docs/advanced-config.asciidoc
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
[[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``.
|
||||||
290
docs/basic-config.asciidoc
Normal file
290
docs/basic-config.asciidoc
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
[[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
|
||||||
|
})
|
||||||
|
----
|
||||||
@ -1,5 +1,5 @@
|
|||||||
[[breaking-changes]]
|
[[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
|
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
|
to install with `npm install elasticsearch` – you will encounter some breaking
|
||||||
@ -7,7 +7,7 @@ changes.
|
|||||||
|
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== Don’t panic!
|
==== Don’t panic!
|
||||||
|
|
||||||
Every breaking change was carefully weighed, and each is justified. Furthermore,
|
Every breaking change was carefully weighed, and each is justified. Furthermore,
|
||||||
the new codebase has been rewritten with modern JavaScript and has been
|
the new codebase has been rewritten with modern JavaScript and has been
|
||||||
@ -15,7 +15,7 @@ carefully designed to be easy to maintain.
|
|||||||
|
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== Breaking changes
|
==== Breaking changes
|
||||||
|
|
||||||
* Minimum supported version of Node.js is `v8`.
|
* Minimum supported version of Node.js is `v8`.
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ client.transport.request({
|
|||||||
----
|
----
|
||||||
|
|
||||||
[discrete]
|
[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
|
You can find a code snippet with the old client below followed by the same code
|
||||||
logic but with the new client.
|
logic but with the new client.
|
||||||
|
|||||||
@ -1,5 +1,301 @@
|
|||||||
[[changelog-client]]
|
[[changelog-client]]
|
||||||
== Changelog
|
== Release notes
|
||||||
|
|
||||||
|
[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 conten 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]
|
[discrete]
|
||||||
=== 7.10.0
|
=== 7.10.0
|
||||||
@ -10,14 +306,15 @@
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Support for Elasticsearch `v7.10`.
|
===== 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].
|
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]
|
[discrete]
|
||||||
===== Added proxy support https://github.com/elastic/elasticsearch-js/pull/1260[#1260]
|
===== 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 Elasticsearch, the client offers
|
If you need to pass through an http(s) proxy for connecting to {es}, the client
|
||||||
out of the box a handy configuration for helping you with it. Under the hood it
|
offers out of the box a handy configuration for helping you with it. Under the
|
||||||
uses the https://github.com/delvedor/hpagent[`hpagent`] module.
|
hood it uses the https://github.com/delvedor/hpagent[`hpagent`] module.
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -43,14 +340,16 @@ const client = new Client({
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Scroll search should clear the scroll at the end https://github.com/elastic/elasticsearch-js/pull/1331[#1331]
|
===== 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 Elasticsearch,
|
From now on the scroll search helper will automatically close the scroll on
|
||||||
by doing so, Elasticsearch will free resources faster.
|
{es}, by doing so, {es} will free resources faster.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
===== Handle connectivity issues while reading the body https://github.com/elastic/elasticsearch-js/pull/1343[#1343]
|
===== 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.
|
It might happen that the underlying socket stops working due to an external
|
||||||
This could lead to an unwanted `DeserialzationError`. From now, this will be handled as a generic `ConnectionError`.
|
cause while reading the body. This could lead to an unwanted
|
||||||
|
`DeserialzationError`. From now, this will be handled as a generic
|
||||||
|
`ConnectionError`.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
==== Warnings
|
==== Warnings
|
||||||
@ -58,12 +357,14 @@ This could lead to an unwanted `DeserialzationError`. From now, this will be han
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Add warning log about nodejs version support https://github.com/elastic/elasticsearch-js/pull/1349[#1349]
|
===== 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
|
`7.11` will be the last version of the client that will support Node.js v8,
|
||||||
the last one that supports Node.js v10. If you are eusing this versions you will see a
|
while `7.12` will be the last one that supports Node.js v10. If you are using
|
||||||
`DeprecationWaring` in your logs. We strongly recommend to upgrade to newer versions of Node.js
|
this versions you will see a `DeprecationWaring` in your logs. We strongly
|
||||||
as usng an EOL version will expose you to securty risks.
|
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.
|
Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for
|
||||||
|
additional information.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== 7.9.1
|
=== 7.9.1
|
||||||
@ -74,24 +375,33 @@ Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for additio
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Improve child performances https://github.com/elastic/elasticsearch-js/pull/1314[#1314]
|
===== 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.
|
The client code has been refactored to speed up the performances of the child
|
||||||
Before this pr, creating many children per second would have caused a high memory consumption and a spike in CPU usage.
|
method. Before this pr, creating many children per second would have caused a
|
||||||
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.
|
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].
|
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.
|
Finally, this change should also fix once and of all the bundlers support.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
===== Throw all errors asynchronously https://github.com/elastic/elasticsearch-js/pull/1295[#1295]
|
===== 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.
|
Some validation errors were thrown synchronously, causing the callback to be
|
||||||
This issue is known as _"The release fo Zalgo"_ (see https://blog.izs.me/2013/08/designing-apis-for-asynchrony[here]).
|
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]
|
[discrete]
|
||||||
===== Fix `maxRetries` request option handling https://github.com/elastic/elasticsearch-js/pull/1296[#1296]
|
===== 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.
|
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]
|
[discrete]
|
||||||
===== Fix RequestOptions.body type to include null https://github.com/elastic/elasticsearch-js/pull/1300[#1300]
|
===== Fix RequestOptions.body type to include null https://github.com/elastic/elasticsearch-js/pull/1300[#1300]
|
||||||
@ -101,8 +411,8 @@ The Connection requets option types were not accepting `null` as valid value.
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Fixed `size` and `maxRetries` parameters in helpers https://github.com/elastic/elasticsearch-js/pull/1284[#1284]
|
===== 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.
|
The `size` parameter was being passed too the scroll request, which was causing
|
||||||
`maxRetries` setted to 0 was resulting in no request at all.
|
an error. Value of `maxRetries` set to 0 was resulting in no request at all.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== 7.9.0
|
=== 7.9.0
|
||||||
@ -113,7 +423,7 @@ The `size` parameter was being passed too the scroll request, which was causing
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Add ability to disable the http agent https://github.com/elastic/elasticsearch-js/pull/1251[#1251]
|
===== 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`
|
If needed, the http agent can be disabled by setting it to `false`.
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -127,8 +437,9 @@ const client = new Client({
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Add support for a global context option https://github.com/elastic/elasticsearch-js/pull/1256[#1256]
|
===== 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.
|
Before this, you could set a `context` option in each request, but there was no
|
||||||
Now you can by configuring the `context` object in the global configuration, that will be merged with the local one.
|
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]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -155,7 +466,8 @@ import { Client } from '@elastic/elasticsearch'
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Allow the client name to be a symbol https://github.com/elastic/elasticsearch-js/pull/1254[#1254]
|
===== 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.
|
It was possible in plain JavaScript, but not in TypeScript, now you can do it in
|
||||||
|
TypeScript as well.
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -174,14 +486,18 @@ Only `Record<string, any>` was allowed. Now `string` is allowed as well.
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Fixed type definitions https://github.com/elastic/elasticsearch-js/pull/1263[#1263]
|
===== 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 `transport.request` defintion was incorrect, it was returning a
|
||||||
* The `refresh` parameter of most APIs was declared as `'true' | 'false' | 'wait_for'`, which was clunky. Now is `'wait_for' | boolean`.
|
`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]
|
[discrete]
|
||||||
===== Generate response type as boolean if the request is HEAD only https://github.com/elastic/elasticsearch-js/pull/1275[#1275]
|
===== 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
|
All HEAD request will have the body casted to a boolean value, `true` in case of
|
||||||
a 404 response. The type definitions were not reflecting this behavior.
|
a 200 response, `false` in case of a 404 response. The type definitions were not
|
||||||
|
reflecting this behavior.
|
||||||
|
|
||||||
[source,ts]
|
[source,ts]
|
||||||
----
|
----
|
||||||
@ -200,19 +516,24 @@ console.log(body) // either `true` or `false`
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Updated default http agent configuration https://github.com/elastic/elasticsearch-js/pull/1242[#1242]
|
===== 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
|
Added the scheduling: 'lifo' option to the default HTTP agent configuration to
|
||||||
against Elasticsearch and lowering the risk of encountering socket timeouts.
|
avoid maximizing the open sockets against {es} and lowering the risk of
|
||||||
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])
|
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]
|
[discrete]
|
||||||
===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245]
|
===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245]
|
||||||
|
|
||||||
This pr introduce two changes which should not impact the surface API:
|
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
|
* Refactored the `client.child` API to allocate fewer objects, this change
|
||||||
and improves the child creation performances by ~12%.
|
improves memory consumption over time and improves the child creation
|
||||||
* The client no longer inherits from the EventEmitter class, but instead has an internal event emitter and exposes
|
performances by ~12%.
|
||||||
only the API useful for the users, namely `emit, `on`, `once`, and `off`. The type definitions have been updated accordingly.
|
* 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]
|
[discrete]
|
||||||
=== 7.8.0
|
=== 7.8.0
|
||||||
@ -228,9 +549,11 @@ You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/r
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Added multi search helper https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
|
===== 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.
|
If you are sending search request at a high rate, this helper might be useful
|
||||||
It will use the mutli search API under the hood to batch the requests and improve the overall performances of your application. +
|
for you. It will use the mutli search API under the hood to batch the requests
|
||||||
The `result` exposes a `documents` property as well, which allows you to access directly the hits sources.
|
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]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -261,8 +584,11 @@ m.search(
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Added timeout support in bulk and msearch helpers https://github.com/elastic/elasticsearch-js/pull/1206[#1206]
|
===== 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.
|
If there is a slow producer, the bulk helper might send data with a very large
|
||||||
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.
|
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]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -271,7 +597,9 @@ 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]
|
[source,js]
|
||||||
----
|
----
|
||||||
@ -286,12 +614,17 @@ const m = client.helpers.msearch({
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Use filter_path for improving the search helpers performances https://github.com/elastic/elasticsearch-js/pull/1199[#1199]
|
===== 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]
|
[discrete]
|
||||||
===== Search helpers documents getter https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
|
===== 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 procees 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 process lazy,
|
||||||
|
resulting in better performances and lower memory impact.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== 7.7.1
|
=== 7.7.1
|
||||||
@ -302,13 +635,15 @@ Before this, the `documents` key that you can access in any search helper was co
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Disable client Helpers in Node.js < 10 - https://github.com/elastic/elasticsearch-js/pull/1194[#1194]
|
===== 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.
|
The client helpers can't be used in Node.js < 10 because it needs a custom flag
|
||||||
Given that not every provider allows the user to specify cuatom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
|
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.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
===== Force lowercase in all headers - https://github.com/elastic/elasticsearch-js/pull/1187[#1187]
|
===== 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]
|
[discrete]
|
||||||
=== 7.7.0
|
=== 7.7.0
|
||||||
@ -319,14 +654,17 @@ Now all the user-provided headers names will be lowercased by default, so there
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== Support for Elasticsearch `v7.7`.
|
===== 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]
|
[discrete]
|
||||||
===== Introduced client helpers - https://github.com/elastic/elasticsearch-js/pull/1107[#1107]
|
===== 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:
|
The following helpers has been introduced:
|
||||||
|
|
||||||
@ -338,13 +676,17 @@ The following helpers has been introduced:
|
|||||||
[discrete]
|
[discrete]
|
||||||
===== The `ConnectionPool.getConnection` now always returns a `Connection` - https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
|
===== 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.
|
What does this mean? It means that you will see less `NoLivingConnectionError`,
|
||||||
For improving the debugging experience, the `NoLivingConnectionsError` error message has been updated.
|
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]
|
[discrete]
|
||||||
===== Abortable promises - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
|
===== 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]
|
[source,js]
|
||||||
@ -365,7 +707,10 @@ promise.abort()
|
|||||||
[discrete]
|
[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]
|
===== 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]
|
[source,ts]
|
||||||
----
|
----
|
||||||
// request and response bodies are generics
|
// request and response bodies are generics
|
||||||
@ -376,7 +721,11 @@ client.search<SearchResponse>(...)
|
|||||||
client.search<SearchResponse, SearchBody>(...)
|
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]
|
[discrete]
|
||||||
==== Fixes
|
==== Fixes
|
||||||
@ -384,35 +733,51 @@ This *should* not be a breaking change, as every generics defaults to `any`. It
|
|||||||
[discrete]
|
[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]
|
===== 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]
|
[discrete]
|
||||||
===== `ConnectionPoolmarkDead` should ignore connections that no longer exists - https://github.com/elastic/elasticsearch-js/pull/1159[#1159]
|
===== `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 clint 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 client was adding the dead list a node that no longer exists, causing
|
||||||
|
unhandled exceptions later.
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
===== Do not retry a request if the body is a stream - https://github.com/elastic/elasticsearch-js/pull/1143[#1143]
|
===== 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.
|
The client should not retry if it's sending a stream body, because it should
|
||||||
Furthermore, copying everytime the stream is very an expensive operation.
|
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]
|
[discrete]
|
||||||
===== Return an error if the request has been aborted - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
|
===== 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]
|
[discrete]
|
||||||
=== 7.6.1
|
=== 7.6.1
|
||||||
|
|
||||||
**Fixes:**
|
**Fixes:**
|
||||||
|
|
||||||
- Secure json parsing - https://github.com/elastic/elasticsearch-js/pull/1110[#1110]
|
- Secure json parsing -
|
||||||
- ApiKey should take precedence over basic auth - https://github.com/elastic/elasticsearch-js/pull/1115[#1115]
|
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:**
|
**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]
|
[discrete]
|
||||||
=== 7.6.0
|
=== 7.6.0
|
||||||
@ -424,16 +789,23 @@ Support for Elasticsearch `v7.6`.
|
|||||||
|
|
||||||
**Fixes:**
|
**Fixes:**
|
||||||
|
|
||||||
- Skip compression in case of empty string body - https://github.com/elastic/elasticsearch-js/pull/1080[#1080]
|
- Skip compression in case of empty string body -
|
||||||
- Fix typo in NoLivingConnectionsError - https://github.com/elastic/elasticsearch-js/pull/1045[#1045]
|
https://github.com/elastic/elasticsearch-js/pull/1080[#1080]
|
||||||
- Change TransportRequestOptions.ignore to number[] - https://github.com/elastic/elasticsearch-js/pull/1053[#1053]
|
- Fix typo in NoLivingConnectionsError -
|
||||||
- ClientOptions["cloud"] should have optional auth fields - https://github.com/elastic/elasticsearch-js/pull/1032[#1032]
|
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:**
|
**Documentation:**
|
||||||
|
|
||||||
- Docs: Return super in example Transport subclass - https://github.com/elastic/elasticsearch-js/pull/980[#980]
|
- Docs: Return super in example Transport subclass -
|
||||||
- Add examples to reference - https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
|
https://github.com/elastic/elasticsearch-js/pull/980[#980]
|
||||||
- Added new examples - https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
|
- 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]
|
[discrete]
|
||||||
=== 7.5.0
|
=== 7.5.0
|
||||||
@ -451,16 +823,22 @@ Support for Elasticsearch `v7.4`.
|
|||||||
|
|
||||||
**Fixes:**
|
**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:**
|
**Documentation:**
|
||||||
|
|
||||||
- Updated API reference doc - https://github.com/elastic/elasticsearch-js/pull/945[#945] https://github.com/elastic/elasticsearch-js/pull/969[#969]
|
- Updated API reference doc -
|
||||||
- Fix inaccurate description sniffEndpoint - https://github.com/elastic/elasticsearch-js/pull/959[#959]
|
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:**
|
**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]
|
[discrete]
|
||||||
=== 7.3.0
|
=== 7.3.0
|
||||||
@ -469,21 +847,27 @@ Support for Elasticsearch `v7.3`.
|
|||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
|
|
||||||
- Added `auth` option - https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
- Added `auth` option -
|
||||||
- Added support for `ApiKey` authentication - https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
||||||
|
- Added support for `ApiKey` authentication -
|
||||||
|
https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
||||||
|
|
||||||
**Fixes:**
|
**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:**
|
**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:**
|
**Documentation:**
|
||||||
|
|
||||||
- Better reference code examples - https://github.com/elastic/elasticsearch-js/pull/920[#920]
|
- Better reference code examples -
|
||||||
- Improve README - https://github.com/elastic/elasticsearch-js/pull/909[#909]
|
https://github.com/elastic/elasticsearch-js/pull/920[#920]
|
||||||
|
- Improve README -
|
||||||
|
https://github.com/elastic/elasticsearch-js/pull/909[#909]
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== 7.2.0
|
=== 7.2.0
|
||||||
@ -492,7 +876,8 @@ Support for Elasticsearch `v7.2`
|
|||||||
|
|
||||||
**Fixes:**
|
**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]
|
[discrete]
|
||||||
=== 7.1.0
|
=== 7.1.0
|
||||||
@ -501,18 +886,28 @@ Support for Elasticsearch `v7.1`
|
|||||||
|
|
||||||
**Fixes:**
|
**Fixes:**
|
||||||
|
|
||||||
- Support for non-friendly chars in url username and password - https://github.com/elastic/elasticsearch-js/pull/858[#858]
|
- Support for non-friendly chars in url username and password -
|
||||||
- Patch deprecated parameters - https://github.com/elastic/elasticsearch-js/pull/851[#851]
|
https://github.com/elastic/elasticsearch-js/pull/858[#858]
|
||||||
|
- Patch deprecated parameters -
|
||||||
|
https://github.com/elastic/elasticsearch-js/pull/851[#851]
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
=== 7.0.1
|
=== 7.0.1
|
||||||
|
|
||||||
**Fixes:**
|
**Fixes:**
|
||||||
|
|
||||||
- Fix TypeScript export *(issue https://github.com/elastic/elasticsearch-js/pull/841[#841])* - https://github.com/elastic/elasticsearch-js/pull/842[#842]
|
- Fix TypeScript export *(issue
|
||||||
- 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]
|
https://github.com/elastic/elasticsearch-js/pull/841[#841])* -
|
||||||
- Fix TypeScript definiton *(issue https://github.com/elastic/elasticsearch-js/pull/803[#803])* - https://github.com/elastic/elasticsearch-js/pull/846[#846]
|
https://github.com/elastic/elasticsearch-js/pull/842[#842]
|
||||||
- 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 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]
|
[discrete]
|
||||||
=== 7.0.0
|
=== 7.0.0
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
[[child-client]]
|
[[child]]
|
||||||
== Creating a child client
|
=== Creating a child client
|
||||||
|
|
||||||
There are some use cases where you may need multiple instances of the 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
|
You can easily do that by calling `new Client()` as many times as you need, but
|
||||||
|
|||||||
@ -1,371 +1,12 @@
|
|||||||
[[client-configuration]]
|
[[client-configuration]]
|
||||||
== Client configuration
|
== Configuration
|
||||||
|
|
||||||
|
|
||||||
The client is designed to be easily configured for your needs. In the following
|
The client is designed to be easily configured for your needs. In the following
|
||||||
section, you can see the possible basic options that you can use to configure
|
section, you can see the possible options that you can use to configure it.
|
||||||
it.
|
|
||||||
|
|
||||||
[source,js]
|
* <<basic-config>>
|
||||||
----
|
* <<advanced-config>>
|
||||||
const { Client } = require('@elastic/elasticsearch')
|
* <<child>>
|
||||||
|
* <<extend>>
|
||||||
const client = new Client({
|
* <<client-testing>>
|
||||||
node: 'http://localhost:9200',
|
|
||||||
maxRetries: 5,
|
|
||||||
requestTimeout: 60000,
|
|
||||||
sniffOnStart: true
|
|
||||||
})
|
|
||||||
----
|
|
||||||
|
|
||||||
[discrete]
|
|
||||||
=== 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`
|
|
||||||
|
|
||||||
|`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'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
----
|
|
||||||
|
|
||||||
|===
|
|
||||||
|
|
||||||
|
|
||||||
[discrete]
|
|
||||||
=== 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
|
|
||||||
|
|
||||||
|
|
||||||
[discrete]
|
|
||||||
=== `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)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
[discrete]
|
|
||||||
=== `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
|
|
||||||
})
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
[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
|
|
||||||
})
|
|
||||||
----
|
|
||||||
|
|||||||
@ -8,8 +8,10 @@ This page contains the information you need to connect and use the Client with
|
|||||||
|
|
||||||
* <<auth-reference, Authentication options>>
|
* <<auth-reference, Authentication options>>
|
||||||
* <<client-usage, Using the client>>
|
* <<client-usage, Using the client>>
|
||||||
|
* <<client-faas-env, Using the Client in a Function-as-a-Service Environment>>
|
||||||
* <<client-connect-proxy, Connecting through a proxy>>
|
* <<client-connect-proxy, Connecting through a proxy>>
|
||||||
* <<client-error-handling, Handling errors>>
|
* <<client-error-handling, Handling errors>>
|
||||||
|
* <<product-check, Automatic product check>>
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
[[authentication]]
|
[[authentication]]
|
||||||
@ -59,11 +61,12 @@ const client = new Client({
|
|||||||
==== ApiKey authentication
|
==== ApiKey authentication
|
||||||
|
|
||||||
You can use the
|
You can use the
|
||||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[ApiKey]
|
{ref-7x}/security-api-create-api-key.html[ApiKey]
|
||||||
authentication by passing the `apiKey` parameter via the `auth` option. The
|
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
|
`apiKey` parameter can be either a base64 encoded string or an object with the
|
||||||
values that you can obtain from 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].
|
{ref-7x}/security-api-create-api-key.html[create api key endpoint].
|
||||||
|
|
||||||
|
|
||||||
NOTE: If you provide both basic authentication credentials and the ApiKey
|
NOTE: If you provide both basic authentication credentials and the ApiKey
|
||||||
configuration, the ApiKey takes precedence.
|
configuration, the ApiKey takes precedence.
|
||||||
@ -93,6 +96,26 @@ const client = new Client({
|
|||||||
})
|
})
|
||||||
----
|
----
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
[[auth-bearer]]
|
||||||
|
==== Bearer authentication
|
||||||
|
|
||||||
|
You can provide your credentials by passing the `bearer` token
|
||||||
|
parameter via the `auth` option.
|
||||||
|
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]
|
||||||
|
----
|
||||||
|
const { Client } = require('@elastic/elasticsearch')
|
||||||
|
const client = new Client({
|
||||||
|
node: 'https://localhost:9200',
|
||||||
|
auth: {
|
||||||
|
bearer: 'token'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
----
|
||||||
|
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
[[auth-basic]]
|
[[auth-basic]]
|
||||||
@ -156,6 +179,29 @@ const client = new Client({
|
|||||||
})
|
})
|
||||||
----
|
----
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
[[auth-ca-fingerprint]]
|
||||||
|
==== CA fingerprint
|
||||||
|
|
||||||
|
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]
|
[discrete]
|
||||||
[[client-usage]]
|
[[client-usage]]
|
||||||
=== Usage
|
=== Usage
|
||||||
@ -373,8 +419,87 @@ _Default:_ `null`
|
|||||||
|`context`
|
|`context`
|
||||||
|`any` - Custom object per request. _(you can use it to pass data to the clients events)_ +
|
|`any` - Custom object per request. _(you can use it to pass data to the clients events)_ +
|
||||||
_Default:_ `null`
|
_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]
|
||||||
|
[[client-faas-env]]
|
||||||
|
=== Using the Client in a Function-as-a-Service Environment
|
||||||
|
|
||||||
|
This section illustrates the best practices for leveraging the {es} client in a Function-as-a-Service (FaaS) environment.
|
||||||
|
The most influential optimization is to initialize the client outside of the function, the global scope.
|
||||||
|
This practice does not only improve performance but also enables background functionality as – for example – https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[sniffing].
|
||||||
|
The following examples provide a skeleton for the best practices.
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
==== GCP Cloud Functions
|
||||||
|
|
||||||
|
[source,js]
|
||||||
|
----
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
const { Client } = require('@elastic/elasticsearch')
|
||||||
|
|
||||||
|
const client = new Client({
|
||||||
|
// client initialisation
|
||||||
|
})
|
||||||
|
|
||||||
|
exports.testFunction = async function (req, res) {
|
||||||
|
// use the client
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
==== AWS Lambda
|
||||||
|
|
||||||
|
[source,js]
|
||||||
|
----
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
const { Client } = require('@elastic/elasticsearch')
|
||||||
|
|
||||||
|
const client = new Client({
|
||||||
|
// client initialisation
|
||||||
|
})
|
||||||
|
|
||||||
|
exports.handler = async function (event, context) {
|
||||||
|
// use the client
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
==== Azure Functions
|
||||||
|
|
||||||
|
[source,js]
|
||||||
|
----
|
||||||
|
'use strict'
|
||||||
|
|
||||||
|
const { Client } = require('@elastic/elasticsearch')
|
||||||
|
|
||||||
|
const client = new Client({
|
||||||
|
// client initialisation
|
||||||
|
})
|
||||||
|
|
||||||
|
module.exports = async function (context, req) {
|
||||||
|
// use the client
|
||||||
|
}
|
||||||
|
----
|
||||||
|
|
||||||
|
Resources used to assess these recommendations:
|
||||||
|
|
||||||
|
- https://cloud.google.com/functions/docs/bestpractices/tips#use_global_variables_to_reuse_objects_in_future_invocations[GCP Cloud Functions: Tips & Tricks]
|
||||||
|
- https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html[Best practices for working with AWS Lambda functions]
|
||||||
|
- https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=azurecli-linux%2Capplication-level#global-variables[Azure Functions Python developer guide]
|
||||||
|
- https://docs.aws.amazon.com/lambda/latest/operatorguide/global-scope.html[AWS Lambda: Comparing the effect of global scope]
|
||||||
|
|
||||||
|
|
||||||
[discrete]
|
[discrete]
|
||||||
[[client-connect-proxy]]
|
[[client-connect-proxy]]
|
||||||
@ -497,3 +622,15 @@ a|* `name` - `string`
|
|||||||
* `statusCode` - `object`, the response headers
|
* `statusCode` - `object`, the response headers
|
||||||
* `headers` - `object`, the response status code
|
* `headers` - `object`, the response status code
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
[discrete]
|
||||||
|
[[product-check]]
|
||||||
|
=== Automatic product check
|
||||||
|
|
||||||
|
Since v7.14.0, the client performs a required product check before the first call.
|
||||||
|
This pre-flight product check allows the client to establish the version of Elasticsearch
|
||||||
|
that it is communicating with. The product check requires one additional HTTP request to
|
||||||
|
be sent to the server as part of the request pipeline before the main API call is sent.
|
||||||
|
In most cases, this will succeed during the very first API call that the client sends.
|
||||||
|
Once the product check completes, no further product check HTTP requests are sent for
|
||||||
|
subsequent API calls.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user