Compare commits
123 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3a3530e000 | |||
| ef7e95a939 | |||
| f2a00082f9 | |||
| 8634de2170 | |||
| 68f93feb01 | |||
| 1d5b8fa5c2 | |||
| 649f95afca | |||
| 5e18738921 | |||
| 38b7350f69 | |||
| 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 | |||
| f135ba7da2 | |||
| 39ce8778a5 | |||
| 48762f12ec | |||
| 07bcd62285 | |||
| 29ee3ec582 | |||
| fbaa502cd3 | |||
| 07faf09aaf | |||
| afc6249fd2 | |||
| b4e2b05c2d | |||
| 92f31d467c | |||
| d32c8bca81 | |||
| e9ad12ba67 | |||
| 27458b39b1 | |||
| 6e61ae236c | |||
| cbfb9616a0 | |||
| a4f66d7f4a | |||
| 3cb336be67 | |||
| 5490114ea9 | |||
| 94e8bcd611 | |||
| 4b8077b40d | |||
| 3e60b6726d | |||
| c1dfb013ef | |||
| 18b62b41aa |
@ -4,6 +4,10 @@ FROM node:${NODE_JS_VERSION}
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apt-get clean -y
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y zip
|
||||
|
||||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
@ -18,7 +18,7 @@ require_stack_version
|
||||
if [[ -z $es_node_name ]]; then
|
||||
# only set these once
|
||||
set -euo pipefail
|
||||
export TEST_SUITE=${TEST_SUITE-oss}
|
||||
export TEST_SUITE=${TEST_SUITE-free}
|
||||
export RUNSCRIPTS=${RUNSCRIPTS-}
|
||||
export DETACH=${DETACH-false}
|
||||
export CLEANUP=${CLEANUP-false}
|
||||
@ -27,8 +27,7 @@ if [[ -z $es_node_name ]]; then
|
||||
export elastic_password=changeme
|
||||
export elasticsearch_image=elasticsearch
|
||||
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
|
||||
if [[ $TEST_SUITE != "xpack" ]]; then
|
||||
export elasticsearch_image=elasticsearch-${TEST_SUITE}
|
||||
if [[ $TEST_SUITE != "platinum" ]]; then
|
||||
export elasticsearch_url=http://${es_node_name}:9200
|
||||
fi
|
||||
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
# to form a cluster suitable for running the REST API tests.
|
||||
#
|
||||
# Export the STACK_VERSION variable, eg. '8.0.0-SNAPSHOT'.
|
||||
# Export the TEST_SUITE variable, eg. 'oss' or 'xpack' defaults to 'oss'.
|
||||
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
|
||||
# Export the NUMBER_OF_NODES variable to start more than 1 node
|
||||
|
||||
# Version 1.2.0
|
||||
# Version 1.4.0
|
||||
# - Initial version of the run-elasticsearch.sh script
|
||||
# - Deleting the volume should not dependent on the container still running
|
||||
# - Fixed `ES_JAVA_OPTS` config
|
||||
@ -15,6 +15,9 @@
|
||||
# - Refactored into functions and imports
|
||||
# - Support NUMBER_OF_NODES
|
||||
# - Added 5 retries on docker pull for fixing transient network errors
|
||||
# - Added flags to make local CCR configurations work
|
||||
# - Added action.destructive_requires_name=false as the default will be true in v8
|
||||
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
|
||||
|
||||
script_path=$(dirname $(realpath -s $0))
|
||||
source $script_path/functions/imports.sh
|
||||
@ -37,9 +40,11 @@ environment=($(cat <<-END
|
||||
--env node.attr.testattr=test
|
||||
--env path.repo=/tmp
|
||||
--env repositories.url.allowed_urls=http://snapshot.test*
|
||||
--env action.destructive_requires_name=false
|
||||
--env ingest.geoip.downloader.enabled=false
|
||||
END
|
||||
))
|
||||
if [[ "$TEST_SUITE" == "xpack" ]]; then
|
||||
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
||||
environment+=($(cat <<-END
|
||||
--env ELASTIC_PASSWORD=$elastic_password
|
||||
--env xpack.license.self_generated.type=trial
|
||||
@ -50,6 +55,7 @@ if [[ "$TEST_SUITE" == "xpack" ]]; then
|
||||
--env xpack.security.http.ssl.certificate=certs/testnode.crt
|
||||
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
|
||||
--env xpack.security.transport.ssl.enabled=true
|
||||
--env xpack.security.transport.ssl.verification_mode=certificate
|
||||
--env xpack.security.transport.ssl.key=certs/testnode.key
|
||||
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
|
||||
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
|
||||
@ -64,7 +70,7 @@ END
|
||||
fi
|
||||
|
||||
cert_validation_flags=""
|
||||
if [[ "$TEST_SUITE" == "xpack" ]]; then
|
||||
if [[ "$TEST_SUITE" == "platinum" ]]; then
|
||||
cert_validation_flags="--insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name}:443:127.0.0.1"
|
||||
fi
|
||||
|
||||
@ -104,7 +110,7 @@ END
|
||||
docker run \
|
||||
--name "$node_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[@]}" \
|
||||
"${volumes[@]}" \
|
||||
--publish "$http_port":9200 \
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# parameters are available to this script
|
||||
|
||||
# STACK_VERSION -- version e.g Major.Minor.Patch(-Prelease)
|
||||
# TEST_SUITE -- which test suite to run: oss or xpack
|
||||
# TEST_SUITE -- which test suite to run: free or platinum
|
||||
# ELASTICSEARCH_URL -- The url at which elasticsearch is reachable, a default is composed based on STACK_VERSION and TEST_SUITE
|
||||
# NODE_JS_VERSION -- node js version (defined in test-matrix.yml, a default is hardcoded here)
|
||||
script_path=$(dirname $(realpath -s $0))
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
---
|
||||
STACK_VERSION:
|
||||
- 7.x-SNAPSHOT
|
||||
- 7.15.0-SNAPSHOT
|
||||
|
||||
NODE_JS_VERSION:
|
||||
- 16
|
||||
- 14
|
||||
- 12
|
||||
- 10
|
||||
- 8
|
||||
|
||||
TEST_SUITE:
|
||||
- oss
|
||||
- xpack
|
||||
- free
|
||||
- platinum
|
||||
|
||||
exclude: ~
|
||||
|
||||
37
.github/workflows/nodejs.yml
vendored
37
.github/workflows/nodejs.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 14.x]
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
@ -40,38 +40,13 @@ jobs:
|
||||
run: |
|
||||
npm run test:types
|
||||
|
||||
test-node-v8:
|
||||
name: Test
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x]
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
npm install
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
npm run test:node8
|
||||
|
||||
helpers-integration-test:
|
||||
name: Helpers integration test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x, 12.x, 14.x]
|
||||
node-version: [12.x, 14.x, 16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -86,7 +61,7 @@ jobs:
|
||||
- name: Runs Elasticsearch
|
||||
uses: elastic/elastic-github-actions/elasticsearch@master
|
||||
with:
|
||||
stack-version: 7.x-SNAPSHOT
|
||||
stack-version: 7.15.0-SNAPSHOT
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
@ -118,7 +93,7 @@ jobs:
|
||||
- name: Runs Elasticsearch
|
||||
uses: elastic/elastic-github-actions/elasticsearch@master
|
||||
with:
|
||||
stack-version: 8.0.0-SNAPSHOT
|
||||
stack-version: 7.15.0-SNAPSHOT
|
||||
|
||||
- name: Use Node.js 14.x
|
||||
uses: actions/setup-node@v1
|
||||
@ -150,7 +125,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -184,7 +159,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
node-version: [14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -60,3 +60,4 @@ test/benchmarks/macro/fixtures/*
|
||||
.cache
|
||||
|
||||
test/bundlers/**/bundle.js
|
||||
test/bundlers/parcel-test/.parcel-cache
|
||||
|
||||
@ -70,3 +70,7 @@ certs
|
||||
.github
|
||||
CODE_OF_CONDUCT.md
|
||||
CONTRIBUTING.md
|
||||
|
||||
# CANARY-PACKAGE
|
||||
api/kibana.d.ts
|
||||
# /CANARY-PACKAGE
|
||||
|
||||
33
README.md
33
README.md
@ -26,11 +26,36 @@ The official Node.js client for Elasticsearch.
|
||||
npm install @elastic/elasticsearch
|
||||
```
|
||||
|
||||
### Node.js support
|
||||
|
||||
NOTE: The minimum supported version of Node.js is `v10`.
|
||||
|
||||
The client versioning follows the Elastc Stack versioning, this means that
|
||||
major, minor, and patch releases are done following a precise schedule that
|
||||
often does not coincide with the [Node.js release](https://nodejs.org/en/about/releases/) times.
|
||||
|
||||
To avoid support insecure and unsupported versions of Node.js, the
|
||||
client **will drop the support of EOL versions of Node.js between minor releases**.
|
||||
Typically, as soon as a Node.js version goes into EOL, the client will continue
|
||||
to support that version for at least another minor release. If you are using the client
|
||||
with a version of Node.js that will be unsupported soon, you will see a warning
|
||||
in your logs (the client will start logging the warning with two minors in advance).
|
||||
|
||||
Unless you are **always** using a supported version of Node.js,
|
||||
we recommend defining the client dependency in your
|
||||
`package.json` with the `~` instead of `^`. In this way, you will lock the
|
||||
dependency on the minor release and not the major. (for example, `~7.10.0` instead
|
||||
of `^7.10.0`).
|
||||
|
||||
| Node.js Version | Node.js EOL date | End of support |
|
||||
| --------------- |------------------| ---------------------- |
|
||||
| `8.x` | `December 2019` | `7.11` (early 2021) |
|
||||
| `10.x` | `Apri 2021` | `7.12` (mid 2021) |
|
||||
|
||||
### Compatibility
|
||||
|
||||
The minimum supported version of Node.js is `v8`.
|
||||
|
||||
The library is compatible with all Elasticsearch versions since 5.x, and you should use the same major version of the Elasticsearch instance that you are using.
|
||||
Language clients are forward compatible; meaning that clients support communicating with greater minor versions of Elasticsearch.
|
||||
Elastic language clients are also backwards compatible with lesser supported minor Elasticsearch versions.
|
||||
|
||||
| Elasticsearch Version | Client Version |
|
||||
| --------------------- |----------------|
|
||||
@ -47,7 +72,7 @@ npm install @elastic/elasticsearch@<major>
|
||||
#### Browser
|
||||
|
||||
WARNING: There is no official support for the browser environment. It exposes your Elasticsearch instance to everyone, which could lead to security issues.
|
||||
We recommend that you write a lightweight proxy that uses this client instead.
|
||||
We recommend that you write a lightweight proxy that uses this client instead, you can see a proxy example [here](./docs/examples/proxy).
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', typedKeys: 'typed_keys', keepOnCompletion: 'keep_on_completion', batchedReduceSize: 'batched_reduce_size', requestCache: 'request_cache', analyzeWildcard: 'analyze_wildcard', 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', _sourceIncludes: '_source_includes', 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', seqNoPrimaryTerm: 'seq_no_primary_term', maxConcurrentShardRequests: 'max_concurrent_shard_requests' }
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion_timeout', 'keep_alive', 'typed_keys', 'keep_on_completion', 'batched_reduce_size', 'request_cache', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', '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', 'version', 'seq_no_primary_term', 'max_concurrent_shard_requests']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletionTimeout: 'wait_for_completion_timeout', keepAlive: 'keep_alive', typedKeys: 'typed_keys', keepOnCompletion: 'keep_on_completion', batchedReduceSize: 'batched_reduce_size', requestCache: 'request_cache', analyzeWildcard: 'analyze_wildcard', 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', seqNoPrimaryTerm: 'seq_no_primary_term', maxConcurrentShardRequests: 'max_concurrent_shard_requests' }
|
||||
|
||||
function AsyncSearchApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -35,15 +35,15 @@ AsyncSearchApi.prototype.delete = function asyncSearchDeleteApi (params, options
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -62,15 +62,15 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_async_search' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -85,13 +85,40 @@ AsyncSearchApi.prototype.get = function asyncSearchGetApi (params, options, call
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
AsyncSearchApi.prototype.status = function asyncSearchStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_async_search' + '/' + 'status' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
AsyncSearchApi.prototype.submit = function asyncSearchSubmitApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_async_search'
|
||||
|
||||
@ -35,15 +35,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -58,15 +58,15 @@ AutoscalingApi.prototype.deleteAutoscalingPolicy = function autoscalingDeleteAut
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
AutoscalingApi.prototype.getAutoscalingDecision = function autoscalingGetAutoscalingDecisionApi (params, options, callback) {
|
||||
AutoscalingApi.prototype.getAutoscalingCapacity = function autoscalingGetAutoscalingCapacityApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_autoscaling' + '/' + 'decision'
|
||||
path = '/' + '_autoscaling' + '/' + 'capacity'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
@ -83,15 +83,15 @@ AutoscalingApi.prototype.getAutoscalingPolicy = function autoscalingGetAutoscali
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -110,19 +110,19 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -139,7 +139,7 @@ AutoscalingApi.prototype.putAutoscalingPolicy = function autoscalingPutAutoscali
|
||||
|
||||
Object.defineProperties(AutoscalingApi.prototype, {
|
||||
delete_autoscaling_policy: { get () { return this.deleteAutoscalingPolicy } },
|
||||
get_autoscaling_decision: { get () { return this.getAutoscalingDecision } },
|
||||
get_autoscaling_capacity: { get () { return this.getAutoscalingCapacity } },
|
||||
get_autoscaling_policy: { get () { return this.getAutoscalingPolicy } },
|
||||
put_autoscaling_policy: { get () { return this.putAutoscalingPolicy } }
|
||||
})
|
||||
|
||||
@ -23,28 +23,28 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_includes', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['wait_for_active_shards', 'refresh', 'routing', 'timeout', 'type', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pipeline', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function bulkApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
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 */
|
||||
|
||||
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', 'node_id', 'actions', 'parent_task', 'size', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from']
|
||||
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', fullId: 'full_id', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', nodeId: 'node_id', parentTask: 'parent_task', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs' }
|
||||
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'allow_no_match', 'allow_no_datafeeds', 'allow_no_jobs', 'from', 'size', 'full_id', 'include_bootstrap', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'nodes', 'actions', 'parent_task_id']
|
||||
const snakeCase = { expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', includeUnloadedSegments: 'include_unloaded_segments', allowNoMatch: 'allow_no_match', allowNoDatafeeds: 'allow_no_datafeeds', allowNoJobs: 'allow_no_jobs', fullId: 'full_id', includeBootstrap: 'include_bootstrap', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', parentTaskId: 'parent_task_id' }
|
||||
|
||||
function CatApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -34,10 +34,10 @@ function CatApi (transport, ConfigurationError) {
|
||||
CatApi.prototype.aliases = function catAliasesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name)
|
||||
@ -60,10 +60,10 @@ CatApi.prototype.aliases = function catAliasesApi (params, options, callback) {
|
||||
CatApi.prototype.allocation = function catAllocationApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, nodeId, node_id, ...querystring } = params
|
||||
let { method, body, nodeId, node_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId)
|
||||
@ -86,10 +86,10 @@ CatApi.prototype.allocation = function catAllocationApi (params, options, callba
|
||||
CatApi.prototype.count = function catCountApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index)
|
||||
@ -112,10 +112,10 @@ CatApi.prototype.count = function catCountApi (params, options, callback) {
|
||||
CatApi.prototype.fielddata = function catFielddataApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, fields, ...querystring } = params
|
||||
let { method, body, fields, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((fields) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields)
|
||||
@ -138,10 +138,10 @@ CatApi.prototype.fielddata = function catFielddataApi (params, options, callback
|
||||
CatApi.prototype.health = function catHealthApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'health'
|
||||
|
||||
@ -159,10 +159,10 @@ CatApi.prototype.health = function catHealthApi (params, options, callback) {
|
||||
CatApi.prototype.help = function catHelpApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat'
|
||||
|
||||
@ -180,10 +180,10 @@ CatApi.prototype.help = function catHelpApi (params, options, callback) {
|
||||
CatApi.prototype.indices = function catIndicesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index)
|
||||
@ -206,10 +206,10 @@ CatApi.prototype.indices = function catIndicesApi (params, options, callback) {
|
||||
CatApi.prototype.master = function catMasterApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'master'
|
||||
|
||||
@ -224,295 +224,13 @@ CatApi.prototype.master = function catMasterApi (params, 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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((datafeed_id || datafeedId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((job_id || jobId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((model_id || modelId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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)
|
||||
}
|
||||
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((transform_id || transformId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cat' + '/' + 'transforms' + '/' + encodeURIComponent(transform_id || transformId)
|
||||
@ -637,12 +637,12 @@ CatApi.prototype.transforms = function catTransformsApi (params, options, callba
|
||||
}
|
||||
|
||||
Object.defineProperties(CatApi.prototype, {
|
||||
pending_tasks: { get () { return this.pendingTasks } },
|
||||
thread_pool: { get () { return this.threadPool } },
|
||||
ml_data_frame_analytics: { get () { return this.mlDataFrameAnalytics } },
|
||||
ml_datafeeds: { get () { return this.mlDatafeeds } },
|
||||
ml_jobs: { get () { return this.mlJobs } },
|
||||
ml_trained_models: { get () { return this.mlTrainedModels } }
|
||||
ml_trained_models: { get () { return this.mlTrainedModels } },
|
||||
pending_tasks: { get () { return this.pendingTasks } },
|
||||
thread_pool: { get () { return this.threadPool } }
|
||||
})
|
||||
|
||||
module.exports = CatApi
|
||||
|
||||
@ -35,15 +35,15 @@ CcrApi.prototype.deleteAutoFollowPattern = function ccrDeleteAutoFollowPatternAp
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -62,19 +62,19 @@ CcrApi.prototype.follow = function ccrFollowApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'follow'
|
||||
|
||||
@ -93,15 +93,15 @@ CcrApi.prototype.followInfo = function ccrFollowInfoApi (params, options, callba
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'info'
|
||||
|
||||
@ -120,15 +120,15 @@ CcrApi.prototype.followStats = function ccrFollowStatsApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'stats'
|
||||
|
||||
@ -147,19 +147,19 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'forget_follower'
|
||||
|
||||
@ -177,10 +177,10 @@ CcrApi.prototype.forgetFollower = function ccrForgetFollowerApi (params, options
|
||||
CcrApi.prototype.getAutoFollowPattern = function ccrGetAutoFollowPatternApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||
@ -204,15 +204,15 @@ CcrApi.prototype.pauseAutoFollowPattern = function ccrPauseAutoFollowPatternApi
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'pause'
|
||||
|
||||
@ -231,15 +231,15 @@ CcrApi.prototype.pauseFollow = function ccrPauseFollowApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'pause_follow'
|
||||
|
||||
@ -258,19 +258,19 @@ CcrApi.prototype.putAutoFollowPattern = function ccrPutAutoFollowPatternApi (par
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -289,15 +289,15 @@ CcrApi.prototype.resumeAutoFollowPattern = function ccrResumeAutoFollowPatternAp
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ccr' + '/' + 'auto_follow' + '/' + encodeURIComponent(name) + '/' + 'resume'
|
||||
|
||||
@ -316,15 +316,15 @@ CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'resume_follow'
|
||||
|
||||
@ -342,10 +342,10 @@ CcrApi.prototype.resumeFollow = function ccrResumeFollowApi (params, options, ca
|
||||
CcrApi.prototype.stats = function ccrStatsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ccr' + '/' + 'stats'
|
||||
|
||||
@ -364,15 +364,15 @@ CcrApi.prototype.unfollow = function ccrUnfollowApi (params, options, callback)
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ccr' + '/' + 'unfollow'
|
||||
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function clearScrollApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((scroll_id || scrollId) != null) {
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function closePointInTimeApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_pit'
|
||||
|
||||
|
||||
@ -34,10 +34,10 @@ function ClusterApi (transport, ConfigurationError) {
|
||||
ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'
|
||||
|
||||
@ -56,15 +56,15 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -82,10 +82,10 @@ ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTe
|
||||
ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
|
||||
|
||||
@ -104,15 +104,15 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -130,10 +130,10 @@ ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTe
|
||||
ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||
@ -156,10 +156,10 @@ ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplate
|
||||
ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'settings'
|
||||
|
||||
@ -177,10 +177,10 @@ ClusterApi.prototype.getSettings = function clusterGetSettingsApi (params, optio
|
||||
ClusterApi.prototype.health = function clusterHealthApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index)
|
||||
@ -203,10 +203,10 @@ ClusterApi.prototype.health = function clusterHealthApi (params, options, callba
|
||||
ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'pending_tasks'
|
||||
|
||||
@ -224,10 +224,10 @@ ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi (params, opt
|
||||
ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_cluster' + '/' + 'voting_config_exclusions'
|
||||
|
||||
@ -246,19 +246,19 @@ ClusterApi.prototype.putComponentTemplate = function clusterPutComponentTemplate
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_component_template' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -277,15 +277,15 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_cluster' + '/' + 'settings'
|
||||
|
||||
@ -303,10 +303,10 @@ ClusterApi.prototype.putSettings = function clusterPutSettingsApi (params, optio
|
||||
ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_remote' + '/' + 'info'
|
||||
|
||||
@ -324,10 +324,10 @@ ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi (params, options
|
||||
ClusterApi.prototype.reroute = function clusterRerouteApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_cluster' + '/' + 'reroute'
|
||||
|
||||
@ -346,15 +346,15 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params['index'] != null && (params['metric'] == null)) {
|
||||
if (params.index != null && (params.metric == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: metric')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, metric, index, ...querystring } = params
|
||||
let { method, body, metric, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((metric) != null && (index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index)
|
||||
@ -380,10 +380,10 @@ ClusterApi.prototype.state = function clusterStateApi (params, options, callback
|
||||
ClusterApi.prototype.stats = function clusterStatsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, nodeId, node_id, ...querystring } = params
|
||||
let { method, body, nodeId, node_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_cluster' + '/' + 'stats' + '/' + 'nodes' + '/' + encodeURIComponent(node_id || nodeId)
|
||||
|
||||
@ -30,15 +30,15 @@ function countApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'
|
||||
|
||||
@ -30,23 +30,23 @@ function createApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_create'
|
||||
|
||||
@ -35,15 +35,15 @@ DanglingIndicesApi.prototype.deleteDanglingIndex = function danglingIndicesDelet
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index_uuid'] == null && params['indexUuid'] == null) {
|
||||
if (params.index_uuid == null && params.indexUuid == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, indexUuid, index_uuid, ...querystring } = params
|
||||
let { method, body, indexUuid, index_uuid, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
|
||||
|
||||
@ -62,15 +62,15 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index_uuid'] == null && params['indexUuid'] == null) {
|
||||
if (params.index_uuid == null && params.indexUuid == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index_uuid or indexUuid')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, indexUuid, index_uuid, ...querystring } = params
|
||||
let { method, body, indexUuid, index_uuid, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid)
|
||||
|
||||
@ -88,10 +88,10 @@ DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImpor
|
||||
DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_dangling'
|
||||
|
||||
|
||||
@ -30,19 +30,19 @@ function deleteApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -23,32 +23,32 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_includes', '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', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function deleteByQueryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'
|
||||
|
||||
@ -30,19 +30,19 @@ function deleteByQueryRethrottleApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['task_id'] == null && params['taskId'] == null) {
|
||||
if (params.task_id == null && params.taskId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
|
||||
if (params.requests_per_second == null && params.requestsPerSecond == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, taskId, task_id, ...querystring } = params
|
||||
let { method, body, taskId, task_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
||||
|
||||
|
||||
@ -35,15 +35,15 @@ EnrichApi.prototype.deletePolicy = function enrichDeletePolicyApi (params, optio
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -62,15 +62,15 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name) + '/' + '_execute'
|
||||
|
||||
@ -88,10 +88,10 @@ EnrichApi.prototype.executePolicy = function enrichExecutePolicyApi (params, opt
|
||||
EnrichApi.prototype.getPolicy = function enrichGetPolicyApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
@ -115,19 +115,19 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_enrich' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -145,10 +145,10 @@ EnrichApi.prototype.putPolicy = function enrichPutPolicyApi (params, options, ca
|
||||
EnrichApi.prototype.stats = function enrichStatsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_enrich' + '/' + '_stats'
|
||||
|
||||
|
||||
@ -35,15 +35,15 @@ EqlApi.prototype.delete = function eqlDeleteApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -62,15 +62,15 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_eql' + '/' + 'search' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -85,23 +85,50 @@ EqlApi.prototype.get = function eqlGetApi (params, options, callback) {
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
EqlApi.prototype.getStatus = function eqlGetStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_eql' + '/' + 'search' + '/' + 'status' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_eql' + '/' + 'search'
|
||||
|
||||
@ -116,4 +143,8 @@ EqlApi.prototype.search = function eqlSearchApi (params, options, callback) {
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
Object.defineProperties(EqlApi.prototype, {
|
||||
get_status: { get () { return this.getStatus } }
|
||||
})
|
||||
|
||||
module.exports = EqlApi
|
||||
|
||||
@ -23,26 +23,26 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function existsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -23,35 +23,35 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function existsSourceApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['id'] != null && (params['type'] == null || params['index'] == null)) {
|
||||
if (params.id != null && (params.type == null || params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: type, index')
|
||||
return handleError(err, callback)
|
||||
} else if (params['type'] != null && (params['index'] == null)) {
|
||||
} else if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_source'
|
||||
|
||||
@ -23,26 +23,26 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyze_wildcard', 'analyzer', 'default_operator', 'df', 'stored_fields', 'lenient', 'preference', 'q', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function explainApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_field_caps'
|
||||
|
||||
65
api/api/fleet.js
Normal file
65
api/api/fleet.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 = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForAdvance: 'wait_for_advance', waitForIndex: 'wait_for_index', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
Object.defineProperties(FleetApi.prototype, {
|
||||
global_checkpoints: { get () { return this.globalCheckpoints } }
|
||||
})
|
||||
|
||||
module.exports = FleetApi
|
||||
@ -23,26 +23,26 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function getApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -30,15 +30,15 @@ function getScriptApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id)
|
||||
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function getScriptContextApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_script_context'
|
||||
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function getScriptLanguagesApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_script_language'
|
||||
|
||||
|
||||
@ -23,26 +23,26 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'version', 'version_type', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', versionType: 'version_type', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function getSourceApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_graph' + '/' + 'explore'
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', onlyManaged: 'only_managed', onlyErrors: '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', dryRun: 'dry_run' }
|
||||
|
||||
function IlmApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -35,15 +35,15 @@ IlmApi.prototype.deleteLifecycle = function ilmDeleteLifecycleApi (params, optio
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['policy'] == null) {
|
||||
if (params.policy == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, policy, ...querystring } = params
|
||||
let { method, body, policy, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||
|
||||
@ -62,15 +62,15 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'explain'
|
||||
|
||||
@ -88,10 +88,10 @@ IlmApi.prototype.explainLifecycle = function ilmExplainLifecycleApi (params, opt
|
||||
IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, policy, ...querystring } = params
|
||||
let { method, body, policy, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((policy) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||
@ -114,10 +114,10 @@ IlmApi.prototype.getLifecycle = function ilmGetLifecycleApi (params, options, ca
|
||||
IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ilm' + '/' + 'status'
|
||||
|
||||
@ -132,19 +132,40 @@ IlmApi.prototype.getStatus = function ilmGetStatusApi (params, options, callback
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IlmApi.prototype.migrateToDataTiers = function ilmMigrateToDataTiersApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ilm' + '/' + 'migrate_to_data_tiers'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IlmApi.prototype.moveToStep = function ilmMoveToStepApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ilm' + '/' + 'move' + '/' + encodeURIComponent(index)
|
||||
|
||||
@ -163,15 +184,15 @@ IlmApi.prototype.putLifecycle = function ilmPutLifecycleApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['policy'] == null) {
|
||||
if (params.policy == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: policy')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, policy, ...querystring } = params
|
||||
let { method, body, policy, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_ilm' + '/' + 'policy' + '/' + encodeURIComponent(policy)
|
||||
|
||||
@ -190,15 +211,15 @@ IlmApi.prototype.removePolicy = function ilmRemovePolicyApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_ilm' + '/' + 'remove'
|
||||
|
||||
@ -217,15 +238,15 @@ IlmApi.prototype.retry = function ilmRetryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ilm' + '/' + 'start'
|
||||
|
||||
@ -264,10 +285,10 @@ IlmApi.prototype.start = function ilmStartApi (params, options, callback) {
|
||||
IlmApi.prototype.stop = function ilmStopApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_ilm' + '/' + 'stop'
|
||||
|
||||
@ -287,6 +308,7 @@ Object.defineProperties(IlmApi.prototype, {
|
||||
explain_lifecycle: { get () { return this.explainLifecycle } },
|
||||
get_lifecycle: { get () { return this.getLifecycle } },
|
||||
get_status: { get () { return this.getStatus } },
|
||||
migrate_to_data_tiers: { get () { return this.migrateToDataTiers } },
|
||||
move_to_step: { get () { return this.moveToStep } },
|
||||
put_lifecycle: { get () { return this.putLifecycle } },
|
||||
remove_policy: { get () { return this.removePolicy } }
|
||||
|
||||
@ -30,19 +30,19 @@ function indexApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function infoApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/'
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
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', 'verbose']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function IngestApi (transport, ConfigurationError) {
|
||||
@ -35,15 +35,15 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -58,13 +58,34 @@ IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi (params, o
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IngestApi.prototype.geoIpStats = function ingestGeoIpStatsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ingest' + '/' + 'geoip' + '/' + 'stats'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
||||
@ -87,10 +108,10 @@ IngestApi.prototype.getPipeline = function ingestGetPipelineApi (params, options
|
||||
IngestApi.prototype.processorGrok = function ingestProcessorGrokApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok'
|
||||
|
||||
@ -109,19 +130,19 @@ IngestApi.prototype.putPipeline = function ingestPutPipelineApi (params, options
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -140,15 +161,15 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate'
|
||||
@ -170,6 +191,7 @@ IngestApi.prototype.simulate = function ingestSimulateApi (params, options, call
|
||||
|
||||
Object.defineProperties(IngestApi.prototype, {
|
||||
delete_pipeline: { get () { return this.deletePipeline } },
|
||||
geo_ip_stats: { get () { return this.geoIpStats } },
|
||||
get_pipeline: { get () { return this.getPipeline } },
|
||||
processor_grok: { get () { return this.processorGrok } },
|
||||
put_pipeline: { get () { return this.putPipeline } }
|
||||
|
||||
@ -34,10 +34,10 @@ function LicenseApi (transport, ConfigurationError) {
|
||||
LicenseApi.prototype.delete = function licenseDeleteApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_license'
|
||||
|
||||
@ -55,10 +55,10 @@ LicenseApi.prototype.delete = function licenseDeleteApi (params, options, callba
|
||||
LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_license'
|
||||
|
||||
@ -76,10 +76,10 @@ LicenseApi.prototype.get = function licenseGetApi (params, options, callback) {
|
||||
LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_license' + '/' + 'basic_status'
|
||||
|
||||
@ -97,10 +97,10 @@ LicenseApi.prototype.getBasicStatus = function licenseGetBasicStatusApi (params,
|
||||
LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_license' + '/' + 'trial_status'
|
||||
|
||||
@ -118,10 +118,10 @@ LicenseApi.prototype.getTrialStatus = function licenseGetTrialStatusApi (params,
|
||||
LicenseApi.prototype.post = function licensePostApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_license'
|
||||
|
||||
@ -139,10 +139,10 @@ LicenseApi.prototype.post = function licensePostApi (params, options, callback)
|
||||
LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_license' + '/' + 'start_basic'
|
||||
|
||||
@ -160,10 +160,10 @@ LicenseApi.prototype.postStartBasic = function licensePostStartBasicApi (params,
|
||||
LicenseApi.prototype.postStartTrial = function licensePostStartTrialApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
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
|
||||
@ -23,28 +23,28 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['stored_fields', 'preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { storedFields: 'stored_fields', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function mgetApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'
|
||||
|
||||
@ -34,10 +34,10 @@ function MigrationApi (transport, ConfigurationError) {
|
||||
MigrationApi.prototype.deprecations = function migrationDeprecationsApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_migration' + '/' + 'deprecations'
|
||||
|
||||
576
api/api/ml.js
576
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, type, ...querystring } = params
|
||||
let { method, body, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_monitoring' + '/' + encodeURIComponent(type) + '/' + 'bulk'
|
||||
|
||||
@ -30,21 +30,21 @@ function msearchApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'
|
||||
|
||||
@ -30,21 +30,21 @@ function msearchTemplateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch' + '/' + 'template'
|
||||
|
||||
@ -30,15 +30,15 @@ function mtermvectorsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'
|
||||
|
||||
@ -23,21 +23,85 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
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 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 acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'interval', 'snapshots', 'threads', 'ignore_idle_threads', 'type', 'timeout', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', ignoreIdleThreads: 'ignore_idle_threads', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments' }
|
||||
|
||||
function NodesApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
this[kConfigurationError] = ConfigurationError
|
||||
}
|
||||
|
||||
NodesApi.prototype.clearRepositoriesMeteringArchive = function nodesClearRepositoriesMeteringArchiveApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.node_id == null && params.nodeId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.max_archive_version == null && params.maxArchiveVersion == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: max_archive_version or maxArchiveVersion')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params.max_archive_version != null || params.maxArchiveVersion != null) && ((params.node_id == null && params.nodeId == null))) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: node_id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, nodeId, node_id, maxArchiveVersion, max_archive_version, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + '_repositories_metering' + '/' + encodeURIComponent(max_archive_version || maxArchiveVersion)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
NodesApi.prototype.getRepositoriesMeteringInfo = function nodesGetRepositoriesMeteringInfoApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.node_id == null && params.nodeId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, nodeId, node_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + '_repositories_metering'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
NodesApi.prototype.hotThreads = function nodesHotThreadsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, nodeId, node_id, ...querystring } = params
|
||||
let { method, body, nodeId, node_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null && (metric) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
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) {
|
||||
;[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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null && (metric) != null && (index_metric || indexMetric) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats' + '/' + encodeURIComponent(metric) + '/' + encodeURIComponent(index_metric || indexMetric)
|
||||
@ -165,10 +229,10 @@ NodesApi.prototype.stats = function nodesStatsApi (params, options, callback) {
|
||||
NodesApi.prototype.usage = function nodesUsageApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null && (metric) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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, {
|
||||
clear_repositories_metering_archive: { get () { return this.clearRepositoriesMeteringArchive } },
|
||||
get_repositories_metering_info: { get () { return this.getRepositoriesMeteringInfo } },
|
||||
hot_threads: { get () { return this.hotThreads } },
|
||||
reload_secure_settings: { get () { return this.reloadSecureSettings } }
|
||||
})
|
||||
|
||||
@ -29,17 +29,18 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', expandWildcards: 'e
|
||||
function openPointInTimeApi (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)
|
||||
}
|
||||
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_pit'
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_pit'
|
||||
}
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_pit'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function pingApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'HEAD'
|
||||
path = '/'
|
||||
|
||||
|
||||
@ -30,25 +30,25 @@ function putScriptApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['context'] != null && (params['id'] == null)) {
|
||||
if (params.context != null && (params.id == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, context, ...querystring } = params
|
||||
let { method, body, id, context, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null && (context) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context)
|
||||
|
||||
@ -30,15 +30,15 @@ function rankEvalApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'
|
||||
|
||||
@ -30,15 +30,15 @@ function reindexApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_reindex'
|
||||
|
||||
|
||||
@ -30,19 +30,19 @@ function reindexRethrottleApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['task_id'] == null && params['taskId'] == null) {
|
||||
if (params.task_id == null && params.taskId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
|
||||
if (params.requests_per_second == null && params.requestsPerSecond == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, taskId, task_id, ...querystring } = params
|
||||
let { method, body, taskId, task_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'
|
||||
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function renderSearchTemplateApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -35,15 +35,15 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -61,10 +61,10 @@ RollupApi.prototype.deleteJob = function rollupDeleteJobApi (params, options, ca
|
||||
RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
||||
@ -87,10 +87,10 @@ RollupApi.prototype.getJobs = function rollupGetJobsApi (params, options, callba
|
||||
RollupApi.prototype.getRollupCaps = function rollupGetRollupCapsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_rollup' + '/' + 'data' + '/' + encodeURIComponent(id)
|
||||
@ -114,15 +114,15 @@ RollupApi.prototype.getRollupIndexCaps = function rollupGetRollupIndexCapsApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + 'data'
|
||||
|
||||
@ -141,19 +141,19 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -168,29 +168,70 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
RollupApi.prototype.rollup = function rollupRollupApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.rollup_index == null && params.rollupIndex == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: rollup_index or rollupIndex')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params.rollup_index != null || params.rollupIndex != null) && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, index, rollupIndex, rollup_index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_rollup' + '/' + encodeURIComponent(rollup_index || rollupIndex)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
RollupApi.prototype.rollupSearch = function rollupRollupSearchApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_rollup_search'
|
||||
@ -214,15 +255,15 @@ RollupApi.prototype.startJob = function rollupStartJobApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_start'
|
||||
|
||||
@ -241,15 +282,15 @@ RollupApi.prototype.stopJob = function rollupStopJobApi (params, options, callba
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_rollup' + '/' + 'job' + '/' + encodeURIComponent(id) + '/' + '_stop'
|
||||
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
function scriptsPainlessExecuteApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'
|
||||
|
||||
|
||||
@ -29,10 +29,10 @@ const snakeCase = { scrollId: 'scroll_id', restTotalHitsAsInt: 'rest_total_hits_
|
||||
function scrollApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, scrollId, scroll_id, ...querystring } = params
|
||||
let { method, body, scrollId, scroll_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((scroll_id || scrollId) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId)
|
||||
|
||||
@ -23,22 +23,22 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_includes', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', 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 acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', 'min_compatible_shard_node', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', defaultOperator: 'default_operator', storedFields: 'stored_fields', docvalueFields: 'docvalue_fields', ignoreUnavailable: 'ignore_unavailable', ignoreThrottled: 'ignore_throttled', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', suggestField: 'suggest_field', suggestMode: 'suggest_mode', suggestSize: 'suggest_size', suggestText: 'suggest_text', trackScores: 'track_scores', trackTotalHits: 'track_total_hits', allowPartialSearchResults: 'allow_partial_search_results', typedKeys: 'typed_keys', seqNoPrimaryTerm: 'seq_no_primary_term', requestCache: 'request_cache', batchedReduceSize: 'batched_reduce_size', maxConcurrentShardRequests: 'max_concurrent_shard_requests', preFilterShardSize: 'pre_filter_shard_size', restTotalHitsAsInt: 'rest_total_hits_as_int', minCompatibleShardNode: 'min_compatible_shard_node', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function searchApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
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', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { exactBounds: 'exact_bounds', gridPrecision: 'grid_precision', gridType: 'grid_type', 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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_search_shards'
|
||||
|
||||
@ -30,21 +30,21 @@ function searchTemplateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search' + '/' + 'template'
|
||||
|
||||
@ -23,21 +23,47 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
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 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 acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'index', 'master_timeout', 'wait_for_completion', 'storage', 'level']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', masterTimeout: 'master_timeout', waitForCompletion: 'wait_for_completion' }
|
||||
|
||||
function SearchableSnapshotsApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
this[kConfigurationError] = ConfigurationError
|
||||
}
|
||||
|
||||
SearchableSnapshotsApi.prototype.cacheStats = function searchableSnapshotsCacheStatsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
let { method, body, nodeId, node_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if ((node_id || nodeId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_searchable_snapshots' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'cache' + '/' + 'stats'
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'stats'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SearchableSnapshotsApi.prototype.clearCache = function searchableSnapshotsClearCacheApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, index, ...querystring } = params
|
||||
let { method, body, index, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'cache' + '/' + 'clear'
|
||||
@ -61,29 +87,29 @@ SearchableSnapshotsApi.prototype.mount = function searchableSnapshotsMountApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
if (params.snapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
let { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_mount'
|
||||
|
||||
@ -102,15 +128,15 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, ...querystring } = params
|
||||
let { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_stats'
|
||||
|
||||
@ -128,10 +154,10 @@ SearchableSnapshotsApi.prototype.repositoryStats = function searchableSnapshotsR
|
||||
SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_searchable_snapshots' + '/' + 'stats'
|
||||
@ -152,6 +178,7 @@ SearchableSnapshotsApi.prototype.stats = function searchableSnapshotsStatsApi (p
|
||||
}
|
||||
|
||||
Object.defineProperties(SearchableSnapshotsApi.prototype, {
|
||||
cache_stats: { get () { return this.cacheStats } },
|
||||
clear_cache: { get () { return this.clearCache } },
|
||||
repository_stats: { get () { return this.repositoryStats } }
|
||||
})
|
||||
|
||||
@ -34,10 +34,10 @@ function SecurityApi (transport, ConfigurationError) {
|
||||
SecurityApi.prototype.authenticate = function securityAuthenticateApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + '_authenticate'
|
||||
|
||||
@ -56,15 +56,15 @@ SecurityApi.prototype.changePassword = function securityChangePasswordApi (param
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, username, ...querystring } = params
|
||||
let { method, body, username, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((username) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_password'
|
||||
@ -88,15 +88,15 @@ SecurityApi.prototype.clearApiKeyCache = function securityClearApiKeyCacheApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['ids'] == null) {
|
||||
if (params.ids == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: ids')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ids, ...querystring } = params
|
||||
let { method, body, ids, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'api_key' + '/' + encodeURIComponent(ids) + '/' + '_clear_cache'
|
||||
|
||||
@ -115,15 +115,15 @@ SecurityApi.prototype.clearCachedPrivileges = function securityClearCachedPrivil
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['application'] == null) {
|
||||
if (params.application == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: application')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, application, ...querystring } = params
|
||||
let { method, body, application, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + '_clear_cache'
|
||||
|
||||
@ -142,15 +142,15 @@ SecurityApi.prototype.clearCachedRealms = function securityClearCachedRealmsApi
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['realms'] == null) {
|
||||
if (params.realms == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: realms')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, realms, ...querystring } = params
|
||||
let { method, body, realms, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'realm' + '/' + encodeURIComponent(realms) + '/' + '_clear_cache'
|
||||
|
||||
@ -169,15 +169,15 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
|
||||
|
||||
@ -192,19 +192,63 @@ SecurityApi.prototype.clearCachedRoles = function securityClearCachedRolesApi (p
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.clearCachedServiceTokens = function securityClearCachedServiceTokensApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.namespace == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.service == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: service')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params.name != null && (params.service == null || params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
|
||||
return handleError(err, callback)
|
||||
} else if (params.service != null && (params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, namespace, service, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name) + '/' + '_clear_cache'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'api_key'
|
||||
|
||||
@ -219,29 +263,74 @@ SecurityApi.prototype.createApiKey = function securityCreateApiKeyApi (params, o
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.createServiceToken = function securityCreateServiceTokenApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.namespace == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.service == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: service')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params.name != null && (params.service == null || params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
|
||||
return handleError(err, callback)
|
||||
} else if (params.service != null && (params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, namespace, service, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if ((namespace) != null && (service) != null && (name) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name)
|
||||
} else {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.deletePrivileges = function securityDeletePrivilegesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['application'] == null) {
|
||||
if (params.application == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: application')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['name'] != null && (params['application'] == null)) {
|
||||
if (params.name != null && (params.application == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, application, name, ...querystring } = params
|
||||
let { method, body, application, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -287,15 +376,15 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -310,19 +399,63 @@ SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.deleteServiceToken = function securityDeleteServiceTokenApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.namespace == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.service == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: service')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params.name != null && (params.service == null || params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: service, namespace')
|
||||
return handleError(err, callback)
|
||||
} else if (params.service != null && (params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, namespace, service, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential' + '/' + 'token' + '/' + encodeURIComponent(name)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.deleteUser = function securityDeleteUserApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['username'] == null) {
|
||||
if (params.username == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, username, ...querystring } = params
|
||||
let { method, body, username, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
||||
|
||||
@ -341,15 +474,15 @@ SecurityApi.prototype.disableUser = function securityDisableUserApi (params, opt
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['username'] == null) {
|
||||
if (params.username == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, username, ...querystring } = params
|
||||
let { method, body, username, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username) + '/' + '_disable'
|
||||
|
||||
@ -368,15 +501,15 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['username'] == null) {
|
||||
if (params.username == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, username, ...querystring } = params
|
||||
let { method, body, username, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'api_key'
|
||||
|
||||
@ -415,10 +548,10 @@ SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options
|
||||
SecurityApi.prototype.getBuiltinPrivileges = function securityGetBuiltinPrivilegesApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'privilege' + '/' + '_builtin'
|
||||
|
||||
@ -437,15 +570,15 @@ SecurityApi.prototype.getPrivileges = function securityGetPrivilegesApi (params,
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params['name'] != null && (params['application'] == null)) {
|
||||
if (params.name != null && (params.application == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: application')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, application, name, ...querystring } = params
|
||||
let { method, body, application, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((application) != null && (name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((name) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
||||
@ -520,19 +653,91 @@ SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi (param
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.getServiceAccounts = function securityGetServiceAccountsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params.service != null && (params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, namespace, service, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if ((namespace) != null && (service) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service)
|
||||
} else if ((namespace) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace)
|
||||
} else {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'service'
|
||||
}
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.getServiceCredentials = function securityGetServiceCredentialsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.namespace == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.service == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: service')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params.service != null && (params.namespace == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: namespace')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, namespace, service, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'service' + '/' + encodeURIComponent(namespace) + '/' + encodeURIComponent(service) + '/' + 'credential'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.getToken = function securityGetTokenApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
||||
|
||||
@ -550,10 +755,10 @@ SecurityApi.prototype.getToken = function securityGetTokenApi (params, options,
|
||||
SecurityApi.prototype.getUser = function securityGetUserApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((username) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
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) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'user' + '/' + '_privileges'
|
||||
|
||||
@ -594,19 +799,46 @@ SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, options, callback) {
|
||||
SecurityApi.prototype.grantApiKey = function securityGrantApiKeyApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, user, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, user, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if ((user) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(user) + '/' + '_has_privileges'
|
||||
@ -630,15 +862,15 @@ SecurityApi.prototype.invalidateApiKey = function securityInvalidateApiKeyApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_security' + '/' + 'api_key'
|
||||
|
||||
@ -657,15 +889,15 @@ SecurityApi.prototype.invalidateToken = function securityInvalidateTokenApi (par
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_security' + '/' + 'oauth2' + '/' + 'token'
|
||||
|
||||
@ -684,15 +916,15 @@ SecurityApi.prototype.putPrivileges = function securityPutPrivilegesApi (params,
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'privilege'
|
||||
|
||||
@ -711,19 +943,19 @@ SecurityApi.prototype.putRole = function securityPutRoleApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'role' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -742,19 +974,19 @@ SecurityApi.prototype.putRoleMapping = function securityPutRoleMappingApi (param
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
if (params.name == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, name, ...querystring } = params
|
||||
let { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'role_mapping' + '/' + encodeURIComponent(name)
|
||||
|
||||
@ -773,19 +1005,19 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['username'] == null) {
|
||||
if (params.username == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: username')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, username, ...querystring } = params
|
||||
let { method, body, username, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_security' + '/' + 'user' + '/' + encodeURIComponent(username)
|
||||
|
||||
@ -800,16 +1032,202 @@ SecurityApi.prototype.putUser = function securityPutUserApi (params, options, ca
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.queryApiKeys = function securityQueryApiKeysApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_security' + '/' + '_query' + '/' + 'api_key'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.samlAuthenticate = function securitySamlAuthenticateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'saml' + '/' + 'authenticate'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.samlCompleteLogout = function securitySamlCompleteLogoutApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'saml' + '/' + 'complete_logout'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.samlInvalidate = function securitySamlInvalidateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'saml' + '/' + 'invalidate'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.samlLogout = function securitySamlLogoutApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'saml' + '/' + 'logout'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.samlPrepareAuthentication = function securitySamlPrepareAuthenticationApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_security' + '/' + 'saml' + '/' + 'prepare'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.samlServiceProviderMetadata = function securitySamlServiceProviderMetadataApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.realm_name == null && params.realmName == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: realm_name or realmName')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, realmName, realm_name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'saml' + '/' + 'metadata' + '/' + encodeURIComponent(realm_name || realmName)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
Object.defineProperties(SecurityApi.prototype, {
|
||||
change_password: { get () { return this.changePassword } },
|
||||
clear_api_key_cache: { get () { return this.clearApiKeyCache } },
|
||||
clear_cached_privileges: { get () { return this.clearCachedPrivileges } },
|
||||
clear_cached_realms: { get () { return this.clearCachedRealms } },
|
||||
clear_cached_roles: { get () { return this.clearCachedRoles } },
|
||||
clear_cached_service_tokens: { get () { return this.clearCachedServiceTokens } },
|
||||
create_api_key: { get () { return this.createApiKey } },
|
||||
create_service_token: { get () { return this.createServiceToken } },
|
||||
delete_privileges: { get () { return this.deletePrivileges } },
|
||||
delete_role: { get () { return this.deleteRole } },
|
||||
delete_role_mapping: { get () { return this.deleteRoleMapping } },
|
||||
delete_service_token: { get () { return this.deleteServiceToken } },
|
||||
delete_user: { get () { return this.deleteUser } },
|
||||
disable_user: { get () { return this.disableUser } },
|
||||
enable_user: { get () { return this.enableUser } },
|
||||
@ -818,16 +1236,26 @@ Object.defineProperties(SecurityApi.prototype, {
|
||||
get_privileges: { get () { return this.getPrivileges } },
|
||||
get_role: { get () { return this.getRole } },
|
||||
get_role_mapping: { get () { return this.getRoleMapping } },
|
||||
get_service_accounts: { get () { return this.getServiceAccounts } },
|
||||
get_service_credentials: { get () { return this.getServiceCredentials } },
|
||||
get_token: { get () { return this.getToken } },
|
||||
get_user: { get () { return this.getUser } },
|
||||
get_user_privileges: { get () { return this.getUserPrivileges } },
|
||||
grant_api_key: { get () { return this.grantApiKey } },
|
||||
has_privileges: { get () { return this.hasPrivileges } },
|
||||
invalidate_api_key: { get () { return this.invalidateApiKey } },
|
||||
invalidate_token: { get () { return this.invalidateToken } },
|
||||
put_privileges: { get () { return this.putPrivileges } },
|
||||
put_role: { get () { return this.putRole } },
|
||||
put_role_mapping: { get () { return this.putRoleMapping } },
|
||||
put_user: { get () { return this.putUser } }
|
||||
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
|
||||
|
||||
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['policy_id'] == null && params['policyId'] == null) {
|
||||
if (params.policy_id == null && params.policyId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, policyId, policy_id, ...querystring } = params
|
||||
let { method, body, policyId, policy_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
||||
|
||||
@ -62,15 +62,15 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['policy_id'] == null && params['policyId'] == null) {
|
||||
if (params.policy_id == null && params.policyId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, policyId, policy_id, ...querystring } = params
|
||||
let { method, body, policyId, policy_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId) + '/' + '_execute'
|
||||
|
||||
@ -88,10 +88,10 @@ SlmApi.prototype.executeLifecycle = function slmExecuteLifecycleApi (params, opt
|
||||
SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_slm' + '/' + '_execute_retention'
|
||||
|
||||
@ -109,10 +109,10 @@ SlmApi.prototype.executeRetention = function slmExecuteRetentionApi (params, opt
|
||||
SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, policyId, policy_id, ...querystring } = params
|
||||
let { method, body, policyId, policy_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((policy_id || policyId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
||||
@ -135,10 +135,10 @@ SlmApi.prototype.getLifecycle = function slmGetLifecycleApi (params, options, ca
|
||||
SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_slm' + '/' + 'stats'
|
||||
|
||||
@ -156,10 +156,10 @@ SlmApi.prototype.getStats = function slmGetStatsApi (params, options, callback)
|
||||
SlmApi.prototype.getStatus = function slmGetStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_slm' + '/' + 'status'
|
||||
|
||||
@ -178,15 +178,15 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['policy_id'] == null && params['policyId'] == null) {
|
||||
if (params.policy_id == null && params.policyId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: policy_id or policyId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, policyId, policy_id, ...querystring } = params
|
||||
let { method, body, policyId, policy_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_slm' + '/' + 'policy' + '/' + encodeURIComponent(policy_id || policyId)
|
||||
|
||||
@ -204,10 +204,10 @@ SlmApi.prototype.putLifecycle = function slmPutLifecycleApi (params, options, ca
|
||||
SlmApi.prototype.start = function slmStartApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_slm' + '/' + 'start'
|
||||
|
||||
@ -225,10 +225,10 @@ SlmApi.prototype.start = function slmStartApi (params, options, callback) {
|
||||
SlmApi.prototype.stop = function slmStopApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_slm' + '/' + 'stop'
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'verbose', 'local']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable' }
|
||||
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', 'index_details', 'include_repository', 'verbose', 'local', 'blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'detailed', 'rarely_abort_writes']
|
||||
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCompletion: 'wait_for_completion', ignoreUnavailable: 'ignore_unavailable', indexDetails: 'index_details', includeRepository: 'include_repository', 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) {
|
||||
this.transport = transport
|
||||
@ -35,15 +35,15 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, ...querystring } = params
|
||||
let { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup'
|
||||
|
||||
@ -58,29 +58,77 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SnapshotApi.prototype.clone = function snapshotCloneApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.snapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.target_snapshot == null && params.targetSnapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params.target_snapshot != null || params.targetSnapshot != null) && (params.snapshot == null || params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: snapshot, repository')
|
||||
return handleError(err, callback)
|
||||
} else if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SnapshotApi.prototype.create = function snapshotCreateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
if (params.snapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
let { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||
|
||||
@ -99,19 +147,19 @@ SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, ...querystring } = params
|
||||
let { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
||||
|
||||
@ -130,25 +178,25 @@ SnapshotApi.prototype.delete = function snapshotDeleteApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
if (params.snapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
let { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||
|
||||
@ -167,15 +215,15 @@ SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, ...querystring } = params
|
||||
let { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
||||
|
||||
@ -194,25 +242,25 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
if (params.snapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
let { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot)
|
||||
|
||||
@ -230,10 +278,10 @@ SnapshotApi.prototype.get = function snapshotGetApi (params, options, callback)
|
||||
SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((repository) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository)
|
||||
@ -253,29 +301,56 @@ SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi (params,
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SnapshotApi.prototype.repositoryAnalyze = function snapshotRepositoryAnalyzeApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_analyze'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SnapshotApi.prototype.restore = function snapshotRestoreApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['snapshot'] == null) {
|
||||
if (params.snapshot == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: snapshot')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
let { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_restore'
|
||||
|
||||
@ -294,15 +369,15 @@ SnapshotApi.prototype.status = function snapshotStatusApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required url components
|
||||
if (params['snapshot'] != null && (params['repository'] == null)) {
|
||||
if (params.snapshot != null && (params.repository == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, snapshot, ...querystring } = params
|
||||
let { method, body, repository, snapshot, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((repository) != null && (snapshot) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_status'
|
||||
@ -329,15 +404,15 @@ SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['repository'] == null) {
|
||||
if (params.repository == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: repository')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, repository, ...querystring } = params
|
||||
let { method, body, repository, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'
|
||||
|
||||
@ -357,6 +432,7 @@ Object.defineProperties(SnapshotApi.prototype, {
|
||||
create_repository: { get () { return this.createRepository } },
|
||||
delete_repository: { get () { return this.deleteRepository } },
|
||||
get_repository: { get () { return this.getRepository } },
|
||||
repository_analyze: { get () { return this.repositoryAnalyze } },
|
||||
verify_repository: { get () { return this.verifyRepository } }
|
||||
})
|
||||
|
||||
|
||||
108
api/api/sql.js
108
api/api/sql.js
@ -23,8 +23,8 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'format']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'delimiter', 'format', 'keep_alive', 'wait_for_completion_timeout']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', keepAlive: 'keep_alive', waitForCompletionTimeout: 'wait_for_completion_timeout' }
|
||||
|
||||
function SqlApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -35,15 +35,15 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_sql' + '/' + 'close'
|
||||
|
||||
@ -58,19 +58,100 @@ SqlApi.prototype.clearCursor = function sqlClearCursorApi (params, options, call
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SqlApi.prototype.deleteAsync = function sqlDeleteAsyncApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_sql' + '/' + 'async' + '/' + 'delete' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SqlApi.prototype.getAsync = function sqlGetAsyncApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_sql' + '/' + 'async' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SqlApi.prototype.getAsyncStatus = function sqlGetAsyncStatusApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_sql' + '/' + 'async' + '/' + 'status' + '/' + encodeURIComponent(id)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SqlApi.prototype.query = function sqlQueryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_sql'
|
||||
|
||||
@ -89,15 +170,15 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_sql' + '/' + 'translate'
|
||||
|
||||
@ -113,7 +194,10 @@ SqlApi.prototype.translate = function sqlTranslateApi (params, options, callback
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
@ -34,10 +34,10 @@ function SslApi (transport, ConfigurationError) {
|
||||
SslApi.prototype.certificates = function sslCertificatesApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_ssl' + '/' + 'certificates'
|
||||
|
||||
|
||||
@ -34,10 +34,10 @@ function TasksApi (transport, ConfigurationError) {
|
||||
TasksApi.prototype.cancel = function tasksCancelApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((task_id || taskId) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel'
|
||||
@ -61,15 +61,15 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['task_id'] == null && params['taskId'] == null) {
|
||||
if (params.task_id == null && params.taskId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, taskId, task_id, ...querystring } = params
|
||||
let { method, body, taskId, task_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId)
|
||||
|
||||
@ -87,10 +87,10 @@ TasksApi.prototype.get = function tasksGetApi (params, options, callback) {
|
||||
TasksApi.prototype.list = function tasksListApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
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 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint' }
|
||||
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 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' }
|
||||
|
||||
function TransformApi (transport, ConfigurationError) {
|
||||
this.transport = transport
|
||||
@ -35,15 +35,15 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||
if (params.transform_id == null && params.transformId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
||||
|
||||
@ -61,10 +61,10 @@ TransformApi.prototype.deleteTransform = function transformDeleteTransformApi (p
|
||||
TransformApi.prototype.getTransform = function transformGetTransformApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((transform_id || transformId) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
||||
@ -88,15 +88,15 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||
if (params.transform_id == null && params.transformId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stats'
|
||||
|
||||
@ -115,15 +115,15 @@ TransformApi.prototype.previewTransform = function transformPreviewTransformApi
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_transform' + '/' + '_preview'
|
||||
|
||||
@ -142,19 +142,19 @@ TransformApi.prototype.putTransform = function transformPutTransformApi (params,
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||
if (params.transform_id == null && params.transformId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId)
|
||||
|
||||
@ -173,15 +173,15 @@ TransformApi.prototype.startTransform = function transformStartTransformApi (par
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||
if (params.transform_id == null && params.transformId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_start'
|
||||
|
||||
@ -200,15 +200,15 @@ TransformApi.prototype.stopTransform = function transformStopTransformApi (param
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||
if (params.transform_id == null && params.transformId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_stop'
|
||||
|
||||
@ -227,19 +227,19 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['transform_id'] == null && params['transformId'] == null) {
|
||||
if (params.transform_id == null && params.transformId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: transform_id or transformId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, transformId, transform_id, ...querystring } = params
|
||||
let { method, body, transformId, transform_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_update'
|
||||
|
||||
|
||||
@ -23,30 +23,30 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_includes', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceIncludes: '_source_includes', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['wait_for_active_shards', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'lang', 'refresh', 'retry_on_conflict', 'routing', 'timeout', 'if_seq_no', 'if_primary_term', 'require_alias', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { waitForActiveShards: 'wait_for_active_shards', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', retryOnConflict: 'retry_on_conflict', ifSeqNo: 'if_seq_no', ifPrimaryTerm: 'if_primary_term', requireAlias: 'require_alias', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function updateApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['body'] == null) {
|
||||
if (params.body == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: body')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, index, type, ...querystring } = params
|
||||
let { method, body, id, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null && (id) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/' + '_update'
|
||||
|
||||
@ -23,28 +23,28 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_includes', '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', _sourceIncludes: '_source_includes', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function updateByQueryApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['index'] == null) {
|
||||
if (params.index == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if (params['type'] != null && (params['index'] == null)) {
|
||||
if (params.type != null && (params.index == null)) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, index, type, ...querystring } = params
|
||||
let { method, body, index, type, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((index) != null && (type) != null) {
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'
|
||||
|
||||
@ -30,19 +30,19 @@ function updateByQueryRethrottleApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['task_id'] == null && params['taskId'] == null) {
|
||||
if (params.task_id == null && params.taskId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
if (params['requests_per_second'] == null && params['requestsPerSecond'] == null) {
|
||||
if (params.requests_per_second == null && params.requestsPerSecond == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: requests_per_second or requestsPerSecond')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, taskId, task_id, ...querystring } = params
|
||||
let { method, body, taskId, task_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
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)
|
||||
|
||||
// check required parameters
|
||||
if (params['watch_id'] == null && params['watchId'] == null) {
|
||||
if (params.watch_id == null && params.watchId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// check required url components
|
||||
if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) {
|
||||
if ((params.action_id != null || params.actionId != null) && ((params.watch_id == null && params.watchId == null))) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter of the url: watch_id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((watch_id || watchId) != null && (action_id || actionId) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_ack' + '/' + encodeURIComponent(action_id || actionId)
|
||||
@ -73,15 +73,15 @@ WatcherApi.prototype.activateWatch = function watcherActivateWatchApi (params, o
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['watch_id'] == null && params['watchId'] == null) {
|
||||
if (params.watch_id == null && params.watchId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, watchId, watch_id, ...querystring } = params
|
||||
let { method, body, watchId, watch_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_activate'
|
||||
|
||||
@ -100,15 +100,15 @@ WatcherApi.prototype.deactivateWatch = function watcherDeactivateWatchApi (param
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['watch_id'] == null && params['watchId'] == null) {
|
||||
if (params.watch_id == null && params.watchId == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: watch_id or watchId')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, watchId, watch_id, ...querystring } = params
|
||||
let { method, body, watchId, watch_id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(watch_id || watchId) + '/' + '_deactivate'
|
||||
|
||||
@ -127,15 +127,15 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -153,10 +153,10 @@ WatcherApi.prototype.deleteWatch = function watcherDeleteWatchApi (params, optio
|
||||
WatcherApi.prototype.executeWatch = function watcherExecuteWatchApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((id) != null) {
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id) + '/' + '_execute'
|
||||
@ -180,15 +180,15 @@ WatcherApi.prototype.getWatch = function watcherGetWatchApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -207,15 +207,15 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
if (params['id'] == null) {
|
||||
if (params.id == null) {
|
||||
const err = new this[kConfigurationError]('Missing required parameter: id')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var { method, body, id, ...querystring } = params
|
||||
let { method, body, id, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'PUT'
|
||||
path = '/' + '_watcher' + '/' + 'watch' + '/' + encodeURIComponent(id)
|
||||
|
||||
@ -230,13 +230,34 @@ WatcherApi.prototype.putWatch = function watcherPutWatchApi (params, options, ca
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
WatcherApi.prototype.queryWatches = function watcherQueryWatchesApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_watcher' + '/' + '_query' + '/' + 'watches'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
WatcherApi.prototype.start = function watcherStartApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_watcher' + '/' + '_start'
|
||||
|
||||
@ -254,10 +275,10 @@ WatcherApi.prototype.start = function watcherStartApi (params, options, callback
|
||||
WatcherApi.prototype.stats = function watcherStatsApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if ((metric) != null) {
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_watcher' + '/' + 'stats' + '/' + encodeURIComponent(metric)
|
||||
@ -280,10 +301,10 @@ WatcherApi.prototype.stats = function watcherStatsApi (params, options, callback
|
||||
WatcherApi.prototype.stop = function watcherStopApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'POST'
|
||||
path = '/' + '_watcher' + '/' + '_stop'
|
||||
|
||||
@ -305,7 +326,8 @@ Object.defineProperties(WatcherApi.prototype, {
|
||||
delete_watch: { get () { return this.deleteWatch } },
|
||||
execute_watch: { get () { return this.executeWatch } },
|
||||
get_watch: { get () { return this.getWatch } },
|
||||
put_watch: { get () { return this.putWatch } }
|
||||
put_watch: { get () { return this.putWatch } },
|
||||
query_watches: { get () { return this.queryWatches } }
|
||||
})
|
||||
|
||||
module.exports = WatcherApi
|
||||
|
||||
@ -34,10 +34,10 @@ function XpackApi (transport, ConfigurationError) {
|
||||
XpackApi.prototype.info = function xpackInfoApi (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)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_xpack'
|
||||
|
||||
@ -55,10 +55,10 @@ XpackApi.prototype.info = function xpackInfoApi (params, options, callback) {
|
||||
XpackApi.prototype.usage = function xpackUsageApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
var { method, body, ...querystring } = params
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
var path = ''
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_xpack' + '/' + 'usage'
|
||||
|
||||
|
||||
302
api/index.js
302
api/index.js
@ -19,9 +19,13 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
const AsyncSearchApi = require('./api/async_search')
|
||||
const AutoscalingApi = require('./api/autoscaling')
|
||||
const bulkApi = require('./api/bulk')
|
||||
const CatApi = require('./api/cat')
|
||||
const CcrApi = require('./api/ccr')
|
||||
const clearScrollApi = require('./api/clear_scroll')
|
||||
const closePointInTimeApi = require('./api/close_point_in_time')
|
||||
const ClusterApi = require('./api/cluster')
|
||||
const countApi = require('./api/count')
|
||||
const createApi = require('./api/create')
|
||||
@ -30,121 +34,134 @@ const deleteApi = require('./api/delete')
|
||||
const deleteByQueryApi = require('./api/delete_by_query')
|
||||
const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle')
|
||||
const deleteScriptApi = require('./api/delete_script')
|
||||
const EnrichApi = require('./api/enrich')
|
||||
const EqlApi = require('./api/eql')
|
||||
const existsApi = require('./api/exists')
|
||||
const existsSourceApi = require('./api/exists_source')
|
||||
const explainApi = require('./api/explain')
|
||||
const FeaturesApi = require('./api/features')
|
||||
const fieldCapsApi = require('./api/field_caps')
|
||||
const FleetApi = require('./api/fleet')
|
||||
const getApi = require('./api/get')
|
||||
const getScriptApi = require('./api/get_script')
|
||||
const getScriptContextApi = require('./api/get_script_context')
|
||||
const getScriptLanguagesApi = require('./api/get_script_languages')
|
||||
const getSourceApi = require('./api/get_source')
|
||||
const GraphApi = require('./api/graph')
|
||||
const IlmApi = require('./api/ilm')
|
||||
const indexApi = require('./api/index')
|
||||
const IndicesApi = require('./api/indices')
|
||||
const infoApi = require('./api/info')
|
||||
const IngestApi = require('./api/ingest')
|
||||
const LicenseApi = require('./api/license')
|
||||
const LogstashApi = require('./api/logstash')
|
||||
const mgetApi = require('./api/mget')
|
||||
const MigrationApi = require('./api/migration')
|
||||
const MlApi = require('./api/ml')
|
||||
const MonitoringApi = require('./api/monitoring')
|
||||
const msearchApi = require('./api/msearch')
|
||||
const msearchTemplateApi = require('./api/msearch_template')
|
||||
const mtermvectorsApi = require('./api/mtermvectors')
|
||||
const NodesApi = require('./api/nodes')
|
||||
const openPointInTimeApi = require('./api/open_point_in_time')
|
||||
const pingApi = require('./api/ping')
|
||||
const putScriptApi = require('./api/put_script')
|
||||
const rankEvalApi = require('./api/rank_eval')
|
||||
const reindexApi = require('./api/reindex')
|
||||
const reindexRethrottleApi = require('./api/reindex_rethrottle')
|
||||
const renderSearchTemplateApi = require('./api/render_search_template')
|
||||
const RollupApi = require('./api/rollup')
|
||||
const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute')
|
||||
const scrollApi = require('./api/scroll')
|
||||
const searchApi = require('./api/search')
|
||||
const searchMvtApi = require('./api/search_mvt')
|
||||
const searchShardsApi = require('./api/search_shards')
|
||||
const searchTemplateApi = require('./api/search_template')
|
||||
const SearchableSnapshotsApi = require('./api/searchable_snapshots')
|
||||
const SecurityApi = require('./api/security')
|
||||
const ShutdownApi = require('./api/shutdown')
|
||||
const SlmApi = require('./api/slm')
|
||||
const SnapshotApi = require('./api/snapshot')
|
||||
const SqlApi = require('./api/sql')
|
||||
const SslApi = require('./api/ssl')
|
||||
const TasksApi = require('./api/tasks')
|
||||
const termsEnumApi = require('./api/terms_enum')
|
||||
const termvectorsApi = require('./api/termvectors')
|
||||
const TextStructureApi = require('./api/text_structure')
|
||||
const TransformApi = require('./api/transform')
|
||||
const updateApi = require('./api/update')
|
||||
const updateByQueryApi = require('./api/update_by_query')
|
||||
const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle')
|
||||
const AsyncSearchApi = require('./api/async_search')
|
||||
const AutoscalingApi = require('./api/autoscaling')
|
||||
const CcrApi = require('./api/ccr')
|
||||
const 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 XpackApi = require('./api/xpack')
|
||||
|
||||
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 kAutoscaling = Symbol('Autoscaling')
|
||||
const kCat = Symbol('Cat')
|
||||
const kCcr = Symbol('Ccr')
|
||||
const kCluster = Symbol('Cluster')
|
||||
const kDanglingIndices = Symbol('DanglingIndices')
|
||||
const kEnrich = Symbol('Enrich')
|
||||
const kEql = Symbol('Eql')
|
||||
const kFeatures = Symbol('Features')
|
||||
const kFleet = Symbol('Fleet')
|
||||
const kGraph = Symbol('Graph')
|
||||
const kIlm = Symbol('Ilm')
|
||||
const kIndices = Symbol('Indices')
|
||||
const kIngest = Symbol('Ingest')
|
||||
const kLicense = Symbol('License')
|
||||
const kLogstash = Symbol('Logstash')
|
||||
const kMigration = Symbol('Migration')
|
||||
const kMl = Symbol('Ml')
|
||||
const kMonitoring = Symbol('Monitoring')
|
||||
const kNodes = Symbol('Nodes')
|
||||
const kRollup = Symbol('Rollup')
|
||||
const kSearchableSnapshots = Symbol('SearchableSnapshots')
|
||||
const kSecurity = Symbol('Security')
|
||||
const kShutdown = Symbol('Shutdown')
|
||||
const kSlm = Symbol('Slm')
|
||||
const kSnapshot = Symbol('Snapshot')
|
||||
const kSql = Symbol('Sql')
|
||||
const kSsl = Symbol('Ssl')
|
||||
const kTasks = Symbol('Tasks')
|
||||
const kTextStructure = Symbol('TextStructure')
|
||||
const kTransform = Symbol('Transform')
|
||||
const kWatcher = Symbol('Watcher')
|
||||
const kXpack = Symbol('Xpack')
|
||||
|
||||
function ESAPI (opts) {
|
||||
this[kConfigurationError] = opts.ConfigurationError
|
||||
this[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[kAutoscaling] = null
|
||||
this[kCat] = null
|
||||
this[kCcr] = null
|
||||
this[kCluster] = null
|
||||
this[kDanglingIndices] = null
|
||||
this[kEnrich] = null
|
||||
this[kEql] = null
|
||||
this[kFeatures] = null
|
||||
this[kFleet] = null
|
||||
this[kGraph] = null
|
||||
this[kIlm] = null
|
||||
this[kIndices] = null
|
||||
this[kIngest] = null
|
||||
this[kLicense] = null
|
||||
this[kLogstash] = null
|
||||
this[kMigration] = null
|
||||
this[kMl] = null
|
||||
this[kMonitoring] = null
|
||||
this[kNodes] = null
|
||||
this[kRollup] = null
|
||||
this[kSearchableSnapshots] = null
|
||||
this[kSecurity] = null
|
||||
this[kShutdown] = null
|
||||
this[kSlm] = null
|
||||
this[kSnapshot] = null
|
||||
this[kSql] = null
|
||||
this[kSsl] = null
|
||||
this[kTasks] = null
|
||||
this[kTextStructure] = null
|
||||
this[kTransform] = null
|
||||
this[kWatcher] = null
|
||||
this[kXpack] = null
|
||||
@ -152,6 +169,7 @@ function ESAPI (opts) {
|
||||
|
||||
ESAPI.prototype.bulk = bulkApi
|
||||
ESAPI.prototype.clearScroll = clearScrollApi
|
||||
ESAPI.prototype.closePointInTime = closePointInTimeApi
|
||||
ESAPI.prototype.count = countApi
|
||||
ESAPI.prototype.create = createApi
|
||||
ESAPI.prototype.delete = deleteApi
|
||||
@ -173,6 +191,7 @@ ESAPI.prototype.mget = mgetApi
|
||||
ESAPI.prototype.msearch = msearchApi
|
||||
ESAPI.prototype.msearchTemplate = msearchTemplateApi
|
||||
ESAPI.prototype.mtermvectors = mtermvectorsApi
|
||||
ESAPI.prototype.openPointInTime = openPointInTimeApi
|
||||
ESAPI.prototype.ping = pingApi
|
||||
ESAPI.prototype.putScript = putScriptApi
|
||||
ESAPI.prototype.rankEval = rankEvalApi
|
||||
@ -182,16 +201,33 @@ ESAPI.prototype.renderSearchTemplate = renderSearchTemplateApi
|
||||
ESAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi
|
||||
ESAPI.prototype.scroll = scrollApi
|
||||
ESAPI.prototype.search = searchApi
|
||||
ESAPI.prototype.searchMvt = searchMvtApi
|
||||
ESAPI.prototype.searchShards = searchShardsApi
|
||||
ESAPI.prototype.searchTemplate = searchTemplateApi
|
||||
ESAPI.prototype.termsEnum = termsEnumApi
|
||||
ESAPI.prototype.termvectors = termvectorsApi
|
||||
ESAPI.prototype.update = updateApi
|
||||
ESAPI.prototype.updateByQuery = updateByQueryApi
|
||||
ESAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi
|
||||
ESAPI.prototype.closePointInTime = closePointInTimeApi
|
||||
ESAPI.prototype.openPointInTime = openPointInTimeApi
|
||||
|
||||
Object.defineProperties(ESAPI.prototype, {
|
||||
asyncSearch: {
|
||||
get () {
|
||||
if (this[kAsyncSearch] === null) {
|
||||
this[kAsyncSearch] = new AsyncSearchApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kAsyncSearch]
|
||||
}
|
||||
},
|
||||
async_search: { get () { return this.asyncSearch } },
|
||||
autoscaling: {
|
||||
get () {
|
||||
if (this[kAutoscaling] === null) {
|
||||
this[kAutoscaling] = new AutoscalingApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kAutoscaling]
|
||||
}
|
||||
},
|
||||
cat: {
|
||||
get () {
|
||||
if (this[kCat] === null) {
|
||||
@ -200,7 +236,16 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kCat]
|
||||
}
|
||||
},
|
||||
ccr: {
|
||||
get () {
|
||||
if (this[kCcr] === null) {
|
||||
this[kCcr] = new CcrApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kCcr]
|
||||
}
|
||||
},
|
||||
clear_scroll: { get () { return this.clearScroll } },
|
||||
close_point_in_time: { get () { return this.closePointInTime } },
|
||||
cluster: {
|
||||
get () {
|
||||
if (this[kCluster] === null) {
|
||||
@ -221,88 +266,6 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
delete_by_query: { get () { return this.deleteByQuery } },
|
||||
delete_by_query_rethrottle: { get () { return this.deleteByQueryRethrottle } },
|
||||
delete_script: { get () { return this.deleteScript } },
|
||||
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: {
|
||||
get () {
|
||||
if (this[kEnrich] === null) {
|
||||
@ -319,6 +282,28 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kEql]
|
||||
}
|
||||
},
|
||||
exists_source: { get () { return this.existsSource } },
|
||||
features: {
|
||||
get () {
|
||||
if (this[kFeatures] === null) {
|
||||
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kFeatures]
|
||||
}
|
||||
},
|
||||
field_caps: { get () { return this.fieldCaps } },
|
||||
fleet: {
|
||||
get () {
|
||||
if (this[kFleet] === null) {
|
||||
this[kFleet] = new FleetApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kFleet]
|
||||
}
|
||||
},
|
||||
get_script: { get () { return this.getScript } },
|
||||
get_script_context: { get () { return this.getScriptContext } },
|
||||
get_script_languages: { get () { return this.getScriptLanguages } },
|
||||
get_source: { get () { return this.getSource } },
|
||||
graph: {
|
||||
get () {
|
||||
if (this[kGraph] === null) {
|
||||
@ -335,6 +320,22 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
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: {
|
||||
get () {
|
||||
if (this[kLicense] === null) {
|
||||
@ -343,6 +344,14 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kLicense]
|
||||
}
|
||||
},
|
||||
logstash: {
|
||||
get () {
|
||||
if (this[kLogstash] === null) {
|
||||
this[kLogstash] = new LogstashApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kLogstash]
|
||||
}
|
||||
},
|
||||
migration: {
|
||||
get () {
|
||||
if (this[kMigration] === null) {
|
||||
@ -367,7 +376,20 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kMonitoring]
|
||||
}
|
||||
},
|
||||
msearch_template: { get () { return this.msearchTemplate } },
|
||||
nodes: {
|
||||
get () {
|
||||
if (this[kNodes] === null) {
|
||||
this[kNodes] = new NodesApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kNodes]
|
||||
}
|
||||
},
|
||||
open_point_in_time: { get () { return this.openPointInTime } },
|
||||
put_script: { get () { return this.putScript } },
|
||||
rank_eval: { get () { return this.rankEval } },
|
||||
reindex_rethrottle: { get () { return this.reindexRethrottle } },
|
||||
render_search_template: { get () { return this.renderSearchTemplate } },
|
||||
rollup: {
|
||||
get () {
|
||||
if (this[kRollup] === null) {
|
||||
@ -376,6 +398,10 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kRollup]
|
||||
}
|
||||
},
|
||||
scripts_painless_execute: { get () { return this.scriptsPainlessExecute } },
|
||||
search_mvt: { get () { return this.searchMvt } },
|
||||
search_shards: { get () { return this.searchShards } },
|
||||
search_template: { get () { return this.searchTemplate } },
|
||||
searchableSnapshots: {
|
||||
get () {
|
||||
if (this[kSearchableSnapshots] === null) {
|
||||
@ -393,6 +419,14 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kSecurity]
|
||||
}
|
||||
},
|
||||
shutdown: {
|
||||
get () {
|
||||
if (this[kShutdown] === null) {
|
||||
this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kShutdown]
|
||||
}
|
||||
},
|
||||
slm: {
|
||||
get () {
|
||||
if (this[kSlm] === null) {
|
||||
@ -401,6 +435,14 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kSlm]
|
||||
}
|
||||
},
|
||||
snapshot: {
|
||||
get () {
|
||||
if (this[kSnapshot] === null) {
|
||||
this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kSnapshot]
|
||||
}
|
||||
},
|
||||
sql: {
|
||||
get () {
|
||||
if (this[kSql] === null) {
|
||||
@ -417,6 +459,24 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kSsl]
|
||||
}
|
||||
},
|
||||
tasks: {
|
||||
get () {
|
||||
if (this[kTasks] === null) {
|
||||
this[kTasks] = new TasksApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kTasks]
|
||||
}
|
||||
},
|
||||
terms_enum: { get () { return this.termsEnum } },
|
||||
textStructure: {
|
||||
get () {
|
||||
if (this[kTextStructure] === null) {
|
||||
this[kTextStructure] = new TextStructureApi(this.transport, this[kConfigurationError])
|
||||
}
|
||||
return this[kTextStructure]
|
||||
}
|
||||
},
|
||||
text_structure: { get () { return this.textStructure } },
|
||||
transform: {
|
||||
get () {
|
||||
if (this[kTransform] === null) {
|
||||
@ -425,6 +485,8 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kTransform]
|
||||
}
|
||||
},
|
||||
update_by_query: { get () { return this.updateByQuery } },
|
||||
update_by_query_rethrottle: { get () { return this.updateByQueryRethrottle } },
|
||||
watcher: {
|
||||
get () {
|
||||
if (this[kWatcher] === null) {
|
||||
|
||||
764
api/kibana.d.ts
vendored
764
api/kibana.d.ts
vendored
@ -32,14 +32,18 @@ import {
|
||||
import Helpers from '../lib/Helpers'
|
||||
import {
|
||||
ApiResponse,
|
||||
RequestBody,
|
||||
RequestNDBody,
|
||||
TransportRequestParams,
|
||||
TransportRequestOptions,
|
||||
TransportRequestPromise,
|
||||
Context
|
||||
TransportRequestParams,
|
||||
TransportRequestOptions
|
||||
} 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
|
||||
interface ClientExtendsCallbackOptions {
|
||||
@ -74,404 +78,468 @@ interface KibanaClient {
|
||||
once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this;
|
||||
once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this;
|
||||
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
||||
/* GENERATED */
|
||||
asyncSearch: {
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
submit<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchSubmit<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
delete<TContext = unknown>(params: T.AsyncSearchDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchDeleteResponse, TContext>>
|
||||
get<TDocument = unknown, TContext = unknown>(params: T.AsyncSearchGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchGetResponse<TDocument>, TContext>>
|
||||
status<TDocument = unknown, TContext = unknown>(params: T.AsyncSearchStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchStatusResponse<TDocument>, TContext>>
|
||||
submit<TDocument = unknown, TContext = unknown>(params?: T.AsyncSearchSubmitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AsyncSearchSubmitResponse<TDocument>, TContext>>
|
||||
}
|
||||
autoscaling: {
|
||||
deleteAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getAutoscalingDecision<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getAutoscalingPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putAutoscalingPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingPutAutoscalingPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteAutoscalingPolicy<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getAutoscalingCapacity<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getAutoscalingPolicy<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putAutoscalingPolicy<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, 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<TSource = unknown, TContext = unknown>(params: T.BulkRequest<TSource>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.BulkResponse, TContext>>
|
||||
cat: {
|
||||
aliases<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatAliases, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
allocation<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatAllocation, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
count<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatCount, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
fielddata<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatFielddata, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
health<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatHealth, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
help<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatHelp, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
indices<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatIndices, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
master<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMaster, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
mlDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
mlDatafeeds<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlDatafeeds, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
mlJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
mlTrainedModels<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatMlTrainedModels, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
nodeattrs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatNodeattrs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
nodes<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatNodes, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
pendingTasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatPendingTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
plugins<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatPlugins, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
recovery<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatRecovery, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
repositories<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatRepositories, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
segments<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatSegments, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
shards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
snapshots<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatSnapshots, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
tasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
templates<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTemplates, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
threadPool<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatThreadPool, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
transforms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CatTransforms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
aliases<TContext = unknown>(params?: T.CatAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatAliasesResponse, TContext>>
|
||||
allocation<TContext = unknown>(params?: T.CatAllocationRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatAllocationResponse, TContext>>
|
||||
count<TContext = unknown>(params?: T.CatCountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatCountResponse, TContext>>
|
||||
fielddata<TContext = unknown>(params?: T.CatFielddataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatFielddataResponse, TContext>>
|
||||
health<TContext = unknown>(params?: T.CatHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatHealthResponse, TContext>>
|
||||
help<TContext = unknown>(params?: T.CatHelpRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatHelpResponse, TContext>>
|
||||
indices<TContext = unknown>(params?: T.CatIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatIndicesResponse, TContext>>
|
||||
master<TContext = unknown>(params?: T.CatMasterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMasterResponse, TContext>>
|
||||
mlDataFrameAnalytics<TContext = unknown>(params?: T.CatDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatDataFrameAnalyticsResponse, TContext>>
|
||||
mlDatafeeds<TContext = unknown>(params?: T.CatDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatDatafeedsResponse, TContext>>
|
||||
mlJobs<TContext = unknown>(params?: T.CatJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatJobsResponse, TContext>>
|
||||
mlTrainedModels<TContext = unknown>(params?: T.CatTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTrainedModelsResponse, TContext>>
|
||||
nodeattrs<TContext = unknown>(params?: T.CatNodeAttributesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodeAttributesResponse, TContext>>
|
||||
nodes<TContext = unknown>(params?: T.CatNodesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodesResponse, TContext>>
|
||||
pendingTasks<TContext = unknown>(params?: T.CatPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPendingTasksResponse, TContext>>
|
||||
plugins<TContext = unknown>(params?: T.CatPluginsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPluginsResponse, TContext>>
|
||||
recovery<TContext = unknown>(params?: T.CatRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRecoveryResponse, TContext>>
|
||||
repositories<TContext = unknown>(params?: T.CatRepositoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRepositoriesResponse, TContext>>
|
||||
segments<TContext = unknown>(params?: T.CatSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSegmentsResponse, TContext>>
|
||||
shards<TContext = unknown>(params?: T.CatShardsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatShardsResponse, TContext>>
|
||||
snapshots<TContext = unknown>(params?: T.CatSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSnapshotsResponse, TContext>>
|
||||
tasks<TContext = unknown>(params?: T.CatTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTasksResponse, TContext>>
|
||||
templates<TContext = unknown>(params?: T.CatTemplatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTemplatesResponse, TContext>>
|
||||
threadPool<TContext = unknown>(params?: T.CatThreadPoolRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatThreadPoolResponse, TContext>>
|
||||
transforms<TContext = unknown>(params?: T.CatTransformsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTransformsResponse, TContext>>
|
||||
}
|
||||
ccr: {
|
||||
deleteAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrDeleteAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
follow<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollow<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
followInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollowInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
followStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrFollowStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
forgetFollower<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrForgetFollower<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrGetAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
pauseAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPauseAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
pauseFollow<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPauseFollow, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putAutoFollowPattern<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrPutAutoFollowPattern<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
resumeAutoFollowPattern<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrResumeAutoFollowPattern, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
resumeFollow<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.CcrResumeFollow<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
unfollow<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.CcrUnfollow, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteAutoFollowPattern<TContext = unknown>(params: T.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrDeleteAutoFollowPatternResponse, TContext>>
|
||||
follow<TContext = unknown>(params: T.CcrCreateFollowIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrCreateFollowIndexResponse, TContext>>
|
||||
followInfo<TContext = unknown>(params: T.CcrFollowInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowInfoResponse, TContext>>
|
||||
followStats<TContext = unknown>(params: T.CcrFollowIndexStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowIndexStatsResponse, TContext>>
|
||||
forgetFollower<TContext = unknown>(params: T.CcrForgetFollowerIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrForgetFollowerIndexResponse, TContext>>
|
||||
getAutoFollowPattern<TContext = unknown>(params?: T.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrGetAutoFollowPatternResponse, TContext>>
|
||||
pauseAutoFollowPattern<TContext = unknown>(params: T.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseAutoFollowPatternResponse, TContext>>
|
||||
pauseFollow<TContext = unknown>(params: T.CcrPauseFollowIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseFollowIndexResponse, TContext>>
|
||||
putAutoFollowPattern<TContext = unknown>(params: T.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPutAutoFollowPatternResponse, TContext>>
|
||||
resumeAutoFollowPattern<TContext = unknown>(params: T.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeAutoFollowPatternResponse, TContext>>
|
||||
resumeFollow<TContext = unknown>(params: T.CcrResumeFollowIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeFollowIndexResponse, TContext>>
|
||||
stats<TContext = unknown>(params?: T.CcrStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrStatsResponse, TContext>>
|
||||
unfollow<TContext = unknown>(params: T.CcrUnfollowIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrUnfollowIndexResponse, TContext>>
|
||||
}
|
||||
clearScroll<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClearScroll<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
closePointInTime<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClosePointInTime<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearScroll<TContext = unknown>(params?: T.ClearScrollRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClearScrollResponse, TContext>>
|
||||
closePointInTime<TContext = unknown>(params?: T.ClosePointInTimeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClosePointInTimeResponse, TContext>>
|
||||
cluster: {
|
||||
allocationExplain<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterAllocationExplain<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteComponentTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterDeleteComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteVotingConfigExclusions<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterDeleteVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
existsComponentTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.ClusterExistsComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getComponentTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterGetComponentTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
health<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterHealth, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
pendingTasks<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPendingTasks, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
postVotingConfigExclusions<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPostVotingConfigExclusions, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putComponentTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPutComponentTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterPutSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
remoteInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterRemoteInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
reroute<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterReroute<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
state<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterState, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ClusterStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
allocationExplain<TContext = unknown>(params?: T.ClusterAllocationExplainRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterAllocationExplainResponse, TContext>>
|
||||
deleteComponentTemplate<TContext = unknown>(params: T.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterDeleteComponentTemplateResponse, TContext>>
|
||||
deleteVotingConfigExclusions<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
existsComponentTemplate<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getComponentTemplate<TContext = unknown>(params?: T.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetComponentTemplateResponse, TContext>>
|
||||
getSettings<TContext = unknown>(params?: T.ClusterGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetSettingsResponse, TContext>>
|
||||
health<TContext = unknown>(params?: T.ClusterHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterHealthResponse, TContext>>
|
||||
pendingTasks<TContext = unknown>(params?: T.ClusterPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPendingTasksResponse, TContext>>
|
||||
postVotingConfigExclusions<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putComponentTemplate<TContext = unknown>(params: T.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutComponentTemplateResponse, TContext>>
|
||||
putSettings<TContext = unknown>(params?: T.ClusterPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutSettingsResponse, TContext>>
|
||||
remoteInfo<TContext = unknown>(params?: T.ClusterRemoteInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRemoteInfoResponse, TContext>>
|
||||
reroute<TContext = unknown>(params?: T.ClusterRerouteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRerouteResponse, TContext>>
|
||||
state<TContext = unknown>(params?: T.ClusterStateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStateResponse, TContext>>
|
||||
stats<TContext = unknown>(params?: T.ClusterStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStatsResponse, TContext>>
|
||||
}
|
||||
count<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Count<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Create<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
count<TContext = unknown>(params?: T.CountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CountResponse, TContext>>
|
||||
create<TDocument = unknown, TContext = unknown>(params: T.CreateRequest<TDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CreateResponse, TContext>>
|
||||
danglingIndices: {
|
||||
deleteDanglingIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesDeleteDanglingIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
importDanglingIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesImportDanglingIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
listDanglingIndices<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DanglingIndicesListDanglingIndices, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteDanglingIndex<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
importDanglingIndex<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
listDanglingIndices<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Delete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteByQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteByQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteByQueryRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteByQueryRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteScript<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.DeleteScript, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
dataFrameTransformDeprecated: {
|
||||
deleteTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getTransformStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
previewTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
startTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
stopTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
updateTransform<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
delete<TContext = unknown>(params: T.DeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteResponse, TContext>>
|
||||
deleteByQuery<TContext = unknown>(params: T.DeleteByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteByQueryResponse, TContext>>
|
||||
deleteByQueryRethrottle<TContext = unknown>(params: T.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteByQueryRethrottleResponse, TContext>>
|
||||
deleteScript<TContext = unknown>(params: T.DeleteScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DeleteScriptResponse, TContext>>
|
||||
enrich: {
|
||||
deletePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichDeletePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
executePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichExecutePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getPolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichGetPolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putPolicy<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichPutPolicy<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EnrichStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deletePolicy<TContext = unknown>(params: T.EnrichDeletePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichDeletePolicyResponse, TContext>>
|
||||
executePolicy<TContext = unknown>(params: T.EnrichExecutePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichExecutePolicyResponse, TContext>>
|
||||
getPolicy<TContext = unknown>(params?: T.EnrichGetPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichGetPolicyResponse, TContext>>
|
||||
putPolicy<TContext = unknown>(params: T.EnrichPutPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichPutPolicyResponse, TContext>>
|
||||
stats<TContext = unknown>(params?: T.EnrichStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EnrichStatsResponse, TContext>>
|
||||
}
|
||||
eql: {
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.EqlSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
delete<TContext = unknown>(params: T.EqlDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlDeleteResponse, TContext>>
|
||||
get<TEvent = unknown, TContext = unknown>(params: T.EqlGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlGetResponse<TEvent>, TContext>>
|
||||
getStatus<TContext = unknown>(params: T.EqlGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlGetStatusResponse, TContext>>
|
||||
search<TEvent = unknown, TContext = unknown>(params: T.EqlSearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.EqlSearchResponse<TEvent>, TContext>>
|
||||
}
|
||||
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.Exists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
existsSource<TResponse = boolean, TContext = Context>(params?: RequestParams.ExistsSource, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
explain<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Explain<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
fieldCaps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.FieldCaps<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Get, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getScript<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScript, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getScriptContext<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScriptContext, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getScriptLanguages<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetScriptLanguages, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getSource<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.GetSource, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
exists<TContext = unknown>(params: T.ExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsResponse, TContext>>
|
||||
existsSource<TContext = unknown>(params: T.ExistsSourceRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExistsSourceResponse, TContext>>
|
||||
explain<TDocument = unknown, TContext = unknown>(params: T.ExplainRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ExplainResponse<TDocument>, TContext>>
|
||||
features: {
|
||||
getFeatures<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
resetFeatures<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
fieldCaps<TContext = unknown>(params?: T.FieldCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FieldCapsResponse, TContext>>
|
||||
fleet: {
|
||||
globalCheckpoints<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: {
|
||||
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: {
|
||||
deleteLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
explainLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmExplainLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmGetLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmGetStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
moveToStep<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmMoveToStep<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putLifecycle<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmPutLifecycle<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
removePolicy<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmRemovePolicy, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
retry<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmRetry, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IlmStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteLifecycle<TContext = unknown>(params: T.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmDeleteLifecycleResponse, TContext>>
|
||||
explainLifecycle<TContext = unknown>(params: T.IlmExplainLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmExplainLifecycleResponse, TContext>>
|
||||
getLifecycle<TContext = unknown>(params?: T.IlmGetLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmGetLifecycleResponse, TContext>>
|
||||
getStatus<TContext = unknown>(params?: T.IlmGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmGetStatusResponse, TContext>>
|
||||
migrateToDataTiers<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
moveToStep<TContext = unknown>(params: T.IlmMoveToStepRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmMoveToStepResponse, TContext>>
|
||||
putLifecycle<TContext = unknown>(params?: T.IlmPutLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmPutLifecycleResponse, TContext>>
|
||||
removePolicy<TContext = unknown>(params: T.IlmRemovePolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmRemovePolicyResponse, TContext>>
|
||||
retry<TContext = unknown>(params: T.IlmRetryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmRetryResponse, TContext>>
|
||||
start<TContext = unknown>(params?: T.IlmStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmStartResponse, TContext>>
|
||||
stop<TContext = unknown>(params?: T.IlmStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IlmStopResponse, TContext>>
|
||||
}
|
||||
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: {
|
||||
addBlock<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesAddBlock, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
analyze<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesAnalyze<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clone<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClone<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
close<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClose, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
createDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
dataStreamsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteIndexTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
existsAlias<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
existsIndexTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
existsTemplate<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
existsType<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExistsType, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
flush<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlush, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
flushSynced<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlushSynced, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
forcemerge<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesForcemerge, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
freeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getFieldMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetFieldMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getIndexTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetIndexTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getSettings<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetSettings, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTemplate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetTemplate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getUpgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesGetUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
open<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesOpen, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putAlias<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutAlias<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putIndexTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutIndexTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putMapping<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutMapping<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPutTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
recovery<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRecovery, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
refresh<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRefresh, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
reloadSearchAnalyzers<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesReloadSearchAnalyzers, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
resolveIndex<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesResolveIndex, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
rollover<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesRollover<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
segments<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSegments, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
shardStores<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesShardStores, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
shrink<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesShrink<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
simulateIndexTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSimulateIndexTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
simulateTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSimulateTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
split<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesSplit<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
unfreeze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUnfreeze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateAliases<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpdateAliases<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validateQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesValidateQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
addBlock<TContext = unknown>(params: T.IndicesAddBlockRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesAddBlockResponse, TContext>>
|
||||
analyze<TContext = unknown>(params?: T.IndicesAnalyzeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesAnalyzeResponse, TContext>>
|
||||
clearCache<TContext = unknown>(params?: T.IndicesClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesClearCacheResponse, TContext>>
|
||||
clone<TContext = unknown>(params: T.IndicesCloneRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCloneResponse, TContext>>
|
||||
close<TContext = unknown>(params: T.IndicesCloseRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCloseResponse, TContext>>
|
||||
create<TContext = unknown>(params: T.IndicesCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCreateResponse, TContext>>
|
||||
createDataStream<TContext = unknown>(params: T.IndicesCreateDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesCreateDataStreamResponse, TContext>>
|
||||
dataStreamsStats<TContext = unknown>(params?: T.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDataStreamsStatsResponse, TContext>>
|
||||
delete<TContext = unknown>(params: T.IndicesDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteResponse, TContext>>
|
||||
deleteAlias<TContext = unknown>(params: T.IndicesDeleteAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteAliasResponse, TContext>>
|
||||
deleteDataStream<TContext = unknown>(params: T.IndicesDeleteDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteDataStreamResponse, TContext>>
|
||||
deleteIndexTemplate<TContext = unknown>(params: T.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteIndexTemplateResponse, TContext>>
|
||||
deleteTemplate<TContext = unknown>(params: T.IndicesDeleteTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDeleteTemplateResponse, TContext>>
|
||||
diskUsage<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
exists<TContext = unknown>(params: T.IndicesExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsResponse, TContext>>
|
||||
existsAlias<TContext = unknown>(params: T.IndicesExistsAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsAliasResponse, TContext>>
|
||||
existsIndexTemplate<TContext = unknown>(params: T.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsIndexTemplateResponse, TContext>>
|
||||
existsTemplate<TContext = unknown>(params: T.IndicesExistsTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTemplateResponse, TContext>>
|
||||
existsType<TContext = unknown>(params: T.IndicesExistsTypeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTypeResponse, TContext>>
|
||||
fieldUsageStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
flush<TContext = unknown>(params?: T.IndicesFlushRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushResponse, TContext>>
|
||||
flushSynced<TContext = unknown>(params?: T.IndicesFlushSyncedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushSyncedResponse, TContext>>
|
||||
forcemerge<TContext = unknown>(params?: T.IndicesForcemergeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesForcemergeResponse, TContext>>
|
||||
freeze<TContext = unknown>(params: T.IndicesFreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFreezeResponse, TContext>>
|
||||
get<TContext = unknown>(params: T.IndicesGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetResponse, TContext>>
|
||||
getAlias<TContext = unknown>(params?: T.IndicesGetAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetAliasResponse, TContext>>
|
||||
getDataStream<TContext = unknown>(params?: T.IndicesGetDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetDataStreamResponse, TContext>>
|
||||
getFieldMapping<TContext = unknown>(params: T.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetFieldMappingResponse, TContext>>
|
||||
getIndexTemplate<TContext = unknown>(params?: T.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetIndexTemplateResponse, TContext>>
|
||||
getMapping<TContext = unknown>(params?: T.IndicesGetMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetMappingResponse, TContext>>
|
||||
getSettings<TContext = unknown>(params?: T.IndicesGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetSettingsResponse, TContext>>
|
||||
getTemplate<TContext = unknown>(params?: T.IndicesGetTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetTemplateResponse, TContext>>
|
||||
getUpgrade<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
migrateToDataStream<TContext = unknown>(params: T.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesMigrateToDataStreamResponse, TContext>>
|
||||
open<TContext = unknown>(params: T.IndicesOpenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesOpenResponse, TContext>>
|
||||
promoteDataStream<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putAlias<TContext = unknown>(params: T.IndicesPutAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutAliasResponse, TContext>>
|
||||
putIndexTemplate<TContext = unknown>(params: T.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutIndexTemplateResponse, TContext>>
|
||||
putMapping<TContext = unknown>(params?: T.IndicesPutMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutMappingResponse, TContext>>
|
||||
putSettings<TContext = unknown>(params?: T.IndicesPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutSettingsResponse, TContext>>
|
||||
putTemplate<TContext = unknown>(params: T.IndicesPutTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutTemplateResponse, TContext>>
|
||||
recovery<TContext = unknown>(params?: T.IndicesRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRecoveryResponse, TContext>>
|
||||
refresh<TContext = unknown>(params?: T.IndicesRefreshRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRefreshResponse, TContext>>
|
||||
reloadSearchAnalyzers<TContext = unknown>(params: T.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesReloadSearchAnalyzersResponse, TContext>>
|
||||
resolveIndex<TContext = unknown>(params: T.IndicesResolveIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesResolveIndexResponse, TContext>>
|
||||
rollover<TContext = unknown>(params: T.IndicesRolloverRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRolloverResponse, TContext>>
|
||||
segments<TContext = unknown>(params?: T.IndicesSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSegmentsResponse, TContext>>
|
||||
shardStores<TContext = unknown>(params?: T.IndicesShardStoresRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShardStoresResponse, TContext>>
|
||||
shrink<TContext = unknown>(params: T.IndicesShrinkRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShrinkResponse, TContext>>
|
||||
simulateIndexTemplate<TContext = unknown>(params?: T.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateIndexTemplateResponse, TContext>>
|
||||
simulateTemplate<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
split<TContext = unknown>(params: T.IndicesSplitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSplitResponse, TContext>>
|
||||
stats<TContext = unknown>(params?: T.IndicesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesStatsResponse, TContext>>
|
||||
unfreeze<TContext = unknown>(params: T.IndicesUnfreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUnfreezeResponse, TContext>>
|
||||
updateAliases<TContext = unknown>(params?: T.IndicesUpdateAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUpdateAliasesResponse, TContext>>
|
||||
upgrade<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, 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: {
|
||||
deletePipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestDeletePipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getPipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestGetPipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
processorGrok<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestProcessorGrok, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putPipeline<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IngestPutPipeline<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
simulate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IngestSimulate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deletePipeline<TContext = unknown>(params: T.IngestDeletePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestDeletePipelineResponse, TContext>>
|
||||
geoIpStats<TContext = unknown>(params?: T.IngestGeoIpStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestGeoIpStatsResponse, TContext>>
|
||||
getPipeline<TContext = unknown>(params?: T.IngestGetPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestGetPipelineResponse, TContext>>
|
||||
processorGrok<TContext = unknown>(params?: T.IngestProcessorGrokRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestProcessorGrokResponse, TContext>>
|
||||
putPipeline<TContext = unknown>(params: T.IngestPutPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestPutPipelineResponse, TContext>>
|
||||
simulate<TContext = unknown>(params?: T.IngestSimulatePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestSimulatePipelineResponse, TContext>>
|
||||
}
|
||||
license: {
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getBasicStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGetBasicStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTrialStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicenseGetTrialStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
post<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePost<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
postStartBasic<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePostStartBasic, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
postStartTrial<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LicensePostStartTrial, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
delete<TContext = unknown>(params?: T.LicenseDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseDeleteResponse, TContext>>
|
||||
get<TContext = unknown>(params?: T.LicenseGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetResponse, TContext>>
|
||||
getBasicStatus<TContext = unknown>(params?: T.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetBasicStatusResponse, TContext>>
|
||||
getTrialStatus<TContext = unknown>(params?: T.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicenseGetTrialStatusResponse, TContext>>
|
||||
post<TContext = unknown>(params?: T.LicensePostRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostResponse, TContext>>
|
||||
postStartBasic<TContext = unknown>(params?: T.LicensePostStartBasicRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostStartBasicResponse, TContext>>
|
||||
postStartTrial<TContext = unknown>(params?: T.LicensePostStartTrialRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LicensePostStartTrialResponse, TContext>>
|
||||
}
|
||||
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?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getPipeline<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putPipeline<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
mget<TDocument = unknown, TContext = unknown>(params?: T.MgetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MgetResponse<TDocument>, TContext>>
|
||||
migration: {
|
||||
deprecations<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationDeprecations, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deprecations<TContext = unknown>(params?: T.MigrationDeprecationInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MigrationDeprecationInfoResponse, TContext>>
|
||||
}
|
||||
ml: {
|
||||
closeJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlCloseJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteCalendar<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendar, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteCalendarEvent<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendarEvent, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteCalendarJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteCalendarJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteExpiredData<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteExpiredData<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteFilter<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteFilter, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteForecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteModelSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteModelSnapshot, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteTrainedModel<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteTrainedModel, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
estimateModelMemory<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEstimateModelMemory<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
evaluateDataFrame<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEvaluateDataFrame<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
explainDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlExplainDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
findFileStructure<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MlFindFileStructure<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
flushJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlFlushJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
forecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getBuckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getCalendarEvents<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCalendarEvents, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getCalendars<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCalendars<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getCategories<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetCategories<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getDataFrameAnalytics<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDataFrameAnalytics, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getDataFrameAnalyticsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDataFrameAnalyticsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getDatafeedStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDatafeedStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getDatafeeds<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetDatafeeds, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getFilters<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetFilters, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getInfluencers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetInfluencers<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getJobStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetJobStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getModelSnapshots<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetModelSnapshots<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getOverallBuckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetOverallBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getRecords<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetRecords<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTrainedModels<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetTrainedModels, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTrainedModelsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetTrainedModelsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
openJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
postCalendarEvents<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostCalendarEvents<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
postData<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostData<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putCalendar<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendar<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putCalendarJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendarJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putTrainedModel<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutTrainedModel<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
revertModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlRevertModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
setUpgradeMode<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlSetUpgradeMode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
startDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
startDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateModelSnapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
validateDetector<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlValidateDetector<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
closeJob<TContext = unknown>(params: T.MlCloseJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlCloseJobResponse, TContext>>
|
||||
deleteCalendar<TContext = unknown>(params: T.MlDeleteCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarResponse, TContext>>
|
||||
deleteCalendarEvent<TContext = unknown>(params: T.MlDeleteCalendarEventRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarEventResponse, TContext>>
|
||||
deleteCalendarJob<TContext = unknown>(params: T.MlDeleteCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteCalendarJobResponse, TContext>>
|
||||
deleteDataFrameAnalytics<TContext = unknown>(params: T.MlDeleteDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteDataFrameAnalyticsResponse, TContext>>
|
||||
deleteDatafeed<TContext = unknown>(params: T.MlDeleteDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteDatafeedResponse, TContext>>
|
||||
deleteExpiredData<TContext = unknown>(params?: T.MlDeleteExpiredDataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteExpiredDataResponse, TContext>>
|
||||
deleteFilter<TContext = unknown>(params: T.MlDeleteFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteFilterResponse, TContext>>
|
||||
deleteForecast<TContext = unknown>(params: T.MlDeleteForecastRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteForecastResponse, TContext>>
|
||||
deleteJob<TContext = unknown>(params: T.MlDeleteJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteJobResponse, TContext>>
|
||||
deleteModelSnapshot<TContext = unknown>(params: T.MlDeleteModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteModelSnapshotResponse, TContext>>
|
||||
deleteTrainedModel<TContext = unknown>(params: T.MlDeleteTrainedModelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteTrainedModelResponse, TContext>>
|
||||
deleteTrainedModelAlias<TContext = unknown>(params: T.MlDeleteTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlDeleteTrainedModelAliasResponse, TContext>>
|
||||
estimateModelMemory<TContext = unknown>(params?: T.MlEstimateModelMemoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlEstimateModelMemoryResponse, TContext>>
|
||||
evaluateDataFrame<TContext = unknown>(params?: T.MlEvaluateDataFrameRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlEvaluateDataFrameResponse, TContext>>
|
||||
explainDataFrameAnalytics<TContext = unknown>(params?: T.MlExplainDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlExplainDataFrameAnalyticsResponse, TContext>>
|
||||
findFileStructure<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
flushJob<TContext = unknown>(params: T.MlFlushJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlFlushJobResponse, TContext>>
|
||||
forecast<TContext = unknown>(params: T.MlForecastJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlForecastJobResponse, TContext>>
|
||||
getBuckets<TContext = unknown>(params: T.MlGetBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetBucketsResponse, TContext>>
|
||||
getCalendarEvents<TContext = unknown>(params: T.MlGetCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarEventsResponse, TContext>>
|
||||
getCalendars<TContext = unknown>(params?: T.MlGetCalendarsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarsResponse, TContext>>
|
||||
getCategories<TContext = unknown>(params: T.MlGetCategoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCategoriesResponse, TContext>>
|
||||
getDataFrameAnalytics<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsResponse, TContext>>
|
||||
getDataFrameAnalyticsStats<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsStatsResponse, TContext>>
|
||||
getDatafeedStats<TContext = unknown>(params?: T.MlGetDatafeedStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedStatsResponse, TContext>>
|
||||
getDatafeeds<TContext = unknown>(params?: T.MlGetDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedsResponse, TContext>>
|
||||
getFilters<TContext = unknown>(params?: T.MlGetFiltersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetFiltersResponse, TContext>>
|
||||
getInfluencers<TContext = unknown>(params: T.MlGetInfluencersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetInfluencersResponse, TContext>>
|
||||
getJobStats<TContext = unknown>(params?: T.MlGetJobStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobStatsResponse, TContext>>
|
||||
getJobs<TContext = unknown>(params?: T.MlGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobsResponse, TContext>>
|
||||
getModelSnapshots<TContext = unknown>(params: T.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetModelSnapshotsResponse, TContext>>
|
||||
getOverallBuckets<TContext = unknown>(params: T.MlGetOverallBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetOverallBucketsResponse, TContext>>
|
||||
getRecords<TContext = unknown>(params: T.MlGetAnomalyRecordsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetAnomalyRecordsResponse, TContext>>
|
||||
getTrainedModels<TContext = unknown>(params?: T.MlGetTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsResponse, TContext>>
|
||||
getTrainedModelsStats<TContext = unknown>(params?: T.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsStatsResponse, TContext>>
|
||||
info<TContext = unknown>(params?: T.MlInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlInfoResponse, TContext>>
|
||||
openJob<TContext = unknown>(params: T.MlOpenJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlOpenJobResponse, TContext>>
|
||||
postCalendarEvents<TContext = unknown>(params?: T.MlPostCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostCalendarEventsResponse, TContext>>
|
||||
postData<TContext = unknown>(params: T.MlPostJobDataRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostJobDataResponse, TContext>>
|
||||
previewDataFrameAnalytics<TContext = unknown>(params?: T.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDataFrameAnalyticsResponse, TContext>>
|
||||
previewDatafeed<TDocument = unknown, TContext = unknown>(params?: T.MlPreviewDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDatafeedResponse<TDocument>, TContext>>
|
||||
putCalendar<TContext = unknown>(params: T.MlPutCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarResponse, TContext>>
|
||||
putCalendarJob<TContext = unknown>(params: T.MlPutCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarJobResponse, TContext>>
|
||||
putDataFrameAnalytics<TContext = unknown>(params: T.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDataFrameAnalyticsResponse, TContext>>
|
||||
putDatafeed<TContext = unknown>(params: T.MlPutDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDatafeedResponse, TContext>>
|
||||
putFilter<TContext = unknown>(params: T.MlPutFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutFilterResponse, TContext>>
|
||||
putJob<TContext = unknown>(params: T.MlPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutJobResponse, TContext>>
|
||||
putTrainedModel<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putTrainedModelAlias<TContext = unknown>(params: T.MlPutTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelAliasResponse, TContext>>
|
||||
resetJob<TContext = unknown>(params: T.MlResetJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlResetJobResponse, TContext>>
|
||||
revertModelSnapshot<TContext = unknown>(params: T.MlRevertModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlRevertModelSnapshotResponse, TContext>>
|
||||
setUpgradeMode<TContext = unknown>(params?: T.MlSetUpgradeModeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlSetUpgradeModeResponse, TContext>>
|
||||
startDataFrameAnalytics<TContext = unknown>(params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDataFrameAnalyticsResponse, TContext>>
|
||||
startDatafeed<TContext = unknown>(params: T.MlStartDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDatafeedResponse, TContext>>
|
||||
stopDataFrameAnalytics<TContext = unknown>(params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDataFrameAnalyticsResponse, TContext>>
|
||||
stopDatafeed<TContext = unknown>(params: T.MlStopDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDatafeedResponse, TContext>>
|
||||
updateDataFrameAnalytics<TContext = unknown>(params: T.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateDataFrameAnalyticsResponse, TContext>>
|
||||
updateDatafeed<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
updateFilter<TContext = unknown>(params: T.MlUpdateFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateFilterResponse, TContext>>
|
||||
updateJob<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, 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.MlValidateJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlValidateJobResponse, TContext>>
|
||||
validateDetector<TContext = unknown>(params?: T.MlValidateDetectorRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlValidateDetectorResponse, TContext>>
|
||||
}
|
||||
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<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Msearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
msearchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MsearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
mtermvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Mtermvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
msearch<TDocument = unknown, TContext = unknown>(params?: T.MsearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MsearchResponse<TDocument>, TContext>>
|
||||
msearchTemplate<TDocument = unknown, TContext = unknown>(params?: T.MsearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MsearchTemplateResponse<TDocument>, TContext>>
|
||||
mtermvectors<TContext = unknown>(params?: T.MtermvectorsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MtermvectorsResponse, TContext>>
|
||||
nodes: {
|
||||
hotThreads<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesHotThreads, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
reloadSecureSettings<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.NodesReloadSecureSettings<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearMeteringArchive<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getMeteringInfo<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
hotThreads<TContext = unknown>(params?: T.NodesHotThreadsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesHotThreadsResponse, TContext>>
|
||||
info<TContext = unknown>(params?: T.NodesInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesInfoResponse, TContext>>
|
||||
reloadSecureSettings<TContext = unknown>(params?: T.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesReloadSecureSettingsResponse, TContext>>
|
||||
stats<TContext = unknown>(params?: T.NodesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesStatsResponse, TContext>>
|
||||
usage<TContext = unknown>(params?: T.NodesUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesUsageResponse, TContext>>
|
||||
}
|
||||
openPointInTime<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.OpenPointInTime, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
ping<TResponse = boolean, TContext = Context>(params?: RequestParams.Ping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putScript<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.PutScript<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
rankEval<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RankEval<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
reindex<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Reindex<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
reindexRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ReindexRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
renderSearchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RenderSearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
openPointInTime<TContext = unknown>(params: T.OpenPointInTimeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.OpenPointInTimeResponse, TContext>>
|
||||
ping<TContext = unknown>(params?: T.PingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PingResponse, TContext>>
|
||||
putScript<TContext = unknown>(params: T.PutScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.PutScriptResponse, TContext>>
|
||||
rankEval<TContext = unknown>(params: T.RankEvalRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RankEvalResponse, TContext>>
|
||||
reindex<TContext = unknown>(params?: T.ReindexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ReindexResponse, TContext>>
|
||||
reindexRethrottle<TContext = unknown>(params: T.ReindexRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ReindexRethrottleResponse, TContext>>
|
||||
renderSearchTemplate<TContext = unknown>(params?: T.RenderSearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RenderSearchTemplateResponse, TContext>>
|
||||
rollup: {
|
||||
deleteJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupDeleteJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getJobs<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetJobs, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getRollupCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getRollupIndexCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupIndexCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
rollupSearch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollupSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
startJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStartJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStopJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteJob<TContext = unknown>(params: T.RollupDeleteRollupJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupDeleteRollupJobResponse, TContext>>
|
||||
getJobs<TContext = unknown>(params?: T.RollupGetRollupJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupJobResponse, TContext>>
|
||||
getRollupCaps<TContext = unknown>(params?: T.RollupGetRollupCapabilitiesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupCapabilitiesResponse, TContext>>
|
||||
getRollupIndexCaps<TContext = unknown>(params: T.RollupGetRollupIndexCapabilitiesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupIndexCapabilitiesResponse, TContext>>
|
||||
putJob<TContext = unknown>(params: T.RollupCreateRollupJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupCreateRollupJobResponse, TContext>>
|
||||
rollup<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
rollupSearch<TDocument = unknown, TContext = unknown>(params: T.RollupRollupSearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupSearchResponse<TDocument>, TContext>>
|
||||
startJob<TContext = unknown>(params: T.RollupStartRollupJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStartRollupJobResponse, TContext>>
|
||||
stopJob<TContext = unknown>(params: T.RollupStopRollupJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStopRollupJobResponse, TContext>>
|
||||
}
|
||||
scriptsPainlessExecute<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ScriptsPainlessExecute<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
scroll<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Scroll<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Search<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
searchShards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
searchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchTemplate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
scriptsPainlessExecute<TResult = unknown, TContext = unknown>(params?: T.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ScriptsPainlessExecuteResponse<TResult>, TContext>>
|
||||
scroll<TDocument = unknown, TContext = unknown>(params?: T.ScrollRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ScrollResponse<TDocument>, TContext>>
|
||||
search<TDocument = unknown, TContext = unknown>(params?: T.SearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchResponse<TDocument>, TContext>>
|
||||
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: {
|
||||
clearCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
mount<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsMount<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
repositoryStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsRepositoryStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
cacheStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
clearCache<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
mount<TContext = unknown>(params: T.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsMountResponse, TContext>>
|
||||
repositoryStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
stats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
security: {
|
||||
authenticate<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityAuthenticate, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
changePassword<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityChangePassword<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearApiKeyCache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearApiKeyCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCachedPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCachedRealms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRealms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedRoles, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
createApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityCreateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deletePrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeletePrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteRole<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteRole, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteRoleMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteRoleMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
disableUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDisableUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
enableUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityEnableUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getApiKey<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetApiKey, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getBuiltinPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetBuiltinPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getRole<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetRole, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getRoleMapping<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetRoleMapping, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getToken<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getUser<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getUserPrivileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetUserPrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
hasPrivileges<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityHasPrivileges<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
invalidateApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityInvalidateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
invalidateToken<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityInvalidateToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putPrivileges<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutPrivileges<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putRole<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutRole<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putRoleMapping<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutRoleMapping<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putUser<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityPutUser<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
authenticate<TContext = unknown>(params?: T.SecurityAuthenticateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityAuthenticateResponse, TContext>>
|
||||
changePassword<TContext = unknown>(params?: T.SecurityChangePasswordRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityChangePasswordResponse, TContext>>
|
||||
clearApiKeyCache<TContext = unknown>(params?: T.SecurityClearApiKeyCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearApiKeyCacheResponse, TContext>>
|
||||
clearCachedPrivileges<TContext = unknown>(params: T.SecurityClearCachedPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedPrivilegesResponse, TContext>>
|
||||
clearCachedRealms<TContext = unknown>(params: T.SecurityClearCachedRealmsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedRealmsResponse, TContext>>
|
||||
clearCachedRoles<TContext = unknown>(params: T.SecurityClearCachedRolesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedRolesResponse, TContext>>
|
||||
clearCachedServiceTokens<TContext = unknown>(params: T.SecurityClearCachedServiceTokensRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityClearCachedServiceTokensResponse, TContext>>
|
||||
createApiKey<TContext = unknown>(params?: T.SecurityCreateApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityCreateApiKeyResponse, TContext>>
|
||||
createServiceToken<TContext = unknown>(params: T.SecurityCreateServiceTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityCreateServiceTokenResponse, TContext>>
|
||||
deletePrivileges<TContext = unknown>(params: T.SecurityDeletePrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeletePrivilegesResponse, TContext>>
|
||||
deleteRole<TContext = unknown>(params: T.SecurityDeleteRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteRoleResponse, TContext>>
|
||||
deleteRoleMapping<TContext = unknown>(params: T.SecurityDeleteRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteRoleMappingResponse, TContext>>
|
||||
deleteServiceToken<TContext = unknown>(params: T.SecurityDeleteServiceTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteServiceTokenResponse, TContext>>
|
||||
deleteUser<TContext = unknown>(params: T.SecurityDeleteUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDeleteUserResponse, TContext>>
|
||||
disableUser<TContext = unknown>(params: T.SecurityDisableUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityDisableUserResponse, TContext>>
|
||||
enableUser<TContext = unknown>(params: T.SecurityEnableUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityEnableUserResponse, TContext>>
|
||||
getApiKey<TContext = unknown>(params?: T.SecurityGetApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetApiKeyResponse, TContext>>
|
||||
getBuiltinPrivileges<TContext = unknown>(params?: T.SecurityGetBuiltinPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetBuiltinPrivilegesResponse, TContext>>
|
||||
getPrivileges<TContext = unknown>(params?: T.SecurityGetPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetPrivilegesResponse, TContext>>
|
||||
getRole<TContext = unknown>(params?: T.SecurityGetRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetRoleResponse, TContext>>
|
||||
getRoleMapping<TContext = unknown>(params?: T.SecurityGetRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetRoleMappingResponse, TContext>>
|
||||
getServiceAccounts<TContext = unknown>(params?: T.SecurityGetServiceAccountsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetServiceAccountsResponse, TContext>>
|
||||
getServiceCredentials<TContext = unknown>(params: T.SecurityGetServiceCredentialsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetServiceCredentialsResponse, TContext>>
|
||||
getToken<TContext = unknown>(params?: T.SecurityGetTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetTokenResponse, TContext>>
|
||||
getUser<TContext = unknown>(params?: T.SecurityGetUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetUserResponse, TContext>>
|
||||
getUserPrivileges<TContext = unknown>(params?: T.SecurityGetUserPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGetUserPrivilegesResponse, TContext>>
|
||||
grantApiKey<TContext = unknown>(params?: T.SecurityGrantApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityGrantApiKeyResponse, TContext>>
|
||||
hasPrivileges<TContext = unknown>(params?: T.SecurityHasPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityHasPrivilegesResponse, TContext>>
|
||||
invalidateApiKey<TContext = unknown>(params?: T.SecurityInvalidateApiKeyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityInvalidateApiKeyResponse, TContext>>
|
||||
invalidateToken<TContext = unknown>(params?: T.SecurityInvalidateTokenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityInvalidateTokenResponse, TContext>>
|
||||
putPrivileges<TContext = unknown>(params?: T.SecurityPutPrivilegesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutPrivilegesResponse, TContext>>
|
||||
putRole<TContext = unknown>(params: T.SecurityPutRoleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutRoleResponse, TContext>>
|
||||
putRoleMapping<TContext = unknown>(params: T.SecurityPutRoleMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutRoleMappingResponse, TContext>>
|
||||
putUser<TContext = unknown>(params: T.SecurityPutUserRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SecurityPutUserResponse, TContext>>
|
||||
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?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getNode<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
putNode<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
}
|
||||
slm: {
|
||||
deleteLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
executeLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmExecuteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
executeRetention<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmExecuteRetention, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getLifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmGetStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putLifecycle<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SlmPutLifecycle<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteLifecycle<TContext = unknown>(params: T.SlmDeleteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmDeleteLifecycleResponse, TContext>>
|
||||
executeLifecycle<TContext = unknown>(params: T.SlmExecuteLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmExecuteLifecycleResponse, TContext>>
|
||||
executeRetention<TContext = unknown>(params?: T.SlmExecuteRetentionRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmExecuteRetentionResponse, TContext>>
|
||||
getLifecycle<TContext = unknown>(params?: T.SlmGetLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetLifecycleResponse, TContext>>
|
||||
getStats<TContext = unknown>(params?: T.SlmGetStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetStatsResponse, TContext>>
|
||||
getStatus<TContext = unknown>(params?: T.SlmGetStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmGetStatusResponse, TContext>>
|
||||
putLifecycle<TContext = unknown>(params: T.SlmPutLifecycleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmPutLifecycleResponse, TContext>>
|
||||
start<TContext = unknown>(params?: T.SlmStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmStartResponse, TContext>>
|
||||
stop<TContext = unknown>(params?: T.SlmStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SlmStopResponse, TContext>>
|
||||
}
|
||||
snapshot: {
|
||||
cleanupRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCleanupRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
createRepository<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotCreateRepository<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotDeleteRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotGetRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
restore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotRestore<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
verifyRepository<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotVerifyRepository, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
cleanupRepository<TContext = unknown>(params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCleanupRepositoryResponse, TContext>>
|
||||
clone<TContext = unknown>(params: T.SnapshotCloneRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCloneResponse, TContext>>
|
||||
create<TContext = unknown>(params: T.SnapshotCreateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCreateResponse, TContext>>
|
||||
createRepository<TContext = unknown>(params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotCreateRepositoryResponse, TContext>>
|
||||
delete<TContext = unknown>(params: T.SnapshotDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotDeleteResponse, TContext>>
|
||||
deleteRepository<TContext = unknown>(params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotDeleteRepositoryResponse, TContext>>
|
||||
get<TContext = unknown>(params: T.SnapshotGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotGetResponse, TContext>>
|
||||
getRepository<TContext = unknown>(params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotGetRepositoryResponse, TContext>>
|
||||
repositoryAnalyze<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
restore<TContext = unknown>(params: T.SnapshotRestoreRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotRestoreResponse, TContext>>
|
||||
status<TContext = unknown>(params?: T.SnapshotStatusRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotStatusResponse, TContext>>
|
||||
verifyRepository<TContext = unknown>(params: T.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SnapshotVerifyRepositoryResponse, TContext>>
|
||||
}
|
||||
sql: {
|
||||
clearCursor<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlClearCursor<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
translate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlTranslate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
clearCursor<TContext = unknown>(params?: T.SqlClearCursorRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlClearCursorResponse, TContext>>
|
||||
deleteAsync<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getAsync<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
getAsyncStatus<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
query<TContext = unknown>(params?: T.SqlQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlQueryResponse, TContext>>
|
||||
translate<TContext = unknown>(params?: T.SqlTranslateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SqlTranslateResponse, TContext>>
|
||||
}
|
||||
ssl: {
|
||||
certificates<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SslCertificates, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
certificates<TContext = unknown>(params?: T.SslGetCertificatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SslGetCertificatesResponse, TContext>>
|
||||
}
|
||||
tasks: {
|
||||
cancel<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksCancel, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksGet, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
list<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TasksList, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
cancel<TContext = unknown>(params?: T.TaskCancelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TaskCancelResponse, TContext>>
|
||||
get<TContext = unknown>(params: T.TaskGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TaskGetResponse, TContext>>
|
||||
list<TContext = unknown>(params?: T.TaskListRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TaskListResponse, 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: {
|
||||
deleteTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformDeleteTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformGetTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getTransformStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformGetTransformStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
previewTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformPreviewTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformPutTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
startTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformStartTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopTransform<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformStopTransform, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TransformUpdateTransform<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteTransform<TContext = unknown>(params: T.TransformDeleteTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformDeleteTransformResponse, TContext>>
|
||||
getTransform<TContext = unknown>(params?: T.TransformGetTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformGetTransformResponse, TContext>>
|
||||
getTransformStats<TContext = unknown>(params: T.TransformGetTransformStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformGetTransformStatsResponse, TContext>>
|
||||
previewTransform<TTransform = unknown, TContext = unknown>(params?: T.TransformPreviewTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformPreviewTransformResponse<TTransform>, TContext>>
|
||||
putTransform<TContext = unknown>(params: T.TransformPutTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformPutTransformResponse, TContext>>
|
||||
startTransform<TContext = unknown>(params: T.TransformStartTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformStartTransformResponse, TContext>>
|
||||
stopTransform<TContext = unknown>(params: T.TransformStopTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformStopTransformResponse, TContext>>
|
||||
updateTransform<TContext = unknown>(params?: T.TransformUpdateTransformRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TransformUpdateTransformResponse, TContext>>
|
||||
}
|
||||
update<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Update<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateByQuery<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.UpdateByQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateByQueryRethrottle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.UpdateByQueryRethrottle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
update<TDocumentR = unknown, TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateResponse<TDocumentR>, TContext>>
|
||||
updateByQuery<TContext = unknown>(params: T.UpdateByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateByQueryResponse, TContext>>
|
||||
updateByQueryRethrottle<TContext = unknown>(params: T.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.UpdateByQueryRethrottleResponse, TContext>>
|
||||
watcher: {
|
||||
ackWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherAckWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
activateWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherActivateWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deactivateWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherDeactivateWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherDeleteWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
executeWatch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherExecuteWatch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
getWatch<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherGetWatch, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
putWatch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherPutWatch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
start<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStart, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stop<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherStop, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
ackWatch<TContext = unknown>(params: T.WatcherAckWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherAckWatchResponse, TContext>>
|
||||
activateWatch<TContext = unknown>(params: T.WatcherActivateWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherActivateWatchResponse, TContext>>
|
||||
deactivateWatch<TContext = unknown>(params: T.WatcherDeactivateWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherDeactivateWatchResponse, TContext>>
|
||||
deleteWatch<TContext = unknown>(params: T.WatcherDeleteWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherDeleteWatchResponse, TContext>>
|
||||
executeWatch<TContext = unknown>(params?: T.WatcherExecuteWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherExecuteWatchResponse, TContext>>
|
||||
getWatch<TContext = unknown>(params: T.WatcherGetWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherGetWatchResponse, TContext>>
|
||||
putWatch<TContext = unknown>(params: T.WatcherPutWatchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherPutWatchResponse, TContext>>
|
||||
queryWatches<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
|
||||
start<TContext = unknown>(params?: T.WatcherStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStartResponse, TContext>>
|
||||
stats<TContext = unknown>(params?: T.WatcherStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStatsResponse, TContext>>
|
||||
stop<TContext = unknown>(params?: T.WatcherStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStopResponse, TContext>>
|
||||
}
|
||||
xpack: {
|
||||
info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.XpackInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.XpackUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
info<TContext = unknown>(params?: T.XpackInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.XpackInfoResponse, TContext>>
|
||||
usage<TContext = unknown>(params?: T.XpackUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.XpackUsageResponse, TContext>>
|
||||
}
|
||||
/* /GENERATED */
|
||||
}
|
||||
|
||||
export { KibanaClient }
|
||||
|
||||
1585
api/new.d.ts
vendored
Normal file
1585
api/new.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
344
api/requestParams.d.ts
vendored
344
api/requestParams.d.ts
vendored
@ -39,8 +39,14 @@ export interface AsyncSearchGet extends Generic {
|
||||
typed_keys?: boolean;
|
||||
}
|
||||
|
||||
export interface AsyncSearchStatus extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AsyncSearchSubmit<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
wait_for_completion_timeout?: string;
|
||||
keep_on_completion?: boolean;
|
||||
keep_alive?: string;
|
||||
@ -89,7 +95,7 @@ export interface AutoscalingDeleteAutoscalingPolicy extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AutoscalingGetAutoscalingDecision extends Generic {
|
||||
export interface AutoscalingGetAutoscalingCapacity extends Generic {
|
||||
}
|
||||
|
||||
export interface AutoscalingGetAutoscalingPolicy extends Generic {
|
||||
@ -104,6 +110,8 @@ export interface AutoscalingPutAutoscalingPolicy<T = RequestBody> extends Generi
|
||||
export interface Bulk<T = RequestNDBody> extends Generic {
|
||||
index?: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
wait_for_active_shards?: string;
|
||||
refresh?: 'wait_for' | boolean;
|
||||
routing?: string;
|
||||
@ -272,6 +280,7 @@ export interface CatNodes extends Generic {
|
||||
s?: string | string[];
|
||||
time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos';
|
||||
v?: boolean;
|
||||
include_unloaded_segments?: boolean;
|
||||
}
|
||||
|
||||
export interface CatPendingTasks extends Generic {
|
||||
@ -291,6 +300,7 @@ export interface CatPlugins extends Generic {
|
||||
master_timeout?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
include_bootstrap?: boolean;
|
||||
s?: string | string[];
|
||||
v?: boolean;
|
||||
}
|
||||
@ -355,10 +365,10 @@ export interface CatSnapshots extends Generic {
|
||||
|
||||
export interface CatTasks extends Generic {
|
||||
format?: string;
|
||||
node_id?: string | string[];
|
||||
nodes?: string | string[];
|
||||
actions?: string | string[];
|
||||
detailed?: boolean;
|
||||
parent_task?: number;
|
||||
parent_task_id?: string;
|
||||
h?: string | string[];
|
||||
help?: boolean;
|
||||
s?: string | string[];
|
||||
@ -557,8 +567,8 @@ export interface ClusterReroute<T = RequestBody> extends Generic {
|
||||
}
|
||||
|
||||
export interface ClusterState extends Generic {
|
||||
metric?: string | string[];
|
||||
index?: string | string[];
|
||||
metric?: string | string[];
|
||||
local?: boolean;
|
||||
master_timeout?: string;
|
||||
flat_settings?: boolean;
|
||||
@ -643,6 +653,8 @@ export interface Delete extends Generic {
|
||||
export interface DeleteByQuery<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
type?: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
@ -721,6 +733,10 @@ export interface EqlGet extends Generic {
|
||||
keep_alive?: string;
|
||||
}
|
||||
|
||||
export interface EqlGetStatus extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface EqlSearch<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
wait_for_completion_timeout?: string;
|
||||
@ -733,6 +749,8 @@ export interface Exists extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
stored_fields?: string | string[];
|
||||
preference?: string;
|
||||
realtime?: boolean;
|
||||
@ -749,6 +767,8 @@ export interface ExistsSource extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
preference?: string;
|
||||
realtime?: boolean;
|
||||
refresh?: boolean;
|
||||
@ -764,6 +784,8 @@ export interface Explain<T = RequestBody> extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
analyze_wildcard?: boolean;
|
||||
analyzer?: string;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
@ -779,6 +801,13 @@ export interface Explain<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface FeaturesGetFeatures extends Generic {
|
||||
master_timeout?: string;
|
||||
}
|
||||
|
||||
export interface FeaturesResetFeatures extends Generic {
|
||||
}
|
||||
|
||||
export interface FieldCaps<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
fields?: string | string[];
|
||||
@ -789,10 +818,20 @@ export interface FieldCaps<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface FleetGlobalCheckpoints extends Generic {
|
||||
index: string;
|
||||
wait_for_advance?: boolean;
|
||||
wait_for_index?: boolean;
|
||||
checkpoints?: string | string[];
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface Get extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
stored_fields?: string | string[];
|
||||
preference?: string;
|
||||
realtime?: boolean;
|
||||
@ -820,6 +859,8 @@ export interface GetSource extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
preference?: string;
|
||||
realtime?: boolean;
|
||||
refresh?: boolean;
|
||||
@ -856,6 +897,11 @@ export interface IlmGetLifecycle extends Generic {
|
||||
export interface IlmGetStatus extends Generic {
|
||||
}
|
||||
|
||||
export interface IlmMigrateToDataTiers<T = RequestBody> extends Generic {
|
||||
dry_run?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface IlmMoveToStep<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
body?: T;
|
||||
@ -978,6 +1024,7 @@ export interface IndicesDeleteAlias extends Generic {
|
||||
|
||||
export interface IndicesDeleteDataStream extends Generic {
|
||||
name: string | string[];
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesDeleteIndexTemplate extends Generic {
|
||||
@ -992,6 +1039,15 @@ export interface IndicesDeleteTemplate extends Generic {
|
||||
master_timeout?: string;
|
||||
}
|
||||
|
||||
export interface IndicesDiskUsage extends Generic {
|
||||
index: string;
|
||||
run_expensive_tasks?: boolean;
|
||||
flush?: boolean;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesExists extends Generic {
|
||||
index: string | string[];
|
||||
local?: boolean;
|
||||
@ -1034,6 +1090,14 @@ export interface IndicesExistsType extends Generic {
|
||||
local?: boolean;
|
||||
}
|
||||
|
||||
export interface IndicesFieldUsageStats extends Generic {
|
||||
index: string;
|
||||
fields?: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesFlush extends Generic {
|
||||
index?: string | string[];
|
||||
force?: boolean;
|
||||
@ -1093,6 +1157,7 @@ export interface IndicesGetAlias extends Generic {
|
||||
|
||||
export interface IndicesGetDataStream extends Generic {
|
||||
name?: string | string[];
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesGetFieldMapping extends Generic {
|
||||
@ -1152,6 +1217,10 @@ export interface IndicesGetUpgrade extends Generic {
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
}
|
||||
|
||||
export interface IndicesMigrateToDataStream extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IndicesOpen extends Generic {
|
||||
index: string | string[];
|
||||
timeout?: string;
|
||||
@ -1162,6 +1231,10 @@ export interface IndicesOpen extends Generic {
|
||||
wait_for_active_shards?: string;
|
||||
}
|
||||
|
||||
export interface IndicesPromoteDataStream extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface IndicesPutAlias<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
name: string;
|
||||
@ -1367,8 +1440,12 @@ export interface IngestDeletePipeline extends Generic {
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface IngestGeoIpStats extends Generic {
|
||||
}
|
||||
|
||||
export interface IngestGetPipeline extends Generic {
|
||||
id?: string;
|
||||
summary?: boolean;
|
||||
master_timeout?: string;
|
||||
}
|
||||
|
||||
@ -1416,9 +1493,24 @@ export interface LicensePostStartTrial extends Generic {
|
||||
acknowledge?: boolean;
|
||||
}
|
||||
|
||||
export interface LogstashDeletePipeline extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface LogstashGetPipeline extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface LogstashPutPipeline<T = RequestBody> extends Generic {
|
||||
id: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface Mget<T = RequestBody> extends Generic {
|
||||
index?: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
stored_fields?: string | string[];
|
||||
preference?: string;
|
||||
realtime?: boolean;
|
||||
@ -1501,6 +1593,11 @@ export interface MlDeleteTrainedModel extends Generic {
|
||||
model_id: string;
|
||||
}
|
||||
|
||||
export interface MlDeleteTrainedModelAlias extends Generic {
|
||||
model_alias: string;
|
||||
model_id: string;
|
||||
}
|
||||
|
||||
export interface MlEstimateModelMemory<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
@ -1594,6 +1691,7 @@ export interface MlGetDataFrameAnalytics extends Generic {
|
||||
allow_no_match?: boolean;
|
||||
from?: number;
|
||||
size?: number;
|
||||
exclude_generated?: boolean;
|
||||
}
|
||||
|
||||
export interface MlGetDataFrameAnalyticsStats extends Generic {
|
||||
@ -1614,6 +1712,7 @@ export interface MlGetDatafeeds extends Generic {
|
||||
datafeed_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_datafeeds?: boolean;
|
||||
exclude_generated?: boolean;
|
||||
}
|
||||
|
||||
export interface MlGetFilters extends Generic {
|
||||
@ -1645,6 +1744,7 @@ export interface MlGetJobs extends Generic {
|
||||
job_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
exclude_generated?: boolean;
|
||||
}
|
||||
|
||||
export interface MlGetModelSnapshots<T = RequestBody> extends Generic {
|
||||
@ -1694,7 +1794,7 @@ export interface MlGetTrainedModels extends Generic {
|
||||
from?: number;
|
||||
size?: number;
|
||||
tags?: string | string[];
|
||||
for_export?: boolean;
|
||||
exclude_generated?: boolean;
|
||||
}
|
||||
|
||||
export interface MlGetTrainedModelsStats extends Generic {
|
||||
@ -1716,15 +1816,21 @@ export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface MlPostData<T = RequestBody> extends Generic {
|
||||
export interface MlPostData<T = RequestNDBody> extends Generic {
|
||||
job_id: string;
|
||||
reset_start?: string;
|
||||
reset_end?: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface MlPreviewDatafeed extends Generic {
|
||||
datafeed_id: string;
|
||||
export interface MlPreviewDataFrameAnalytics<T = RequestBody> extends Generic {
|
||||
id?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface MlPreviewDatafeed<T = RequestBody> extends Generic {
|
||||
datafeed_id?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface MlPutCalendar<T = RequestBody> extends Generic {
|
||||
@ -1758,6 +1864,10 @@ export interface MlPutFilter<T = RequestBody> extends Generic {
|
||||
|
||||
export interface MlPutJob<T = RequestBody> extends Generic {
|
||||
job_id: string;
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
ignore_throttled?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -1766,6 +1876,17 @@ export interface MlPutTrainedModel<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface MlPutTrainedModelAlias extends Generic {
|
||||
model_alias: string;
|
||||
model_id: string;
|
||||
reassign?: boolean;
|
||||
}
|
||||
|
||||
export interface MlResetJob extends Generic {
|
||||
job_id: string;
|
||||
wait_for_completion?: boolean;
|
||||
}
|
||||
|
||||
export interface MlRevertModelSnapshot<T = RequestBody> extends Generic {
|
||||
job_id: string;
|
||||
snapshot_id: string;
|
||||
@ -1839,6 +1960,13 @@ export interface MlUpdateModelSnapshot<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface MlUpgradeJobSnapshot extends Generic {
|
||||
job_id: string;
|
||||
snapshot_id: string;
|
||||
timeout?: string;
|
||||
wait_for_completion?: boolean;
|
||||
}
|
||||
|
||||
export interface MlValidate<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
@ -1858,7 +1986,7 @@ export interface MonitoringBulk<T = RequestNDBody> extends Generic {
|
||||
export interface Msearch<T = RequestNDBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
max_concurrent_searches?: number;
|
||||
typed_keys?: boolean;
|
||||
pre_filter_shard_size?: number;
|
||||
@ -1871,7 +1999,7 @@ export interface Msearch<T = RequestNDBody> extends Generic {
|
||||
export interface MsearchTemplate<T = RequestNDBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
search_type?: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch';
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
typed_keys?: boolean;
|
||||
max_concurrent_searches?: number;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
@ -1897,6 +2025,15 @@ export interface Mtermvectors<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface NodesClearRepositoriesMeteringArchive extends Generic {
|
||||
node_id: string | string[];
|
||||
max_archive_version: number;
|
||||
}
|
||||
|
||||
export interface NodesGetRepositoriesMeteringInfo extends Generic {
|
||||
node_id: string | string[];
|
||||
}
|
||||
|
||||
export interface NodesHotThreads extends Generic {
|
||||
node_id?: string | string[];
|
||||
interval?: string;
|
||||
@ -1932,6 +2069,7 @@ export interface NodesStats extends Generic {
|
||||
types?: string | string[];
|
||||
timeout?: string;
|
||||
include_segment_file_sizes?: boolean;
|
||||
include_unloaded_segments?: boolean;
|
||||
}
|
||||
|
||||
export interface NodesUsage extends Generic {
|
||||
@ -1941,7 +2079,7 @@ export interface NodesUsage extends Generic {
|
||||
}
|
||||
|
||||
export interface OpenPointInTime extends Generic {
|
||||
index?: string | string[];
|
||||
index: string | string[];
|
||||
preference?: string;
|
||||
routing?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
@ -2012,6 +2150,12 @@ export interface RollupPutJob<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface RollupRollup<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
rollup_index: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface RollupRollupSearch<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
type?: string;
|
||||
@ -2044,6 +2188,8 @@ export interface Scroll<T = RequestBody> extends Generic {
|
||||
export interface Search<T = RequestBody> extends Generic {
|
||||
index?: string | string[];
|
||||
type?: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
ccs_minimize_roundtrips?: boolean;
|
||||
@ -2086,6 +2232,21 @@ export interface Search<T = RequestBody> extends Generic {
|
||||
max_concurrent_shard_requests?: number;
|
||||
pre_filter_shard_size?: number;
|
||||
rest_total_hits_as_int?: boolean;
|
||||
min_compatible_shard_node?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface SearchMvt<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
field: string;
|
||||
zoom: number;
|
||||
x: number;
|
||||
y: number;
|
||||
exact_bounds?: boolean;
|
||||
extent?: number;
|
||||
grid_precision?: number;
|
||||
grid_type?: 'grid' | 'point';
|
||||
size?: number;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -2109,7 +2270,7 @@ export interface SearchTemplate<T = RequestBody> extends Generic {
|
||||
preference?: string;
|
||||
routing?: string | 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;
|
||||
profile?: boolean;
|
||||
typed_keys?: boolean;
|
||||
@ -2118,6 +2279,10 @@ export interface SearchTemplate<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SearchableSnapshotsCacheStats extends Generic {
|
||||
node_id?: string | string[];
|
||||
}
|
||||
|
||||
export interface SearchableSnapshotsClearCache extends Generic {
|
||||
index?: string | string[];
|
||||
ignore_unavailable?: boolean;
|
||||
@ -2130,6 +2295,7 @@ export interface SearchableSnapshotsMount<T = RequestBody> extends Generic {
|
||||
snapshot: string;
|
||||
master_timeout?: string;
|
||||
wait_for_completion?: boolean;
|
||||
storage?: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -2139,6 +2305,7 @@ export interface SearchableSnapshotsRepositoryStats extends Generic {
|
||||
|
||||
export interface SearchableSnapshotsStats extends Generic {
|
||||
index?: string | string[];
|
||||
level?: 'cluster' | 'indices' | 'shards';
|
||||
}
|
||||
|
||||
export interface SecurityAuthenticate extends Generic {
|
||||
@ -2167,11 +2334,24 @@ export interface SecurityClearCachedRoles extends Generic {
|
||||
name: string | string[];
|
||||
}
|
||||
|
||||
export interface SecurityClearCachedServiceTokens extends Generic {
|
||||
namespace: string;
|
||||
service: string;
|
||||
name: string | string[];
|
||||
}
|
||||
|
||||
export interface SecurityCreateApiKey<T = RequestBody> extends Generic {
|
||||
refresh?: 'wait_for' | boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecurityCreateServiceToken extends Generic {
|
||||
namespace: string;
|
||||
service: string;
|
||||
name?: string;
|
||||
refresh?: 'wait_for' | boolean;
|
||||
}
|
||||
|
||||
export interface SecurityDeletePrivileges extends Generic {
|
||||
application: string;
|
||||
name: string;
|
||||
@ -2188,6 +2368,13 @@ export interface SecurityDeleteRoleMapping extends Generic {
|
||||
refresh?: 'wait_for' | boolean;
|
||||
}
|
||||
|
||||
export interface SecurityDeleteServiceToken extends Generic {
|
||||
namespace: string;
|
||||
service: string;
|
||||
name: string;
|
||||
refresh?: 'wait_for' | boolean;
|
||||
}
|
||||
|
||||
export interface SecurityDeleteUser extends Generic {
|
||||
username: string;
|
||||
refresh?: 'wait_for' | boolean;
|
||||
@ -2220,11 +2407,21 @@ export interface SecurityGetPrivileges extends Generic {
|
||||
}
|
||||
|
||||
export interface SecurityGetRole extends Generic {
|
||||
name?: string;
|
||||
name?: string | string[];
|
||||
}
|
||||
|
||||
export interface SecurityGetRoleMapping extends Generic {
|
||||
name?: 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 {
|
||||
@ -2238,6 +2435,11 @@ export interface SecurityGetUser extends Generic {
|
||||
export interface SecurityGetUserPrivileges extends Generic {
|
||||
}
|
||||
|
||||
export interface SecurityGrantApiKey<T = RequestBody> extends Generic {
|
||||
refresh?: 'wait_for' | boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecurityHasPrivileges<T = RequestBody> extends Generic {
|
||||
user?: string;
|
||||
body: T;
|
||||
@ -2274,6 +2476,47 @@ export interface SecurityPutUser<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecurityQueryApiKeys<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface SecuritySamlAuthenticate<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecuritySamlCompleteLogout<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecuritySamlInvalidate<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecuritySamlLogout<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecuritySamlPrepareAuthentication<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SecuritySamlServiceProviderMetadata extends Generic {
|
||||
realm_name: string;
|
||||
}
|
||||
|
||||
export interface ShutdownDeleteNode extends Generic {
|
||||
node_id: string;
|
||||
}
|
||||
|
||||
export interface ShutdownGetNode extends Generic {
|
||||
node_id?: string;
|
||||
}
|
||||
|
||||
export interface ShutdownPutNode<T = RequestBody> extends Generic {
|
||||
node_id: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SlmDeleteLifecycle extends Generic {
|
||||
policy_id: string;
|
||||
}
|
||||
@ -2312,6 +2555,14 @@ export interface SnapshotCleanupRepository extends Generic {
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface SnapshotClone<T = RequestBody> extends Generic {
|
||||
repository: string;
|
||||
snapshot: string;
|
||||
target_snapshot: string;
|
||||
master_timeout?: string;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SnapshotCreate<T = RequestBody> extends Generic {
|
||||
repository: string;
|
||||
snapshot: string;
|
||||
@ -2345,6 +2596,8 @@ export interface SnapshotGet extends Generic {
|
||||
snapshot: string | string[];
|
||||
master_timeout?: string;
|
||||
ignore_unavailable?: boolean;
|
||||
index_details?: boolean;
|
||||
include_repository?: boolean;
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
@ -2354,6 +2607,21 @@ export interface SnapshotGetRepository extends Generic {
|
||||
local?: boolean;
|
||||
}
|
||||
|
||||
export interface SnapshotRepositoryAnalyze extends Generic {
|
||||
repository: string;
|
||||
blob_count?: number;
|
||||
concurrency?: number;
|
||||
read_node_count?: number;
|
||||
early_read_node_count?: number;
|
||||
seed?: number;
|
||||
rare_action_probability?: number;
|
||||
max_blob_size?: string;
|
||||
max_total_data_size?: string;
|
||||
timeout?: string;
|
||||
detailed?: boolean;
|
||||
rarely_abort_writes?: boolean;
|
||||
}
|
||||
|
||||
export interface SnapshotRestore<T = RequestBody> extends Generic {
|
||||
repository: string;
|
||||
snapshot: string;
|
||||
@ -2379,6 +2647,22 @@ export interface SqlClearCursor<T = RequestBody> extends Generic {
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface SqlDeleteAsync extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface SqlGetAsync extends Generic {
|
||||
id: string;
|
||||
delimiter?: string;
|
||||
format?: string;
|
||||
keep_alive?: string;
|
||||
wait_for_completion_timeout?: string;
|
||||
}
|
||||
|
||||
export interface SqlGetAsyncStatus extends Generic {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface SqlQuery<T = RequestBody> extends Generic {
|
||||
format?: string;
|
||||
body: T;
|
||||
@ -2415,6 +2699,11 @@ export interface TasksList extends Generic {
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface TermsEnum<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface Termvectors<T = RequestBody> extends Generic {
|
||||
index: string;
|
||||
id?: string;
|
||||
@ -2433,6 +2722,24 @@ export interface Termvectors<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface TextStructureFindStructure<T = RequestNDBody> extends Generic {
|
||||
lines_to_sample?: number;
|
||||
line_merge_size_limit?: number;
|
||||
timeout?: string;
|
||||
charset?: string;
|
||||
format?: 'ndjson' | 'xml' | 'delimited' | 'semi_structured_text';
|
||||
has_header_row?: boolean;
|
||||
column_names?: string | string[];
|
||||
delimiter?: string;
|
||||
quote?: string;
|
||||
should_trim_fields?: boolean;
|
||||
grok_pattern?: string;
|
||||
timestamp_field?: string;
|
||||
timestamp_format?: string;
|
||||
explain?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
export interface TransformDeleteTransform extends Generic {
|
||||
transform_id: string;
|
||||
force?: boolean;
|
||||
@ -2443,6 +2750,7 @@ export interface TransformGetTransform extends Generic {
|
||||
from?: number;
|
||||
size?: number;
|
||||
allow_no_match?: boolean;
|
||||
exclude_generated?: boolean;
|
||||
}
|
||||
|
||||
export interface TransformGetTransformStats extends Generic {
|
||||
@ -2486,6 +2794,8 @@ export interface Update<T = RequestBody> extends Generic {
|
||||
id: string;
|
||||
index: string;
|
||||
type?: string;
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
wait_for_active_shards?: string;
|
||||
_source?: string | string[];
|
||||
_source_excludes?: string | string[];
|
||||
@ -2504,6 +2814,8 @@ export interface Update<T = RequestBody> extends Generic {
|
||||
export interface UpdateByQuery<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
type?: string | string[];
|
||||
_source_exclude?: string | string[];
|
||||
_source_include?: string | string[];
|
||||
analyzer?: string;
|
||||
analyze_wildcard?: boolean;
|
||||
default_operator?: 'AND' | 'OR';
|
||||
@ -2583,6 +2895,10 @@ export interface WatcherPutWatch<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface WatcherQueryWatches<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface WatcherStart extends Generic {
|
||||
}
|
||||
|
||||
|
||||
15420
api/types.d.ts
vendored
Normal file
15420
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) {
|
||||
var target = {}
|
||||
var keys = Object.keys(querystring)
|
||||
for (var i = 0, len = keys.length; i < len; i++) {
|
||||
var key = keys[i]
|
||||
const target = {}
|
||||
const keys = Object.keys(querystring)
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const key = keys[i]
|
||||
target[snakeCase[key] || key] = querystring[key]
|
||||
}
|
||||
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``.
|
||||
@ -1,133 +0,0 @@
|
||||
[[auth-reference]]
|
||||
== Authentication
|
||||
|
||||
This document contains code snippets to show you how to connect to various {es}
|
||||
providers.
|
||||
|
||||
|
||||
[discrete]
|
||||
=== Elastic Cloud
|
||||
|
||||
If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers
|
||||
an easy way to connect to it via the `cloud` option. You must pass the Cloud ID
|
||||
that you can find in the cloud console, then your username and password inside
|
||||
the `auth` option.
|
||||
|
||||
NOTE: When connecting to Elastic Cloud, the client will automatically enable
|
||||
both request and response compression by default, since it yields significant
|
||||
throughput improvements. Moreover, the client will also set the ssl option
|
||||
`secureProtocol` to `TLSv1_2_method` unless specified otherwise. You can still
|
||||
override this option by configuring them.
|
||||
|
||||
IMPORTANT: Do not enable sniffing when using Elastic Cloud, since the nodes are
|
||||
behind a load balancer, Elastic Cloud will take care of everything for you.
|
||||
Take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here]
|
||||
to know more.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
cloud: {
|
||||
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
|
||||
},
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
[discrete]
|
||||
=== Basic authentication
|
||||
|
||||
You can provide your credentials by passing the `username` and `password`
|
||||
parameters via the `auth` option.
|
||||
|
||||
NOTE: If you provide both basic authentication credentials and the Api Key configuration, the Api Key will take precedence.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
Otherwise, you can provide your credentials in the node(s) URL.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://username:password@localhost:9200'
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
[discrete]
|
||||
=== ApiKey authentication
|
||||
|
||||
You can use the
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[ApiKey]
|
||||
authentication by passing the `apiKey` parameter via the `auth` option. The
|
||||
`apiKey` parameter can be either a base64 encoded string or an object with the
|
||||
values that you can obtain from the
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[create api key endpoint].
|
||||
|
||||
NOTE: If you provide both basic authentication credentials and the Api Key configuration, the Api Key will take precedence.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
apiKey: 'base64EncodedKey'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
apiKey: {
|
||||
id: 'foo',
|
||||
api_key: 'bar'
|
||||
}
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
[discrete]
|
||||
=== SSL configuration
|
||||
|
||||
Without any additional configuration you can specify `https://` node urls, and
|
||||
the certificates used to sign these requests will be verified. To turn off certificate verification, you must specify an `ssl` object in the top level config and set `rejectUnauthorized: false`. The default `ssl` values are the same that Node.js's https://nodejs.org/api/tls.html#tls_tls_connect_options_callback[`tls.connect()`]
|
||||
uses.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
},
|
||||
ssl: {
|
||||
ca: fs.readFileSync('./cacert.pem'),
|
||||
rejectUnauthorized: false
|
||||
}
|
||||
})
|
||||
----
|
||||
282
docs/basic-config.asciidoc
Normal file
282
docs/basic-config.asciidoc
Normal file
@ -0,0 +1,282 @@
|
||||
[[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`
|
||||
|
||||
|===
|
||||
|
||||
[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 coming from the old client
|
||||
=== Breaking changes coming from the old client
|
||||
|
||||
If you were already using the previous version of this client – the one you used
|
||||
to install with `npm install elasticsearch` – you will encounter some breaking
|
||||
@ -7,7 +7,7 @@ changes.
|
||||
|
||||
|
||||
[discrete]
|
||||
=== Don’t panic!
|
||||
==== Don’t panic!
|
||||
|
||||
Every breaking change was carefully weighed, and each is justified. Furthermore,
|
||||
the new codebase has been rewritten with modern JavaScript and has been
|
||||
@ -15,7 +15,7 @@ carefully designed to be easy to maintain.
|
||||
|
||||
|
||||
[discrete]
|
||||
=== Breaking changes
|
||||
==== Breaking changes
|
||||
|
||||
* Minimum supported version of Node.js is `v8`.
|
||||
|
||||
@ -212,7 +212,7 @@ client.transport.request({
|
||||
----
|
||||
|
||||
[discrete]
|
||||
=== Talk is cheap. Show me the code.
|
||||
==== Talk is cheap. Show me the code.
|
||||
|
||||
You can find a code snippet with the old client below followed by the same code
|
||||
logic but with the new client.
|
||||
|
||||
@ -1,46 +1,321 @@
|
||||
[[changelog-client]]
|
||||
== Changelog
|
||||
== Release notes
|
||||
|
||||
=== 7.9.1
|
||||
[discrete]
|
||||
=== 7.14.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.14`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.14/release-notes-7.14.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Verify connection to Elasticsearch https://github.com/elastic/elasticsearch-js/pull/1487[#1487]
|
||||
|
||||
The client will verify if it's working with a supported release of Elasticsearch.
|
||||
Elastic language clients are guaranteed to be able to communicate with Elasticsearch or Elastic solutions running on the same major version and greater or equal minor version.
|
||||
|
||||
Language clients are forward compatible; meaning that clients support communicating with greater minor versions of Elasticsearch. Elastic language clients are not guaranteed to be backwards compatible.
|
||||
|
||||
[discrete]
|
||||
===== Add api compatibility header support https://github.com/elastic/elasticsearch-js/pull/1478[#1478]
|
||||
|
||||
If you configure the `ELASTIC_CLIENT_APIVERSIONING` to `true` the client will send a compatibility header
|
||||
to allow you to use a 7.x client against a 8.x cluster. In this way it will be easier to migrate your code to a newer release of Elasticsearch.
|
||||
|
||||
[discrete]
|
||||
===== Add support for bearer auth https://github.com/elastic/elasticsearch-js/pull/1488[#1488]
|
||||
|
||||
Bearer authentication, useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens].
|
||||
Be aware that it does not handle automatic token refresh:
|
||||
|
||||
[source,js]
|
||||
----
|
||||
auth: {
|
||||
bearer: 'token'
|
||||
}
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== Bulk update improvements https://github.com/elastic/elasticsearch-js/pull/1428[#1428]
|
||||
|
||||
The final stats object will let you know how many `noop` operations happened.
|
||||
Also, a new `.stats` getter has been added to allow you to read the stats before
|
||||
the operation finishes.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const b = client.helpers.bulk({ ... })
|
||||
...
|
||||
console.log(b.stats)
|
||||
----
|
||||
|
||||
[discrete]
|
||||
=== 7.13.0
|
||||
|
||||
[discrete]
|
||||
==== Breaking changes
|
||||
|
||||
[discrete]
|
||||
===== Remove Node.js v10 support https://github.com/elastic/elasticsearch-js/pull/1471[#1471]
|
||||
|
||||
According to our
|
||||
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html#nodejs-support[support matrix].
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.13`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.13/release-notes-7.13.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Added new TypeScript definitions
|
||||
|
||||
The new type definition is more advanced compared to the legacy one.
|
||||
In the legacy type definitions you were expected to configure via generics both request and response bodies.
|
||||
The new type definitions comes with a complete type definition for every Elasticsearch endpoint.
|
||||
|
||||
You can see how to use them now https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/typescript.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Improve response error message https://github.com/elastic/elasticsearch-js/pull/1457[#1457]
|
||||
|
||||
In case of Elasticsearch errors, now the error message show more info about the underlying issue,
|
||||
improving the debugging experience.
|
||||
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Catch HEAD errors https://github.com/elastic/elasticsearch-js/pull/1460[#1460]
|
||||
|
||||
In case of http errors in HEAD request, the client was swalling the response body.
|
||||
This is now fixed and in case of error you will get the full body response.
|
||||
|
||||
[discrete]
|
||||
=== 7.12.0
|
||||
|
||||
[discrete]
|
||||
==== Breaking changes
|
||||
|
||||
[discrete]
|
||||
===== Remove Node.js v8 support https://github.com/elastic/elasticsearch-js/pull/1402[#1402]
|
||||
|
||||
According to our
|
||||
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html#nodejs-support[support matrix].
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.12`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.12/release-notes-7.12.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Add support for transport options to all helpers https://github.com/elastic/elasticsearch-js/pull/1400[#1400]
|
||||
|
||||
You can now pass Transport specific options to the helpers as well.
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Add `.finally` method to the Promise API https://github.com/elastic/elasticsearch-js/pull/1415[#1415]
|
||||
|
||||
The client returns a thenable object when you are not configuring a callback.
|
||||
Now the thenable offers a `.finally` method as well.
|
||||
|
||||
[discrete]
|
||||
=== 7.11.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.11`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.11/release-notes-7.11.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Added new observability events https://github.com/elastic/elasticsearch-js/pull/1365[#1365]
|
||||
|
||||
Two new observability events has been introduced: `serialization` and
|
||||
`deserialization`. The event order is described in the following graph, in some
|
||||
edge cases, the order is not guaranteed. You can find in
|
||||
https://github.com/elastic/elasticsearch-js/blob/master/test/acceptance/events-order.test.js[`test/acceptance/events-order.test.js`]
|
||||
how the order changes based on the situation.
|
||||
|
||||
----
|
||||
serialization
|
||||
│
|
||||
│ (serialization and compression happens between those two events)
|
||||
│
|
||||
└─▶ request
|
||||
│
|
||||
│ (actual time spent over the wire)
|
||||
│
|
||||
└─▶ deserialization
|
||||
│
|
||||
│ (deserialization and decompression happens between those two events)
|
||||
│
|
||||
└─▶ response
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== Added x-elastic-client-meta header https://github.com/elastic/elasticsearch-js/pull/1373[#1373]
|
||||
|
||||
Adds the `x-elastic-client-meta` HTTP header which is used by Elastic Cloud and
|
||||
can be disabled with the `enableMetaHeader` parameter set to `false`.
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Fixes req.abort() with a body that is a stream calls callback(err) twice https://github.com/elastic/elasticsearch-js/pull/1376[#1376]
|
||||
|
||||
When using a body that is a stream to client.search(), and calling req.abort(),
|
||||
the callback is called twice. Once for the RequestAbortedError, as expected, and
|
||||
once for a "premature close" error from end-of-stream, used by pump, used by the
|
||||
client. This issue has now been fixed.
|
||||
|
||||
[discrete]
|
||||
=== 7.10.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.10`.
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.10/release-notes-7.10.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Added proxy support https://github.com/elastic/elasticsearch-js/pull/1260[#1260]
|
||||
|
||||
If you need to pass through an http(s) proxy for connecting to {es}, the client
|
||||
offers out of the box a handy configuration for helping you with it. Under the
|
||||
hood it uses the https://github.com/delvedor/hpagent[`hpagent`] module.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
proxy: 'http://localhost:8080'
|
||||
})
|
||||
----
|
||||
|
||||
Basic authentication is supported as well:
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
proxy: 'http://user:pwd@localhost:8080'
|
||||
})
|
||||
----
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Scroll search should clear the scroll at the end https://github.com/elastic/elasticsearch-js/pull/1331[#1331]
|
||||
|
||||
From now on the scroll search helper will automatically close the scroll on
|
||||
{es}, by doing so, {es} will free resources faster.
|
||||
|
||||
[discrete]
|
||||
===== Handle connectivity issues while reading the body https://github.com/elastic/elasticsearch-js/pull/1343[#1343]
|
||||
|
||||
It might happen that the underlying socket stops working due to an external
|
||||
cause while reading the body. This could lead to an unwanted
|
||||
`DeserialzationError`. From now, this will be handled as a generic
|
||||
`ConnectionError`.
|
||||
|
||||
[discrete]
|
||||
==== Warnings
|
||||
|
||||
[discrete]
|
||||
===== Add warning log about nodejs version support https://github.com/elastic/elasticsearch-js/pull/1349[#1349]
|
||||
|
||||
`7.11` will be the last version of the client that will support Node.js v8,
|
||||
while `7.12` will be the last one that supports Node.js v10. If you are using
|
||||
this versions you will see a `DeprecationWaring` in your logs. We strongly
|
||||
recommend to upgrade to newer versions of Node.js as usng an EOL version will
|
||||
expose you to securty risks.
|
||||
|
||||
Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for
|
||||
additional information.
|
||||
|
||||
[discrete]
|
||||
=== 7.9.1
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Improve child performances https://github.com/elastic/elasticsearch-js/pull/1314[#1314]
|
||||
|
||||
The client code has been refactored to speed up the performances of the child method.
|
||||
Before this pr, creating many children per second would have caused a high memory consumption and a spike in CPU usage.
|
||||
This pr changes the way the client is created by refactoring the code generation, now the clients methods are no longer added to the instance with a for loop but via prototypal inheritance. Thus, the overall performances are way better, now creating a child is ~5 times faster, and it consumes ~70% less memory.
|
||||
The client code has been refactored to speed up the performances of the child
|
||||
method. Before this pr, creating many children per second would have caused a
|
||||
high memory consumption and a spike in CPU usage. This pr changes the way the
|
||||
client is created by refactoring the code generation, now the clients methods
|
||||
are no longer added to the instance with a for loop but via prototypal
|
||||
inheritance. Thus, the overall performances are way better, now creating a child
|
||||
is ~5 times faster, and it consumes ~70% less memory.
|
||||
|
||||
This change should not cause any breaking change unless you were mocking the client methods. In such case you should refactor it, or use https://github.com/elastic/elasticsearch-js-mock[elasticsearch-js-mock].
|
||||
This change should not cause any breaking change unless you were mocking the
|
||||
client methods. In such case you should refactor it, or use
|
||||
https://github.com/elastic/elasticsearch-js-mock[elasticsearch-js-mock].
|
||||
|
||||
Finally, this change should also fix once and of all the bundlers support.
|
||||
|
||||
[discrete]
|
||||
===== Throw all errors asynchronously https://github.com/elastic/elasticsearch-js/pull/1295[#1295]
|
||||
|
||||
Some validation errors were thrown synchronously, causing the callback to be called in th same tick.
|
||||
This issue is known as _"The release fo Zalgo"_ (see https://blog.izs.me/2013/08/designing-apis-for-asynchrony[here]).
|
||||
Some validation errors were thrown synchronously, causing the callback to be
|
||||
called in th same tick. This issue is known as _"The release fo Zalgo"_ (see
|
||||
https://blog.izs.me/2013/08/designing-apis-for-asynchrony[here]).
|
||||
|
||||
[discrete]
|
||||
===== Fix `maxRetries` request option handling https://github.com/elastic/elasticsearch-js/pull/1296[#1296]
|
||||
|
||||
The `maxRetries` parameter can be configured on a per requets basis, if set to zero it was defaulting to the client default. Now the client is honoring the request specific configuration.
|
||||
|
||||
The `maxRetries` parameter can be configured on a per requets basis, if set to
|
||||
zero it was defaulting to the client default. Now the client is honoring the
|
||||
request specific configuration.
|
||||
|
||||
[discrete]
|
||||
===== Fix RequestOptions.body type to include null https://github.com/elastic/elasticsearch-js/pull/1300[#1300]
|
||||
|
||||
The Connection requets option types were not accepting `null` as valid value.
|
||||
|
||||
[discrete]
|
||||
===== Fixed `size` and `maxRetries` parameters in helpers https://github.com/elastic/elasticsearch-js/pull/1284[#1284]
|
||||
|
||||
The `size` parameter was being passed too the scroll request, which was causing an error.
|
||||
`maxRetries` setted to 0 was resulting in no request at all.
|
||||
The `size` parameter was being passed too the scroll request, which was causing
|
||||
an error. Value of `maxRetries` set to 0 was resulting in no request at all.
|
||||
|
||||
[discrete]
|
||||
=== 7.9.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Add ability to disable the http agent https://github.com/elastic/elasticsearch-js/pull/1251[#1251]
|
||||
|
||||
If needed, the http agent can be disabled by setting it to `false`
|
||||
If needed, the http agent can be disabled by setting it to `false`.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
@ -51,10 +326,12 @@ const client = new Client({
|
||||
})
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== Add support for a global context option https://github.com/elastic/elasticsearch-js/pull/1256[#1256]
|
||||
|
||||
Before this, you could set a `context` option in each request, but there was no way of setting it globally.
|
||||
Now you can by configuring the `context` object in the global configuration, that will be merged with the local one.
|
||||
Before this, you could set a `context` option in each request, but there was no
|
||||
way of setting it globally. Now you can by configuring the `context` object in
|
||||
the global configuration, that will be merged with the local one.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
@ -65,6 +342,7 @@ const client = new Client({
|
||||
})
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== ESM support https://github.com/elastic/elasticsearch-js/pull/1235[#1235]
|
||||
|
||||
If you are using ES Modules, now you can easily import the client!
|
||||
@ -74,11 +352,14 @@ If you are using ES Modules, now you can easily import the client!
|
||||
import { Client } from '@elastic/elasticsearch'
|
||||
----
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Allow the client name to be a symbol https://github.com/elastic/elasticsearch-js/pull/1254[#1254]
|
||||
|
||||
It was possible in plain JavaScript, but not in TypeScript, now you can do it in TypeScript as well.
|
||||
It was possible in plain JavaScript, but not in TypeScript, now you can do it in
|
||||
TypeScript as well.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
@ -89,19 +370,26 @@ const client = new Client({
|
||||
})
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== Fixed transport.request querystring type https://github.com/elastic/elasticsearch-js/pull/1240[#1240]
|
||||
|
||||
Only `Record<string, any>` was allowed. Now `string` is allowed as well.
|
||||
|
||||
[discrete]
|
||||
===== Fixed type definitions https://github.com/elastic/elasticsearch-js/pull/1263[#1263]
|
||||
|
||||
* The `transport.request` defintion was incorrect, it was returning a `Promise<T>` instead of `TransportRequestPromise<T>`.
|
||||
* The `refresh` parameter of most APIs was declared as `'true' | 'false' | 'wait_for'`, which was clunky. Now is `'wait_for' | boolean`.
|
||||
* The `transport.request` defintion was incorrect, it was returning a
|
||||
`Promise<T>` instead of `TransportRequestPromise<T>`.
|
||||
* The `refresh` parameter of most APIs was declared as
|
||||
`'true' | 'false' | 'wait_for'`, which was clunky. Now is
|
||||
`'wait_for' | boolean`.
|
||||
|
||||
[discrete]
|
||||
===== Generate response type as boolean if the request is HEAD only https://github.com/elastic/elasticsearch-js/pull/1275[#1275]
|
||||
|
||||
All HEAD request will have the body casted to a boolean value, `true` in case of a 200 response, `false` in case of
|
||||
a 404 response. The type definitions were not reflecting this behavior.
|
||||
All HEAD request will have the body casted to a boolean value, `true` in case of
|
||||
a 200 response, `false` in case of a 404 response. The type definitions were not
|
||||
reflecting this behavior.
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
@ -114,36 +402,50 @@ const { body } = await client.exist({ index: 'my-index', id: 'my-id' })
|
||||
console.log(body) // either `true` or `false`
|
||||
----
|
||||
|
||||
[discrete]
|
||||
==== Internals
|
||||
|
||||
[discrete]
|
||||
===== Updated default http agent configuration https://github.com/elastic/elasticsearch-js/pull/1242[#1242]
|
||||
|
||||
Added the scheduling: 'lifo' option to the default HTTP agent configuration to avoid maximizing the open sockets
|
||||
against Elasticsearch and lowering the risk of encountering socket timeouts.
|
||||
This feature is only available from Node v14.5+, but it should be backported to v10 and v12. (https://github.com/nodejs/node/pull/33278[nodejs/node#33278])
|
||||
Added the scheduling: 'lifo' option to the default HTTP agent configuration to
|
||||
avoid maximizing the open sockets against {es} and lowering the risk of
|
||||
encountering socket timeouts. This feature is only available from Node v14.5+,
|
||||
but it should be backported to v10 and v12
|
||||
(https://github.com/nodejs/node/pull/33278[nodejs/node#33278]).
|
||||
|
||||
[discrete]
|
||||
===== Improve child API https://github.com/elastic/elasticsearch-js/pull/1245[#1245]
|
||||
|
||||
This pr introduce two changes which should not impact the surface API:
|
||||
|
||||
* Refactored the `client.child` API to allocate fewer objects, this change improves memory consumption over time
|
||||
and improves the child creation performances by ~12%.
|
||||
* The client no longer inherits from the EventEmitter class, but instead has an internal event emitter and exposes
|
||||
only the API useful for the users, namely `emit, `on`, `once`, and `off`. The type definitions have been updated accordingly.
|
||||
* Refactored the `client.child` API to allocate fewer objects, this change
|
||||
improves memory consumption over time and improves the child creation
|
||||
performances by ~12%.
|
||||
* The client no longer inherits from the EventEmitter class, but instead has an
|
||||
internal event emitter and exposes only the API useful for the users, namely
|
||||
`emit, `on`, `once`, and `off`. The type definitions have been updated
|
||||
accordingly.
|
||||
|
||||
[discrete]
|
||||
=== 7.8.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.8`.
|
||||
|
||||
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.8/release-notes-7.8.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Added multi search helper https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
|
||||
|
||||
If you are sending search request at a high rate, this helper might be useful for you.
|
||||
It will use the mutli search API under the hood to batch the requests and improve the overall performances of your application. +
|
||||
The `result` exposes a `documents` property as well, which allows you to access directly the hits sources.
|
||||
If you are sending search request at a high rate, this helper might be useful
|
||||
for you. It will use the mutli search API under the hood to batch the requests
|
||||
and improve the overall performances of your application. The `result` exposes a
|
||||
`documents` property as well, which allows you to access directly the hits
|
||||
sources.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
@ -171,10 +473,14 @@ m.search(
|
||||
)
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== Added timeout support in bulk and msearch helpers https://github.com/elastic/elasticsearch-js/pull/1206[#1206]
|
||||
|
||||
If there is a slow producer, the bulk helper might send data with a very large period of time, and if the process crashes for any reason, the data would be lost.
|
||||
This pr introduces a `flushInterval` option in the bulk helper to avoid this issue. By default, the bulk helper will flush the data automatically every 30 seconds, unless the threshold has been reached before.
|
||||
If there is a slow producer, the bulk helper might send data with a very large
|
||||
period of time, and if the process crashes for any reason, the data would be
|
||||
lost. This pr introduces a `flushInterval` option in the bulk helper to avoid
|
||||
this issue. By default, the bulk helper will flush the data automatically every
|
||||
30 seconds, unless the threshold has been reached before.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
@ -183,7 +489,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]
|
||||
----
|
||||
@ -192,43 +500,63 @@ const m = client.helpers.msearch({
|
||||
})
|
||||
----
|
||||
|
||||
[discrete]
|
||||
==== Internals
|
||||
|
||||
[discrete]
|
||||
===== Use filter_path for improving the search helpers performances https://github.com/elastic/elasticsearch-js/pull/1199[#1199]
|
||||
|
||||
From now on, all he search helpers will use the `filter_path` option automatically when needed to retrieve only the hits source. This change will result in less netwprk traffic and improved deserialization performances.
|
||||
From now on, all he search helpers will use the `filter_path` option
|
||||
automatically when needed to retrieve only the hits source. This change will
|
||||
result in less netwprk traffic and improved deserialization performances.
|
||||
|
||||
[discrete]
|
||||
===== Search helpers documents getter https://github.com/elastic/elasticsearch-js/pull/1186[#1186]
|
||||
|
||||
Before this, the `documents` key that you can access in any search helper was computed as soon as we got the search result from Elasticsearch. With this change the `documents` key is now a getter, which makes this 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]
|
||||
=== 7.7.1
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Disable client Helpers in Node.js < 10 - https://github.com/elastic/elasticsearch-js/pull/1194[#1194]
|
||||
|
||||
The client helpers can't be used in Node.js < 10 because it needs a custom flag to be able to use them.
|
||||
Given that not every provider allows the user to specify cuatom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
|
||||
The client helpers can't be used in Node.js < 10 because it needs a custom flag
|
||||
to be able to use them. Given that not every provider allows the user to specify
|
||||
custom Node.js flags, the Helpers has been disabled completely in Node.js < 10.
|
||||
|
||||
[discrete]
|
||||
===== Force lowercase in all headers - https://github.com/elastic/elasticsearch-js/pull/1187[#1187]
|
||||
|
||||
Now all the user-provided headers names will be lowercased by default, so there will be no conflicts in case of the same header with different casing.
|
||||
Now all the user-provided headers names will be lowercased by default, so there
|
||||
will be no conflicts in case of the same header with different casing.
|
||||
|
||||
[discrete]
|
||||
=== 7.7.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v7.7`.
|
||||
|
||||
You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/reference/7.7/release-notes-7.7.0.html[here].
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.7/release-notes-7.7.0.html[here].
|
||||
|
||||
[discrete]
|
||||
===== Introduced client helpers - https://github.com/elastic/elasticsearch-js/pull/1107[#1107]
|
||||
|
||||
From now on, the client comes with an handy collection of helpers to give you a more comfortable experience with some APIs.
|
||||
From now on, the client comes with an handy collection of helpers to give you a
|
||||
more comfortable experience with some APIs.
|
||||
|
||||
CAUTION: The client helpers are experimental, and the API may change in the next minor releases.
|
||||
CAUTION: The client helpers are experimental, and the API may change in the next
|
||||
minor releases.
|
||||
|
||||
The following helpers has been introduced:
|
||||
|
||||
@ -237,14 +565,20 @@ The following helpers has been introduced:
|
||||
- `client.helpers.scrollSearch`
|
||||
- `client.helpers.scrollDocuments`
|
||||
|
||||
[discrete]
|
||||
===== The `ConnectionPool.getConnection` now always returns a `Connection` - https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
|
||||
|
||||
What does this mean? It means that you will see less `NoLivingConnectionError`, which now can only be caused if you set a selector/filter too strict.
|
||||
For improving the debugging experience, the `NoLivingConnectionsError` error message has been updated.
|
||||
What does this mean? It means that you will see less `NoLivingConnectionError`,
|
||||
which now can only be caused if you set a selector/filter too strict. For
|
||||
improving the debugging experience, the `NoLivingConnectionsError` error message
|
||||
has been updated.
|
||||
|
||||
[discrete]
|
||||
===== Abortable promises - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
|
||||
|
||||
From now on, it will be possible to abort a request generated with the promise-styl API. If you abort a request generated from a promise, the promise will be rejected with a `RequestAbortedError`.
|
||||
From now on, it will be possible to abort a request generated with the
|
||||
promise-styl API. If you abort a request generated from a promise, the promise
|
||||
will be rejected with a `RequestAbortedError`.
|
||||
|
||||
|
||||
[source,js]
|
||||
@ -262,9 +596,13 @@ promise
|
||||
promise.abort()
|
||||
----
|
||||
|
||||
[discrete]
|
||||
===== Major refactor of the Type Definitions - https://github.com/elastic/elasticsearch-js/pull/1119[#1119] https://github.com/elastic/elasticsearch-js/issues/1130[#1130] https://github.com/elastic/elasticsearch-js/pull/1132[#1132]
|
||||
|
||||
Now every API makes better use of the generics and overloading, so you can (or not, by default request/response bodies are `Record<string, any>`) define the request/response bodies in the generics.
|
||||
Now every API makes better use of the generics and overloading, so you can (or
|
||||
not, by default request/response bodies are `Record<string, any>`) define the
|
||||
request/response bodies in the generics.
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
// request and response bodies are generics
|
||||
@ -275,57 +613,93 @@ client.search<SearchResponse>(...)
|
||||
client.search<SearchResponse, SearchBody>(...)
|
||||
----
|
||||
|
||||
This *should* not be a breaking change, as every generics defaults to `any`. It might happen to some users that the code breaks, but our test didn't detect any of it, probably because they were not robust enough. However, given the gigantic improvement in the developer experience, we have decided to release this change in the 7.x line.
|
||||
This *should* not be a breaking change, as every generics defaults to `any`. It
|
||||
might happen to some users that the code breaks, but our test didn't detect any
|
||||
of it, probably because they were not robust enough. However, given the gigantic
|
||||
improvement in the developer experience, we have decided to release this change
|
||||
in the 7.x line.
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== The `ConnectionPool.update` method now cleans the `dead` list - https://github.com/elastic/elasticsearch-js/issues/1122[#1122] https://github.com/elastic/elasticsearch-js/pull/1127[#1127]
|
||||
|
||||
It can happen in a situation where we are updating the connections list and running sniff, leaving the `dead` list in a dirty state. Now the `ConnectionPool.update` cleans up the `dead` list every time, which makes way more sense given that all the new connections are alive.
|
||||
It can happen in a situation where we are updating the connections list and
|
||||
running sniff, leaving the `dead` list in a dirty state. Now the
|
||||
`ConnectionPool.update` cleans up the `dead` list every time, which makes way
|
||||
more sense given that all the new connections are alive.
|
||||
|
||||
[discrete]
|
||||
===== `ConnectionPoolmarkDead` should ignore connections that no longer exists - https://github.com/elastic/elasticsearch-js/pull/1159[#1159]
|
||||
|
||||
It might happen that markDead is called just after a pool update, and in such case, the 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]
|
||||
===== Do not retry a request if the body is a stream - https://github.com/elastic/elasticsearch-js/pull/1143[#1143]
|
||||
|
||||
The client should not retry if it's sending a stream body, because it should store in memory a copy of the stream to be able to send it again, but since it doesn't know in advance the size of the stream, it risks to take too much memory.
|
||||
Furthermore, copying everytime the stream is very an expensive operation.
|
||||
The client should not retry if it's sending a stream body, because it should
|
||||
store in memory a copy of the stream to be able to send it again, but since it
|
||||
doesn't know in advance the size of the stream, it risks to take too much
|
||||
memory. Furthermore, copying everytime the stream is very an expensive
|
||||
operation.
|
||||
|
||||
[discrete]
|
||||
===== Return an error if the request has been aborted - https://github.com/elastic/elasticsearch-js/pull/1141[#1141]
|
||||
|
||||
Until now, aborting a request was blocking the HTTP request, but never calling the callback or resolving the promise to notify the user. This is a bug because it could lead to dangerous memory leaks. From now on if the user calls the `request.abort()` method, the callback style API will be called with a `RequestAbortedError`, the promise will be rejected with `RequestAbortedError` as well.
|
||||
Until now, aborting a request was blocking the HTTP request, but never calling
|
||||
the callback or resolving the promise to notify the user. This is a bug because
|
||||
it could lead to dangerous memory leaks. From now on if the user calls the
|
||||
`request.abort()` method, the callback style API will be called with a
|
||||
`RequestAbortedError`, the promise will be rejected with `RequestAbortedError`
|
||||
as well.
|
||||
|
||||
[discrete]
|
||||
=== 7.6.1
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Secure json parsing - https://github.com/elastic/elasticsearch-js/pull/1110[#1110]
|
||||
- ApiKey should take precedence over basic auth - https://github.com/elastic/elasticsearch-js/pull/1115[#1115]
|
||||
- Secure json parsing -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1110[#1110]
|
||||
- ApiKey should take precedence over basic auth -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1115[#1115]
|
||||
|
||||
**Documentation:**
|
||||
|
||||
- Fix typo in api reference - https://github.com/elastic/elasticsearch-js/pull/1109[#1109]
|
||||
- Fix typo in api reference -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1109[#1109]
|
||||
|
||||
[discrete]
|
||||
=== 7.6.0
|
||||
|
||||
Support for Elasticsearch `v7.6`.
|
||||
|
||||
[discrete]
|
||||
=== 7.5.1
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Skip compression in case of empty string body - https://github.com/elastic/elasticsearch-js/pull/1080[#1080]
|
||||
- Fix typo in NoLivingConnectionsError - https://github.com/elastic/elasticsearch-js/pull/1045[#1045]
|
||||
- Change TransportRequestOptions.ignore to number[] - https://github.com/elastic/elasticsearch-js/pull/1053[#1053]
|
||||
- ClientOptions["cloud"] should have optional auth fields - https://github.com/elastic/elasticsearch-js/pull/1032[#1032]
|
||||
- Skip compression in case of empty string body -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1080[#1080]
|
||||
- Fix typo in NoLivingConnectionsError -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1045[#1045]
|
||||
- Change TransportRequestOptions.ignore to number[] -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1053[#1053]
|
||||
- ClientOptions["cloud"] should have optional auth fields -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1032[#1032]
|
||||
|
||||
**Documentation:**
|
||||
|
||||
- Docs: Return super in example Transport subclass - https://github.com/elastic/elasticsearch-js/pull/980[#980]
|
||||
- Add examples to reference - https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
|
||||
- Added new examples - https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
|
||||
- Docs: Return super in example Transport subclass -
|
||||
https://github.com/elastic/elasticsearch-js/pull/980[#980]
|
||||
- Add examples to reference -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1076[#1076]
|
||||
- Added new examples -
|
||||
https://github.com/elastic/elasticsearch-js/pull/1031[#1031]
|
||||
|
||||
[discrete]
|
||||
=== 7.5.0
|
||||
|
||||
Support for Elasticsearch `v7.5`.
|
||||
@ -334,73 +708,102 @@ Support for Elasticsearch `v7.5`.
|
||||
|
||||
- X-Opaque-Id support https://github.com/elastic/elasticsearch-js/pull/997[#997]
|
||||
|
||||
[discrete]
|
||||
=== 7.4.0
|
||||
|
||||
Support for Elasticsearch `v7.4`.
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Fix issue; node roles are defaulting to true when undefined is breaking usage of nodeFilter option - https://github.com/elastic/elasticsearch-js/pull/967[#967]
|
||||
- Fix issue; node roles are defaulting to true when undefined is breaking usage
|
||||
of nodeFilter option -
|
||||
https://github.com/elastic/elasticsearch-js/pull/967[#967]
|
||||
|
||||
**Documentation:**
|
||||
|
||||
- Updated API reference doc - https://github.com/elastic/elasticsearch-js/pull/945[#945] https://github.com/elastic/elasticsearch-js/pull/969[#969]
|
||||
- Fix inaccurate description sniffEndpoint - https://github.com/elastic/elasticsearch-js/pull/959[#959]
|
||||
- Updated API reference doc -
|
||||
https://github.com/elastic/elasticsearch-js/pull/945[#945],
|
||||
https://github.com/elastic/elasticsearch-js/pull/969[#969]
|
||||
- Fix inaccurate description sniffEndpoint -
|
||||
https://github.com/elastic/elasticsearch-js/pull/959[#959]
|
||||
|
||||
**Internals:**
|
||||
|
||||
- Update code generation https://github.com/elastic/elasticsearch-js/pull/969[#969]
|
||||
- Update code generation
|
||||
https://github.com/elastic/elasticsearch-js/pull/969[#969]
|
||||
|
||||
[discrete]
|
||||
=== 7.3.0
|
||||
|
||||
Support for Elasticsearch `v7.3`.
|
||||
|
||||
**Features:**
|
||||
|
||||
- Added `auth` option - https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
||||
- Added support for `ApiKey` authentication - https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
||||
- Added `auth` option -
|
||||
https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
||||
- Added support for `ApiKey` authentication -
|
||||
https://github.com/elastic/elasticsearch-js/pull/908[#908]
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- fix(Typings): sniffInterval can also be boolean - https://github.com/elastic/elasticsearch-js/pull/914[#914]
|
||||
- fix(Typings): sniffInterval can also be boolean -
|
||||
https://github.com/elastic/elasticsearch-js/pull/914[#914]
|
||||
|
||||
**Internals:**
|
||||
|
||||
- Refactored connection pool - https://github.com/elastic/elasticsearch-js/pull/913[#913]
|
||||
- Refactored connection pool -
|
||||
https://github.com/elastic/elasticsearch-js/pull/913[#913]
|
||||
|
||||
**Documentation:**
|
||||
|
||||
- Better reference code examples - https://github.com/elastic/elasticsearch-js/pull/920[#920]
|
||||
- Improve README - https://github.com/elastic/elasticsearch-js/pull/909[#909]
|
||||
- Better reference code examples -
|
||||
https://github.com/elastic/elasticsearch-js/pull/920[#920]
|
||||
- Improve README -
|
||||
https://github.com/elastic/elasticsearch-js/pull/909[#909]
|
||||
|
||||
[discrete]
|
||||
=== 7.2.0
|
||||
|
||||
Support for Elasticsearch `v7.2`
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Remove auth data from inspect and toJSON in connection class - https://github.com/elastic/elasticsearch-js/pull/887[#887]
|
||||
- Remove auth data from inspect and toJSON in connection class -
|
||||
https://github.com/elastic/elasticsearch-js/pull/887[#887]
|
||||
|
||||
[discrete]
|
||||
=== 7.1.0
|
||||
|
||||
Support for Elasticsearch `v7.1`
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Support for non-friendly chars in url username and password - https://github.com/elastic/elasticsearch-js/pull/858[#858]
|
||||
- Patch deprecated parameters - https://github.com/elastic/elasticsearch-js/pull/851[#851]
|
||||
- Support for non-friendly chars in url username and password -
|
||||
https://github.com/elastic/elasticsearch-js/pull/858[#858]
|
||||
- Patch deprecated parameters -
|
||||
https://github.com/elastic/elasticsearch-js/pull/851[#851]
|
||||
|
||||
[discrete]
|
||||
=== 7.0.1
|
||||
|
||||
**Fixes:**
|
||||
|
||||
- Fix TypeScript export *(issue https://github.com/elastic/elasticsearch-js/pull/841[#841])* - https://github.com/elastic/elasticsearch-js/pull/842[#842]
|
||||
- Fix http and https port handling *(issue https://github.com/elastic/elasticsearch-js/pull/843[#843])* - https://github.com/elastic/elasticsearch-js/pull/845[#845]
|
||||
- Fix TypeScript definiton *(issue https://github.com/elastic/elasticsearch-js/pull/803[#803])* - https://github.com/elastic/elasticsearch-js/pull/846[#846]
|
||||
- Added toJSON method to Connection class *(issue https://github.com/elastic/elasticsearch-js/pull/848[#848])* - https://github.com/elastic/elasticsearch-js/pull/849[#849]
|
||||
- Fix TypeScript export *(issue
|
||||
https://github.com/elastic/elasticsearch-js/pull/841[#841])* -
|
||||
https://github.com/elastic/elasticsearch-js/pull/842[#842]
|
||||
- Fix http and https port handling *(issue
|
||||
https://github.com/elastic/elasticsearch-js/pull/843[#843])* -
|
||||
https://github.com/elastic/elasticsearch-js/pull/845[#845]
|
||||
- Fix TypeScript definiton *(issue
|
||||
https://github.com/elastic/elasticsearch-js/pull/803[#803])* -
|
||||
https://github.com/elastic/elasticsearch-js/pull/846[#846]
|
||||
- Added toJSON method to Connection class *(issue
|
||||
https://github.com/elastic/elasticsearch-js/pull/848[#848])* -
|
||||
https://github.com/elastic/elasticsearch-js/pull/849[#849]
|
||||
|
||||
[discrete]
|
||||
=== 7.0.0
|
||||
|
||||
Support for Elasticsearch `v7.0`
|
||||
|
||||
- Stable release.
|
||||
- Stable release.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[[child-client]]
|
||||
== Creating a child client
|
||||
[[child]]
|
||||
=== Creating a child client
|
||||
|
||||
There are some use cases where you may need multiple instances of the client.
|
||||
You can easily do that by calling `new Client()` as many times as you need, but
|
||||
|
||||
@ -1,366 +1,12 @@
|
||||
[[client-configuration]]
|
||||
== Client configuration
|
||||
== Configuration
|
||||
|
||||
|
||||
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
|
||||
it.
|
||||
section, you can see the possible options that you can use to configure it.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
|
||||
const client = new Client({
|
||||
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 yoru events.
|
||||
It will be merged with the API level context option. +
|
||||
_Default:_ `null`
|
||||
|
||||
|`cloud`
|
||||
a|`object` - Custom configuration for connecting to
|
||||
https://cloud.elastic.co[Elastic Cloud]. See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
|
||||
for more details. +
|
||||
_Default:_ `null` +
|
||||
_Cloud configuration example:_
|
||||
[source,js]
|
||||
----
|
||||
const client = new Client({
|
||||
cloud: {
|
||||
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA=='
|
||||
},
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
|===
|
||||
|
||||
|
||||
[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
|
||||
})
|
||||
----
|
||||
* <<basic-config>>
|
||||
* <<advanced-config>>
|
||||
* <<child>>
|
||||
* <<extend>>
|
||||
* <<client-testing>>
|
||||
|
||||
@ -1,5 +1,208 @@
|
||||
[[client-connecting]]
|
||||
== Connecting
|
||||
|
||||
This page contains the information you need to connect and use the Client with
|
||||
{es}.
|
||||
|
||||
**On this page**
|
||||
|
||||
* <<auth-reference, Authentication options>>
|
||||
* <<client-usage, Using the client>>
|
||||
* <<client-connect-proxy, Connecting through a proxy>>
|
||||
* <<client-error-handling, Handling errors>>
|
||||
* <<product-check, Automatic product check>>
|
||||
|
||||
[discrete]
|
||||
[[authentication]]
|
||||
=== Authentication
|
||||
|
||||
This document contains code snippets to show you how to connect to various {es}
|
||||
providers.
|
||||
|
||||
|
||||
[discrete]
|
||||
[[auth-ec]]
|
||||
==== Elastic Cloud
|
||||
|
||||
If you are using https://www.elastic.co/cloud[Elastic Cloud], the client offers
|
||||
an easy way to connect to it via the `cloud` option. You must pass the Cloud ID
|
||||
that you can find in the cloud console, then your username and password inside
|
||||
the `auth` option.
|
||||
|
||||
NOTE: When connecting to Elastic Cloud, the client will automatically enable
|
||||
both request and response compression by default, since it yields significant
|
||||
throughput improvements. Moreover, the client will also set the ssl option
|
||||
`secureProtocol` to `TLSv1_2_method` unless specified otherwise. You can still
|
||||
override this option by configuring them.
|
||||
|
||||
IMPORTANT: Do not enable sniffing when using Elastic Cloud, since the nodes are
|
||||
behind a load balancer, Elastic Cloud will take care of everything for you.
|
||||
Take a look https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[here]
|
||||
to know more.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
cloud: {
|
||||
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA==',
|
||||
},
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
[discrete]
|
||||
[[auth-apikey]]
|
||||
==== ApiKey authentication
|
||||
|
||||
You can use the
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[ApiKey]
|
||||
authentication by passing the `apiKey` parameter via the `auth` option. The
|
||||
`apiKey` parameter can be either a base64 encoded string or an object with the
|
||||
values that you can obtain from the
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[create api key endpoint].
|
||||
|
||||
NOTE: If you provide both basic authentication credentials and the ApiKey
|
||||
configuration, the ApiKey takes precedence.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
apiKey: 'base64EncodedKey'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
apiKey: {
|
||||
id: 'foo',
|
||||
api_key: 'bar'
|
||||
}
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
[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]
|
||||
[[auth-basic]]
|
||||
==== Basic authentication
|
||||
|
||||
You can provide your credentials by passing the `username` and `password`
|
||||
parameters via the `auth` option.
|
||||
|
||||
NOTE: If you provide both basic authentication credentials and the Api Key
|
||||
configuration, the Api Key will take precedence.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
Otherwise, you can provide your credentials in the node(s) URL.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://username:password@localhost:9200'
|
||||
})
|
||||
----
|
||||
|
||||
|
||||
[discrete]
|
||||
[[auth-ssl]]
|
||||
==== SSL configuration
|
||||
|
||||
Without any additional configuration you can specify `https://` node urls, and
|
||||
the certificates used to sign these requests will be verified. To turn off
|
||||
certificate verification, you must specify an `ssl` object in the top level
|
||||
config and set `rejectUnauthorized: false`. The default `ssl` values are the
|
||||
same that Node.js's
|
||||
https://nodejs.org/api/tls.html#tls_tls_connect_options_callback[`tls.connect()`]
|
||||
uses.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const { Client } = require('@elastic/elasticsearch')
|
||||
const client = new Client({
|
||||
node: 'https://localhost:9200',
|
||||
auth: {
|
||||
username: 'elastic',
|
||||
password: 'changeme'
|
||||
},
|
||||
ssl: {
|
||||
ca: fs.readFileSync('./cacert.pem'),
|
||||
rejectUnauthorized: false
|
||||
}
|
||||
})
|
||||
----
|
||||
|
||||
[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]
|
||||
[[client-usage]]
|
||||
== Usage
|
||||
=== Usage
|
||||
|
||||
Using the client is straightforward, it supports all the public APIs of {es},
|
||||
and every method exposes the same signature.
|
||||
@ -33,7 +236,7 @@ client.search({
|
||||
})
|
||||
----
|
||||
|
||||
The returned value of every API call is formed as follows:
|
||||
The returned value of every API call is designed as follows:
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
@ -82,11 +285,13 @@ client.search({
|
||||
|
||||
|
||||
[discrete]
|
||||
=== Aborting a request
|
||||
==== Aborting a request
|
||||
|
||||
If needed, you can abort a running request by calling the `request.abort()` method returned by the API.
|
||||
If needed, you can abort a running request by calling the `request.abort()`
|
||||
method returned by the API.
|
||||
|
||||
CAUTION: If you abort a request, the request will fail with a `RequestAbortedError`.
|
||||
CAUTION: If you abort a request, the request will fail with a
|
||||
`RequestAbortedError`.
|
||||
|
||||
|
||||
[source,js]
|
||||
@ -113,6 +318,7 @@ request.abort()
|
||||
----
|
||||
|
||||
The same behavior is valid for the promise style API as well.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
const request = client.search({
|
||||
@ -136,7 +342,8 @@ request.abort()
|
||||
|
||||
|
||||
[discrete]
|
||||
=== Request specific options
|
||||
==== Request specific options
|
||||
|
||||
If needed you can pass request specific options in a second object:
|
||||
|
||||
[source,js]
|
||||
@ -214,13 +421,14 @@ _Default:_ `null`
|
||||
|
||||
|
||||
[discrete]
|
||||
[[client-connect-proxy]]
|
||||
=== Connecting through a proxy
|
||||
|
||||
~Added~ ~in~ ~`v7.10.0`~
|
||||
|
||||
If you need to pass through an http(s) proxy for connecting to Elasticsearch, the client offers
|
||||
out of the box a handy configuration for helping you with it. Under the hood it
|
||||
uses the https://github.com/delvedor/hpagent[`hpagent`] module.
|
||||
If you need to pass through an http(s) proxy for connecting to {es}, the client
|
||||
offers out of the box a handy configuration for helping you with it. Under the
|
||||
hood, it uses the https://github.com/delvedor/hpagent[`hpagent`] module.
|
||||
|
||||
[source,js]
|
||||
----
|
||||
@ -256,6 +464,7 @@ const client = new Client({
|
||||
|
||||
|
||||
[discrete]
|
||||
[[client-error-handling]]
|
||||
=== Error handling
|
||||
|
||||
The client exposes a variety of error objects that you can use to enhance your
|
||||
@ -332,3 +541,15 @@ a|* `name` - `string`
|
||||
* `statusCode` - `object`, the response headers
|
||||
* `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.
|
||||
@ -1,5 +1,5 @@
|
||||
[[as_stream_examples]]
|
||||
== asStream
|
||||
=== asStream
|
||||
|
||||
Instead of getting the parsed body back, you will get the raw Node.js stream of
|
||||
data.
|
||||
@ -57,7 +57,7 @@ async function run () {
|
||||
})
|
||||
|
||||
// stream async iteration, available in Node.js ≥ 10
|
||||
var payload = ''
|
||||
let payload = ''
|
||||
body.setEncoding('utf8')
|
||||
for await (const chunk of body) {
|
||||
payload += chunk
|
||||
@ -65,7 +65,7 @@ async function run () {
|
||||
console.log(JSON.parse(payload))
|
||||
|
||||
// classic stream callback style
|
||||
var payload = ''
|
||||
let payload = ''
|
||||
body.setEncoding('utf8')
|
||||
body.on('data', chunk => { payload += chunk })
|
||||
body.on('error', console.log)
|
||||
@ -101,4 +101,4 @@ fastify.post('/search/:index', async (req, reply) => {
|
||||
})
|
||||
|
||||
fastify.listen(3000)
|
||||
----
|
||||
----
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[[bulk_examples]]
|
||||
== Bulk
|
||||
=== Bulk
|
||||
|
||||
The `bulk` API makes it possible to perform many index/delete operations in a
|
||||
single API call. This can greatly increase the indexing speed.
|
||||
@ -38,7 +38,7 @@ async function run () {
|
||||
date: new Date()
|
||||
}, {
|
||||
id: 2,
|
||||
text: 'Witer is coming',
|
||||
text: 'Winter is coming',
|
||||
user: 'ned',
|
||||
date: new Date()
|
||||
}, {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user