Compare commits

..

117 Commits

Author SHA1 Message Date
de5ac5c7d0 Changelog for 7.16 (#1605) 2021-12-15 12:06:33 +01:00
23030139af API generation 2021-12-15 11:19:32 +01:00
6020625912 Bumped v7.16.0-canary.7 2021-11-03 14:57:55 +01:00
0652f5ab31 Use extension explicitly 2021-11-03 14:56:39 +01:00
fa91d1a832 Bumped v7.16.0-canary.6 2021-11-03 13:38:26 +01:00
bb7393a084 API generation 2021-11-03 13:37:32 +01:00
dc905aaabc Updated types 2021-11-03 13:37:02 +01:00
4e2f25b5cd Bumped v7.16.0-canary.5 2021-11-02 09:28:14 +01:00
249d2a6398 Fix #1521 (#1594) 2021-10-29 14:48:40 +02:00
d0a421b25c Fix #1465 (#1593) 2021-10-29 14:48:31 +02:00
e6eeeeb6af Update 7.16 types definitions (#1592) 2021-10-29 14:16:35 +02:00
d2ee3be9e0 Updated for 7.16 (#1591) 2021-10-29 11:01:18 +02:00
cb7421ecfc Use internal xrefs in docs code gen script (#1588) 2021-10-28 10:29:09 +02:00
a5f48d0962 [DOCS] Deletes attribute from index (#1590) 2021-10-27 18:11:54 +02:00
54642b9c9d Updated CI conf 2021-10-27 17:08:01 +02:00
9ff5fc34bc Hard code jsclient links to 7.x (#1580) 2021-10-20 20:43:56 -04:00
1ad8501d73 [DOCS] Update branch attribute to fix doc links (#1577)
Co-authored-by: debadair <debadair@elastic.co>
2021-10-20 19:55:54 -04:00
158ea917e2 [DOCS] Hardcode fix for broken link to unblock doc build (#1575) 2021-10-20 18:14:22 -04:00
26887ca76b [DOCS] Retitle Elasticsearch JavaScript Client doc book (#1565) 2021-10-13 18:52:05 +02:00
53ba8ba726 Bumped v7.16.0-canary.4 2021-09-29 07:25:25 +02:00
8ad6d993e6 Fix broken link 2021-09-23 15:31:02 +02:00
fb363fe5c3 Changelog for 7.15 (#1557) 2021-09-23 14:49:18 +02:00
1e7ccfab33 [Backport 7.x] Show socket local/remote address in case of ECONNRESET (#1556)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-09-22 10:06:50 +02:00
1362fb568e Bumped v7.16.0-canary.3 2021-09-16 08:43:47 +02:00
34a168dd99 [Backport 7.x] Update compatibility info (#1554)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-09-16 08:21:36 +02:00
be1c0f235c [Backport 7.x] Add support for maxResponseSize and maxCompressedResponseSize (#1553)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-09-16 08:20:33 +02:00
da0bfd2fb5 [DOCS] Adds a link to the Quick Start section that points to an EC ingest example (#1546) 2021-09-07 10:01:39 +02:00
9daf8f360c Merge branch '7.x' of https://github.com/elastic/elasticsearch-js into 7.x 2021-08-30 15:37:51 +02:00
f6180fae6b Add test for mocking library (#1545) 2021-08-30 15:37:43 +02:00
996ee29009 Bumped v7.16.0-canary.2 2021-08-28 18:24:55 +02:00
bb8f397742 Do not use a singleton for EE (#1543) (#1544)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-28 18:22:26 +02:00
7c69f043e5 [Backport 7.x] Documentation Update for FaaS use cases (#1541)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-24 14:55:18 +02:00
93a7e52be0 [Backport 7.x] Always emit request aborted event (#1539)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-24 11:56:15 +02:00
642b15cd5c [Backport 7.x] Always display request params and options in request event (#1538)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-24 11:27:59 +02:00
ee867daad0 [Backport 7.x] Fix parcel build (#1536)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-23 15:31:01 +02:00
ef11962ad4 Bumped v7.16.0-canary.1 2021-08-20 12:42:15 +02:00
65fabb267d [Backport 7.x] Fix isHttpConnection check (#1528)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-20 12:41:00 +02:00
c520967790 [Backport 7.x] Add warning.name to product check security exception (#1527)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-20 10:40:19 +02:00
f555329496 API generation 2021-08-18 17:51:19 +02:00
c55b287c63 Bumped v7.16.0 2021-08-18 17:50:32 +02:00
1a2665b13b Bumped v7.15.0-canary.3 2021-08-17 09:55:35 +02:00
791cfdb186 API generation 2021-08-17 09:54:41 +02:00
f3a2cbffe9 Update README.md 2021-08-16 11:52:21 +02:00
1777d091bb Bumped v7.15.0-canary.2 2021-08-16 11:26:40 +02:00
37c2959e92 Updated types 2021-08-16 11:26:00 +02:00
6aaba8af07 Bumped v7.15.0-canary.1 2021-08-11 12:04:38 +02:00
64f62c91e0 Bumped v7.15.0 2021-08-11 12:03:30 +02:00
432df0c3db Changelog for 7.14 (#1505) 2021-08-11 12:02:17 +02:00
0f35880143 API generation 2021-08-11 12:00:15 +02:00
3bd3748feb Updated types 2021-08-11 11:58:42 +02:00
559acd32be [Backport 7.x] Show the body as string if the response error can't be read as ES error (#1514)
* Show the body as string if the response error can't be read as ES error

* Updated test

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-11 09:46:37 +02:00
a48ebc9442 Support CA fingerprint validation (#1499)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Ioannis Kakavas <ioannis@elastic.co>
2021-08-02 11:22:10 +02:00
563b7746cd [Backport 7.x] Support mapbox content type (#1508)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-08-02 11:20:11 +02:00
a287c71147 Add note about prototype poisoning protection perf (#1503) (#1504)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-07-24 17:49:56 +02:00
db5476ad5d Better message in case of unsupported build flavor (#1498) (#1502)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-07-24 16:55:14 +02:00
e8b4eb8b9b Do not check for 100% coverage (#1501) 2021-07-24 14:46:21 +02:00
67db0c57bf Updated type definitions 2021-07-19 16:50:17 +02:00
743c53dfe0 API generation 2021-07-19 16:45:12 +02:00
adc5c2b146 Verify connection to Elasticsearch (#1487) (#1497)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-07-19 16:42:53 +02:00
7358fd0c83 API generation 2021-07-16 11:27:03 +02:00
9baa42ac1b Update integration test (#1493) 2021-07-16 10:07:22 +02:00
28d8ff799e Add api compatibility header support (#1478) (#1491)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-07-13 09:48:30 +02:00
ea2c8d2d4d Add support for bearer auth (#1488) (#1490)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-07-13 09:40:06 +02:00
2f0aeec108 Bulk update improvements (#1428) 2021-07-12 16:06:59 +02:00
74c6e187a2 Bumped v7.14.0-canary.6 2021-06-04 11:37:41 +02:00
7bf627f76b Updated type definitions 2021-06-04 11:37:06 +02:00
496887cec0 Bumped v7.14.0-canary.5 2021-06-03 18:41:03 +02:00
1040e76ce2 Updated type definitions 2021-06-03 18:40:11 +02:00
b3ca264a0b [Backport 7.x] Fix integration test (#1480)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-06-03 17:52:36 +02:00
ea3df650f1 Changelog for 7.13 (#1476) 2021-05-31 12:32:11 +02:00
51594424d5 Bumped v7.14.0-canary.4 2021-05-20 16:20:07 +02:00
a2614bd84e Merge branch '7.x' of https://github.com/elastic/elasticsearch-js into 7.x 2021-05-20 16:18:10 +02:00
4ec32601e7 Drop node v10 support (#1471) 2021-05-20 16:18:01 +02:00
1e5d143d0c [Backport 7.x] Update body error check (#1474)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-05-20 16:16:06 +02:00
9a021f8445 Bumped v7.14.0-canary.3 2021-05-19 11:18:00 +02:00
aad5fdf144 API generation 2021-05-19 11:17:08 +02:00
bc607ffbd1 Updated type definitions 2021-05-19 11:14:54 +02:00
ecff306004 [Backport 7.x] Add top level type error to error message (#1469)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-05-19 11:09:55 +02:00
9b0f45f390 Bumped v7.14.0-canary.2 2021-05-12 18:18:33 +02:00
2016dd2ef6 Updated type definitions 2021-05-12 17:42:04 +02:00
95daf256f6 Merge branch '7.x' of https://github.com/elastic/elasticsearch-js into 7.x 2021-05-12 17:38:34 +02:00
7ef266bdb0 API generation 2021-05-12 17:38:31 +02:00
f7450de64e Updated integration test helpers (#1466) (#1467)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-05-12 15:34:05 +02:00
f7c9c64e1d Bumped v7.14.0-canary.1 2021-05-03 16:54:34 +02:00
4441de678f Catch HEAD errors (#1460) (#1462)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-05-03 16:40:48 +02:00
c9808fb067 Improve response error message (#1457) (#1461)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-05-03 16:39:54 +02:00
b812c51dce [DOCS] Reviews Client helpers section in the Node.JS book (#1434) (#1458)
* [DOCS] Reviews Client helpers section in the Node.JS book.

* [DOCS] Changes link.

* Update docs/index.asciidoc
2021-04-27 14:16:14 +02:00
7a83df8445 Merge branch '7.x' of https://github.com/elastic/elasticsearch-js into 7.x 2021-04-26 16:51:56 +02:00
bfae6066af API generation 2021-04-26 16:51:52 +02:00
23ababaffc [7.x][DOCS] Renames Changelog to Release notes in Node.JS book. (#1454) 2021-04-26 16:25:26 +02:00
fe3ec491de Bumped v7.14.0 2021-04-21 13:44:20 +02:00
1889691a43 Fix type definition 2021-04-19 09:33:18 +02:00
146fde308a Fix type definition 2021-04-19 07:30:32 +02:00
a0786f2705 Bumped v7.13.0-canary.3 2021-04-15 08:46:05 +02:00
4ab53eee4b Updated new types export (#1446) (#1447)
* Updated new types

* Updated new types

* Updated test

* Updated docs

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-04-15 08:44:37 +02:00
17b3d63428 Wrap inside array ndjson bodies in integration test (#1444) (#1445)
* Wrap inside array ndjson bodies

* Fix path

* Use orignal api name

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-04-08 18:27:50 +02:00
8b946af6ce Bumped v7.13.0-canary.2 2021-04-07 19:37:59 +02:00
d6dbaf1ab9 API generation 2021-04-07 19:23:36 +02:00
1db476f716 Updated code generation (#1441) (#1442)
* Updated code generation

* Nit

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-04-07 15:25:30 +02:00
93231e621e API generation 2021-04-07 14:16:52 +02:00
e198511327 Expose the new type definition along with the current one (#1440) 2021-04-07 14:10:17 +02:00
cba4affb82 Move integration test to artifact API (#1436) 2021-03-31 13:58:37 +02:00
3d2720d3c8 [DOCS] Rearranges Examples section in Node.JS book (#1425) (#1431) 2021-03-29 15:02:59 +02:00
b53466e41c Bumped v7.13.0-canary.1 2021-03-24 15:00:05 +01:00
f138b077e3 New type definitions (#1358) 2021-03-24 14:54:06 +01:00
f7edb80df7 Updated changelog.asciidoc (#1422) 2021-03-24 08:37:46 +01:00
66693f30ab Integration test: Fix yaml parser and crash on failure (#1423) (#1424)
* Fix yaml parser and crash on failure

* Log response in case of ResponseError

* Updated cleanup

* Updated skip list

* Updated skip list

* Updated skip list

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-03-24 07:53:34 +01:00
e0e3267ca0 API generation 2021-03-22 11:54:41 +01:00
416b221b1e fix(TransportRequestPromise): add finally method to TransportRequestP… (#1415)
* fix(TransportRequestPromise): add finally method to TransportRequestPromise interface

* fix(TransportRequestPromise): add finally method to transportReturn object

* fix(TransportRequestPromise): add finally method tests
2021-03-22 11:52:13 +01:00
528b90d19a Disable prototype poisoning option (#1414) (#1420)
* Introduce disablePrototypePoisoningProtection option

* Updated test

* Updated docs

* Fix bundler test

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-03-15 08:52:34 +01:00
9fe088589c [DOCS] Adds Integrations section to Node.JS docs (#1407) (#1419)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-03-11 07:51:15 +01:00
7d776c15f7 Fix test bundler (#1417) (#1418)
* Updated .gitignore

* Fix parcel build

* Updated .gitignore

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-03-10 14:57:10 +01:00
0e2ae5452d API generation 2021-03-01 10:36:52 +01:00
2ebe2d8b7f API generation 2021-02-19 08:31:52 +01:00
b759e621db Remove linter ignore configuration 2021-02-19 08:30:03 +01:00
28370acf49 Remove Node.js v8 support (#1402) 2021-02-19 08:29:57 +01:00
ae3bb7031f Bumped v7.13.0 2021-02-18 16:44:08 +01:00
140 changed files with 26850 additions and 2439 deletions

View File

@ -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

View File

@ -26,10 +26,11 @@ if [[ -z $es_node_name ]]; then
export es_node_name=instance
export elastic_password=changeme
export elasticsearch_image=elasticsearch
export elasticsearch_url=https://elastic:${elastic_password}@${es_node_name}:9200
export elasticsearch_scheme="https"
if [[ $TEST_SUITE != "platinum" ]]; then
export elasticsearch_url=http://${es_node_name}:9200
export elasticsearch_scheme="http"
fi
export elasticsearch_url=${elasticsearch_scheme}://elastic:${elastic_password}@${es_node_name}:9200
export external_elasticsearch_url=${elasticsearch_url/$es_node_name/localhost}
export elasticsearch_container="${elasticsearch_image}:${STACK_VERSION}"

View File

@ -7,7 +7,7 @@
# 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.6.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,11 @@
# - Refactored into functions and imports
# - Support NUMBER_OF_NODES
# - Added 5 retries on docker pull for fixing transient network errors
# - Added flags to make local CCR configurations work
# - Added action.destructive_requires_name=false as the default will be true in v8
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
# - Use https only when TEST_SUITE is "platinum", when "free" use http
script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
@ -28,6 +33,8 @@ cluster_name=${moniker}${suffix}
declare -a volumes
environment=($(cat <<-END
--env ELASTIC_PASSWORD=$elastic_password
--env xpack.security.enabled=true
--env node.name=$es_node_name
--env cluster.name=$cluster_name
--env cluster.initial_master_nodes=$master_node_name
@ -37,19 +44,21 @@ environment=($(cat <<-END
--env node.attr.testattr=test
--env path.repo=/tmp
--env repositories.url.allowed_urls=http://snapshot.test*
--env action.destructive_requires_name=false
--env ingest.geoip.downloader.enabled=false
--env cluster.deprecation_indexing.enabled=false
END
))
if [[ "$TEST_SUITE" == "platinum" ]]; then
environment+=($(cat <<-END
--env ELASTIC_PASSWORD=$elastic_password
--env xpack.license.self_generated.type=trial
--env xpack.security.enabled=true
--env xpack.security.http.ssl.enabled=true
--env xpack.security.http.ssl.verification_mode=certificate
--env xpack.security.http.ssl.key=certs/testnode.key
--env xpack.security.http.ssl.certificate=certs/testnode.crt
--env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
--env xpack.security.transport.ssl.enabled=true
--env xpack.security.transport.ssl.verification_mode=certificate
--env xpack.security.transport.ssl.key=certs/testnode.key
--env xpack.security.transport.ssl.certificate=certs/testnode.crt
--env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
@ -61,6 +70,11 @@ END
--volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
END
))
else
environment+=($(cat <<-END
--env xpack.security.http.ssl.enabled=false
END
))
fi
cert_validation_flags=""
@ -104,7 +118,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 \

View File

@ -30,17 +30,14 @@ docker build \
echo -e "\033[1m>>>>> NPM run test:integration >>>>>>>>>>>>>>>>>>>>>>>>>>>>>\033[0m"
repo=$(realpath $(dirname $(realpath -s $0))/../)
run_script_args=""
if [[ "$NODE_JS_VERSION" == "8" ]]; then
run_script_args="--harmony-async-iteration"
fi
docker run \
--network=${network_name} \
--env "TEST_ES_SERVER=${ELASTICSEARCH_URL}" \
--env "TEST_SUITE=${TEST_SUITE}" \
--volume $repo:/usr/src/app \
--volume /usr/src/app/node_modules \
--name elasticsearch-js \
--rm \
elastic/elasticsearch-js \
node ${run_script_args} test/integration/index.js
npm run test:integration

View File

@ -1,11 +1,11 @@
---
STACK_VERSION:
- 7.12.0-SNAPSHOT
- 7.16-SNAPSHOT
NODE_JS_VERSION:
- 16
- 14
- 12
- 10
TEST_SUITE:
- free

View File

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

View File

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

View File

@ -28,7 +28,7 @@ npm install @elastic/elasticsearch
### Node.js support
NOTE: The minimum supported version of Node.js is `v10`.
NOTE: The minimum supported version of Node.js is `v12`.
The client versioning follows the Elastc Stack versioning, this means that
major, minor, and patch releases are done following a precise schedule that
@ -49,12 +49,13 @@ 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) |
| `8.x` | `December 2019` | `7.11` (early 2021) |
| `10.x` | `April 2021` | `7.12` (mid 2021) |
### Compatibility
The library is compatible with all Elasticsearch versions since 5.x, and you should use the same major version of the Elasticsearch instance that you are using.
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch.
Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
| Elasticsearch Version | Client Version |
| --------------------- |----------------|

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', '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

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['format', 'local', 'h', 'help', 's', 'v', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'bytes', 'master_timeout', 'fields', 'time', 'ts', 'health', 'pri', 'include_unloaded_segments', 'full_id', 'include_bootstrap', 'active_only', 'detailed', 'index', 'ignore_unavailable', 'nodes', 'actions', 'parent_task_id', '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', includeBootstrap: 'include_bootstrap', activeOnly: 'active_only', ignoreUnavailable: 'ignore_unavailable', parentTaskId: 'parent_task_id', 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
@ -224,6 +224,110 @@ CatApi.prototype.master = function catMasterApi (params, options, callback) {
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, datafeedId, datafeed_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((datafeed_id || datafeedId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, jobId, job_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((job_id || jobId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, modelId, model_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((model_id || modelId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.nodeattrs = function catNodeattrsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -506,110 +610,6 @@ CatApi.prototype.threadPool = function catThreadPoolApi (params, options, callba
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDataFrameAnalytics = function catMlDataFrameAnalyticsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((id) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'data_frame' + '/' + 'analytics'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlDatafeeds = function catMlDatafeedsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, datafeedId, datafeed_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((datafeed_id || datafeedId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'datafeeds'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlJobs = function catMlJobsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, jobId, job_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((job_id || jobId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'anomaly_detectors'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.mlTrainedModels = function catMlTrainedModelsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, modelId, model_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((model_id || modelId) != null) {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId)
} else {
if (method == null) method = 'GET'
path = '/' + '_cat' + '/' + 'ml' + '/' + 'trained_models'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
CatApi.prototype.transforms = function catTransformsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -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

View File

@ -23,8 +23,8 @@
/* 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', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
function deleteByQueryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -52,8 +52,30 @@ FeaturesApi.prototype.getFeatures = function featuresGetFeaturesApi (params, opt
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 } }
get_features: { get () { return this.getFeatures } },
reset_features: { get () { return this.resetFeatures } }
})
module.exports = FeaturesApi

124
api/api/fleet.js Normal file
View File

@ -0,0 +1,124 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_checkpoints', 'wait_for_checkpoints_timeout', 'allow_partial_search_results']
const snakeCase = { waitForAdvance: 'wait_for_advance', waitForIndex: 'wait_for_index', errorTrace: 'error_trace', filterPath: 'filter_path', waitForCheckpoints: 'wait_for_checkpoints', waitForCheckpointsTimeout: 'wait_for_checkpoints_timeout', allowPartialSearchResults: 'allow_partial_search_results' }
function FleetApi (transport, ConfigurationError) {
this.transport = transport
this[kConfigurationError] = ConfigurationError
}
FleetApi.prototype.globalCheckpoints = function fleetGlobalCheckpointsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + 'global_checkpoints'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
FleetApi.prototype.msearch = function fleetMsearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.body == null) {
const err = new this[kConfigurationError]('Missing required parameter: body')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((index) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_fleet_msearch'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_fleet' + '/' + '_fleet_msearch'
}
// build request object
const request = {
method,
path,
bulkBody: body,
querystring
}
return this.transport.request(request, options, callback)
}
FleetApi.prototype.search = function fleetSearchApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_fleet' + '/' + '_fleet_search'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(FleetApi.prototype, {
global_checkpoints: { get () { return this.globalCheckpoints } }
})
module.exports = FleetApi

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', 'only_managed', 'only_errors']
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
@ -132,6 +132,27 @@ 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)
@ -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 } }

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'index', 'fielddata', 'fields', 'query', 'request', 'wait_for_active_shards', 'include_type_name', 'local', 'flat_settings', 'include_defaults', 'force', 'wait_if_ongoing', 'flush', 'max_num_segments', 'only_expunge_deletes', 'create', 'cause', 'write_index_only', 'preserve_existing', 'order', 'detailed', 'active_only', 'dry_run', 'verbose', 'status', 'copy_settings', 'completion_fields', 'fielddata_fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments', 'forbid_closed_indices', 'wait_for_completion', 'only_ancient_segments', 'explain', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards']
const snakeCase = { masterTimeout: 'master_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards', includeTypeName: 'include_type_name', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', waitIfOngoing: 'wait_if_ongoing', maxNumSegments: 'max_num_segments', onlyExpungeDeletes: 'only_expunge_deletes', writeIndexOnly: 'write_index_only', preserveExisting: 'preserve_existing', activeOnly: 'active_only', dryRun: 'dry_run', copySettings: 'copy_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments', forbidClosedIndices: 'forbid_closed_indices', waitForCompletion: 'wait_for_completion', onlyAncientSegments: 'only_ancient_segments', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', allShards: 'all_shards' }
const acceptedQuerystring = ['timeout', 'master_timeout', 'ignore_unavailable', 'allow_no_indices', 'expand_wildcards', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'index', 'fielddata', 'fields', 'query', 'request', 'wait_for_active_shards', 'include_type_name', 'run_expensive_tasks', 'flush', 'local', 'flat_settings', 'include_defaults', 'force', 'wait_if_ongoing', 'max_num_segments', 'only_expunge_deletes', 'create', 'cause', 'write_index_only', 'preserve_existing', 'order', 'detailed', 'active_only', 'dry_run', 'verbose', 'status', 'copy_settings', 'completion_fields', 'fielddata_fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments', 'forbid_closed_indices', 'wait_for_completion', 'only_ancient_segments', 'explain', 'q', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'rewrite', 'all_shards']
const snakeCase = { masterTimeout: 'master_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', waitForActiveShards: 'wait_for_active_shards', includeTypeName: 'include_type_name', runExpensiveTasks: 'run_expensive_tasks', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', waitIfOngoing: 'wait_if_ongoing', maxNumSegments: 'max_num_segments', onlyExpungeDeletes: 'only_expunge_deletes', writeIndexOnly: 'write_index_only', preserveExisting: 'preserve_existing', activeOnly: 'active_only', dryRun: 'dry_run', copySettings: 'copy_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments', forbidClosedIndices: 'forbid_closed_indices', waitForCompletion: 'wait_for_completion', onlyAncientSegments: 'only_ancient_segments', analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', allShards: 'all_shards' }
function IndicesApi (transport, ConfigurationError) {
this.transport = transport
@ -211,6 +211,59 @@ IndicesApi.prototype.create = function indicesCreateApi (params, options, callba
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'PUT'
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (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 = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats'
} else {
if (method == null) method = 'GET'
path = '/' + '_data_stream' + '/' + '_stats'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.delete = function indicesDeleteApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -280,6 +333,33 @@ IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi (params, optio
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -334,6 +414,33 @@ IndicesApi.prototype.deleteTemplate = function indicesDeleteTemplateApi (params,
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.diskUsage = function indicesDiskUsageApi (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 = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_disk_usage'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.exists = function indicesExistsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -484,6 +591,33 @@ IndicesApi.prototype.existsType = function indicesExistsTypeApi (params, options
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.fieldUsageStats = function indicesFieldUsageStatsApi (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) + '/' + '_field_usage_stats'
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.flush = function indicesFlushApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -557,6 +691,33 @@ IndicesApi.prototype.forcemerge = function indicesForcemergeApi (params, options
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.freeze = function indicesFreezeApi (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 = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_freeze'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.get = function indicesGetApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -616,6 +777,32 @@ IndicesApi.prototype.getAlias = function indicesGetAliasApi (params, options, ca
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.getDataStream = function indicesGetDataStreamApi (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 = '/' + '_data_stream' + '/' + encodeURIComponent(name)
} else {
if (method == null) method = 'GET'
path = '/' + '_data_stream'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -791,6 +978,60 @@ IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi (params, options
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_data_stream' + '/' + '_migrate' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.modifyDataStream = function indicesModifyDataStreamApi (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 = '/' + '_data_stream' + '/' + '_modify'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.open = function indicesOpenApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -818,6 +1059,33 @@ IndicesApi.prototype.open = function indicesOpenApi (params, options, callback)
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_data_stream' + '/' + '_promote' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.putAlias = function indicesPutAliasApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -1056,6 +1324,33 @@ IndicesApi.prototype.refresh = function indicesRefreshApi (params, options, call
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.reloadSearchAnalyzers = function indicesReloadSearchAnalyzersApi (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) + '/' + '_reload_search_analyzers'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -1332,6 +1627,33 @@ IndicesApi.prototype.stats = function indicesStatsApi (params, options, callback
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (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 = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_unfreeze'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -1415,283 +1737,45 @@ IndicesApi.prototype.validateQuery = function indicesValidateQueryApi (params, o
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.createDataStream = function indicesCreateDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'PUT'
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.dataStreamsStats = function indicesDataStreamsStatsApi (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 = '/' + '_data_stream' + '/' + encodeURIComponent(name) + '/' + '_stats'
} else {
if (method == null) method = 'GET'
path = '/' + '_data_stream' + '/' + '_stats'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.deleteDataStream = function indicesDeleteDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_data_stream' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.freeze = function indicesFreezeApi (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 = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_freeze'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.getDataStream = function indicesGetDataStreamApi (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 = '/' + '_data_stream' + '/' + encodeURIComponent(name)
} else {
if (method == null) method = 'GET'
path = '/' + '_data_stream'
}
// build request object
const request = {
method,
path,
body: null,
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.migrateToDataStream = function indicesMigrateToDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_data_stream' + '/' + '_migrate' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.promoteDataStream = function indicesPromoteDataStreamApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.name == null) {
const err = new this[kConfigurationError]('Missing required parameter: name')
return handleError(err, callback)
}
let { method, body, name, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_data_stream' + '/' + '_promote' + '/' + encodeURIComponent(name)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.reloadSearchAnalyzers = function indicesReloadSearchAnalyzersApi (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) + '/' + '_reload_search_analyzers'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
IndicesApi.prototype.unfreeze = function indicesUnfreezeApi (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 = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_unfreeze'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(IndicesApi.prototype, {
add_block: { get () { return this.addBlock } },
clear_cache: { get () { return this.clearCache } },
create_data_stream: { get () { return this.createDataStream } },
data_streams_stats: { get () { return this.dataStreamsStats } },
delete_alias: { get () { return this.deleteAlias } },
delete_data_stream: { get () { return this.deleteDataStream } },
delete_index_template: { get () { return this.deleteIndexTemplate } },
delete_template: { get () { return this.deleteTemplate } },
disk_usage: { get () { return this.diskUsage } },
exists_alias: { get () { return this.existsAlias } },
exists_index_template: { get () { return this.existsIndexTemplate } },
exists_template: { get () { return this.existsTemplate } },
exists_type: { get () { return this.existsType } },
field_usage_stats: { get () { return this.fieldUsageStats } },
flush_synced: { get () { return this.flushSynced } },
get_alias: { get () { return this.getAlias } },
get_data_stream: { get () { return this.getDataStream } },
get_field_mapping: { get () { return this.getFieldMapping } },
get_index_template: { get () { return this.getIndexTemplate } },
get_mapping: { get () { return this.getMapping } },
get_settings: { get () { return this.getSettings } },
get_template: { get () { return this.getTemplate } },
get_upgrade: { get () { return this.getUpgrade } },
migrate_to_data_stream: { get () { return this.migrateToDataStream } },
modify_data_stream: { get () { return this.modifyDataStream } },
promote_data_stream: { get () { return this.promoteDataStream } },
put_alias: { get () { return this.putAlias } },
put_index_template: { get () { return this.putIndexTemplate } },
put_mapping: { get () { return this.putMapping } },
put_settings: { get () { return this.putSettings } },
put_template: { get () { return this.putTemplate } },
reload_search_analyzers: { get () { return this.reloadSearchAnalyzers } },
resolve_index: { get () { return this.resolveIndex } },
shard_stores: { get () { return this.shardStores } },
simulate_index_template: { get () { return this.simulateIndexTemplate } },
simulate_template: { get () { return this.simulateTemplate } },
update_aliases: { get () { return this.updateAliases } },
validate_query: { get () { return this.validateQuery } },
create_data_stream: { get () { return this.createDataStream } },
data_streams_stats: { get () { return this.dataStreamsStats } },
delete_data_stream: { get () { return this.deleteDataStream } },
get_data_stream: { get () { return this.getDataStream } },
migrate_to_data_stream: { get () { return this.migrateToDataStream } },
promote_data_stream: { get () { return this.promoteDataStream } },
reload_search_analyzers: { get () { return this.reloadSearchAnalyzers } }
validate_query: { get () { return this.validateQuery } }
})
module.exports = IndicesApi

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'verbose']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'summary', 'if_version', 'verbose']
const snakeCase = { masterTimeout: 'master_timeout', errorTrace: 'error_trace', filterPath: 'filter_path', ifVersion: 'if_version' }
function IngestApi (transport, ConfigurationError) {
this.transport = transport
@ -58,6 +58,27 @@ 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)
@ -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 } }

View File

@ -23,8 +23,8 @@
/* 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)

View File

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

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['allow_no_match', 'allow_no_jobs', 'force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'requests_per_second', 'allow_no_forecasts', 'wait_for_completion', 'lines_to_sample', 'line_merge_size_limit', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'calc_interim', 'start', 'end', 'advance_time', 'skip_time', 'duration', 'expires_in', 'max_model_memory', 'expand', 'exclude_interim', 'from', 'size', 'anomaly_score', 'sort', 'desc', 'job_id', 'partition_field_value', 'exclude_generated', 'verbose', 'allow_no_datafeeds', 'influencer_score', 'top_n', 'bucket_span', 'overall_score', 'record_score', 'include', 'include_model_definition', 'decompress_definition', 'tags', 'reset_start', 'reset_end', 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards', 'delete_intervening_results', 'enabled']
const snakeCase = { allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs', errorTrace: 'error_trace', filterPath: 'filter_path', requestsPerSecond: 'requests_per_second', allowNoForecasts: 'allow_no_forecasts', waitForCompletion: 'wait_for_completion', 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', calcInterim: 'calc_interim', advanceTime: 'advance_time', skipTime: 'skip_time', expiresIn: 'expires_in', maxModelMemory: 'max_model_memory', excludeInterim: 'exclude_interim', anomalyScore: 'anomaly_score', jobId: 'job_id', partitionFieldValue: 'partition_field_value', excludeGenerated: 'exclude_generated', allowNoDatafeeds: 'allow_no_datafeeds', influencerScore: 'influencer_score', topN: 'top_n', bucketSpan: 'bucket_span', overallScore: 'overall_score', recordScore: 'record_score', includeModelDefinition: 'include_model_definition', decompressDefinition: 'decompress_definition', resetStart: 'reset_start', resetEnd: 'reset_end', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', ignoreThrottled: 'ignore_throttled', expandWildcards: 'expand_wildcards', deleteInterveningResults: 'delete_intervening_results' }
const acceptedQuerystring = ['allow_no_match', 'allow_no_jobs', 'force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'requests_per_second', 'allow_no_forecasts', 'wait_for_completion', 'lines_to_sample', 'line_merge_size_limit', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'calc_interim', 'start', 'end', 'advance_time', 'skip_time', 'duration', 'expires_in', 'max_model_memory', 'expand', 'exclude_interim', 'from', 'size', 'anomaly_score', 'sort', 'desc', 'job_id', 'partition_field_value', 'exclude_generated', 'verbose', 'allow_no_datafeeds', 'influencer_score', 'top_n', 'bucket_span', 'overall_score', 'record_score', 'include', 'include_model_definition', 'decompress_definition', 'tags', 'reset_start', 'reset_end', 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards', 'defer_definition_decompression', 'reassign', 'delete_intervening_results', 'enabled']
const snakeCase = { allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs', errorTrace: 'error_trace', filterPath: 'filter_path', requestsPerSecond: 'requests_per_second', allowNoForecasts: 'allow_no_forecasts', waitForCompletion: 'wait_for_completion', 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', calcInterim: 'calc_interim', advanceTime: 'advance_time', skipTime: 'skip_time', expiresIn: 'expires_in', maxModelMemory: 'max_model_memory', excludeInterim: 'exclude_interim', anomalyScore: 'anomaly_score', jobId: 'job_id', partitionFieldValue: 'partition_field_value', excludeGenerated: 'exclude_generated', allowNoDatafeeds: 'allow_no_datafeeds', influencerScore: 'influencer_score', topN: 'top_n', bucketSpan: 'bucket_span', overallScore: 'overall_score', recordScore: 'record_score', includeModelDefinition: 'include_model_definition', decompressDefinition: 'decompress_definition', resetStart: 'reset_start', resetEnd: 'reset_end', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', ignoreThrottled: 'ignore_throttled', expandWildcards: 'expand_wildcards', deferDefinitionDecompression: 'defer_definition_decompression', deleteInterveningResults: 'delete_intervening_results' }
function MlApi (transport, ConfigurationError) {
this.transport = transport
@ -395,6 +395,43 @@ MlApi.prototype.deleteTrainedModel = function mlDeleteTrainedModelApi (params, o
return this.transport.request(request, options, callback)
}
MlApi.prototype.deleteTrainedModelAlias = function mlDeleteTrainedModelAliasApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.model_alias == null && params.modelAlias == null) {
const err = new this[kConfigurationError]('Missing required parameter: model_alias or modelAlias')
return handleError(err, callback)
}
if (params.model_id == null && params.modelId == null) {
const err = new this[kConfigurationError]('Missing required parameter: model_id or modelId')
return handleError(err, callback)
}
// check required url components
if ((params.model_alias != null || params.modelAlias != null) && ((params.model_id == null && params.modelId == null))) {
const err = new this[kConfigurationError]('Missing required parameter of the url: model_id')
return handleError(err, callback)
}
let { method, body, modelAlias, model_alias, modelId, model_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'DELETE'
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) + '/' + 'model_aliases' + '/' + encodeURIComponent(model_alias || modelAlias)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
MlApi.prototype.estimateModelMemory = function mlEstimateModelMemoryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -1148,27 +1185,52 @@ MlApi.prototype.postData = function mlPostDataApi (params, options, callback) {
return this.transport.request(request, options, callback)
}
MlApi.prototype.previewDatafeed = function mlPreviewDatafeedApi (params, options, callback) {
MlApi.prototype.previewDataFrameAnalytics = function mlPreviewDataFrameAnalyticsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.datafeed_id == null && params.datafeedId == null) {
const err = new this[kConfigurationError]('Missing required parameter: datafeed_id or datafeedId')
return handleError(err, callback)
}
let { method, body, datafeedId, datafeed_id, ...querystring } = params
let { method, body, id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'GET'
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_preview'
if ((id) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + encodeURIComponent(id) + '/' + '_preview'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_ml' + '/' + 'data_frame' + '/' + 'analytics' + '/' + '_preview'
}
// build request object
const request = {
method,
path,
body: null,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
MlApi.prototype.previewDatafeed = function mlPreviewDatafeedApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, datafeedId, datafeed_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((datafeed_id || datafeedId) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + encodeURIComponent(datafeed_id || datafeedId) + '/' + '_preview'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_ml' + '/' + 'datafeeds' + '/' + '_preview'
}
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
@ -1394,6 +1456,70 @@ MlApi.prototype.putTrainedModel = function mlPutTrainedModelApi (params, options
return this.transport.request(request, options, callback)
}
MlApi.prototype.putTrainedModelAlias = function mlPutTrainedModelAliasApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.model_alias == null && params.modelAlias == null) {
const err = new this[kConfigurationError]('Missing required parameter: model_alias or modelAlias')
return handleError(err, callback)
}
if (params.model_id == null && params.modelId == null) {
const err = new this[kConfigurationError]('Missing required parameter: model_id or modelId')
return handleError(err, callback)
}
// check required url components
if ((params.model_alias != null || params.modelAlias != null) && ((params.model_id == null && params.modelId == null))) {
const err = new this[kConfigurationError]('Missing required parameter of the url: model_id')
return handleError(err, callback)
}
let { method, body, modelAlias, model_alias, modelId, model_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'PUT'
path = '/' + '_ml' + '/' + 'trained_models' + '/' + encodeURIComponent(model_id || modelId) + '/' + 'model_aliases' + '/' + encodeURIComponent(model_alias || modelAlias)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
MlApi.prototype.resetJob = function mlResetJobApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.job_id == null && params.jobId == null) {
const err = new this[kConfigurationError]('Missing required parameter: job_id or jobId')
return handleError(err, callback)
}
let { method, body, jobId, job_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_ml' + '/' + 'anomaly_detectors' + '/' + encodeURIComponent(job_id || jobId) + '/' + '_reset'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
MlApi.prototype.revertModelSnapshot = function mlRevertModelSnapshotApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
@ -1829,6 +1955,7 @@ Object.defineProperties(MlApi.prototype, {
delete_job: { get () { return this.deleteJob } },
delete_model_snapshot: { get () { return this.deleteModelSnapshot } },
delete_trained_model: { get () { return this.deleteTrainedModel } },
delete_trained_model_alias: { get () { return this.deleteTrainedModelAlias } },
estimate_model_memory: { get () { return this.estimateModelMemory } },
evaluate_data_frame: { get () { return this.evaluateDataFrame } },
explain_data_frame_analytics: { get () { return this.explainDataFrameAnalytics } },
@ -1854,6 +1981,7 @@ Object.defineProperties(MlApi.prototype, {
open_job: { get () { return this.openJob } },
post_calendar_events: { get () { return this.postCalendarEvents } },
post_data: { get () { return this.postData } },
preview_data_frame_analytics: { get () { return this.previewDataFrameAnalytics } },
preview_datafeed: { get () { return this.previewDatafeed } },
put_calendar: { get () { return this.putCalendar } },
put_calendar_job: { get () { return this.putCalendarJob } },
@ -1862,6 +1990,8 @@ Object.defineProperties(MlApi.prototype, {
put_filter: { get () { return this.putFilter } },
put_job: { get () { return this.putJob } },
put_trained_model: { get () { return this.putTrainedModel } },
put_trained_model_alias: { get () { return this.putTrainedModelAlias } },
reset_job: { get () { return this.resetJob } },
revert_model_snapshot: { get () { return this.revertModelSnapshot } },
set_upgrade_mode: { get () { return this.setUpgradeMode } },
start_data_frame_analytics: { get () { return this.startDataFrameAnalytics } },

View File

@ -23,14 +23,78 @@
/* 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', 'sort', 'timeout', 'flat_settings', 'completion_fields', 'fielddata_fields', 'fields', 'groups', 'level', 'types', 'include_segment_file_sizes', 'include_unloaded_segments']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', ignoreIdleThreads: 'ignore_idle_threads', flatSettings: 'flat_settings', completionFields: 'completion_fields', fielddataFields: 'fielddata_fields', includeSegmentFileSizes: 'include_segment_file_sizes', includeUnloadedSegments: 'include_unloaded_segments' }
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)
@ -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 } }
})

View File

@ -29,17 +29,22 @@ const snakeCase = { ignoreUnavailable: 'ignore_unavailable', expandWildcards: 'e
function openPointInTimeApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.keep_alive == null && params.keepAlive == null) {
const err = new this[kConfigurationError]('Missing required parameter: keep_alive or keepAlive')
return handleError(err, callback)
}
let { method, body, index, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if ((index) != null) {
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_pit'
} else {
if (method == null) method = 'POST'
path = '/' + '_pit'
}
if (method == null) method = 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_pit'
// build request object
const request = {

View File

@ -23,8 +23,8 @@
/* 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', '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', _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', minCompatibleShardNode: 'min_compatible_shard_node', errorTrace: 'error_trace', filterPath: 'filter_path' }
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'explain', 'stored_fields', 'docvalue_fields', 'from', 'ignore_unavailable', 'ignore_throttled', 'allow_no_indices', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'size', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'timeout', 'track_scores', 'track_total_hits', 'allow_partial_search_results', 'typed_keys', 'version', 'seq_no_primary_term', 'request_cache', 'batched_reduce_size', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'rest_total_hits_as_int', '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)

87
api/api/search_mvt.js Normal file
View File

@ -0,0 +1,87 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
'use strict'
/* eslint camelcase: 0 */
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['exact_bounds', 'extent', 'grid_precision', 'grid_type', 'size', 'track_total_hits', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { exactBounds: 'exact_bounds', gridPrecision: 'grid_precision', gridType: 'grid_type', trackTotalHits: 'track_total_hits', errorTrace: 'error_trace', filterPath: 'filter_path' }
function searchMvtApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
// check required parameters
if (params.index == null) {
const err = new this[kConfigurationError]('Missing required parameter: index')
return handleError(err, callback)
}
if (params.field == null) {
const err = new this[kConfigurationError]('Missing required parameter: field')
return handleError(err, callback)
}
if (params.zoom == null) {
const err = new this[kConfigurationError]('Missing required parameter: zoom')
return handleError(err, callback)
}
if (params.x == null) {
const err = new this[kConfigurationError]('Missing required parameter: x')
return handleError(err, callback)
}
if (params.y == null) {
const err = new this[kConfigurationError]('Missing required parameter: y')
return handleError(err, callback)
}
// check required url components
if (params.y != null && (params.x == null || params.zoom == null || params.field == null || params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: x, zoom, field, index')
return handleError(err, callback)
} else if (params.x != null && (params.zoom == null || params.field == null || params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: zoom, field, index')
return handleError(err, callback)
} else if (params.zoom != null && (params.field == null || params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: field, index')
return handleError(err, callback)
} else if (params.field != null && (params.index == null)) {
const err = new this[kConfigurationError]('Missing required parameter of the url: index')
return handleError(err, callback)
}
let { method, body, index, field, zoom, x, y, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + encodeURIComponent(index) + '/' + '_mvt' + '/' + encodeURIComponent(field) + '/' + encodeURIComponent(zoom) + '/' + encodeURIComponent(x) + '/' + encodeURIComponent(y)
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
module.exports = searchMvtApi

View File

@ -23,14 +23,40 @@
/* 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', 'storage', 'level']
const snakeCase = { ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForCompletion: 'wait_for_completion' }
const 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)
@ -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 } }
})

View File

@ -192,6 +192,50 @@ 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)
@ -219,6 +263,51 @@ 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)
@ -310,6 +399,50 @@ 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)
@ -520,6 +653,78 @@ 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)
@ -827,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 } },
@ -845,6 +1236,8 @@ 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 } },
@ -855,7 +1248,14 @@ Object.defineProperties(SecurityApi.prototype, {
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
View 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

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['master_timeout', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'wait_for_completion', 'verify', 'ignore_unavailable', '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
@ -301,6 +301,33 @@ 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)
@ -405,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 } }
})

View File

@ -23,8 +23,8 @@
/* eslint no-unused-vars: 0 */
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path', '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
@ -58,6 +58,87 @@ 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)
@ -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

56
api/api/terms_enum.js Normal file
View 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

View File

@ -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', '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' }
const acceptedQuerystring = ['force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'wait_for_completion', 'wait_for_checkpoint', 'dry_run']
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', excludeGenerated: 'exclude_generated', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint', dryRun: 'dry_run' }
function TransformApi (transport, ConfigurationError) {
this.transport = transport
@ -114,18 +114,17 @@ TransformApi.prototype.getTransformStats = function transformGetTransformStatsAp
TransformApi.prototype.previewTransform = function transformPreviewTransformApi (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
let { method, body, transformId, transform_id, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + '_preview'
if ((transform_id || transformId) != null) {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_transform' + '/' + encodeURIComponent(transform_id || transformId) + '/' + '_preview'
} else {
if (method == null) method = body == null ? 'GET' : 'POST'
path = '/' + '_transform' + '/' + '_preview'
}
// build request object
const request = {
@ -254,6 +253,27 @@ TransformApi.prototype.updateTransform = function transformUpdateTransformApi (p
return this.transport.request(request, options, callback)
}
TransformApi.prototype.upgradeTransforms = function transformUpgradeTransformsApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
if (method == null) method = 'POST'
path = '/' + '_transform' + '/' + '_upgrade'
// build request object
const request = {
method,
path,
body: body || '',
querystring
}
return this.transport.request(request, options, callback)
}
Object.defineProperties(TransformApi.prototype, {
delete_transform: { get () { return this.deleteTransform } },
get_transform: { get () { return this.getTransform } },
@ -262,7 +282,8 @@ Object.defineProperties(TransformApi.prototype, {
put_transform: { get () { return this.putTransform } },
start_transform: { get () { return this.startTransform } },
stop_transform: { get () { return this.stopTransform } },
update_transform: { get () { return this.updateTransform } }
update_transform: { get () { return this.updateTransform } },
upgrade_transforms: { get () { return this.upgradeTransforms } }
})
module.exports = TransformApi

View File

@ -23,8 +23,8 @@
/* 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)

View File

@ -23,8 +23,8 @@
/* 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', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
function updateByQueryApi (params, options, callback) {
;[params, options, callback] = normalizeArguments(params, options, callback)

View File

@ -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,95 +34,97 @@ 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 LogstashApi = require('./api/logstash')
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 TextStructureApi = require('./api/text_structure')
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 kFeatures = Symbol('Features')
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')
@ -126,33 +132,35 @@ const kXpack = Symbol('Xpack')
function ESAPI (opts) {
this[kConfigurationError] = opts.ConfigurationError
this[kCat] = null
this[kCluster] = null
this[kDanglingIndices] = null
this[kFeatures] = 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
@ -161,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
@ -182,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
@ -191,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) {
@ -209,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) {
@ -230,96 +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 } },
features: {
get () {
if (this[kFeatures] === null) {
this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError])
}
return this[kFeatures]
}
},
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) {
@ -336,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) {
@ -352,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) {
@ -392,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) {
@ -401,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) {
@ -418,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) {
@ -426,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) {
@ -442,6 +459,15 @@ 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) {
@ -459,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) {

780
api/kibana.d.ts vendored
View File

@ -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,424 +78,476 @@ 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>>
status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AsyncSearchStatus, 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>>
getAutoscalingCapacity<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.AutoscalingGetAutoscalingCapacity, 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: T.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingDeleteAutoscalingPolicyResponse, TContext>>
getAutoscalingCapacity<TContext = unknown>(params?: T.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingGetAutoscalingCapacityResponse, TContext>>
getAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingGetAutoscalingPolicyResponse, TContext>>
putAutoscalingPolicy<TContext = unknown>(params: T.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.AutoscalingPutAutoscalingPolicyResponse, TContext>>
}
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.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlDataFrameAnalyticsResponse, TContext>>
mlDatafeeds<TContext = unknown>(params?: T.CatMlDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlDatafeedsResponse, TContext>>
mlJobs<TContext = unknown>(params?: T.CatMlJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlJobsResponse, TContext>>
mlTrainedModels<TContext = unknown>(params?: T.CatMlTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatMlTrainedModelsResponse, TContext>>
nodeattrs<TContext = unknown>(params?: T.CatNodeattrsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodeattrsResponse, TContext>>
nodes<TContext = unknown>(params?: T.CatNodesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatNodesResponse, TContext>>
pendingTasks<TContext = unknown>(params?: T.CatPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPendingTasksResponse, TContext>>
plugins<TContext = unknown>(params?: T.CatPluginsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatPluginsResponse, TContext>>
recovery<TContext = unknown>(params?: T.CatRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRecoveryResponse, TContext>>
repositories<TContext = unknown>(params?: T.CatRepositoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatRepositoriesResponse, TContext>>
segments<TContext = unknown>(params?: T.CatSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSegmentsResponse, TContext>>
shards<TContext = unknown>(params?: T.CatShardsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatShardsResponse, TContext>>
snapshots<TContext = unknown>(params?: T.CatSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatSnapshotsResponse, TContext>>
tasks<TContext = unknown>(params?: T.CatTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTasksResponse, TContext>>
templates<TContext = unknown>(params?: T.CatTemplatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTemplatesResponse, TContext>>
threadPool<TContext = unknown>(params?: T.CatThreadPoolRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatThreadPoolResponse, TContext>>
transforms<TContext = unknown>(params?: T.CatTransformsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CatTransformsResponse, TContext>>
}
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.CcrFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowResponse, TContext>>
followInfo<TContext = unknown>(params: T.CcrFollowInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowInfoResponse, TContext>>
followStats<TContext = unknown>(params: T.CcrFollowStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrFollowStatsResponse, TContext>>
forgetFollower<TContext = unknown>(params: T.CcrForgetFollowerRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrForgetFollowerResponse, TContext>>
getAutoFollowPattern<TContext = unknown>(params?: T.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrGetAutoFollowPatternResponse, TContext>>
pauseAutoFollowPattern<TContext = unknown>(params: T.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseAutoFollowPatternResponse, TContext>>
pauseFollow<TContext = unknown>(params: T.CcrPauseFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPauseFollowResponse, TContext>>
putAutoFollowPattern<TContext = unknown>(params: T.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrPutAutoFollowPatternResponse, TContext>>
resumeAutoFollowPattern<TContext = unknown>(params: T.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeAutoFollowPatternResponse, TContext>>
resumeFollow<TContext = unknown>(params: T.CcrResumeFollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrResumeFollowResponse, TContext>>
stats<TContext = unknown>(params?: T.CcrStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrStatsResponse, TContext>>
unfollow<TContext = unknown>(params: T.CcrUnfollowRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.CcrUnfollowResponse, TContext>>
}
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?: T.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterDeleteVotingConfigExclusionsResponse, TContext>>
existsComponentTemplate<TContext = unknown>(params: T.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterExistsComponentTemplateResponse, TContext>>
getComponentTemplate<TContext = unknown>(params?: T.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetComponentTemplateResponse, TContext>>
getSettings<TContext = unknown>(params?: T.ClusterGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterGetSettingsResponse, TContext>>
health<TContext = unknown>(params?: T.ClusterHealthRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterHealthResponse, TContext>>
pendingTasks<TContext = unknown>(params?: T.ClusterPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPendingTasksResponse, TContext>>
postVotingConfigExclusions<TContext = unknown>(params?: T.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPostVotingConfigExclusionsResponse, TContext>>
putComponentTemplate<TContext = unknown>(params: T.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutComponentTemplateResponse, TContext>>
putSettings<TContext = unknown>(params?: T.ClusterPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterPutSettingsResponse, TContext>>
remoteInfo<TContext = unknown>(params?: T.ClusterRemoteInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRemoteInfoResponse, TContext>>
reroute<TContext = unknown>(params?: T.ClusterRerouteRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterRerouteResponse, TContext>>
state<TContext = unknown>(params?: T.ClusterStateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStateResponse, TContext>>
stats<TContext = unknown>(params?: T.ClusterStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ClusterStatsResponse, TContext>>
}
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: T.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesDeleteDanglingIndexResponse, TContext>>
importDanglingIndex<TContext = unknown>(params: T.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesImportDanglingIndexResponse, TContext>>
listDanglingIndices<TContext = unknown>(params?: T.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.DanglingIndicesListDanglingIndicesResponse, TContext>>
}
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>>
getStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.EqlGetStatus, 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>>
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<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.FeaturesGetFeatures, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getFeatures<TContext = unknown>(params?: T.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FeaturesGetFeaturesResponse, TContext>>
resetFeatures<TContext = unknown>(params?: T.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.FeaturesResetFeaturesResponse, TContext>>
}
fieldCaps<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>>
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>>
msearch<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
search<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
}
get<TDocument = unknown, TContext = unknown>(params: T.GetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetResponse<TDocument>, TContext>>
getScript<TContext = unknown>(params: T.GetScriptRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptResponse, TContext>>
getScriptContext<TContext = unknown>(params?: T.GetScriptContextRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptContextResponse, TContext>>
getScriptLanguages<TContext = unknown>(params?: T.GetScriptLanguagesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetScriptLanguagesResponse, TContext>>
getSource<TDocument = unknown, TContext = unknown>(params: T.GetSourceRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.GetSourceResponse<TDocument>, TContext>>
graph: {
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>>
migrateToDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesMigrateToDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
open<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesOpen, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
promoteDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesPromoteDataStream, 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: T.IndicesDiskUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesDiskUsageResponse, TContext>>
exists<TContext = unknown>(params: T.IndicesExistsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsResponse, TContext>>
existsAlias<TContext = unknown>(params: T.IndicesExistsAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsAliasResponse, TContext>>
existsIndexTemplate<TContext = unknown>(params: T.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsIndexTemplateResponse, TContext>>
existsTemplate<TContext = unknown>(params: T.IndicesExistsTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTemplateResponse, TContext>>
existsType<TContext = unknown>(params: T.IndicesExistsTypeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesExistsTypeResponse, TContext>>
fieldUsageStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
flush<TContext = unknown>(params?: T.IndicesFlushRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushResponse, TContext>>
flushSynced<TContext = unknown>(params?: T.IndicesFlushSyncedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFlushSyncedResponse, TContext>>
forcemerge<TContext = unknown>(params?: T.IndicesForcemergeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesForcemergeResponse, TContext>>
freeze<TContext = unknown>(params: T.IndicesFreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesFreezeResponse, TContext>>
get<TContext = unknown>(params: T.IndicesGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetResponse, TContext>>
getAlias<TContext = unknown>(params?: T.IndicesGetAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetAliasResponse, TContext>>
getDataStream<TContext = unknown>(params?: T.IndicesGetDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetDataStreamResponse, TContext>>
getFieldMapping<TContext = unknown>(params: T.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetFieldMappingResponse, TContext>>
getIndexTemplate<TContext = unknown>(params?: T.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetIndexTemplateResponse, TContext>>
getMapping<TContext = unknown>(params?: T.IndicesGetMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetMappingResponse, TContext>>
getSettings<TContext = unknown>(params?: T.IndicesGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetSettingsResponse, TContext>>
getTemplate<TContext = unknown>(params?: T.IndicesGetTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetTemplateResponse, TContext>>
getUpgrade<TContext = unknown>(params?: T.IndicesGetUpgradeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesGetUpgradeResponse, TContext>>
migrateToDataStream<TContext = unknown>(params: T.IndicesMigrateToDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesMigrateToDataStreamResponse, TContext>>
modifyDataStream<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
open<TContext = unknown>(params: T.IndicesOpenRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesOpenResponse, TContext>>
promoteDataStream<TContext = unknown>(params: T.IndicesPromoteDataStreamRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPromoteDataStreamResponse, TContext>>
putAlias<TContext = unknown>(params: T.IndicesPutAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutAliasResponse, TContext>>
putIndexTemplate<TContext = unknown>(params: T.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutIndexTemplateResponse, TContext>>
putMapping<TContext = unknown>(params: T.IndicesPutMappingRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutMappingResponse, TContext>>
putSettings<TContext = unknown>(params?: T.IndicesPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutSettingsResponse, TContext>>
putTemplate<TContext = unknown>(params: T.IndicesPutTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesPutTemplateResponse, TContext>>
recovery<TContext = unknown>(params?: T.IndicesRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRecoveryResponse, TContext>>
refresh<TContext = unknown>(params?: T.IndicesRefreshRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRefreshResponse, TContext>>
reloadSearchAnalyzers<TContext = unknown>(params: T.IndicesReloadSearchAnalyzersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesReloadSearchAnalyzersResponse, TContext>>
resolveIndex<TContext = unknown>(params: T.IndicesResolveIndexRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesResolveIndexResponse, TContext>>
rollover<TContext = unknown>(params: T.IndicesRolloverRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesRolloverResponse, TContext>>
segments<TContext = unknown>(params?: T.IndicesSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSegmentsResponse, TContext>>
shardStores<TContext = unknown>(params?: T.IndicesShardStoresRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShardStoresResponse, TContext>>
shrink<TContext = unknown>(params: T.IndicesShrinkRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesShrinkResponse, TContext>>
simulateIndexTemplate<TContext = unknown>(params: T.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateIndexTemplateResponse, TContext>>
simulateTemplate<TContext = unknown>(params?: T.IndicesSimulateTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSimulateTemplateResponse, TContext>>
split<TContext = unknown>(params: T.IndicesSplitRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesSplitResponse, TContext>>
stats<TContext = unknown>(params?: T.IndicesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesStatsResponse, TContext>>
unfreeze<TContext = unknown>(params: T.IndicesUnfreezeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUnfreezeResponse, TContext>>
updateAliases<TContext = unknown>(params?: T.IndicesUpdateAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUpdateAliasesResponse, TContext>>
upgrade<TContext = unknown>(params?: T.IndicesUpgradeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesUpgradeResponse, TContext>>
validateQuery<TContext = unknown>(params?: T.IndicesValidateQueryRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IndicesValidateQueryResponse, TContext>>
}
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.IngestSimulateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.IngestSimulateResponse, 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>>
}
logstash: {
deletePipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LogstashDeletePipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getPipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.LogstashGetPipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putPipeline<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.LogstashPutPipeline<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deletePipeline<TContext = unknown>(params: T.LogstashDeletePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LogstashDeletePipelineResponse, TContext>>
getPipeline<TContext = unknown>(params: T.LogstashGetPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LogstashGetPipelineResponse, TContext>>
putPipeline<TContext = unknown>(params: T.LogstashPutPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.LogstashPutPipelineResponse, TContext>>
}
mget<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Mget<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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.MigrationDeprecationsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MigrationDeprecationsResponse, TContext>>
getFeatureUpgradeStatus<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
postFeatureUpgrade<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
}
ml: {
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 RequestNDBody = 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>>
upgradeJobSnapshot<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpgradeJobSnapshot, 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.MlForecastRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlForecastResponse, TContext>>
getBuckets<TContext = unknown>(params: T.MlGetBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetBucketsResponse, TContext>>
getCalendarEvents<TContext = unknown>(params: T.MlGetCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarEventsResponse, TContext>>
getCalendars<TContext = unknown>(params?: T.MlGetCalendarsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCalendarsResponse, TContext>>
getCategories<TContext = unknown>(params: T.MlGetCategoriesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetCategoriesResponse, TContext>>
getDataFrameAnalytics<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsResponse, TContext>>
getDataFrameAnalyticsStats<TContext = unknown>(params?: T.MlGetDataFrameAnalyticsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDataFrameAnalyticsStatsResponse, TContext>>
getDatafeedStats<TContext = unknown>(params?: T.MlGetDatafeedStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedStatsResponse, TContext>>
getDatafeeds<TContext = unknown>(params?: T.MlGetDatafeedsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetDatafeedsResponse, TContext>>
getFilters<TContext = unknown>(params?: T.MlGetFiltersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetFiltersResponse, TContext>>
getInfluencers<TContext = unknown>(params: T.MlGetInfluencersRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetInfluencersResponse, TContext>>
getJobStats<TContext = unknown>(params?: T.MlGetJobStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobStatsResponse, TContext>>
getJobs<TContext = unknown>(params?: T.MlGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetJobsResponse, TContext>>
getModelSnapshots<TContext = unknown>(params: T.MlGetModelSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetModelSnapshotsResponse, TContext>>
getOverallBuckets<TContext = unknown>(params: T.MlGetOverallBucketsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetOverallBucketsResponse, TContext>>
getRecords<TContext = unknown>(params: T.MlGetRecordsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetRecordsResponse, TContext>>
getTrainedModels<TContext = unknown>(params?: T.MlGetTrainedModelsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsResponse, TContext>>
getTrainedModelsStats<TContext = unknown>(params?: T.MlGetTrainedModelsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlGetTrainedModelsStatsResponse, TContext>>
info<TContext = unknown>(params?: T.MlInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlInfoResponse, TContext>>
openJob<TContext = unknown>(params: T.MlOpenJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlOpenJobResponse, TContext>>
postCalendarEvents<TContext = unknown>(params: T.MlPostCalendarEventsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostCalendarEventsResponse, TContext>>
postData<TData = unknown, TContext = unknown>(params: T.MlPostDataRequest<TData>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPostDataResponse, TContext>>
previewDataFrameAnalytics<TContext = unknown>(params?: T.MlPreviewDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDataFrameAnalyticsResponse, TContext>>
previewDatafeed<TDocument = unknown, TContext = unknown>(params?: T.MlPreviewDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPreviewDatafeedResponse<TDocument>, TContext>>
putCalendar<TContext = unknown>(params: T.MlPutCalendarRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarResponse, TContext>>
putCalendarJob<TContext = unknown>(params: T.MlPutCalendarJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutCalendarJobResponse, TContext>>
putDataFrameAnalytics<TContext = unknown>(params: T.MlPutDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDataFrameAnalyticsResponse, TContext>>
putDatafeed<TContext = unknown>(params: T.MlPutDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutDatafeedResponse, TContext>>
putFilter<TContext = unknown>(params: T.MlPutFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutFilterResponse, TContext>>
putJob<TContext = unknown>(params: T.MlPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutJobResponse, TContext>>
putTrainedModel<TContext = unknown>(params: T.MlPutTrainedModelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelResponse, TContext>>
putTrainedModelAlias<TContext = unknown>(params: T.MlPutTrainedModelAliasRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlPutTrainedModelAliasResponse, TContext>>
resetJob<TContext = unknown>(params: T.MlResetJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlResetJobResponse, TContext>>
revertModelSnapshot<TContext = unknown>(params: T.MlRevertModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlRevertModelSnapshotResponse, TContext>>
setUpgradeMode<TContext = unknown>(params?: T.MlSetUpgradeModeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlSetUpgradeModeResponse, TContext>>
startDataFrameAnalytics<TContext = unknown>(params: T.MlStartDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDataFrameAnalyticsResponse, TContext>>
startDatafeed<TContext = unknown>(params: T.MlStartDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStartDatafeedResponse, TContext>>
stopDataFrameAnalytics<TContext = unknown>(params: T.MlStopDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDataFrameAnalyticsResponse, TContext>>
stopDatafeed<TContext = unknown>(params: T.MlStopDatafeedRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlStopDatafeedResponse, TContext>>
updateDataFrameAnalytics<TContext = unknown>(params: T.MlUpdateDataFrameAnalyticsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateDataFrameAnalyticsResponse, TContext>>
updateDatafeed<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
updateFilter<TContext = unknown>(params: T.MlUpdateFilterRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateFilterResponse, TContext>>
updateJob<TContext = unknown>(params: T.MlUpdateJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateJobResponse, TContext>>
updateModelSnapshot<TContext = unknown>(params: T.MlUpdateModelSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpdateModelSnapshotResponse, TContext>>
upgradeJobSnapshot<TContext = unknown>(params: T.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlUpgradeJobSnapshotResponse, TContext>>
validate<TContext = unknown>(params?: T.MlValidateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlValidateResponse, TContext>>
validateDetector<TContext = unknown>(params?: T.MlValidateDetectorRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MlValidateDetectorResponse, TContext>>
}
monitoring: {
bulk<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MonitoringBulk<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
bulk<TSource = unknown, TContext = unknown>(params: T.MonitoringBulkRequest<TSource>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.MonitoringBulkResponse, TContext>>
}
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Msearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
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>>
clearRepositoriesMeteringArchive<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
getRepositoriesMeteringInfo<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
hotThreads<TContext = unknown>(params?: T.NodesHotThreadsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesHotThreadsResponse, TContext>>
info<TContext = unknown>(params?: T.NodesInfoRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesInfoResponse, TContext>>
reloadSecureSettings<TContext = unknown>(params?: T.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesReloadSecureSettingsResponse, TContext>>
stats<TContext = unknown>(params?: T.NodesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesStatsResponse, TContext>>
usage<TContext = unknown>(params?: T.NodesUsageRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.NodesUsageResponse, TContext>>
}
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>>
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollup<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.RollupDeleteJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupDeleteJobResponse, TContext>>
getJobs<TContext = unknown>(params?: T.RollupGetJobsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetJobsResponse, TContext>>
getRollupCaps<TContext = unknown>(params?: T.RollupGetRollupCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupCapsResponse, TContext>>
getRollupIndexCaps<TContext = unknown>(params: T.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupGetRollupIndexCapsResponse, TContext>>
putJob<TContext = unknown>(params: T.RollupPutJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupPutJobResponse, TContext>>
rollup<TContext = unknown>(params: T.RollupRollupRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupResponse, TContext>>
rollupSearch<TDocument = unknown, TContext = unknown>(params: T.RollupRollupSearchRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupRollupSearchResponse<TDocument>, TContext>>
startJob<TContext = unknown>(params: T.RollupStartJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStartJobResponse, TContext>>
stopJob<TContext = unknown>(params: T.RollupStopJobRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.RollupStopJobResponse, TContext>>
}
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>>
searchMvt<TContext = unknown>(params: T.SearchMvtRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchMvtResponse, TContext>>
searchShards<TContext = unknown>(params?: T.SearchShardsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchShardsResponse, TContext>>
searchTemplate<TDocument = unknown, TContext = unknown>(params?: T.SearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchTemplateResponse<TDocument>, TContext>>
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?: T.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsClearCacheResponse, TContext>>
mount<TContext = unknown>(params: T.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsMountResponse, TContext>>
repositoryStats<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
stats<TContext = unknown>(params?: T.SearchableSnapshotsStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SearchableSnapshotsStatsResponse, TContext>>
}
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>>
grantApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGrantApiKey<TRequestBody>, 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>>
queryApiKeys<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlAuthenticate<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlCompleteLogout<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlInvalidate<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlLogout<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlPrepareAuthentication<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
samlServiceProviderMetadata<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, TContext>>
}
shutdown: {
deleteNode<TContext = unknown>(params: T.ShutdownDeleteNodeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ShutdownDeleteNodeResponse, TContext>>
getNode<TContext = unknown>(params?: T.ShutdownGetNodeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ShutdownGetNodeResponse, TContext>>
putNode<TContext = unknown>(params: T.ShutdownPutNodeRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.ShutdownPutNodeResponse, TContext>>
}
slm: {
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>>
clone<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotClone<TRequestBody>, 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.SslCertificatesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.SslCertificatesResponse, 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.TasksCancelRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksCancelResponse, TContext>>
get<TContext = unknown>(params: T.TasksGetRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksGetResponse, TContext>>
list<TContext = unknown>(params?: T.TasksListRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TasksListResponse, TContext>>
}
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Termvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, 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<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.TextStructureFindStructure<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
findStructure<TJsonDocument = unknown, TContext = unknown>(params: T.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.TextStructureFindStructureResponse, 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>>
upgradeTransforms<TContext = unknown>(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TODO, 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>>
queryWatches<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.WatcherQueryWatches<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?: T.WatcherQueryWatchesRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherQueryWatchesResponse, TContext>>
start<TContext = unknown>(params?: T.WatcherStartRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStartResponse, TContext>>
stats<TContext = unknown>(params?: T.WatcherStatsRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStatsResponse, TContext>>
stop<TContext = unknown>(params?: T.WatcherStopRequest, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<T.WatcherStopResponse, TContext>>
}
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 }

1592
api/new.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

294
api/requestParams.d.ts vendored
View File

@ -45,6 +45,8 @@ export interface AsyncSearchStatus extends Generic {
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;
@ -108,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;
@ -276,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 {
@ -562,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;
@ -667,9 +672,6 @@ export interface DeleteByQuery<T = RequestBody> extends Generic {
size?: number;
max_docs?: number;
sort?: string | string[];
_source?: string | string[];
_source_excludes?: string | string[];
_source_includes?: string | string[];
terminate_after?: number;
stats?: string | string[];
version?: boolean;
@ -742,6 +744,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;
@ -758,6 +762,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;
@ -773,6 +779,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';
@ -792,6 +800,9 @@ 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[];
@ -802,10 +813,33 @@ export interface FieldCaps<T = RequestBody> extends Generic {
body?: T;
}
export interface FleetGlobalCheckpoints extends Generic {
index: string;
wait_for_advance?: boolean;
wait_for_index?: boolean;
checkpoints?: string | string[];
timeout?: string;
}
export interface FleetMsearch<T = RequestNDBody> extends Generic {
index?: string;
body: T;
}
export interface FleetSearch<T = RequestBody> extends Generic {
index: string;
wait_for_checkpoints?: string | string[];
wait_for_checkpoints_timeout?: string;
allow_partial_search_results?: boolean;
body?: T;
}
export interface Get extends Generic {
id: string;
index: string;
type?: string;
_source_exclude?: string | string[];
_source_include?: string | string[];
stored_fields?: string | string[];
preference?: string;
realtime?: boolean;
@ -833,6 +867,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;
@ -869,6 +905,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;
@ -1006,6 +1047,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;
@ -1048,6 +1098,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;
@ -1123,7 +1181,7 @@ export interface IndicesGetFieldMapping extends Generic {
}
export interface IndicesGetIndexTemplate extends Generic {
name?: string | string[];
name?: string;
flat_settings?: boolean;
master_timeout?: string;
local?: boolean;
@ -1171,6 +1229,10 @@ export interface IndicesMigrateToDataStream extends Generic {
name: string;
}
export interface IndicesModifyDataStream<T = RequestBody> extends Generic {
body: T;
}
export interface IndicesOpen extends Generic {
index: string | string[];
timeout?: string;
@ -1390,8 +1452,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;
}
@ -1400,6 +1466,7 @@ export interface IngestProcessorGrok extends Generic {
export interface IngestPutPipeline<T = RequestBody> extends Generic {
id: string;
if_version?: number;
master_timeout?: string;
timeout?: string;
body: T;
@ -1455,6 +1522,8 @@ export interface LogstashPutPipeline<T = RequestBody> extends Generic {
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;
@ -1470,6 +1539,12 @@ export interface MigrationDeprecations extends Generic {
index?: string;
}
export interface MigrationGetFeatureUpgradeStatus extends Generic {
}
export interface MigrationPostFeatureUpgrade extends Generic {
}
export interface MlCloseJob<T = RequestBody> extends Generic {
job_id: string;
allow_no_match?: boolean;
@ -1537,6 +1612,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;
}
@ -1578,11 +1658,12 @@ export interface MlFlushJob<T = RequestBody> extends Generic {
body?: T;
}
export interface MlForecast extends Generic {
export interface MlForecast<T = RequestBody> extends Generic {
job_id: string;
duration?: string;
expires_in?: string;
max_model_memory?: string;
body?: T;
}
export interface MlGetBuckets<T = RequestBody> extends Generic {
@ -1746,8 +1827,9 @@ export interface MlGetTrainedModelsStats extends Generic {
export interface MlInfo extends Generic {
}
export interface MlOpenJob extends Generic {
export interface MlOpenJob<T = RequestBody> extends Generic {
job_id: string;
body?: T;
}
export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
@ -1762,8 +1844,14 @@ export interface MlPostData<T = RequestNDBody> extends Generic {
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 {
@ -1797,14 +1885,30 @@ export interface MlPutFilter<T = RequestBody> extends Generic {
export interface MlPutJob<T = RequestBody> extends Generic {
job_id: string;
ignore_unavailable?: boolean;
allow_no_indices?: boolean;
ignore_throttled?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
body: T;
}
export interface MlPutTrainedModel<T = RequestBody> extends Generic {
model_id: string;
defer_definition_decompression?: boolean;
body: T;
}
export interface MlPutTrainedModelAlias extends Generic {
model_alias: string;
model_id: string;
reassign?: boolean;
}
export interface MlResetJob extends Generic {
job_id: string;
wait_for_completion?: boolean;
}
export interface MlRevertModelSnapshot<T = RequestBody> extends Generic {
job_id: string;
snapshot_id: string;
@ -1893,7 +1997,7 @@ export interface MlValidateDetector<T = RequestBody> extends Generic {
body: T;
}
export interface MonitoringBulk<T = RequestBody> extends Generic {
export interface MonitoringBulk<T = RequestNDBody> extends Generic {
type?: string;
system_id?: string;
system_api_version?: string;
@ -1904,7 +2008,7 @@ export interface MonitoringBulk<T = RequestBody> 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;
@ -1917,7 +2021,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;
@ -1943,13 +2047,23 @@ export interface Mtermvectors<T = RequestBody> extends Generic {
body?: T;
}
export interface NodesClearRepositoriesMeteringArchive extends Generic {
node_id: string | string[];
max_archive_version: number;
}
export interface NodesGetRepositoriesMeteringInfo extends Generic {
node_id: string | string[];
}
export interface NodesHotThreads extends Generic {
node_id?: string | string[];
interval?: string;
snapshots?: number;
threads?: number;
ignore_idle_threads?: boolean;
type?: 'cpu' | 'wait' | 'block';
type?: 'cpu' | 'wait' | 'block' | 'mem';
sort?: 'cpu' | 'total';
timeout?: string;
}
@ -1978,6 +2092,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 {
@ -1987,12 +2102,12 @@ export interface NodesUsage extends Generic {
}
export interface OpenPointInTime extends Generic {
index?: string | string[];
index: string | string[];
preference?: string;
routing?: string;
ignore_unavailable?: boolean;
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
keep_alive?: string;
keep_alive: string;
}
export interface Ping extends Generic {
@ -2096,6 +2211,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;
@ -2142,6 +2259,21 @@ export interface Search<T = RequestBody> extends Generic {
body?: T;
}
export interface SearchMvt<T = RequestBody> extends Generic {
index: string | string[];
field: string;
zoom: number;
x: number;
y: number;
exact_bounds?: boolean;
extent?: number;
grid_precision?: number;
grid_type?: 'grid' | 'point' | 'centroid';
size?: number;
track_total_hits?: boolean | number;
body?: T;
}
export interface SearchShards extends Generic {
index?: string | string[];
preference?: string;
@ -2162,7 +2294,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;
@ -2171,6 +2303,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;
@ -2222,11 +2358,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;
@ -2243,6 +2392,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;
@ -2282,6 +2438,16 @@ export interface SecurityGetRoleMapping extends Generic {
name?: string | string[];
}
export interface SecurityGetServiceAccounts extends Generic {
namespace?: string;
service?: string;
}
export interface SecurityGetServiceCredentials extends Generic {
namespace: string;
service: string;
}
export interface SecurityGetToken<T = RequestBody> extends Generic {
body: T;
}
@ -2334,6 +2500,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;
}
@ -2413,6 +2620,8 @@ export interface SnapshotGet extends Generic {
snapshot: string | string[];
master_timeout?: string;
ignore_unavailable?: boolean;
index_details?: boolean;
include_repository?: boolean;
verbose?: boolean;
}
@ -2422,6 +2631,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;
@ -2447,6 +2671,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;
@ -2483,6 +2723,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;
@ -2522,6 +2767,7 @@ export interface TextStructureFindStructure<T = RequestNDBody> extends Generic {
export interface TransformDeleteTransform extends Generic {
transform_id: string;
force?: boolean;
timeout?: string;
}
export interface TransformGetTransform extends Generic {
@ -2540,12 +2786,15 @@ export interface TransformGetTransformStats extends Generic {
}
export interface TransformPreviewTransform<T = RequestBody> extends Generic {
body: T;
transform_id?: string;
timeout?: string;
body?: T;
}
export interface TransformPutTransform<T = RequestBody> extends Generic {
transform_id: string;
defer_validation?: boolean;
timeout?: string;
body: T;
}
@ -2566,13 +2815,21 @@ export interface TransformStopTransform extends Generic {
export interface TransformUpdateTransform<T = RequestBody> extends Generic {
transform_id: string;
defer_validation?: boolean;
timeout?: string;
body: T;
}
export interface TransformUpgradeTransforms extends Generic {
dry_run?: boolean;
timeout?: string;
}
export interface Update<T = RequestBody> extends Generic {
id: string;
index: string;
type?: string;
_source_exclude?: string | string[];
_source_include?: string | string[];
wait_for_active_shards?: string;
_source?: string | string[];
_source_excludes?: string | string[];
@ -2611,9 +2868,6 @@ export interface UpdateByQuery<T = RequestBody> extends Generic {
size?: number;
max_docs?: number;
sort?: string | string[];
_source?: string | string[];
_source_excludes?: string | string[];
_source_includes?: string | string[];
terminate_after?: number;
stats?: string | string[];
version?: boolean;

15941
api/types.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,45 +4,11 @@
If you need to customize the client behavior heavily, you are in the right
place! The client enables 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)
}
}
----
NOTE: For information about the `Transport` class, refer to <<transport>>.
[discrete]
@ -117,4 +83,18 @@ class MySerializer extends Serializer {
const client = new Client({
Serializer: MySerializer
})
----
----
[discrete]
==== Migrate to v8
The Node.js client can be configured to emit an HTTP header
``Accept: application/vnd.elasticsearch+json; compatible-with=7``
which signals to Elasticsearch that the client is requesting
``7.x`` version of request and response bodies. This allows for
upgrading from 7.x to 8.x version of Elasticsearch without upgrading
everything at once. Elasticsearch should be upgraded first after
the compatibility header is configured and clients should be upgraded
second.
To enable to setting, configure the environment variable
``ELASTIC_CLIENT_APIVERSIONING`` to ``true``.

View File

@ -1,7 +1,7 @@
[[basic-config]]
=== Basic configuration
This page shows you the possible basic configuration options that the clients
This page shows you the possible basic configuration options that the clients
offers.
@ -46,9 +46,9 @@ node: {
----
|`auth`
a|Your authentication data. You can use both basic authentication and
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]
See https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html[Authentication]
for more details. +
_Default:_ `null`
@ -67,6 +67,13 @@ 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`
@ -134,7 +141,7 @@ const client = new Client({
----
|`agent`
a|`http.AgentOptions, function` - http agent https://nodejs.org/api/http.html#http_new_agent_options[options],
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`
@ -189,7 +196,7 @@ function nodeSelector (connections) {
----
|`generateRequestId`
a|`function` - function to generate the request id for every request, it takes
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:_
@ -226,17 +233,17 @@ 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]
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:_
_Default:_ `null` +
_Cloud configuration example:_
[source,js]
----
const client = new Client({
cloud: {
id: 'name:bG9jYWxob3N0JGFiY2QkZWZnaA=='
},
},
auth: {
username: 'elastic',
password: 'changeme'
@ -244,4 +251,40 @@ const client = new Client({
})
----
|===
|`disablePrototypePoisoningProtection`
|`boolean`, `'proto'`, `'constructor'` - By the default the client will protect you against prototype poisoning attacks. Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more. If needed you can disable prototype poisoning protection entirely or one of the two checks. Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more. +
_Default:_ `false`
|`caFingerprint`
|`string` - If configured, verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied fingerprint. Only accepts SHA256 digest fingerprints. +
_Default:_ `null`
|`maxResponseSize`
|`number` - When configured, it verifies that the uncompressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_STRING_LENTGH +
_Default:_ `null`
|`maxCompressedResponseSize`
|`number` - When configured, it verifies that the compressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_LENTGH +
_Default:_ `null`
|===
[discrete]
==== Performances considerations
By default, the client will protection you against prototype poisoning attacks.
Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more.
If needed you can disable prototype poisoning protection entirely or one of the two checks.
Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more.
While it's good to be safe, you should know that security always comes with a cost.
With big enough payloads, this security check could causea drop in the overall performances,
which might be a problem for your application.
If you know you can trust the data stored in Elasticsearch, you can safely disable this check.
[source,js]
----
const client = new Client({
disablePrototypePoisoningProtection: true
})
----

View File

@ -1,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]
=== Dont panic!
==== Dont panic!
Every breaking change was carefully weighed, and each is justified. Furthermore,
the new codebase has been rewritten with modern JavaScript and has been
@ -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.

View File

@ -1,5 +1,215 @@
[[changelog-client]]
== Changelog
== Release notes
[discrete]
=== 7.16.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.16`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.16/release-notes-7.16.0.html[here].
[discrete]
==== Fixes
[discrete]
===== Fixed "Cannot read property 'then' of null" https://github.com/elastic/elasticsearch-js/pull/1594[#1594]
[discrete]
===== Fixed export field deprecation log https://github.com/elastic/elasticsearch-js/pull/1593#[#1593]
[discrete]
=== 7.15.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.15`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.15/release-notes-7.15.0.html[here].
[discrete]
===== Support mapbox content type https://github.com/elastic/elasticsearch-js/pull/1500[#1500]
If you call an API that returns a mapbox conten type, the response body will be a buffer.
[discrete]
===== Support CA fingerprint validation https://github.com/elastic/elasticsearch-js/pull/1499[#1499]
You can configure the client to only trust certificates that are signed by a specific CA certificate ( CA certificate pinning ) by providing a `caFingerprint` option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value.
a `caFingerprint` option, which will verify the supplied certificate authority fingerprint.
You must configure a SHA256 digest.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://example.com'
auth: { ... },
// the fingerprint (SHA256) of the CA certificate that is used to sign the certificate that the Elasticsearch node presents for TLS.
caFingerprint: '20:0D:CA:FA:76:...',
ssl: {
// might be required if it's a self-signed certificate
rejectUnauthorized: false
}
})
----
[discrete]
===== Show the body as string if the response error can't be read as ES error https://github.com/elastic/elasticsearch-js/pull/1509[#1509]
Useful if the errored response does not come from Elasticsearch, but a proxy in the middle for example.
[discrete]
===== Always display request params and options in request event https://github.com/elastic/elasticsearch-js/pull/1531[#1531]
In some edge cases the params and options weren't available in observabilty events, now they are always defined.
[discrete]
===== Always emit request aborted event https://github.com/elastic/elasticsearch-js/pull/1534[#1534]
If the client is busy running an async operation, the `.abort()` call might be executed before sending the actual request. In such case, the error was swallowed, now it will always be emitted, either in the `request` or `response` event.
[discrete]
=== 7.14.0
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.14`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.14/release-notes-7.14.0.html[here].
[discrete]
===== Verify connection to Elasticsearch https://github.com/elastic/elasticsearch-js/pull/1487[#1487]
The client will verify if it's working with a supported release of Elasticsearch.
Elastic language clients are guaranteed to be able to communicate with Elasticsearch or Elastic solutions running on the same major version and greater or equal minor version.
Language clients are forward compatible; meaning that clients support communicating with greater minor versions of Elasticsearch. Elastic language clients are not guaranteed to be backwards compatible.
[discrete]
===== Add api compatibility header support https://github.com/elastic/elasticsearch-js/pull/1478[#1478]
If you configure the `ELASTIC_CLIENT_APIVERSIONING` to `true` the client will send a compatibility header
to allow you to use a 7.x client against a 8.x cluster. In this way it will be easier to migrate your code to a newer release of Elasticsearch.
[discrete]
===== Add support for bearer auth https://github.com/elastic/elasticsearch-js/pull/1488[#1488]
Bearer authentication, useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens].
Be aware that it does not handle automatic token refresh:
[source,js]
----
auth: {
bearer: 'token'
}
----
[discrete]
===== Bulk update improvements https://github.com/elastic/elasticsearch-js/pull/1428[#1428]
The final stats object will let you know how many `noop` operations happened.
Also, a new `.stats` getter has been added to allow you to read the stats before
the operation finishes.
[source,js]
----
const b = client.helpers.bulk({ ... })
...
console.log(b.stats)
----
[discrete]
=== 7.13.0
[discrete]
==== Breaking changes
[discrete]
===== Remove Node.js v10 support https://github.com/elastic/elasticsearch-js/pull/1471[#1471]
According to our
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html#nodejs-support[support matrix].
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.13`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.13/release-notes-7.13.0.html[here].
[discrete]
===== Added new TypeScript definitions
The new type definition is more advanced compared to the legacy one.
In the legacy type definitions you were expected to configure via generics both request and response bodies.
The new type definitions comes with a complete type definition for every Elasticsearch endpoint.
You can see how to use them now https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/typescript.html[here].
[discrete]
===== Improve response error message https://github.com/elastic/elasticsearch-js/pull/1457[#1457]
In case of Elasticsearch errors, now the error message show more info about the underlying issue,
improving the debugging experience.
[discrete]
==== Fixes
[discrete]
===== Catch HEAD errors https://github.com/elastic/elasticsearch-js/pull/1460[#1460]
In case of http errors in HEAD request, the client was swalling the response body.
This is now fixed and in case of error you will get the full body response.
[discrete]
=== 7.12.0
[discrete]
==== Breaking changes
[discrete]
===== Remove Node.js v8 support https://github.com/elastic/elasticsearch-js/pull/1402[#1402]
According to our
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html#nodejs-support[support matrix].
[discrete]
==== Features
[discrete]
===== Support for Elasticsearch `v7.12`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/7.12/release-notes-7.12.0.html[here].
[discrete]
===== Add support for transport options to all helpers https://github.com/elastic/elasticsearch-js/pull/1400[#1400]
You can now pass Transport specific options to the helpers as well.
[discrete]
==== Fixes
[discrete]
===== Add `.finally` method to the Promise API https://github.com/elastic/elasticsearch-js/pull/1415[#1415]
The client returns a thenable object when you are not configuring a callback.
Now the thenable offers a `.finally` method as well.
[discrete]
=== 7.11.0
@ -8,16 +218,18 @@
==== Features
[discrete]
===== Support for Elasticsearch `v7.11`.
===== 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].
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`]
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.
----
@ -39,8 +251,8 @@ serialization
[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`.
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
@ -48,9 +260,10 @@ and can be disabled with the `enableMetaHeader` parameter set to `false`.
[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.
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
@ -61,14 +274,15 @@ This issue has now been fixed.
[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].
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 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]
----
@ -94,14 +308,16 @@ const client = new Client({
[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 Elasticsearch,
by doing so, Elasticsearch will free resources faster.
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`.
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
@ -109,12 +325,14 @@ This could lead to an unwanted `DeserialzationError`. From now, this will be han
[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 eusing 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.
`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.
Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for
additional information.
[discrete]
=== 7.9.1
@ -125,24 +343,33 @@ Please refer to https://ela.st/nodejs-support[ela.st/nodejs-support] for additio
[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]
@ -152,8 +379,8 @@ 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
@ -164,7 +391,7 @@ The `size` parameter was being passed too the scroll request, which was causing
[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]
----
@ -178,8 +405,9 @@ 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]
----
@ -206,7 +434,8 @@ import { Client } from '@elastic/elasticsearch'
[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]
----
@ -225,14 +454,18 @@ 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]
----
@ -251,19 +484,24 @@ console.log(body) // either `true` or `false`
[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
@ -279,9 +517,11 @@ You can find all the API changes https://www.elastic.co/guide/en/elasticsearch/r
[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]
----
@ -312,8 +552,11 @@ 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]
----
@ -322,7 +565,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]
----
@ -337,12 +582,17 @@ const m = client.helpers.msearch({
[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
@ -353,13 +603,15 @@ Before this, the `documents` key that you can access in any search helper was co
[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
@ -370,14 +622,17 @@ Now all the user-provided headers names will be lowercased by default, so there
[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:
@ -389,13 +644,17 @@ The following helpers has been introduced:
[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]
@ -416,7 +675,10 @@ 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
@ -427,7 +689,11 @@ 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
@ -435,35 +701,51 @@ This *should* not be a breaking change, as every generics defaults to `any`. It
[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
@ -475,16 +757,23 @@ Support for Elasticsearch `v7.6`.
**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
@ -502,16 +791,22 @@ 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
@ -520,21 +815,27 @@ 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
@ -543,7 +844,8 @@ 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
@ -552,18 +854,28 @@ 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

View File

@ -9,3 +9,4 @@ section, you can see the possible options that you can use to configure it.
* <<advanced-config>>
* <<child>>
* <<extend>>
* <<client-testing>>

View File

@ -8,8 +8,10 @@ This page contains the information you need to connect and use the Client with
* <<auth-reference, Authentication options>>
* <<client-usage, Using the client>>
* <<client-faas-env, Using the Client in a Function-as-a-Service Environment>>
* <<client-connect-proxy, Connecting through a proxy>>
* <<client-error-handling, Handling errors>>
* <<product-check, Automatic product check>>
[discrete]
[[authentication]]
@ -59,11 +61,12 @@ const client = new Client({
==== ApiKey authentication
You can use the
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/security-api-create-api-key.html[ApiKey]
{ref-7x}/security-api-create-api-key.html[ApiKey]
authentication by passing the `apiKey` parameter via the `auth` option. The
`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].
{ref-7x}/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.
@ -93,6 +96,26 @@ const client = new Client({
})
----
[discrete]
[[auth-bearer]]
==== Bearer authentication
You can provide your credentials by passing the `bearer` token
parameter via the `auth` option.
Useful for https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-service-token.html[service account tokens].
Be aware that it does not handle automatic token refresh.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://localhost:9200',
auth: {
bearer: 'token'
}
})
----
[discrete]
[[auth-basic]]
@ -156,6 +179,29 @@ const client = new Client({
})
----
[discrete]
[[auth-ca-fingerprint]]
==== CA fingerprint
You can configure the client to only trust certificates that are signed by a specific CA certificate ( CA certificate pinning ) by providing a `caFingerprint` option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value.
a `caFingerprint` option, which will verify the supplied certificate authority fingerprint.
You must configure a SHA256 digest.
[source,js]
----
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
node: 'https://example.com'
auth: { ... },
// the fingerprint (SHA256) of the CA certificate that is used to sign the certificate that the Elasticsearch node presents for TLS.
caFingerprint: '20:0D:CA:FA:76:...',
ssl: {
// might be required if it's a self-signed certificate
rejectUnauthorized: false
}
})
----
[discrete]
[[client-usage]]
=== Usage
@ -373,8 +419,87 @@ _Default:_ `null`
|`context`
|`any` - Custom object per request. _(you can use it to pass data to the clients events)_ +
_Default:_ `null`
|`maxResponseSize`
|`number` - When configured, it verifies that the uncompressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_STRING_LENTGH +
_Default:_ `null`
|`maxCompressedResponseSize`
|`number` - When configured, it verifies that the compressed response size is lower than the configured number, if it's higher it will abort the request. It cannot be higher than buffer.constants.MAX_LENTGH +
_Default:_ `null`
|===
[discrete]
[[client-faas-env]]
=== Using the Client in a Function-as-a-Service Environment
This section illustrates the best practices for leveraging the {es} client in a Function-as-a-Service (FaaS) environment.
The most influential optimization is to initialize the client outside of the function, the global scope.
This practice does not only improve performance but also enables background functionality as for example https://www.elastic.co/blog/elasticsearch-sniffing-best-practices-what-when-why-how[sniffing].
The following examples provide a skeleton for the best practices.
[discrete]
==== GCP Cloud Functions
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
// client initialisation
})
exports.testFunction = async function (req, res) {
// use the client
}
----
[discrete]
==== AWS Lambda
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
// client initialisation
})
exports.handler = async function (event, context) {
// use the client
}
----
[discrete]
==== Azure Functions
[source,js]
----
'use strict'
const { Client } = require('@elastic/elasticsearch')
const client = new Client({
// client initialisation
})
module.exports = async function (context, req) {
// use the client
}
----
Resources used to assess these recommendations:
- https://cloud.google.com/functions/docs/bestpractices/tips#use_global_variables_to_reuse_objects_in_future_invocations[GCP Cloud Functions: Tips & Tricks]
- https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html[Best practices for working with AWS Lambda functions]
- https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python?tabs=azurecli-linux%2Capplication-level#global-variables[Azure Functions Python developer guide]
- https://docs.aws.amazon.com/lambda/latest/operatorguide/global-scope.html[AWS Lambda: Comparing the effect of global scope]
[discrete]
[[client-connect-proxy]]
@ -497,3 +622,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.

View File

@ -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.

View File

@ -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.

View File

@ -1,5 +1,5 @@
[[exists_examples]]
== Exists
=== Exists
Check that the document `/game-of-thrones/1` exists.

View File

@ -1,5 +1,5 @@
[[get_examples]]
== Get
=== Get
The get API allows to get a typed JSON document from the index based on its id.
The following example gets a JSON document from an index called

View File

@ -1,5 +1,6 @@
[[ignore_examples]]
== Ignore
=== Ignore
HTTP status codes which should not be considered errors for this request.
[source,js]

View File

@ -1,5 +1,5 @@
[[examples]]
= Examples
== Examples
Following you can find some examples on how to use the client.

View File

@ -1,5 +1,5 @@
[[msearch_examples]]
== MSearch
=== MSearch
The multi search API allows to execute several search requests within the same
API.

View File

@ -1,5 +1,5 @@
[[reindex_examples]]
== Reindex
=== Reindex
The `reindex` API extracts the document source from the source index and indexes the documents into the destination index. You can copy all documents to the destination index, reindex a subset of the documents or update the source before to reindex it.

View File

@ -1,5 +1,5 @@
[[scroll_examples]]
== Scroll
=== Scroll
While a search request returns a single “page” of results, the scroll API can be
used to retrieve large numbers of results (or even all results) from a single

View File

@ -1,5 +1,5 @@
[[search_examples]]
== Search
=== Search
The `search` API allows you to execute a search query and get back search hits
that match the query. The query can either be provided using a simple

View File

@ -1,5 +1,5 @@
[[sql_query_examples]]
== SQL
=== SQL
Elasticsearch SQL is an X-Pack component that allows SQL-like queries to be executed in real-time against Elasticsearch. Whether using the REST interface, command-line or JDBC, any client can use SQL to search and aggregate data natively inside Elasticsearch. One can think of Elasticsearch SQL as a translator, one that understands both SQL and Elasticsearch and makes it easy to read and process data in real-time, at scale by leveraging Elasticsearch capabilities.

View File

@ -1,5 +1,5 @@
[[suggest_examples]]
== Suggest
=== Suggest
The suggest feature suggests similar looking terms based on a provided text by
using a suggester. _Parts of the suggest feature are still under development._

View File

@ -1,5 +1,5 @@
[[transport_request_examples]]
== transport.request
=== transport.request
It can happen that you need to communicate with {es} by using an API that is not
supported by the client, to mitigate this issue you can directly call

View File

@ -1,5 +1,5 @@
[[typescript_examples]]
== Typescript
=== Typescript
The client offers a first-class support for TypeScript, since it ships the type
definitions for every exposed API.

View File

@ -1,5 +1,5 @@
[[update_examples]]
== Update
=== Update
The update API allows updates of a specific document using the given script. +
In the following example, we will index a document that also tracks how many times a character has said the given quote, and then we will update the `times` field.

View File

@ -1,5 +1,5 @@
[[update_by_query_examples]]
== Update By Query
=== Update By Query
The simplest usage of _update_by_query just performs an update on every document in the index without changing the source. This is useful to pick up a new property or some other online mapping change.

View File

@ -1,22 +1,26 @@
[[client-helpers]]
== Client Helpers
== Client helpers
The client comes with an handy collection of helpers to give you a more comfortable experience with some APIs.
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.
The helpers will not work in any Node.js version lower than 10.
CAUTION: The client helpers are experimental, and the API may change in the next
minor releases. The helpers will not work in any Node.js version lower than 10.
[discrete]
=== Bulk Helper
[[bulk-helper]]
=== Bulk helper
~Added~ ~in~ ~`v7.7.0`~
Running Bulk requests can be complex due to the shape of the API, this helper aims to provide a nicer developer experience around the Bulk API.
Running bulk requests can be complex due to the shape of the API, this helper
aims to provide a nicer developer experience around the Bulk API.
[discrete]
==== Usage
[source,js]
----
const { createReadStream } = require('fs')
@ -45,13 +49,14 @@ console.log(result)
// }
----
To create a new instance of the Bulk helper, you should access it as shown in the example above, the configuration options are:
To create a new instance of the Bulk helper, access it as shown in the example
above, the configuration options are:
[cols=2*]
|===
|`datasource`
a|An array, async generator or a readable stream with the data you need to index/create/update/delete.
It can be an array of strings or objects, but also a stream of json strings or JavaScript objects. +
If it is a stream, we recommend to use the https://www.npmjs.com/package/split2[`split2`] package, that will split the stream on new lines delimiters. +
If it is a stream, we recommend to use the https://www.npmjs.com/package/split2[`split2`] package, that splits the stream on new lines delimiters. +
This parameter is mandatory.
[source,js]
----
@ -66,7 +71,7 @@ const b = client.helpers.bulk({
----
|`onDocument`
a|A function that will be called for each document of the datasource. Inside this function you can manipulate the document and you must return the operation you want to execute with the document. Look at the link:{ref}/docs-bulk.html[Bulk API documentation] to see the supported operations. +
a|A function that is called for each document of the datasource. Inside this function you can manipulate the document and you must return the operation you want to execute with the document. Look at the link:{ref}/docs-bulk.html[Bulk API documentation] to see the supported operations. +
This parameter is mandatory.
[source,js]
----
@ -80,7 +85,7 @@ const b = client.helpers.bulk({
----
|`onDrop`
a|A function that will be called for everytime a document can't be indexed and it has reached the maximum amount of retries.
a|A function that is called for everytime a document can't be indexed and it has reached the maximum amount of retries.
[source,js]
----
const b = client.helpers.bulk({
@ -101,7 +106,7 @@ const b = client.helpers.bulk({
----
|`flushInterval`
a|How much time (in milliseconds) the helper will wait before flushing the body from the last document read. +
a|How much time (in milliseconds) the helper waits before flushing the body from the last document read. +
_Default:_ `30000`
[source,js]
----
@ -111,7 +116,7 @@ const b = client.helpers.bulk({
----
|`concurrency`
a|How many request will be executed at the same time. +
a|How many request is executed at the same time. +
_Default:_ `5`
[source,js]
----
@ -121,7 +126,7 @@ const b = client.helpers.bulk({
----
|`retries`
a|How many times a document will be retried before to call the `onDrop` callback. +
a|How many times a document is retried before to call the `onDrop` callback. +
_Default:_ Client max retries.
[source,js]
----
@ -141,7 +146,7 @@ const b = client.helpers.bulk({
----
|`refreshOnCompletion`
a|If `true`, at the end of the bulk operation it will run a refresh on all indices or on the specified indices. +
a|If `true`, at the end of the bulk operation it runs a refresh on all indices or on the specified indices. +
_Default:_ false.
[source,js]
----
@ -161,6 +166,7 @@ const b = client.helpers.bulk({
[discrete]
===== Index
[source,js]
----
client.helpers.bulk({
@ -176,6 +182,7 @@ client.helpers.bulk({
[discrete]
===== Create
[source,js]
----
client.helpers.bulk({
@ -228,9 +235,12 @@ client.helpers.bulk({
[discrete]
==== Abort a bulk operation
If needed, you can abort a bulk operation at any time. The bulk helper returns a https://promisesaplus.com/[thenable], which has an `abort` method.
If needed, you can abort a bulk operation at any time. The bulk helper returns a
https://promisesaplus.com/[thenable], which has an `abort` method.
NOTE: The abort method will stop the execution of the bulk operation, but if you are using a concurrency higher than one, the operations that are already running will not be stopped.
NOTE: The abort method stops the execution of the bulk operation, but if you
are using a concurrency higher than one, the operations that are already running
will not be stopped.
[source,js]
----
@ -258,8 +268,9 @@ console.log(await b)
[discrete]
==== Passing custom options to the Bulk API
You can pass any option supported by the link:{ref}/docs-bulk.html#docs-bulk-api-query-params[Bulk API] to the helper, and the helper will use those options in conjuction with the Bulk
API call.
You can pass any option supported by the link:
{ref}/docs-bulk.html#docs-bulk-api-query-params[Bulk API] to the helper, and the
helper uses those options in conjunction with the Bulk API call.
[source,js]
----
@ -308,13 +319,16 @@ console.log(result)
[discrete]
=== Multi Search Helper
[[multi-search-helper]]
=== Multi search helper
~Added~ ~in~ ~`v7.8.0`~
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 send search request at a high rate, this helper might be useful
for you. It uses the multi 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.
[discrete]
@ -346,7 +360,8 @@ m.search(
)
----
To create a new instance of the Msearch helper, you should access it as shown in the example above, the configuration options are:
To create a new instance of the multi search (msearch) helper, you should access
it as shown in the example above, the configuration options are:
[cols=2*]
|===
|`operations`
@ -360,7 +375,7 @@ const m = client.helpers.msearch({
----
|`flushInterval`
a|How much time (in milliseconds) the helper will wait before flushing the operations from the last operation read. +
a|How much time (in milliseconds) the helper waits before flushing the operations from the last operation read. +
_Default:_ `500`
[source,js]
----
@ -370,7 +385,7 @@ const m = client.helpers.msearch({
----
|`concurrency`
a|How many request will be executed at the same time. +
a|How many request is executed at the same time. +
_Default:_ `5`
[source,js]
----
@ -380,7 +395,7 @@ const m = client.helpers.msearch({
----
|`retries`
a|How many times an operation will be retried before to resolve the request. An operation will be retried only in case of a 429 error. +
a|How many times an operation is retried before to resolve the request. An operation is retried only in case of a 429 error. +
_Default:_ Client max retries.
[source,js]
----
@ -403,15 +418,21 @@ const m = client.helpers.msearch({
[discrete]
==== Stopping the Msearch Helper
==== Stopping the msearch helper
If needed, you can stop a msearch processor at any time. The msearch helper returns a https://promisesaplus.com/[thenable], which has an `stop` method.
If needed, you can stop an msearch processor at any time. The msearch helper
returns a https://promisesaplus.com/[thenable], which has an `stop` method.
If you are creating multiple msearch helpers instances and using them for a limitied period of time, remember to always use the `stop` method once you have finished using them, otherwise your application will start leaking memory.
If you are creating multiple msearch helpers instances and using them for a
limitied period of time, remember to always use the `stop` method once you have
finished using them, otherwise your application will start leaking memory.
The `stop` method accepts an optional error, that will be dispatched every subsequent search request.
The `stop` method accepts an optional error, that will be dispatched every
subsequent search request.
NOTE: The stop method will stop the execution of the msearch processor, but if you are using a concurrency higher than one, the operations that are already running will not be stopped.
NOTE: The stop method stops the execution of the msearch processor, but if
you are using a concurrency higher than one, the operations that are already
running will not be stopped.
[source,js]
----
@ -439,12 +460,15 @@ setImmediate(() => m.stop())
[discrete]
=== Search Helper
[[search-helper]]
=== Search helper
~Added~ ~in~ ~`v7.7.0`~
A simple wrapper around the search API. Instead of returning the entire `result` object it will return only the search documents source.
For improving the performances, this helper automatically adds `filter_path=hits.hits._source` to the querystring.
A simple wrapper around the search API. Instead of returning the entire `result`
object it returns only the search documents source. For improving the
performances, this helper automatically adds `filter_path=hits.hits._source` to
the query string.
[source,js]
----
@ -466,12 +490,16 @@ for (const doc of documents) {
[discrete]
=== Scroll Search Helper
[[scroll-search-helper]]
=== Scroll search helper
~Added~ ~in~ ~`v7.7.0`~
This helpers offers a simple and intuitive way to use the scroll search API. Once called, it returns an https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of[async iterator] which can be used in conjuction with a for-await...of. +
It handles automatically the `429` error and uses the client's `maxRetries` option.
This helpers offers a simple and intuitive way to use the scroll search API.
Once called, it returns an
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function[async iterator]
which can be used in conjuction with a for-await...of. It handles automatically
the `429` error and uses the `maxRetries` option of the client.
[source,js]
----
@ -510,7 +538,8 @@ for await (const result of scrollSearch) {
[discrete]
==== Quickly getting the documents
If you only need the documents from the result of a scroll search, you can access them via `result.documents`:
If you only need the documents from the result of a scroll search, you can
access them via `result.documents`:
[source,js]
----
@ -521,12 +550,15 @@ for await (const result of scrollSearch) {
[discrete]
=== Scroll Documents Helper
[[scroll-documents-helper]]
=== Scroll documents helper
~Added~ ~in~ ~`v7.7.0`~
It works in the same way as the scroll search helper, but it returns only the documents instead. Note, every loop cycle will return you a single document, and you can't use the `clear` method.
For improving the performances, this helper automatically adds `filter_path=hits.hits._source` to the querystring.
It works in the same way as the scroll search helper, but it returns only the
documents instead. Note, every loop cycle returns a single document, and you
can't use the `clear` method. For improving the performances, this helper
automatically adds `filter_path=hits.hits._source` to the query string.
[source,js]
----

View File

@ -1,22 +1,23 @@
= Elasticsearch Node.js client
= Elasticsearch JavaScript Client
:branch: 7.x
:branch: 7.16
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
include::introduction.asciidoc[]
include::installation.asciidoc[]
include::connecting.asciidoc[]
include::changelog.asciidoc[]
include::configuration.asciidoc[]
include::basic-config.asciidoc[]
include::advanced-config.asciidoc[]
include::child.asciidoc[]
include::extend.asciidoc[]
include::reference.asciidoc[]
include::breaking-changes.asciidoc[]
include::observability.asciidoc[]
include::helpers.asciidoc[]
include::typescript.asciidoc[]
include::testing.asciidoc[]
include::integrations.asciidoc[]
include::observability.asciidoc[]
include::transport.asciidoc[]
include::typescript.asciidoc[]
include::reference.asciidoc[]
include::examples/index.asciidoc[]
include::helpers.asciidoc[]
include::changelog.asciidoc[]
include::redirects.asciidoc[]

View File

@ -17,14 +17,14 @@ To install a specific major version of the client, run the following command:
npm install @elastic/elasticsearch@<major>
----
To learn more about the supported major versions, please refer to the
To learn more about the supported major versions, please refer to the
<<js-compatibility-matrix>>.
[discrete]
[[nodejs-support]]
=== Node.js support
NOTE: The minimum supported version of Node.js is `v10`.
NOTE: The minimum supported version of Node.js is `v12`.
The client versioning follows the {stack} versioning, this means that
major, minor, and patch releases are done following a precise schedule that
@ -37,7 +37,7 @@ to support that version for at least another minor release. If you are using the
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,
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
@ -62,9 +62,8 @@ of `^7.10.0`).
[[js-compatibility-matrix]]
=== Compatibility matrix
The library is compatible with all {es} versions since 5.x. We recommend you to
use the same major version of the client as the {es} instance that you are
using.
Language clients are forward compatible; meaning that clients support communicating with greater or equal minor versions of Elasticsearch.
Elasticsearch language clients are only backwards compatible with default distributions and without guarantees made.
[%header,cols=2*]
|===
@ -91,4 +90,4 @@ using.
WARNING: There is no official support for the browser environment. It exposes
your {es} instance to everyone, which could lead to security issues. We
recommend you to write a lightweight proxy that uses this client instead,
you can see a proxy example https://github.com/elastic/elasticsearch-js/tree/master/docs/examples/proxy[here].
you can see a proxy example https://github.com/elastic/elasticsearch-js/tree/master/docs/examples/proxy[here].

View File

@ -0,0 +1,8 @@
[[integrations]]
== Integrations
The Client offers the following integration options for you:
* <<observability>>
* <<transport>>
* <<typescript>>

View File

@ -4,6 +4,8 @@
This is the official Node.js client for {es}. This page gives a quick overview
about the features of the client.
Refer to <<breaking-changes,this page>> for breaking changes coming from the old
client.
[discrete]
=== Features
@ -130,6 +132,9 @@ async function run () {
run().catch(console.log)
----
TIP: For an elaborate example of how to ingest data into Elastic Cloud,
refer to {cloud}/ec-getting-started-node-js.html[this page].
[discrete]
==== Install multiple versions
@ -189,3 +194,5 @@ npm install esmaster@github:elastic/elasticsearch-js
----
WARNING: This command installs the master branch of the client which is not
considered stable.
include::breaking-changes.asciidoc[]

View File

@ -1,19 +1,19 @@
[[observability]]
== Observability
=== Observability
The client does not provide a default logger, but instead it offers an event
emitter interfaces to hook into internal events, such as `request` and
`response`.
Correlating those events can be quite hard, especially if your applications have
a large codebase with many events happening at the same time.
Correlating those events can be hard, especially if your applications have a
large codebase with many events happening at the same time.
To help you with this, the client offers you a correlation id system and other
features. Let's see them in action.
[discrete]
=== Events
==== Events
The client is an event emitter, this means that you can listen for its event and
add additional logic to your code, without need to change the client internals
@ -105,7 +105,8 @@ client.on('resurrect', (err, result) => {
|===
The values of `result` in `serialization`, `request`, `deserialization`, `response` and `sniff` will be:
The values of `result` in `serialization`, `request`, `deserialization`,
`response` and `sniff` are:
[source,ts]
----
@ -132,7 +133,7 @@ meta: {
----
While the `result` value in `resurrect` will be:
While the `result` value in `resurrect` is:
[source,ts]
----
@ -146,10 +147,13 @@ request: {
----
[discrete]
==== Events order
===== Events order
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.
The event order is described in the following graph, in some edge cases, the
order is not guaranteed.
You can find in
https://github.com/elastic/elasticsearch-js/blob/master/test/acceptance/events-order.test.js[`test/acceptance/events-order.test.js`]
how the order changes based on the situation.
[source]
----
@ -170,11 +174,11 @@ serialization
[discrete]
=== Correlation id
==== Correlation id
Correlating events can be quite hard, especially if there are many events at the
same time. The client offers you an automatic (and configurable) system to help
you handle this problem.
Correlating events can be hard, especially if there are many events at the same
time. The client offers you an automatic (and configurable) system to help you
handle this problem.
[source,js]
----
@ -204,8 +208,8 @@ client.search({
----
By default the id is an incremental integer, but you can easily configure that
with the `generateRequestId` option:
By default the id is an incremental integer, but you can configure it with the
`generateRequestId` option:
[source,js]
----
@ -238,7 +242,7 @@ client.search({
[discrete]
=== Context object
==== Context object
Sometimes, you might need to make some custom data available in your events, you
can do that via the `context` option of a request:
@ -275,8 +279,8 @@ client.search({
----
The context object can also be configured as a global option in the client
configuration. If you provide both, the two context object will be shallow merged,
and the API level object will take precedece.
configuration. If you provide both, the two context objects will be shallow
merged, and the API level object will take precedence.
[source,js]
----
@ -314,12 +318,12 @@ client.search({
[discrete]
=== Client name
==== Client name
If you are using multiple instances of the client or if you are using multiple
child clients _(which is the recommended way to have multiple instances of the
client)_, you might need to recognize which client you are using. The `name`
options will help you in this regard.
options help you in this regard.
[source,js]
----
@ -368,13 +372,13 @@ child.search({
[discrete]
=== X-Opaque-Id support
==== X-Opaque-Id support
To improve the overall observability, the client offers an easy way to configure
the `X-Opaque-Id` header. If you set the `X-Opaque-Id` in a specific request,
this will allow you to discover this identifier in the
To improve observability, the client offers an easy way to configure the
`X-Opaque-Id` header. If you set the `X-Opaque-Id` in a specific request, this
allows you to discover this identifier in the
https://www.elastic.co/guide/en/elasticsearch/reference/master/logging.html#deprecation-logging[deprecation logs],
help you with https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-slowlog.html#_identifying_search_slow_log_origin[identifying search slow log origin]
helps you with https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-slowlog.html#_identifying_search_slow_log_origin[identifying search slow log origin]
as well as https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html#_identifying_running_tasks[identifying running tasks].
The `X-Opaque-Id` should be configured in each request, for doing that you can

File diff suppressed because it is too large Load Diff

View File

@ -1,56 +1,58 @@
[[client-testing]]
== Testing
=== Testing
Testing is one of the most important parts of developing an application.
The client is very flexible when it comes to testing and is compatible with
most testing frameworks (such as https://www.npmjs.com/package/ava[`ava`],
which is used in the examples below).
If you are using this client, you are very likely working with Elasticsearch,
and one of the first issues you will face is how to test your application.
A perfectly valid solution is to use the real Elasticsearch instance for
testing your application, but you would be doing an integration test,
while you want a unit test.
There are many ways to solve this problem, you could create the database
with docker, or use an in-memory compatible one, but if you are writing
unit tests that can be easily parallelized this will become quite uncomfortable.
A different way of improving your testing experience while doing unit tests
is to use a mock.
If you are using this client, you are most likely working with {es}, and one of
the first issues you face is how to test your application. A perfectly valid
solution is to use the real {es} instance for testing your application, but you
would be doing an integration test, while you want a unit test. There are many
ways to solve this problem, you could create the database with Docker, or use an
in-memory compatible one, but if you are writing unit tests that can be easily
parallelized this becomes quite uncomfortable. A different way of improving your
testing experience while doing unit tests is to use a mock.
The client is designed to be easy to extend and adapt to your needs.
Thanks to its internal architecture it allows you to change some specific
components while keeping the rest of it working as usual.
Each Elasticsearch official client is composed of the following components:
The client is designed to be easy to extend and adapt to your needs. Thanks to
its internal architecture it allows you to change some specific components while
keeping the rest of it working as usual. Each {es} official client is composed
of the following components:
* `API layer`: every Elasticsearch API that you can call
* `Transport`: a component that takes care of preparing a request before sending it and handling all the retry and sniffing strategies
* `ConnectionPool`: Elasticsearch is a cluster and might have multiple nodes, the * `ConnectionPool` takes care of them
* `Serializer`: A class with all the serialization strategies, from the basic JSON to the new line delimited JSON.
* `API layer`: every {es} API that you can call.
* `Transport`: a component that takes care of preparing a request before sending
it and handling all the retry and sniffing strategies.
* `ConnectionPool`: {es} is a cluster and might have multiple nodes, the
`ConnectionPool` takes care of them.
* `Serializer`: A class with all the serialization strategies, from the basic
JSON to the new line delimited JSON.
* `Connection`: The actual HTTP library.
The best way to mock Elasticsearch with the official clients is to replace
the `Connection` component since it has very few responsibilities and
it does not interact with other internal components other than getting
requests and returning responses.
The best way to mock {es} with the official clients is to replace the
`Connection` component since it has very few responsibilities and it does not
interact with other internal components other than getting requests and
returning responses.
[discrete]
=== `@elastic/elasticsearch-mock`
==== `@elastic/elasticsearch-mock`
Writing each time a mock for your test can be annoying and error-prone,
so we have built a simple yet powerful mocking library specifically designed
for this client, and you can install it with the following command:
Writing each time a mock for your test can be annoying and error-prone, so we
have built a simple yet powerful mocking library specifically designed for this
client, and you can install it with the following command:
[source,sh]
----
npm install @elastic/elasticsearch-mock --save-dev
----
With this library you can easily create custom mocks for any request you can
send to Elasticsearch. It offers a simple and intuitive API and it mocks only
the HTTP layer, leaving the rest of the client working as usual.
With this library you can create custom mocks for any request you can send to
{es}. It offers a simple and intuitive API and it mocks only the HTTP layer,
leaving the rest of the client working as usual.
Before showing all of its features, and what you can do with it, lets see an example:
Before showing all of its features, and what you can do with it, lets see an
example:
[source,js]
----
@ -73,16 +75,16 @@ mock.add({
client.info(console.log)
----
As you can see it works closely with the client itself, once you have created
a new instance of the mock library you just need to call the mock.getConnection()
method and pass its result to the Connection option of the client.
From now on, every request will be handled by the mock library, and the HTTP
layer will never be touched. As a result, your test will be significantly faster
and you will be able to easily parallelize them!
As you can see it works closely with the client itself, once you have created a
new instance of the mock library you just need to call the mock.getConnection()
method and pass its result to the Connection option of the client. From now on,
every request is handled by the mock library, and the HTTP layer will never be
touched. As a result, your test is significantly faster and you are able to
easily parallelize them!
The library allows you to write both “strict” and “loose” mocks, which means
that you can write a mock that will handle a very specific request or be looser
and handle a group of request, lets see this in action:
The library allows you to write both “strict” and “loose” mocks, which means
that you can write a mock that handles a very specific request or be looser and
handle a group of request, lets see this in action:
[source,js]
----
@ -112,9 +114,9 @@ mock.add({
})
----
In the example above every search request will get the first response,
while every search request that uses the query described in the second mock,
will get the second response.
In the example above, every search request gets the first response, while every
search request that uses the query described in the second mock gets the second
response.
You can also specify dynamic paths:
@ -150,5 +152,6 @@ mock.add({
})
----
We have seen how simple is mocking Elasticsearch and testing your application,
you can find many more features and examples in the https://github.com/elastic/elasticsearch-js-mock[module documentation].
We have seen how simple is mocking {es} and testing your application, you can
find many more features and examples in the
https://github.com/elastic/elasticsearch-js-mock[module documentation].

41
docs/transport.asciidoc Normal file
View File

@ -0,0 +1,41 @@
[[transport]]
=== Transport
This class is responsible for performing the request to {es} and handling
errors, it also handles 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)
}
}
----
==== Supported content types
- `application/json`, in this case the transport will return a plain JavaScript object
- `text/plain`, in this case the transport will return a plain string
- `application/vnd.mapbox-vector-tile`, in this case the transport will return a Buffer
- `application/vnd.elasticsearch+json`, in this case the transport will return a plain JavaScript object

View File

@ -1,17 +1,145 @@
[[typescript]]
== TypeScript support
=== TypeScript support
The client offers a first-class support for TypeScript, since it ships the type
definitions for every exposed API.
The client offers a first-class support for TypeScript, shipping a complete set
of type definitions of Elasticsearch's API surface.
NOTE: If you are using TypeScript you will be required to use _snake_case_ style
to define the API parameters instead of _camelCase_.
By default event API uses https://www.typescriptlang.org/docs/handbook/generics.html[generics] to specify the requets and response bodies and the `meta.context`. Currently we can't provide those definitions, but we are working to improve this situation.
NOTE: If you are using TypeScript you need to use _snake_case_ style to define
the API parameters instead of _camelCase_.
You can find a partial definition of the request types by importing `RequestParams`, which is used by default in the client and accepts a body (when needed) as a generic to provide a better specification.
Currently the client exposes two type definitions, the legacy one, which is the default
and the new one, which will be the default in the next major.
We strongly recommend to migrate to the new one as soon as possible, as the new types
are offering a vastly improved developer experience and guarantee you that your code
will always be in sync with the latest Elasticsearch features.
The body defaults to `RequestBody` and `RequestNDBody`, which are defined as follows:
[discrete]
==== New type 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.
For example:
[source,ts]
----
// legacy definitions
const response = await client.search<SearchResponse<Source>, SearchBody>({
index: 'test',
body: {
query: {
match: { foo: 'bar' }
}
}
})
// new definitions
const response = await client.search<Source>({
index: 'test',
body: {
query: {
match: { foo: 'bar' }
}
}
})
----
The types are not 100% complete yet. Some APIs are missing (the newest ones, e.g. EQL),
and others may contain some errors, but we are continuously pushing fixes & improvements.
[discrete]
==== Request & Response types
Once you migrate to the new types, those are automatically integrated into the Elasticsearch client, you will get them out of the box.
If everything works, meaning that you wont get compiler errors, you are good to go!
The types are already correct, and there is nothing more to do.
If a type is incorrect, you should add a comment `// @ts-expect-error @elastic/elasticsearch`
telling TypeScript that you are aware of the warning and you would like to temporarily suppress it.
In this way, your code will compile until the type is fixed, and when it happens, youll only need to remove the
`// @ts-expect-error @elastic/elasticsearch` comment (TypeScript will let you know when it is time).
Finally, if the type you need is missing, youll see that the client method returns (or defines as a parameter)
a `TODO` type, which accepts any object.
Open an issue in the client repository letting us know if you encounter any problem!
If needed you can import the request and response types.
[source,ts]
----
import { Client, estypes } from '@elastic/elasticsearch'
import type { Client as NewTypes } from '@elastic/elasticsearch/api/new'
// @ts-expect-error @elastic/elasticsearch
const client: NewTypes = new Client({
node: 'http://localhost:9200'
})
interface Source {
foo: string
}
const request: estypes.IndexRequest<Source> = {
index: 'test',
body: { foo: 'bar' }
}
await client.index(request)
----
[discrete]
===== How to migrate to the new type definitions
Since the new type definitions can be considered a breaking change we couldn't add the directly to the client.
Following you will find a snippet that shows you how to override the default types with the new ones.
[source,ts]
----
import { Client } from '@elastic/elasticsearch'
import type { Client as NewTypes } from '@elastic/elasticsearch/api/new'
// @ts-expect-error @elastic/elasticsearch
const client: NewTypes = new Client({
node: 'http://localhost:9200'
})
interface Source {
foo: string
}
// try the new code completion when building a query!
const response = await client.search<Source>({
index: 'test',
body: {
query: {
match_all: {}
}
}
})
// try the new code completion when traversing a response!
const results = response.body.hits.hits.map(hit => hit._source)
// results type will be `Source[]`
console.log(results)
----
[discrete]
==== Legacy type definitions
By default event API uses
https://www.typescriptlang.org/docs/handbook/generics.html[generics] to specify
the requests and response bodies and the `meta.context`. Currently, we can't
provide those definitions, but we are working to improve this situation.
You can find a partial definition of the request types by importing
`RequestParams`, which is used by default in the client and accepts a body (when
needed) as a generic to provide a better specification.
The body defaults to `RequestBody` and `RequestNDBody`, which are defined as
follows:
[source,ts]
----
@ -39,7 +167,7 @@ You don't have to specify all the generics, but the order must be respected.
[discrete]
=== A complete example
===== A complete example
[source,ts]
----

392
index.d.ts vendored
View File

@ -43,12 +43,14 @@ import {
CloudConnectionPool,
ResurrectEvent,
BasicAuth,
ApiKeyAuth
ApiKeyAuth,
BearerAuth
} from './lib/pool';
import Serializer from './lib/Serializer';
import Helpers from './lib/Helpers';
import * as RequestParams from './api/requestParams';
import * as errors from './lib/errors';
import * as estypes from './api/types'
import * as RequestParams from './api/requestParams'
declare type callbackFn<TResponse, TContext> = (err: ApiError, result: ApiResponse<TResponse, TContext>) => void;
@ -105,7 +107,7 @@ interface ClientOptions {
opaqueIdPrefix?: string;
generateRequestId?: generateRequestIdFn;
name?: string | symbol;
auth?: BasicAuth | ApiKeyAuth;
auth?: BasicAuth | ApiKeyAuth | BearerAuth;
context?: Context;
proxy?: string | URL;
enableMetaHeader?: boolean;
@ -114,11 +116,15 @@ interface ClientOptions {
// TODO: remove username and password here in 8
username?: string;
password?: string;
}
};
disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor';
caFingerprint?: string;
maxResponseSize?: number;
maxCompressedResponseSize?: number;
}
declare class Client {
constructor(opts?: ClientOptions);
constructor(opts: ClientOptions);
connectionPool: ConnectionPool;
transport: Transport;
serializer: Serializer;
@ -126,9 +132,8 @@ declare class Client {
extend(method: string, opts: { force: boolean }, fn: extendsCallback): void;
helpers: Helpers;
child(opts?: ClientOptions): Client;
close(): Promise<void>;
close(callback: Function): void;
close(callback?: Function): Promise<void> | void;
close(): Promise<void>;
emit(event: string | symbol, ...args: any[]): boolean;
on(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this;
on(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this;
@ -729,6 +734,14 @@ declare class Client {
getFeatures<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getFeatures<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FeaturesGetFeatures, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getFeatures<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FeaturesGetFeatures, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
reset_features<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.FeaturesResetFeatures, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reset_features<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
reset_features<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FeaturesResetFeatures, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
reset_features<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FeaturesResetFeatures, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
resetFeatures<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.FeaturesResetFeatures, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
resetFeatures<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
resetFeatures<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FeaturesResetFeatures, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
resetFeatures<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FeaturesResetFeatures, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
field_caps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.FieldCaps<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
field_caps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -738,6 +751,24 @@ declare class Client {
fieldCaps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
fieldCaps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.FieldCaps<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
fieldCaps<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.FieldCaps<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
fleet: {
global_checkpoints<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.FleetGlobalCheckpoints, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
global_checkpoints<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
global_checkpoints<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FleetGlobalCheckpoints, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
global_checkpoints<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FleetGlobalCheckpoints, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
globalCheckpoints<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.FleetGlobalCheckpoints, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
globalCheckpoints<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
globalCheckpoints<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FleetGlobalCheckpoints, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
globalCheckpoints<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.FleetGlobalCheckpoints, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.FleetMsearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params: RequestParams.FleetMsearch<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params: RequestParams.FleetMsearch<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.FleetSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.FleetSearch<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.FleetSearch<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
get<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.Get, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.Get, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -813,6 +844,14 @@ declare class Client {
getStatus<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getStatus<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IlmGetStatus, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getStatus<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IlmGetStatus, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrate_to_data_tiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmMigrateToDataTiers<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
migrate_to_data_tiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrate_to_data_tiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrate_to_data_tiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrateToDataTiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmMigrateToDataTiers<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
migrateToDataTiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrateToDataTiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrateToDataTiers<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IlmMigrateToDataTiers<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
move_to_step<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IlmMoveToStep<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
move_to_step<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
move_to_step<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IlmMoveToStep<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -939,6 +978,14 @@ declare class Client {
deleteTemplate<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTemplate<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesDeleteTemplate, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTemplate<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesDeleteTemplate, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
disk_usage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDiskUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
disk_usage<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
disk_usage<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesDiskUsage, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
disk_usage<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesDiskUsage, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
diskUsage<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDiskUsage, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
diskUsage<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
diskUsage<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesDiskUsage, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
diskUsage<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesDiskUsage, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
exists<TResponse = boolean, TContext = Context>(params?: RequestParams.IndicesExists, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
exists<TResponse = boolean, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
exists<TResponse = boolean, TContext = Context>(params: RequestParams.IndicesExists, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -975,6 +1022,14 @@ declare class Client {
existsType<TResponse = boolean, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
existsType<TResponse = boolean, TContext = Context>(params: RequestParams.IndicesExistsType, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
existsType<TResponse = boolean, TContext = Context>(params: RequestParams.IndicesExistsType, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
field_usage_stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFieldUsageStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
field_usage_stats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
field_usage_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesFieldUsageStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
field_usage_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesFieldUsageStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
fieldUsageStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFieldUsageStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
fieldUsageStats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
fieldUsageStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesFieldUsageStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
fieldUsageStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesFieldUsageStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
flush<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesFlush, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
flush<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
flush<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesFlush, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1071,6 +1126,14 @@ declare class Client {
migrateToDataStream<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrateToDataStream<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesMigrateToDataStream, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
migrateToDataStream<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesMigrateToDataStream, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
modify_data_stream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesModifyDataStream<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
modify_data_stream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
modify_data_stream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesModifyDataStream<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
modify_data_stream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesModifyDataStream<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
modifyDataStream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesModifyDataStream<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
modifyDataStream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
modifyDataStream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesModifyDataStream<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
modifyDataStream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.IndicesModifyDataStream<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesOpen, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
open<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IndicesOpen, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1229,6 +1292,14 @@ declare class Client {
deletePipeline<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deletePipeline<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestDeletePipeline, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deletePipeline<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestDeletePipeline, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
geo_ip_stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestGeoIpStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
geo_ip_stats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
geo_ip_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestGeoIpStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
geo_ip_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestGeoIpStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
geoIpStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestGeoIpStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
geoIpStats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
geoIpStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestGeoIpStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
geoIpStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestGeoIpStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_pipeline<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IngestGetPipeline, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_pipeline<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_pipeline<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.IngestGetPipeline, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1339,6 +1410,22 @@ declare class Client {
deprecations<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deprecations<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationDeprecations, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deprecations<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationDeprecations, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_feature_upgrade_status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationGetFeatureUpgradeStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_feature_upgrade_status<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_feature_upgrade_status<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationGetFeatureUpgradeStatus, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_feature_upgrade_status<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationGetFeatureUpgradeStatus, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getFeatureUpgradeStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationGetFeatureUpgradeStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getFeatureUpgradeStatus<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getFeatureUpgradeStatus<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationGetFeatureUpgradeStatus, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getFeatureUpgradeStatus<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationGetFeatureUpgradeStatus, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
post_feature_upgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationPostFeatureUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
post_feature_upgrade<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
post_feature_upgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationPostFeatureUpgrade, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
post_feature_upgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationPostFeatureUpgrade, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
postFeatureUpgrade<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MigrationPostFeatureUpgrade, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
postFeatureUpgrade<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
postFeatureUpgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationPostFeatureUpgrade, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
postFeatureUpgrade<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MigrationPostFeatureUpgrade, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
ml: {
close_job<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlCloseJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
@ -1437,6 +1524,14 @@ declare class Client {
deleteTrainedModel<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTrainedModel<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlDeleteTrainedModel, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTrainedModel<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlDeleteTrainedModel, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteTrainedModelAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlDeleteTrainedModelAlias, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlDeleteTrainedModelAlias, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlDeleteTrainedModelAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlDeleteTrainedModelAlias, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlDeleteTrainedModelAlias, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
estimate_model_memory<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlEstimateModelMemory<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
estimate_model_memory<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
estimate_model_memory<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlEstimateModelMemory<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1477,10 +1572,10 @@ declare class Client {
flushJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
flushJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlFlushJob<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
flushJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlFlushJob<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
forecast<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlForecast, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
forecast<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
forecast<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlForecast, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
forecast<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlForecast, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
forecast<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlForecast<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
forecast<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
forecast<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlForecast<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
forecast<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlForecast<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_buckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlGetBuckets<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_buckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_buckets<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlGetBuckets<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1621,14 +1716,14 @@ declare class Client {
info<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
info<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlInfo, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
info<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlInfo, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open_job<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
open_job<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open_job<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open_job<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
openJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
openJob<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
openJob<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
openJob<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open_job<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
open_job<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open_job<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
open_job<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
openJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlOpenJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
openJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
openJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
openJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlOpenJob<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
post_calendar_events<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPostCalendarEvents<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
post_calendar_events<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
post_calendar_events<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPostCalendarEvents<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1645,14 +1740,22 @@ declare class Client {
postData<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
postData<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params: RequestParams.MlPostData<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
postData<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params: RequestParams.MlPostData<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_datafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
preview_datafeed<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_datafeed<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_datafeed<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDatafeed<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_data_frame_analytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
preview_data_frame_analytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_data_frame_analytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDataFrameAnalytics<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_data_frame_analytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDataFrameAnalytics<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
previewDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDataFrameAnalytics<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDataFrameAnalytics<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_datafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
preview_datafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_datafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
preview_datafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPreviewDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
previewDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
previewDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPreviewDatafeed<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_calendar<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutCalendar<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
put_calendar<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_calendar<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPutCalendar<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1709,6 +1812,22 @@ declare class Client {
putTrainedModel<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putTrainedModel<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPutTrainedModel<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putTrainedModel<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlPutTrainedModel<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutTrainedModelAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
put_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPutTrainedModelAlias, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_trained_model_alias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPutTrainedModelAlias, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlPutTrainedModelAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPutTrainedModelAlias, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putTrainedModelAlias<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlPutTrainedModelAlias, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
reset_job<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlResetJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
reset_job<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
reset_job<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlResetJob, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
reset_job<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlResetJob, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
resetJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlResetJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
resetJob<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
resetJob<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlResetJob, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
resetJob<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.MlResetJob, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
revert_model_snapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlRevertModelSnapshot<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
revert_model_snapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
revert_model_snapshot<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlRevertModelSnapshot<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1819,10 +1938,10 @@ declare class Client {
validateDetector<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MlValidateDetector<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
monitoring: {
bulk<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MonitoringBulk<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
bulk<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
bulk<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MonitoringBulk<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
bulk<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.MonitoringBulk<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.MonitoringBulk<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params: RequestParams.MonitoringBulk<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
bulk<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params: RequestParams.MonitoringBulk<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(params?: RequestParams.Msearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
msearch<TResponse = Record<string, any>, TRequestBody extends RequestNDBody = Record<string, any>[], TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -1841,6 +1960,22 @@ declare class Client {
mtermvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Mtermvectors<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
mtermvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Mtermvectors<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
nodes: {
clear_repositories_metering_archive<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesClearRepositoriesMeteringArchive, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clear_repositories_metering_archive<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_repositories_metering_archive<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesClearRepositoriesMeteringArchive, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_repositories_metering_archive<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesClearRepositoriesMeteringArchive, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearRepositoriesMeteringArchive<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesClearRepositoriesMeteringArchive, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clearRepositoriesMeteringArchive<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearRepositoriesMeteringArchive<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesClearRepositoriesMeteringArchive, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearRepositoriesMeteringArchive<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesClearRepositoriesMeteringArchive, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_repositories_metering_info<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesGetRepositoriesMeteringInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_repositories_metering_info<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_repositories_metering_info<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesGetRepositoriesMeteringInfo, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_repositories_metering_info<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesGetRepositoriesMeteringInfo, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRepositoriesMeteringInfo<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesGetRepositoriesMeteringInfo, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getRepositoriesMeteringInfo<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRepositoriesMeteringInfo<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesGetRepositoriesMeteringInfo, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRepositoriesMeteringInfo<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesGetRepositoriesMeteringInfo, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
hot_threads<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.NodesHotThreads, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
hot_threads<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
hot_threads<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.NodesHotThreads, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2004,6 +2139,14 @@ declare class Client {
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Search<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Search<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search_mvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchMvt<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
search_mvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search_mvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SearchMvt<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search_mvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SearchMvt<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
searchMvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SearchMvt<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
searchMvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
searchMvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SearchMvt<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
searchMvt<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SearchMvt<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search_shards<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchShards, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
search_shards<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
search_shards<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchShards, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2021,6 +2164,14 @@ declare class Client {
searchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SearchTemplate<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
searchTemplate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SearchTemplate<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
searchable_snapshots: {
cache_stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsCacheStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
cache_stats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cache_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cache_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cacheStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsCacheStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
cacheStats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cacheStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cacheStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clear_cache<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cache<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsClearCache, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2047,6 +2198,14 @@ declare class Client {
stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
searchableSnapshots: {
cache_stats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsCacheStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
cache_stats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cache_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cache_stats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cacheStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsCacheStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
cacheStats<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cacheStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
cacheStats<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsCacheStats, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cache<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SearchableSnapshotsClearCache, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clear_cache<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cache<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SearchableSnapshotsClearCache, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2117,6 +2276,14 @@ declare class Client {
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedRoles, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCachedRoles<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedRoles, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cached_service_tokens<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedServiceTokens, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clear_cached_service_tokens<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cached_service_tokens<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedServiceTokens, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clear_cached_service_tokens<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedServiceTokens, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCachedServiceTokens<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityClearCachedServiceTokens, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
clearCachedServiceTokens<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCachedServiceTokens<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedServiceTokens, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCachedServiceTokens<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityClearCachedServiceTokens, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
create_api_key<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityCreateApiKey<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
create_api_key<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
create_api_key<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateApiKey<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2125,6 +2292,14 @@ declare class Client {
createApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
createApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateApiKey<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
createApiKey<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateApiKey<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
create_service_token<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityCreateServiceToken, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
create_service_token<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
create_service_token<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateServiceToken, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
create_service_token<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateServiceToken, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
createServiceToken<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityCreateServiceToken, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
createServiceToken<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
createServiceToken<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateServiceToken, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
createServiceToken<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityCreateServiceToken, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_privileges<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeletePrivileges, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete_privileges<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_privileges<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeletePrivileges, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2149,6 +2324,14 @@ declare class Client {
deleteRoleMapping<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteRoleMapping<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteRoleMapping, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteRoleMapping<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteRoleMapping, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_service_token<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteServiceToken, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete_service_token<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_service_token<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteServiceToken, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_service_token<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteServiceToken, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteServiceToken<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteServiceToken, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteServiceToken<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteServiceToken<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteServiceToken, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteServiceToken<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteServiceToken, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_user<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityDeleteUser, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete_user<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_user<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityDeleteUser, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2213,6 +2396,22 @@ declare class Client {
getRoleMapping<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRoleMapping<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetRoleMapping, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRoleMapping<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetRoleMapping, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_service_accounts<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetServiceAccounts, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_service_accounts<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_service_accounts<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceAccounts, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_service_accounts<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceAccounts, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getServiceAccounts<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetServiceAccounts, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getServiceAccounts<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getServiceAccounts<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceAccounts, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getServiceAccounts<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceAccounts, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_service_credentials<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetServiceCredentials, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_service_credentials<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_service_credentials<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceCredentials, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_service_credentials<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceCredentials, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getServiceCredentials<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetServiceCredentials, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getServiceCredentials<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getServiceCredentials<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceCredentials, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getServiceCredentials<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetServiceCredentials, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_token<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetToken<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_token<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_token<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetToken<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2301,6 +2500,88 @@ declare class Client {
putUser<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putUser<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityPutUser<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putUser<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityPutUser<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
query_api_keys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityQueryApiKeys<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
query_api_keys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
query_api_keys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityQueryApiKeys<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
query_api_keys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityQueryApiKeys<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
queryApiKeys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityQueryApiKeys<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
queryApiKeys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
queryApiKeys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityQueryApiKeys<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
queryApiKeys<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecurityQueryApiKeys<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_authenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlAuthenticate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
saml_authenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_authenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_authenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlAuthenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlAuthenticate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
samlAuthenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlAuthenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlAuthenticate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlAuthenticate<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_complete_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlCompleteLogout<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
saml_complete_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_complete_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_complete_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlCompleteLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlCompleteLogout<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
samlCompleteLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlCompleteLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlCompleteLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlCompleteLogout<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_invalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlInvalidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
saml_invalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_invalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlInvalidate<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_invalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlInvalidate<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlInvalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlInvalidate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
samlInvalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlInvalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlInvalidate<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlInvalidate<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlInvalidate<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlLogout<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
saml_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlLogout<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_logout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlLogout<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlLogout<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
samlLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlLogout<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlLogout<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlLogout<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_prepare_authentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlPrepareAuthentication<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
saml_prepare_authentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_prepare_authentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_prepare_authentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlPrepareAuthentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlPrepareAuthentication<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
samlPrepareAuthentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlPrepareAuthentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlPrepareAuthentication<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlPrepareAuthentication<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_service_provider_metadata<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlServiceProviderMetadata, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
saml_service_provider_metadata<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_service_provider_metadata<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
saml_service_provider_metadata<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlServiceProviderMetadata<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecuritySamlServiceProviderMetadata, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
samlServiceProviderMetadata<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlServiceProviderMetadata<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
samlServiceProviderMetadata<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecuritySamlServiceProviderMetadata, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
shutdown: {
delete_node<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ShutdownDeleteNode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete_node<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_node<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownDeleteNode, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_node<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownDeleteNode, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteNode<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ShutdownDeleteNode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteNode<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteNode<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownDeleteNode, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteNode<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownDeleteNode, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_node<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ShutdownGetNode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_node<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_node<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownGetNode, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_node<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownGetNode, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getNode<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.ShutdownGetNode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getNode<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getNode<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownGetNode, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getNode<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownGetNode, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_node<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ShutdownPutNode<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
put_node<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_node<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownPutNode<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
put_node<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownPutNode<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putNode<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.ShutdownPutNode<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
putNode<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putNode<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownPutNode<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
putNode<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.ShutdownPutNode<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
slm: {
delete_lifecycle<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SlmDeleteLifecycle, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
@ -2417,6 +2698,14 @@ declare class Client {
getRepository<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRepository<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotGetRepository, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getRepository<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotGetRepository, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
repository_analyze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotRepositoryAnalyze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
repository_analyze<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
repository_analyze<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
repository_analyze<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
repositoryAnalyze<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotRepositoryAnalyze, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
repositoryAnalyze<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
repositoryAnalyze<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
repositoryAnalyze<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotRepositoryAnalyze, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
restore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SnapshotRestore<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
restore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
restore<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SnapshotRestore<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2443,6 +2732,30 @@ declare class Client {
clearCursor<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCursor<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SqlClearCursor<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
clearCursor<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SqlClearCursor<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_async<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SqlDeleteAsync, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
delete_async<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_async<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlDeleteAsync, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
delete_async<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlDeleteAsync, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteAsync<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SqlDeleteAsync, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
deleteAsync<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteAsync<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlDeleteAsync, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
deleteAsync<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlDeleteAsync, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_async<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SqlGetAsync, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_async<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_async<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsync, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_async<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsync, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAsync<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SqlGetAsync, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAsync<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAsync<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsync, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAsync<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsync, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_async_status<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SqlGetAsyncStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
get_async_status<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_async_status<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
get_async_status<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAsyncStatus<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SqlGetAsyncStatus, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
getAsyncStatus<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAsyncStatus<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
getAsyncStatus<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SqlGetAsyncStatus, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.SqlQuery<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
query<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.SqlQuery<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2472,6 +2785,14 @@ declare class Client {
list<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TasksList, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
list<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TasksList, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TermsEnum<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TermsEnum<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Termvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Termvectors<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2561,6 +2882,14 @@ declare class Client {
updateTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
updateTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TransformUpdateTransform<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
updateTransform<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TransformUpdateTransform<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
upgrade_transforms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformUpgradeTransforms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
upgrade_transforms<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
upgrade_transforms<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TransformUpgradeTransforms, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
upgrade_transforms<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TransformUpgradeTransforms, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
upgradeTransforms<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.TransformUpgradeTransforms, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
upgradeTransforms<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
upgradeTransforms<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TransformUpgradeTransforms, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
upgradeTransforms<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TransformUpgradeTransforms, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
}
update<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Update<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
update<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
@ -2696,6 +3025,7 @@ export {
ApiResponse,
RequestEvent,
ResurrectEvent,
estypes,
RequestParams,
ClientOptions,
NodeOptions,

View File

@ -19,10 +19,9 @@
'use strict'
const nodeMajor = Number(process.versions.node.split('.')[0])
const { EventEmitter } = require('events')
const { URL } = require('url')
const buffer = require('buffer')
const debug = require('debug')('elasticsearch')
const Transport = require('./lib/Transport')
const Connection = require('./lib/Connection')
@ -47,15 +46,6 @@ const kEventEmitter = Symbol('elasticsearchjs-event-emitter')
const ESAPI = require('./api')
/* istanbul ignore next */
if (nodeMajor >= 10 && nodeMajor < 12) {
process.emitWarning('You are using a version of Node.js that will reach EOL in April 2021. ' +
'The support for this version will be dropped in 7.13. ' +
'Please refer to https://ela.st/nodejs-support for additional information.',
'DeprecationWarning'
)
}
class Client extends ESAPI {
constructor (opts = {}) {
super({ ConfigurationError })
@ -113,6 +103,7 @@ class Client extends ESAPI {
suggestCompression: false,
compression: false,
ssl: null,
caFingerprint: null,
agent: null,
headers: {},
nodeFilter: null,
@ -123,9 +114,28 @@ class Client extends ESAPI {
opaqueIdPrefix: null,
context: null,
proxy: null,
enableMetaHeader: true
enableMetaHeader: true,
disablePrototypePoisoningProtection: false,
maxResponseSize: null,
maxCompressedResponseSize: null
}, opts)
if (options.maxResponseSize !== null && options.maxResponseSize > buffer.constants.MAX_STRING_LENGTH) {
throw new ConfigurationError(`The maxResponseSize cannot be bigger than ${buffer.constants.MAX_STRING_LENGTH}`)
}
if (options.maxCompressedResponseSize !== null && options.maxCompressedResponseSize > buffer.constants.MAX_LENGTH) {
throw new ConfigurationError(`The maxCompressedResponseSize cannot be bigger than ${buffer.constants.MAX_LENGTH}`)
}
if (options.caFingerprint !== null && isHttpConnection(opts.node || opts.nodes)) {
throw new ConfigurationError('You can\'t configure the caFingerprint with a http connection')
}
if (process.env.ELASTIC_CLIENT_APIVERSIONING === 'true') {
options.headers = Object.assign({ accept: 'application/vnd.elasticsearch+json; compatible-with=7' }, options.headers)
}
this[kInitialOptions] = options
this[kExtensions] = []
this.name = options.name
@ -140,7 +150,9 @@ class Client extends ESAPI {
this[kEventEmitter] = options[kChild].eventEmitter
} else {
this[kEventEmitter] = new EventEmitter()
this.serializer = new options.Serializer()
this.serializer = new options.Serializer({
disablePrototypePoisoningProtection: options.disablePrototypePoisoningProtection
})
this.connectionPool = new options.ConnectionPool({
pingTimeout: options.pingTimeout,
resurrectStrategy: options.resurrectStrategy,
@ -150,6 +162,7 @@ class Client extends ESAPI {
Connection: options.Connection,
auth: options.auth,
emit: this[kEventEmitter].emit.bind(this[kEventEmitter]),
caFingerprint: options.caFingerprint,
sniffEnabled: options.sniffInterval !== false ||
options.sniffOnStart !== false ||
options.sniffOnConnectionFault !== false
@ -176,7 +189,9 @@ class Client extends ESAPI {
generateRequestId: options.generateRequestId,
name: options.name,
opaqueIdPrefix: options.opaqueIdPrefix,
context: options.context
context: options.context,
maxResponseSize: options.maxResponseSize,
maxCompressedResponseSize: options.maxCompressedResponseSize
})
this.helpers = new Helpers({
@ -259,6 +274,10 @@ class Client extends ESAPI {
}
const client = new Client(options)
// sync product check
const tSymbol = Object.getOwnPropertySymbols(this.transport)
.filter(symbol => symbol.description === 'product check')[0]
client.transport[tSymbol] = this.transport[tSymbol]
// Add parent extensions
if (this[kExtensions].length > 0) {
this[kExtensions].forEach(({ name, opts, fn }) => {
@ -315,6 +334,14 @@ function getAuth (node) {
}
}
function isHttpConnection (node) {
if (Array.isArray(node)) {
return node.some((n) => (typeof n === 'string' ? new URL(n).protocol : n.url.protocol) === 'http:')
} else {
return (typeof node === 'string' ? new URL(node).protocol : node.url.protocol) === 'http:'
}
}
const events = {
RESPONSE: 'response',
REQUEST: 'request',

1
lib/Connection.d.ts vendored
View File

@ -40,6 +40,7 @@ export interface ConnectionOptions {
roles?: ConnectionRoles;
auth?: BasicAuth | ApiKeyAuth;
proxy?: string | URL;
caFingerprint?: string;
}
interface ConnectionRoles {

View File

@ -25,7 +25,7 @@ const hpagent = require('hpagent')
const http = require('http')
const https = require('https')
const debug = require('debug')('elasticsearch')
const pump = require('pump')
const { pipeline } = require('stream')
const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/
const {
ConnectionError,
@ -42,6 +42,7 @@ class Connection {
this.headers = prepareHeaders(opts.headers, opts.auth)
this.deadCount = 0
this.resurrectTimeout = 0
this.caFingerprint = opts.caFingerprint
this._openRequests = 0
this._status = opts.status || Connection.statuses.ALIVE
@ -112,7 +113,14 @@ class Connection {
const onError = err => {
cleanListeners()
this._openRequests--
callback(new ConnectionError(err.message), null)
let message = err.message
if (err.code === 'ECONNRESET') {
/* istanbul ignore next */
const socket = request.socket || {}
/* istanbul ignore next */
message += ` - Local: ${socket.localAddress || 'unknown'}:${socket.localPort || 'unknown'}, Remote: ${socket.remoteAddress || 'unknown'}:${socket.remotePort || 'unknown'}`
}
callback(new ConnectionError(message), null)
}
const onAbort = () => {
@ -123,17 +131,43 @@ class Connection {
callback(new RequestAbortedError(), null)
}
const onSocket = socket => {
/* istanbul ignore else */
if (!socket.isSessionReused()) {
socket.once('secureConnect', () => {
const issuerCertificate = getIssuerCertificate(socket)
/* istanbul ignore next */
if (issuerCertificate == null) {
onError(new Error('Invalid or malformed certificate'))
request.once('error', () => {}) // we need to catch the request aborted error
return request.abort()
}
// Check if fingerprint matches
/* istanbul ignore else */
if (this.caFingerprint !== issuerCertificate.fingerprint256) {
onError(new Error('Server certificate CA fingerprint does not match the value configured in caFingerprint'))
request.once('error', () => {}) // we need to catch the request aborted error
return request.abort()
}
})
}
}
request.on('response', onResponse)
request.on('timeout', onTimeout)
request.on('error', onError)
request.on('abort', onAbort)
if (this.caFingerprint != null) {
request.on('socket', onSocket)
}
// Disables the Nagle algorithm
request.setNoDelay(true)
// starts the request
if (isStream(params.body) === true) {
pump(params.body, request, err => {
pipeline(params.body, request, err => {
/* istanbul ignore if */
if (err != null && cleanedListeners === false) {
cleanListeners()
@ -152,6 +186,7 @@ class Connection {
request.removeListener('timeout', onTimeout)
request.removeListener('error', onError)
request.removeListener('abort', onAbort)
request.removeListener('socket', onSocket)
cleanedListeners = true
}
}
@ -331,6 +366,8 @@ function prepareHeaders (headers = {}, auth) {
} else {
headers.authorization = `ApiKey ${auth.apiKey}`
}
} else if (auth.bearer) {
headers.authorization = `Bearer ${auth.bearer}`
} else if (auth.username && auth.password) {
headers.authorization = 'Basic ' + Buffer.from(`${auth.username}:${auth.password}`).toString('base64')
}
@ -338,5 +375,25 @@ function prepareHeaders (headers = {}, auth) {
return headers
}
function getIssuerCertificate (socket) {
let certificate = socket.getPeerCertificate(true)
while (certificate && Object.keys(certificate).length > 0) {
// invalid certificate
if (certificate.issuerCertificate == null) {
return null
}
// We have reached the root certificate.
// In case of self-signed certificates, `issuerCertificate` may be a circular reference.
if (certificate.fingerprint256 === certificate.issuerCertificate.fingerprint256) {
break
}
// continue the loop
certificate = certificate.issuerCertificate
}
return certificate
}
module.exports = Connection
module.exports.internals = { prepareHeaders }
module.exports.internals = { prepareHeaders, getIssuerCertificate }

2
lib/Helpers.d.ts vendored
View File

@ -36,6 +36,7 @@ export interface ScrollSearchResponse<TDocument = unknown, TResponse = Record<st
export interface BulkHelper<T> extends Promise<T> {
abort: () => BulkHelper<T>
readonly stats: BulkStats
}
export interface BulkStats {
@ -43,6 +44,7 @@ export interface BulkStats {
failed: number
retry: number
successful: number
noop: number
time: number
bytes: number
aborted: boolean

View File

@ -421,7 +421,7 @@ class Helpers {
*/
bulk (options, reqOptions = {}) {
const client = this[kClient]
const { serialize, deserialize } = client.serializer
const { serializer } = client
if (this[kMetaHeader] !== null) {
reqOptions.headers = reqOptions.headers || {}
reqOptions.headers['x-elastic-client-meta'] = this[kMetaHeader] + ',h=bp'
@ -456,6 +456,7 @@ class Helpers {
failed: 0,
retry: 0,
successful: 0,
noop: 0,
time: 0,
bytes: 0,
aborted: false
@ -463,6 +464,9 @@ class Helpers {
const p = iterate()
const helper = {
get stats () {
return stats
},
then (onFulfilled, onRejected) {
return p.then(onFulfilled, onRejected)
},
@ -505,19 +509,19 @@ class Helpers {
? Object.keys(action[0])[0]
: Object.keys(action)[0]
if (operation === 'index' || operation === 'create') {
actionBody = serialize(action)
payloadBody = typeof chunk === 'string' ? chunk : serialize(chunk)
actionBody = serializer.serialize(action)
payloadBody = typeof chunk === 'string' ? chunk : serializer.serialize(chunk)
chunkBytes += Buffer.byteLength(actionBody) + Buffer.byteLength(payloadBody)
bulkBody.push(actionBody, payloadBody)
} else if (operation === 'update') {
actionBody = serialize(action[0])
actionBody = serializer.serialize(action[0])
payloadBody = typeof chunk === 'string'
? `{"doc":${chunk}}`
: serialize({ doc: chunk, ...action[1] })
: serializer.serialize({ doc: chunk, ...action[1] })
chunkBytes += Buffer.byteLength(actionBody) + Buffer.byteLength(payloadBody)
bulkBody.push(actionBody, payloadBody)
} else if (operation === 'delete') {
actionBody = serialize(action)
actionBody = serializer.serialize(action)
chunkBytes += Buffer.byteLength(actionBody)
bulkBody.push(actionBody)
} else {
@ -669,13 +673,13 @@ class Helpers {
return
}
for (let i = 0, len = bulkBody.length; i < len; i = i + 2) {
const operation = Object.keys(deserialize(bulkBody[i]))[0]
const operation = Object.keys(serializer.deserialize(bulkBody[i]))[0]
onDrop({
status: 429,
error: null,
operation: deserialize(bulkBody[i]),
operation: serializer.deserialize(bulkBody[i]),
document: operation !== 'delete'
? deserialize(bulkBody[i + 1])
? serializer.deserialize(bulkBody[i + 1])
/* istanbul ignore next */
: null,
retried: isRetrying
@ -692,6 +696,11 @@ class Helpers {
if (err) return callback(err, null)
if (body.errors === false) {
stats.successful += body.items.length
for (const item of body.items) {
if (item.update && item.update.result === 'noop') {
stats.noop++
}
}
return callback(null, [])
}
const retry = []
@ -716,9 +725,9 @@ class Helpers {
onDrop({
status: status,
error: action[operation].error,
operation: deserialize(bulkBody[indexSlice]),
operation: serializer.deserialize(bulkBody[indexSlice]),
document: operation !== 'delete'
? deserialize(bulkBody[indexSlice + 1])
? serializer.deserialize(bulkBody[indexSlice + 1])
: null,
retried: isRetrying
})

5
lib/Serializer.d.ts vendored
View File

@ -17,7 +17,12 @@
* under the License.
*/
export interface SerializerOptions {
disablePrototypePoisoningProtection: boolean | 'proto' | 'constructor'
}
export default class Serializer {
constructor (opts?: SerializerOptions)
serialize(object: any): string;
deserialize(json: string): any;
ndserialize(array: any[]): string;

View File

@ -23,8 +23,17 @@ const { stringify } = require('querystring')
const debug = require('debug')('elasticsearch')
const sjson = require('secure-json-parse')
const { SerializationError, DeserializationError } = require('./errors')
const kJsonOptions = Symbol('secure json parse options')
class Serializer {
constructor (opts = {}) {
const disable = opts.disablePrototypePoisoningProtection
this[kJsonOptions] = {
protoAction: disable === true || disable === 'proto' ? 'ignore' : 'error',
constructorAction: disable === true || disable === 'constructor' ? 'ignore' : 'error'
}
}
serialize (object) {
debug('Serializing', object)
let json
@ -40,7 +49,7 @@ class Serializer {
debug('Deserializing', json)
let object
try {
object = sjson.parse(json)
object = sjson.parse(json, this[kJsonOptions])
} catch (err) {
throw new DeserializationError(err.message, json)
}

13
lib/Transport.d.ts vendored
View File

@ -26,9 +26,10 @@ import * as errors from './errors';
export type ApiError = errors.ConfigurationError | errors.ConnectionError |
errors.DeserializationError | errors.SerializationError |
errors.NoLivingConnectionsError | errors.ResponseError |
errors.TimeoutError | errors.RequestAbortedError
errors.TimeoutError | errors.RequestAbortedError |
errors.ProductNotSupportedError
export type Context = Record<string, unknown> | null
export type Context = unknown
export interface nodeSelectorFn {
(connections: Connection[]): Connection;
@ -60,6 +61,8 @@ interface TransportOptions {
generateRequestId?: generateRequestIdFn;
name?: string;
opaqueIdPrefix?: string;
maxResponseSize?: number;
maxCompressedResponseSize?: number;
}
export interface RequestEvent<TResponse = Record<string, any>, TContext = Context> {
@ -112,6 +115,8 @@ export interface TransportRequestOptions {
context?: Context;
warnings?: string[];
opaqueId?: string;
maxResponseSize?: number;
maxCompressedResponseSize?: number;
}
export interface TransportRequestCallback {
@ -154,8 +159,8 @@ export default class Transport {
_nextSniff: number;
_isSniffing: boolean;
constructor(opts: TransportOptions);
request(params: TransportRequestParams, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse>;
request(params: TransportRequestParams, options?: TransportRequestOptions, callback?: (err: ApiError, result: ApiResponse) => void): TransportRequestCallback;
request<TResponse = Record<string, any>, TContext = Context>(params: TransportRequestParams, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>;
request<TResponse = Record<string, any>, TContext = Context>(params: TransportRequestParams, options?: TransportRequestOptions, callback?: (err: ApiError, result: ApiResponse<TResponse, TContext>) => void): TransportRequestCallback;
getConnection(opts: TransportGetConnectionOptions): Connection | null;
sniff(opts?: TransportSniffOptions, callback?: (...args: any[]) => void): void;
}

View File

@ -24,12 +24,14 @@ const os = require('os')
const { gzip, unzip, createGzip } = require('zlib')
const buffer = require('buffer')
const ms = require('ms')
const { EventEmitter } = require('events')
const {
ConnectionError,
RequestAbortedError,
NoLivingConnectionsError,
ResponseError,
ConfigurationError
ConfigurationError,
ProductNotSupportedError
} = require('./errors')
const noop = () => {}
@ -38,6 +40,11 @@ const clientVersion = require('../package.json').version
const userAgent = `elasticsearch-js/${clientVersion} (${os.platform()} ${os.release()}-${os.arch()}; Node.js ${process.version})`
const MAX_BUFFER_LENGTH = buffer.constants.MAX_LENGTH
const MAX_STRING_LENGTH = buffer.constants.MAX_STRING_LENGTH
const kProductCheck = Symbol('product check')
const kApiVersioning = Symbol('api versioning')
const kEventEmitter = Symbol('event emitter')
const kMaxResponseSize = Symbol('max response size')
const kMaxCompressedResponseSize = Symbol('max compressed response size')
class Transport {
constructor (opts) {
@ -64,6 +71,11 @@ class Transport {
this.generateRequestId = opts.generateRequestId || generateRequestId()
this.name = opts.name
this.opaqueIdPrefix = opts.opaqueIdPrefix
this[kProductCheck] = 0 // 0 = to be checked, 1 = checking, 2 = checked-ok, 3 checked-notok, 4 checked-nodefault
this[kApiVersioning] = process.env.ELASTIC_CLIENT_APIVERSIONING === 'true'
this[kEventEmitter] = new EventEmitter()
this[kMaxResponseSize] = opts.maxResponseSize || MAX_STRING_LENGTH
this[kMaxCompressedResponseSize] = opts.maxCompressedResponseSize || MAX_BUFFER_LENGTH
this.nodeFilter = opts.nodeFilter || defaultNodeFilter
if (typeof opts.nodeSelector === 'function') {
@ -81,7 +93,11 @@ class Transport {
this._isSniffing = false
if (opts.sniffOnStart === true) {
this.sniff({ reason: Transport.sniffReasons.SNIFF_ON_START })
// timer needed otherwise it will clash
// with the product check testing
setTimeout(() => {
this.sniff({ reason: Transport.sniffReasons.SNIFF_ON_START })
}, 10)
}
}
@ -150,13 +166,19 @@ class Transport {
? 0
: (typeof options.maxRetries === 'number' ? options.maxRetries : this.maxRetries)
const compression = options.compression !== undefined ? options.compression : this.compression
const maxResponseSize = options.maxResponseSize || this[kMaxResponseSize]
const maxCompressedResponseSize = options.maxCompressedResponseSize || this[kMaxCompressedResponseSize]
let request = { abort: noop }
const transportReturn = {
then (onFulfilled, onRejected) {
return p.then(onFulfilled, onRejected)
if (p != null) {
return p.then(onFulfilled, onRejected)
}
},
catch (onRejected) {
return p.catch(onRejected)
if (p != null) {
return p.catch(onRejected)
}
},
abort () {
meta.aborted = true
@ -165,12 +187,15 @@ class Transport {
return this
},
finally (onFinally) {
return p.finally(onFinally)
if (p != null) {
return p.finally(onFinally)
}
}
}
const makeRequest = () => {
if (meta.aborted === true) {
this.emit('request', new RequestAbortedError(), result)
return process.nextTick(callback, new RequestAbortedError(), result)
}
meta.connection = this.getConnection({ requestId: meta.request.id })
@ -226,26 +251,28 @@ class Transport {
const contentEncoding = (result.headers['content-encoding'] || '').toLowerCase()
const isCompressed = contentEncoding.indexOf('gzip') > -1 || contentEncoding.indexOf('deflate') > -1
const isVectorTile = (result.headers['content-type'] || '').indexOf('application/vnd.mapbox-vector-tile') > -1
/* istanbul ignore else */
if (result.headers['content-length'] !== undefined) {
const contentLength = Number(result.headers['content-length'])
if (isCompressed && contentLength > MAX_BUFFER_LENGTH) {
if (isCompressed && contentLength > maxCompressedResponseSize) {
response.destroy()
return onConnectionError(
new RequestAbortedError(`The content length (${contentLength}) is bigger than the maximum allowed buffer (${MAX_BUFFER_LENGTH})`, result)
new RequestAbortedError(`The content length (${contentLength}) is bigger than the maximum allowed buffer (${maxCompressedResponseSize})`, result)
)
} else if (contentLength > MAX_STRING_LENGTH) {
} else if (contentLength > maxResponseSize) {
response.destroy()
return onConnectionError(
new RequestAbortedError(`The content length (${contentLength}) is bigger than the maximum allowed string (${MAX_STRING_LENGTH})`, result)
new RequestAbortedError(`The content length (${contentLength}) is bigger than the maximum allowed string (${maxResponseSize})`, result)
)
}
}
// if the response is compressed, we must handle it
// as buffer for allowing decompression later
let payload = isCompressed ? [] : ''
const onData = isCompressed
// while if it's a vector tile, we should return it as buffer
let payload = isCompressed || isVectorTile ? [] : ''
const onData = isCompressed || isVectorTile
? chunk => { payload.push(chunk) }
: chunk => { payload += chunk }
const onEnd = err => {
@ -261,7 +288,7 @@ class Transport {
if (isCompressed) {
unzip(Buffer.concat(payload), onBody)
} else {
onBody(null, payload)
onBody(null, isVectorTile ? Buffer.concat(payload) : payload)
}
}
@ -270,7 +297,7 @@ class Transport {
onEnd(new Error('Response aborted while reading the body'))
}
if (!isCompressed) {
if (!isCompressed && !isVectorTile) {
response.setEncoding('utf8')
}
@ -286,7 +313,9 @@ class Transport {
this.emit('response', err, result)
return callback(err, result)
}
if (Buffer.isBuffer(payload)) {
const isVectorTile = (result.headers['content-type'] || '').indexOf('application/vnd.mapbox-vector-tile') > -1
if (Buffer.isBuffer(payload) && !isVectorTile) {
payload = payload.toString()
}
const isHead = params.method === 'HEAD'
@ -295,7 +324,8 @@ class Transport {
// - the request is not a HEAD request
// - the payload is not an empty string
if (result.headers['content-type'] !== undefined &&
result.headers['content-type'].indexOf('application/json') > -1 &&
(result.headers['content-type'].indexOf('application/json') > -1 ||
result.headers['content-type'].indexOf('application/vnd.elasticsearch+json') > -1) &&
isHead === false &&
payload !== ''
) {
@ -306,8 +336,8 @@ class Transport {
return callback(err, result)
}
} else {
// cast to boolean if the request method was HEAD
result.body = isHead === true ? true : payload
// cast to boolean if the request method was HEAD and there was no error
result.body = isHead === true && result.statusCode < 400 ? true : payload
}
// we should ignore the statusCode if the user has configured the `ignore` field with
@ -347,91 +377,130 @@ class Transport {
}
}
this.emit('serialization', null, result)
const headers = Object.assign({}, this.headers, lowerCaseHeaders(options.headers))
const prepareRequest = () => {
this.emit('serialization', null, result)
const headers = Object.assign({}, this.headers, lowerCaseHeaders(options.headers))
if (options.opaqueId !== undefined) {
headers['x-opaque-id'] = this.opaqueIdPrefix !== null
? this.opaqueIdPrefix + options.opaqueId
: options.opaqueId
}
if (options.opaqueId !== undefined) {
headers['x-opaque-id'] = this.opaqueIdPrefix !== null
? this.opaqueIdPrefix + options.opaqueId
: options.opaqueId
}
// handle json body
if (params.body != null) {
if (shouldSerialize(params.body) === true) {
try {
params.body = this.serializer.serialize(params.body)
} catch (err) {
this.emit('request', err, result)
process.nextTick(callback, err, result)
return transportReturn
// handle json body
if (params.body != null) {
if (shouldSerialize(params.body) === true) {
try {
params.body = this.serializer.serialize(params.body)
} catch (err) {
this.emit('request', err, result)
process.nextTick(callback, err, result)
return transportReturn
}
}
if (params.body !== '') {
headers['content-type'] = headers['content-type'] || (this[kApiVersioning] ? 'application/vnd.elasticsearch+json; compatible-with=7' : 'application/json')
}
// handle ndjson body
} else if (params.bulkBody != null) {
if (shouldSerialize(params.bulkBody) === true) {
try {
params.body = this.serializer.ndserialize(params.bulkBody)
} catch (err) {
this.emit('request', err, result)
process.nextTick(callback, err, result)
return transportReturn
}
} else {
params.body = params.bulkBody
}
if (params.body !== '') {
headers['content-type'] = headers['content-type'] || (this[kApiVersioning] ? 'application/vnd.elasticsearch+x-ndjson; compatible-with=7' : 'application/x-ndjson')
}
}
if (params.body !== '') {
headers['content-type'] = headers['content-type'] || 'application/json'
params.headers = headers
// serializes the querystring
if (options.querystring == null) {
params.querystring = this.serializer.qserialize(params.querystring)
} else {
params.querystring = this.serializer.qserialize(
Object.assign({}, params.querystring, options.querystring)
)
}
// handle ndjson body
} else if (params.bulkBody != null) {
if (shouldSerialize(params.bulkBody) === true) {
try {
params.body = this.serializer.ndserialize(params.bulkBody)
} catch (err) {
this.emit('request', err, result)
process.nextTick(callback, err, result)
return transportReturn
// handles request timeout
params.timeout = toMs(options.requestTimeout || this.requestTimeout)
if (options.asStream === true) params.asStream = true
// handle compression
if (params.body !== '' && params.body != null) {
if (isStream(params.body) === true) {
if (compression === 'gzip') {
params.headers['content-encoding'] = compression
params.body = params.body.pipe(createGzip())
}
makeRequest()
} else if (compression === 'gzip') {
gzip(params.body, (err, buffer) => {
/* istanbul ignore next */
if (err) {
this.emit('request', err, result)
return callback(err, result)
}
params.headers['content-encoding'] = compression
params.headers['content-length'] = '' + Buffer.byteLength(buffer)
params.body = buffer
makeRequest()
})
} else {
params.headers['content-length'] = '' + Buffer.byteLength(params.body)
makeRequest()
}
} else {
params.body = params.bulkBody
}
if (params.body !== '') {
headers['content-type'] = headers['content-type'] || 'application/x-ndjson'
makeRequest()
}
}
params.headers = headers
// serializes the querystring
if (options.querystring == null) {
params.querystring = this.serializer.qserialize(params.querystring)
} else {
params.querystring = this.serializer.qserialize(
Object.assign({}, params.querystring, options.querystring)
)
}
// handles request timeout
params.timeout = toMs(options.requestTimeout || this.requestTimeout)
if (options.asStream === true) params.asStream = true
meta.request.params = params
meta.request.options = options
// handle compression
if (params.body !== '' && params.body != null) {
if (isStream(params.body) === true) {
if (compression === 'gzip') {
params.headers['content-encoding'] = compression
params.body = params.body.pipe(createGzip())
}
makeRequest()
} else if (compression === 'gzip') {
gzip(params.body, (err, buffer) => {
/* istanbul ignore next */
if (err) {
this.emit('request', err, result)
return callback(err, result)
}
params.headers['content-encoding'] = compression
params.headers['content-length'] = '' + Buffer.byteLength(buffer)
params.body = buffer
makeRequest()
})
// still need to check the product or waiting for the check to finish
if (this[kProductCheck] === 0 || this[kProductCheck] === 1) {
// let pass info requests
if (params.method === 'GET' && params.path === '/') {
prepareRequest()
} else {
params.headers['content-length'] = '' + Buffer.byteLength(params.body)
makeRequest()
// wait for product check to finish
this[kEventEmitter].once('product-check', (error, status) => {
if (status === false) {
const err = error || new ProductNotSupportedError(result)
if (this[kProductCheck] === 4) {
err.message = 'The client noticed that the server is not a supported distribution of Elasticsearch'
}
this.emit('request', err, result)
process.nextTick(callback, err, result)
} else {
prepareRequest()
}
})
// the very first request triggers the product check
if (this[kProductCheck] === 0) {
this.productCheck()
}
}
// the product check is finished and it's not Elasticsearch
} else if (this[kProductCheck] === 3 || this[kProductCheck] === 4) {
const err = new ProductNotSupportedError(result)
if (this[kProductCheck] === 4) {
err.message = 'The client noticed that the server is not a supported distribution of Elasticsearch'
}
this.emit('request', err, result)
process.nextTick(callback, err, result)
// the product check finished and it's Elasticsearch
} else {
makeRequest()
prepareRequest()
}
return transportReturn
@ -491,6 +560,68 @@ class Transport {
callback(null, hosts)
})
}
productCheck () {
debug('Start product check')
this[kProductCheck] = 1
this.request({
method: 'GET',
path: '/'
}, (err, result) => {
this[kProductCheck] = 3
if (err) {
debug('Product check failed', err)
if (err.statusCode === 401 || err.statusCode === 403) {
this[kProductCheck] = 2
process.emitWarning(
'The client is unable to verify that the server is Elasticsearch due to security privileges on the server side. Some functionality may not be compatible if the server is running an unsupported product.',
'ProductNotSupportedSecurityError'
)
this[kEventEmitter].emit('product-check', null, true)
} else {
this[kProductCheck] = 0
this[kEventEmitter].emit('product-check', err, false)
}
} else {
debug('Checking elasticsearch version', result.body, result.headers)
if (result.body.version == null || typeof result.body.version.number !== 'string') {
debug('Can\'t access Elasticsearch version')
return this[kEventEmitter].emit('product-check', null, false)
}
const tagline = result.body.tagline
const version = result.body.version.number.split('.')
const major = Number(version[0])
const minor = Number(version[1])
if (major < 6) {
return this[kEventEmitter].emit('product-check', null, false)
} else if (major >= 6 && major < 7) {
if (tagline !== 'You Know, for Search') {
debug('Bad tagline')
return this[kEventEmitter].emit('product-check', null, false)
}
} else if (major === 7 && minor < 14) {
if (tagline !== 'You Know, for Search') {
debug('Bad tagline')
return this[kEventEmitter].emit('product-check', null, false)
}
if (result.body.version.build_flavor !== 'default') {
debug('Bad build_flavor')
this[kProductCheck] = 4
return this[kEventEmitter].emit('product-check', null, false)
}
} else {
if (result.headers['x-elastic-product'] !== 'Elasticsearch') {
debug('x-elastic-product not recognized')
return this[kEventEmitter].emit('product-check', null, false)
}
}
debug('Valid Elasticsearch distribution')
this[kProductCheck] = 2
this[kEventEmitter].emit('product-check', null, true)
}
})
}
}
Transport.sniffReasons = {

7
lib/errors.d.ts vendored
View File

@ -81,3 +81,10 @@ export declare class RequestAbortedError<TResponse = Record<string, any>, TConte
meta: ApiResponse<TResponse, TContext>;
constructor(message: string, meta: ApiResponse);
}
export declare class ProductNotSupportedError<TResponse = Record<string, any>, TContext = Context> extends ElasticsearchClientError {
name: string;
message: string;
meta: ApiResponse<TResponse, TContext>;
constructor(meta: ApiResponse);
}

View File

@ -90,7 +90,18 @@ class ResponseError extends ElasticsearchClientError {
super('Response Error')
Error.captureStackTrace(this, ResponseError)
this.name = 'ResponseError'
this.message = (meta.body && meta.body.error && meta.body.error.type) || 'Response Error'
if (meta.body && meta.body.error && meta.body.error.type) {
if (Array.isArray(meta.body.error.root_cause)) {
this.message = meta.body.error.type + ': '
this.message += meta.body.error.root_cause.map(entry => `[${entry.type}] Reason: ${entry.reason}`).join('; ')
} else {
this.message = meta.body.error.type
}
} else if (typeof meta.body === 'object' && meta.body != null) {
this.message = JSON.stringify(meta.body)
} else {
this.message = meta.body || 'Response Error'
}
this.meta = meta
}
@ -108,6 +119,10 @@ class ResponseError extends ElasticsearchClientError {
get headers () {
return this.meta.headers
}
toString () {
return JSON.stringify(this.meta.body)
}
}
class RequestAbortedError extends ElasticsearchClientError {
@ -120,6 +135,16 @@ class RequestAbortedError extends ElasticsearchClientError {
}
}
class ProductNotSupportedError extends ElasticsearchClientError {
constructor (meta) {
super('Product Not Supported Error')
Error.captureStackTrace(this, ProductNotSupportedError)
this.name = 'ProductNotSupportedError'
this.message = 'The client noticed that the server is not Elasticsearch and we do not support this unknown product.'
this.meta = meta
}
}
module.exports = {
ElasticsearchClientError,
TimeoutError,
@ -129,5 +154,6 @@ module.exports = {
DeserializationError,
ConfigurationError,
ResponseError,
RequestAbortedError
RequestAbortedError,
ProductNotSupportedError
}

View File

@ -36,6 +36,7 @@ class BaseConnectionPool {
this._ssl = opts.ssl
this._agent = opts.agent
this._proxy = opts.proxy || null
this._caFingerprint = opts.caFingerprint || null
}
getConnection () {
@ -72,6 +73,8 @@ class BaseConnectionPool {
if (opts.agent == null) opts.agent = this._agent
/* istanbul ignore else */
if (opts.proxy == null) opts.proxy = this._proxy
/* istanbul ignore else */
if (opts.caFingerprint == null) opts.caFingerprint = this._caFingerprint
const connection = new this.Connection(opts)

6
lib/pool/index.d.ts vendored
View File

@ -31,6 +31,7 @@ interface BaseConnectionPoolOptions {
auth?: BasicAuth | ApiKeyAuth;
emit: (event: string | symbol, ...args: any[]) => boolean;
Connection: typeof Connection;
caFingerprint?: string;
}
interface ConnectionPoolOptions extends BaseConnectionPoolOptions {
@ -61,6 +62,10 @@ interface BasicAuth {
password: string;
}
interface BearerAuth {
bearer: string
}
interface resurrectOptions {
now?: number;
requestId: string;
@ -204,6 +209,7 @@ export {
getConnectionOptions,
ApiKeyAuth,
BasicAuth,
BearerAuth,
internals,
resurrectOptions,
ResurrectEvent,

View File

@ -8,11 +8,11 @@
"require": "./index.js",
"import": "./index.mjs"
},
"./": "./"
"./*": "./*.js"
},
"homepage": "http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html",
"version": "7.12.0",
"versionCanary": "7.12.0-canary.7",
"version": "7.16.0",
"versionCanary": "7.16.0-canary.7",
"keywords": [
"elasticsearch",
"elastic",
@ -48,37 +48,38 @@
},
"devDependencies": {
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
"@types/node": "^14.14.28",
"convert-hrtime": "^3.0.0",
"@types/node": "^15.3.1",
"convert-hrtime": "^5.0.0",
"cross-zip": "^4.0.0",
"dedent": "^0.7.0",
"deepmerge": "^4.2.2",
"dezalgo": "^1.0.3",
"fast-deep-equal": "^3.1.3",
"into-stream": "^6.0.0",
"js-yaml": "^4.0.0",
"js-yaml": "^4.1.0",
"license-checker": "^25.0.1",
"minimist": "^1.2.5",
"ora": "^5.3.0",
"node-fetch": "^2.6.1",
"ora": "^5.4.0",
"pretty-hrtime": "^1.0.3",
"proxy": "^1.0.2",
"rimraf": "^3.0.2",
"semver": "^7.3.4",
"simple-git": "^2.35.0",
"simple-statistics": "^7.4.1",
"semver": "^7.3.5",
"simple-git": "^2.39.0",
"simple-statistics": "^7.7.0",
"split2": "^3.2.2",
"standard": "^16.0.3",
"stoppable": "^1.1.0",
"tap": "^14.11.0",
"tsd": "^0.14.0",
"tap": "^15.0.9",
"tsd": "^0.15.1",
"workq": "^3.0.0",
"xmlbuilder2": "^2.4.0"
"xmlbuilder2": "^2.4.1"
},
"dependencies": {
"debug": "^4.3.1",
"hpagent": "^0.1.1",
"ms": "^2.1.3",
"pump": "^3.0.0",
"secure-json-parse": "^2.3.1"
"secure-json-parse": "^2.4.0"
},
"license": "Apache-2.0",
"repository": {
@ -89,17 +90,17 @@
"url": "https://github.com/elastic/elasticsearch-js/issues"
},
"engines": {
"node": ">=10"
"node": ">=12"
},
"tsd": {
"directory": "test/types"
},
"tap": {
"esm": false,
"ts": false,
"jsx": false,
"flow": false,
"coverage": false,
"jobs-auto": true
"jobs-auto": true,
"check-coverage": false
}
}
}

View File

@ -0,0 +1,178 @@
/*
* 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'
const { join } = require('path')
const minimist = require('minimist')
const stream = require('stream')
const { promisify } = require('util')
const { createWriteStream, promises } = require('fs')
const rimraf = require('rimraf')
const fetch = require('node-fetch')
const crossZip = require('cross-zip')
const ora = require('ora')
const { mkdir, writeFile } = promises
const pipeline = promisify(stream.pipeline)
const unzip = promisify(crossZip.unzip)
const rm = promisify(rimraf)
const esFolder = join(__dirname, '..', 'elasticsearch')
const zipFolder = join(esFolder, 'artifacts.zip')
const specFolder = join(esFolder, 'rest-api-spec', 'api')
const freeTestFolder = join(esFolder, 'rest-api-spec', 'test', 'free')
const xPackTestFolder = join(esFolder, 'rest-api-spec', 'test', 'platinum')
const artifactInfo = join(esFolder, 'info.json')
async function downloadArtifacts (opts) {
if (typeof opts.version !== 'string') {
throw new Error('Missing version')
}
const log = ora('Checking out spec and test').start()
log.text = 'Resolving versions'
let resolved
try {
resolved = await resolve(opts.version, opts.hash)
} catch (err) {
log.fail(err.message)
process.exit(1)
}
opts.id = opts.id || resolved.id
opts.hash = opts.hash || resolved.hash
opts.version = resolved.version
const info = loadInfo()
if (info && info.version === opts.version) {
if (info.hash === opts.hash && info.id === opts.id) {
log.succeed('The artifact copy present locally is already up to date')
return
}
}
log.text = 'Cleanup checkouts/elasticsearch'
await rm(esFolder)
await mkdir(esFolder, { recursive: true })
log.text = 'Downloading artifacts'
const response = await fetch(resolved.url)
if (!response.ok) {
log.fail(`unexpected response ${response.statusText}`)
process.exit(1)
}
await pipeline(response.body, createWriteStream(zipFolder))
log.text = 'Unzipping'
await unzip(zipFolder, esFolder)
log.text = 'Cleanup'
await rm(zipFolder)
log.text = 'Update info'
await writeFile(artifactInfo, JSON.stringify(opts), 'utf8')
log.succeed('Done')
}
function loadInfo () {
try {
return require(artifactInfo)
} catch (err) {
return null
}
}
async function resolve (version, hash) {
const response = await fetch(`https://artifacts-api.elastic.co/v1/versions/${version}`)
if (!response.ok) {
throw new Error(`unexpected response ${response.statusText}`)
}
const data = await response.json()
const esBuilds = data.version.builds
.filter(build => build.projects.elasticsearch != null)
.map(build => {
return {
projects: build.projects.elasticsearch,
buildId: build.build_id,
date: build.start_time,
version: build.version
}
})
.sort((a, b) => {
const dA = new Date(a.date)
const dB = new Date(b.date)
if (dA > dB) return -1
if (dA < dB) return 1
return 0
})
if (hash != null) {
const build = esBuilds.find(build => build.projects.commit_hash === hash)
if (!build) {
throw new Error(`Can't find any build with hash '${hash}'`)
}
const zipKey = Object.keys(build.projects.packages).find(key => key.startsWith('rest-resources-zip-') && key.endsWith('.zip'))
return {
url: build.projects.packages[zipKey].url,
id: build.buildId,
hash: build.projects.commit_hash,
version: build.version
}
}
const lastBuild = esBuilds[0]
const zipKey = Object.keys(lastBuild.projects.packages).find(key => key.startsWith('rest-resources-zip-') && key.endsWith('.zip'))
return {
url: lastBuild.projects.packages[zipKey].url,
id: lastBuild.buildId,
hash: lastBuild.projects.commit_hash,
version: lastBuild.version
}
}
async function main (options) {
delete options._
await downloadArtifacts(options)
}
if (require.main === module) {
process.on('unhandledRejection', function (err) {
console.error(err)
process.exit(1)
})
const options = minimist(process.argv.slice(2), {
string: ['id', 'version', 'hash']
})
main(options).catch(t => {
console.log(t)
process.exit(2)
})
}
module.exports = downloadArtifacts
module.exports.locations = {
specFolder,
freeTestFolder,
xPackTestFolder
}

View File

@ -20,115 +20,98 @@
'use strict'
const { join } = require('path')
const { readdirSync, readFileSync, writeFileSync } = require('fs')
const { readdirSync, writeFileSync, readFileSync } = require('fs')
const minimist = require('minimist')
const semver = require('semver')
const ora = require('ora')
const rimraf = require('rimraf')
const standard = require('standard')
const downloadArtifacts = require('./download-artifacts')
const {
generate,
cloneAndCheckout,
genFactory,
generateRequestTypes,
generateDocs
generateDocs,
generateRequestTypes
} = require('./utils')
start(minimist(process.argv.slice(2), {
string: ['tag', 'branch']
string: ['version', 'hash']
}))
function start (opts) {
const log = ora('Loading Elasticsearch Repository').start()
if (opts.branch == null && semver.valid(opts.tag) === null) {
log.fail(`Missing or invalid tag: ${opts.tag}`)
return
if (opts.version == null) {
console.error('Missing version parameter')
process.exit(1)
}
const packageFolder = join(__dirname, '..', 'api')
const apiOutputFolder = join(packageFolder, 'api')
const mainOutputFile = join(packageFolder, 'index.js')
const typeDefFile = join(__dirname, '..', 'index.d.ts')
const kibanaTypeDefFile = join(packageFolder, 'kibana.d.ts')
const docOutputFile = join(__dirname, '..', 'docs', 'reference.asciidoc')
const typeDefFile = join(__dirname, '..', 'index.d.ts')
const requestParamsOutputFile = join(packageFolder, 'requestParams.d.ts')
log.text = 'Cleaning API folder...'
rimraf.sync(join(apiOutputFolder, '*.js'))
let log
downloadArtifacts({ version: opts.version, hash: opts.hash })
.then(onArtifactsDownloaded)
.catch(err => {
console.log(err)
process.exit(1)
})
cloneAndCheckout({ log, tag: opts.tag, branch: opts.branch }, (err, { apiFolder, xPackFolder }) => {
if (err) {
log.fail(err.message)
return
}
function onArtifactsDownloaded () {
log = ora('Generating APIs').start()
const apiFolderContents = readdirSync(apiFolder)
const xPackFolderContents = readdirSync(xPackFolder)
.filter(file => !file.startsWith('data_frame_transform_deprecated'))
log.text = 'Cleaning API folder...'
rimraf.sync(join(apiOutputFolder, '*.js'))
const allSpec = apiFolderContents.concat(xPackFolderContents)
const allSpec = readdirSync(downloadArtifacts.locations.specFolder)
.filter(file => file !== '_common.json')
.filter(file => !file.includes('deprecated'))
.sort()
.map(file => {
try {
return JSON.parse(readFileSync(join(apiFolder, file), 'utf8'))
} catch (err) {
return JSON.parse(readFileSync(join(xPackFolder, file), 'utf8'))
}
})
.map(file => require(join(downloadArtifacts.locations.specFolder, file)))
const namespaces = namespacify(apiFolderContents.concat(xPackFolderContents))
const namespaces = namespacify(readdirSync(downloadArtifacts.locations.specFolder))
for (const namespace in namespaces) {
if (namespace === '_common') continue
const code = generate(namespace, namespaces[namespace], { apiFolder, xPackFolder }, opts.branch || opts.tag)
const code = generate(namespace, namespaces[namespace], downloadArtifacts.locations.specFolder, opts.version)
const filePath = join(apiOutputFolder, `${namespace}.js`)
writeFileSync(filePath, code, { encoding: 'utf8' })
}
writeFileSync(
requestParamsOutputFile,
generateRequestTypes(opts.branch || opts.tag, allSpec),
generateRequestTypes(opts.version, allSpec),
{ encoding: 'utf8' }
)
const { fn: factory, types, kibanaTypes } = genFactory(apiOutputFolder, [apiFolder, xPackFolder], namespaces)
const { fn: factory, types } = genFactory(apiOutputFolder, downloadArtifacts.locations.specFolder, namespaces)
writeFileSync(
mainOutputFile,
factory,
{ encoding: 'utf8' }
)
let oldTypeDefString = readFileSync(typeDefFile, 'utf8')
let start = oldTypeDefString.indexOf('/* GENERATED */')
let end = oldTypeDefString.indexOf('/* /GENERATED */')
let newTypeDefString = oldTypeDefString.slice(0, start + 15) + '\n' + types + '\n ' + oldTypeDefString.slice(end)
const oldTypeDefString = readFileSync(typeDefFile, 'utf8')
const start = oldTypeDefString.indexOf('/* GENERATED */')
const end = oldTypeDefString.indexOf('/* /GENERATED */')
const newTypeDefString = oldTypeDefString.slice(0, start + 15) + '\n' + types + '\n ' + oldTypeDefString.slice(end)
writeFileSync(
typeDefFile,
newTypeDefString,
{ encoding: 'utf8' }
)
oldTypeDefString = readFileSync(kibanaTypeDefFile, 'utf8')
start = oldTypeDefString.indexOf('/* GENERATED */')
end = oldTypeDefString.indexOf('/* /GENERATED */')
newTypeDefString = oldTypeDefString.slice(0, start + 15) + '\n' + kibanaTypes + '\n ' + oldTypeDefString.slice(end)
writeFileSync(
kibanaTypeDefFile,
newTypeDefString,
{ encoding: 'utf8' }
)
lintFiles(log, () => {
log.text = 'Generating documentation'
writeFileSync(
docOutputFile,
generateDocs(require(join(apiFolder, '_common.json')), allSpec),
generateDocs(require(join(downloadArtifacts.locations.specFolder, '_common.json')), allSpec),
{ encoding: 'utf8' }
)
log.succeed('Done!')
})
})
}
function lintFiles (log, cb) {
log.text = 'Linting...'

View File

@ -30,6 +30,7 @@ async function release (opts) {
const originalName = packageJson.name
const originalVersion = packageJson.version
const currentCanaryVersion = packageJson.versionCanary
const originalTypes = packageJson.types
const originalNpmIgnore = await readFile(join(__dirname, '..', '.npmignore'), 'utf8')
const newCanaryInteger = opts.reset ? 1 : (Number(currentCanaryVersion.split('-')[1].split('.')[1]) + 1)
@ -39,12 +40,13 @@ async function release (opts) {
packageJson.name = '@elastic/elasticsearch-canary'
packageJson.version = newCanaryVersion
packageJson.versionCanary = newCanaryVersion
packageJson.types = './api/new.d.ts'
packageJson.commitHash = execSync('git log -1 --pretty=format:%h').toString()
// update the package.json
await writeFile(
join(__dirname, '..', 'package.json'),
JSON.stringify(packageJson, null, 2),
JSON.stringify(packageJson, null, 2) + '\n',
'utf8'
)
@ -72,11 +74,12 @@ async function release (opts) {
// restore the package.json to the original values
packageJson.name = originalName
packageJson.version = originalVersion
packageJson.types = originalTypes
delete packageJson.commitHash
await writeFile(
join(__dirname, '..', 'package.json'),
JSON.stringify(packageJson, null, 2),
JSON.stringify(packageJson, null, 2) + '\n',
'utf8'
)

View File

@ -25,7 +25,6 @@
const { join } = require('path')
const dedent = require('dedent')
const semver = require('semver')
const allowedMethods = {
noBody: ['GET', 'HEAD', 'DELETE'],
body: ['POST', 'PUT', 'DELETE']
@ -60,8 +59,8 @@ const noPathValidation = [
'update'
]
function generateNamespace (namespace, nested, folders, version) {
const common = require(join(folders.apiFolder, '_common.json'))
function generateNamespace (namespace, nested, specFolder, version) {
const common = require(join(specFolder, '_common.json'))
let code = dedent`
/*
* Licensed to Elasticsearch B.V. under one or more contributor
@ -99,7 +98,7 @@ function generateNamespace (namespace, nested, folders, version) {
getters += `${n}: { get () { return this.${nameSnaked} } },\n`
}
}
const api = generateMultiApi(version, namespace, nested, common, folders)
const api = generateMultiApi(version, namespace, nested, common, specFolder)
if (getters.length > 0) {
getters = `Object.defineProperties(${api.namespace}Api.prototype, {\n${getters}})`
}
@ -120,12 +119,7 @@ function generateNamespace (namespace, nested, folders, version) {
module.exports = ${api.namespace}Api
`
} else {
let spec = null
try {
spec = require(join(folders.apiFolder, `${namespace}.json`))
} catch (err) {
spec = require(join(folders.xPackFolder, `${namespace}.json`))
}
const spec = require(join(specFolder, `${namespace}.json`))
const api = generateSingleApi(version, spec, common)
code += `
const acceptedQuerystring = ${JSON.stringify(api.acceptedQuerystring)}
@ -139,7 +133,7 @@ function generateNamespace (namespace, nested, folders, version) {
return code
}
function generateMultiApi (version, namespace, nested, common, folders) {
function generateMultiApi (version, namespace, nested, common, specFolder) {
const namespaceSnaked = namespace
.replace(/\.([a-z])/g, k => k[1].toUpperCase())
.replace(/_([a-z])/g, k => k[1].toUpperCase())
@ -147,15 +141,10 @@ function generateMultiApi (version, namespace, nested, common, folders) {
const snakeCase = {}
const acceptedQuerystring = []
for (const n of nested) {
let spec = null
const nameSnaked = n
.replace(/\.([a-z])/g, k => k[1].toUpperCase())
.replace(/_([a-z])/g, k => k[1].toUpperCase())
try {
spec = require(join(folders.apiFolder, `${namespace}.${n}.json`))
} catch (err) {
spec = require(join(folders.xPackFolder, `${namespace}.${n}.json`))
}
const spec = require(join(specFolder, `${namespace}.${n}.json`))
const api = generateSingleApi(version, spec, common)
code += `${Uppercase(namespaceSnaked)}Api.prototype.${nameSnaked} = ${api.code}\n\n`
Object.assign(snakeCase, api.snakeCase)
@ -169,7 +158,7 @@ function generateMultiApi (version, namespace, nested, common, folders) {
}
function generateSingleApi (version, spec, common) {
const release = semver.valid(version) ? semver.major(version) : version
const release = version.charAt(0)
const api = Object.keys(spec)[0]
const name = api
.replace(/\.([a-z])/g, k => k[1].toUpperCase())

View File

@ -222,7 +222,7 @@ function generateApiDoc (spec) {
doc += `link:${documentationUrl}[Documentation] +\n`
}
if (codeExamples.includes(name)) {
doc += `{jsclient}/${name.replace(/\./g, '_')}_examples.html[Code Example] +\n`
doc += `<<${name.replace(/\./g, '_')}_examples,Code Example>> +\n`
}
if (params.length !== 0) {

View File

@ -27,11 +27,10 @@ const { join } = require('path')
const dedent = require('dedent')
const deepmerge = require('deepmerge')
function genFactory (folder, paths, namespaces) {
function genFactory (folder, specFolder, namespaces) {
// get all the API files
// const apiFiles = readdirSync(folder)
const apiFiles = readdirSync(paths[0])
.concat(readdirSync(paths[1]))
const apiFiles = readdirSync(specFolder)
.filter(file => file !== '_common.json')
.filter(file => !file.includes('deprecated'))
.sort()
@ -47,7 +46,7 @@ function genFactory (folder, paths, namespaces) {
.split('.')
.reverse()
.reduce((acc, val) => {
const spec = readSpec(paths, file.slice(0, -5))
const spec = readSpec(specFolder, file.slice(0, -5))
const isHead = isHeadMethod(spec, file.slice(0, -5))
const body = hasBody(spec, file.slice(0, -5))
const methods = acc === null ? buildMethodDefinition({ kibana: false }, val, name, body, isHead, spec) : null
@ -79,7 +78,7 @@ function genFactory (folder, paths, namespaces) {
.split('.')
.reverse()
.reduce((acc, val) => {
const spec = readSpec(paths, file.slice(0, -5))
const spec = readSpec(specFolder, file.slice(0, -5))
const isHead = isHeadMethod(spec, file.slice(0, -5))
const body = hasBody(spec, file.slice(0, -5))
const methods = acc === null ? buildMethodDefinition({ kibana: true }, val, name, body, isHead, spec) : null
@ -289,16 +288,12 @@ function isHeadMethod (spec, api) {
return methods.length === 1 && methods[0] === 'HEAD'
}
function readSpec (paths, file) {
function readSpec (specFolder, file) {
try {
return require(join(paths[0], file))
} catch (err) {}
try {
return require(join(paths[1], file))
} catch (err) {}
throw new Error(`Cannot read spec file ${file}`)
return require(join(specFolder, file))
} catch (err) {
throw new Error(`Cannot read spec file ${file}`)
}
}
module.exports = genFactory

View File

@ -21,11 +21,10 @@
'use strict'
const semver = require('semver')
const deprecatedParameters = require('./patch.json')
function generate (version, api) {
const release = semver.valid(version) ? semver.major(version) : version
const release = version.charAt(0)
let types = `/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with

View File

@ -20,15 +20,15 @@
'use strict'
const generate = require('./generateApis')
const generateRequestTypes = require('./generateRequestTypes')
const cloneAndCheckout = require('./clone-es')
const genFactory = require('./generateMain')
const generateDocs = require('./generateDocs')
const generateRequestTypes = require('./generateRequestTypes')
module.exports = {
generate,
cloneAndCheckout,
genFactory,
generateRequestTypes,
generateDocs
generateDocs,
generateRequestTypes
}

View File

@ -7,7 +7,7 @@
"_source_includes": "_source_include",
"_source_excludes": "_source_exclude"
},
"master": {
"8": {
"_source_includes": "_source_include",
"_source_excludes": "_source_exclude"
}

View File

@ -21,7 +21,7 @@
const { test } = require('tap')
const intoStream = require('into-stream')
const { Client, Connection, events } = require('../../index')
const { Connection, events } = require('../../index')
const {
TimeoutError,
ConnectionError,
@ -31,6 +31,7 @@ const {
DeserializationError
} = require('../../lib/errors')
const {
Client,
buildServer,
connection: {
MockConnection,
@ -57,27 +58,27 @@ test('No errors', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.DESERIALIZATION)
t.equal(order.shift(), events.DESERIALIZATION)
})
client.on(events.RESPONSE, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.error(err)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -99,12 +100,12 @@ test('Connection error', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (_err, request) => {
@ -113,12 +114,12 @@ test('Connection error', t => {
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof ConnectionError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.ok(err instanceof ConnectionError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -140,12 +141,12 @@ test('TimeoutError error', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (_err, request) => {
@ -154,12 +155,12 @@ test('TimeoutError error', t => {
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof TimeoutError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.ok(err instanceof TimeoutError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -180,12 +181,12 @@ test('RequestAbortedError error', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (_err, request) => {
@ -194,12 +195,12 @@ test('RequestAbortedError error', t => {
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof RequestAbortedError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
const request = client.info((err, result) => {
t.ok(err instanceof RequestAbortedError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
request.abort()
@ -232,27 +233,27 @@ test('ResponseError error (no retry)', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.DESERIALIZATION)
t.equal(order.shift(), events.DESERIALIZATION)
})
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof ResponseError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.ok(err instanceof ResponseError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -285,27 +286,27 @@ test('ResponseError error (with retry)', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.DESERIALIZATION)
t.equal(order.shift(), events.DESERIALIZATION)
})
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof ResponseError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.ok(err instanceof ResponseError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -325,12 +326,12 @@ test('Serialization Error', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.ok(err instanceof SerializationError)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (_err, request) => {
@ -345,7 +346,7 @@ test('Serialization Error', t => {
body.o = body
client.index({ index: 'test', body }, (err, result) => {
t.ok(err instanceof SerializationError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -384,27 +385,27 @@ test('Deserialization Error', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.DESERIALIZATION)
t.equal(order.shift(), events.DESERIALIZATION)
})
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof DeserializationError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.ok(err instanceof DeserializationError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
})
})
@ -435,27 +436,27 @@ test('Socket destroyed while reading the body', t => {
client.on(events.SERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.SERIALIZATION)
t.equal(order.shift(), events.SERIALIZATION)
})
client.on(events.REQUEST, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.REQUEST)
t.equal(order.shift(), events.REQUEST)
})
client.on(events.DESERIALIZATION, (err, request) => {
t.error(err)
t.strictEqual(order.shift(), events.DESERIALIZATION)
t.equal(order.shift(), events.DESERIALIZATION)
})
client.on(events.RESPONSE, (err, request) => {
t.ok(err instanceof ConnectionError)
t.strictEqual(order.shift(), events.RESPONSE)
t.equal(order.shift(), events.RESPONSE)
})
client.info((err, result) => {
t.ok(err instanceof ConnectionError)
t.strictEqual(order.length, 0)
t.equal(order.length, 0)
server.stop()
})
})

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