Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e8b4183b8b | |||
| 486cba656a | |||
| 28e826d738 | |||
| 48068562d1 | |||
| 7cdbae220f | |||
| 48dcef4975 | |||
| b5a36f37ab | |||
| a31920b785 | |||
| 846c50b8bf | |||
| 5204faeb66 | |||
| 1a3504f1bb | |||
| 4a059fdc0c | |||
| c5dd4e96d4 | |||
| c9666e1778 | |||
| 1ee6a34e73 | |||
| 34bb7f5916 | |||
| 124753aea7 | |||
| e36b0e5374 | |||
| e5c88add07 | |||
| 75f31d974d | |||
| 177a420521 | |||
| c0f7fa503a | |||
| 93e2b8b695 | |||
| 9c092a0b30 | |||
| d161c0a428 | |||
| 8c7d4c42e6 | |||
| fbc4fa0685 | |||
| cb6084b7c3 | |||
| 35ce1bfef1 | |||
| 151aef2707 | |||
| 8579a85fde | |||
| be0400789a | |||
| e2905c5708 | |||
| f02c66cdcc | |||
| 8d868df86a | |||
| 5ebd549ad1 | |||
| 7f364b75b7 | |||
| fe0ddb31a1 | |||
| 955eb121fb | |||
| da1a798310 | |||
| 82c9e5df37 | |||
| 4e1273ef33 | |||
| dbd0ec2457 | |||
| fc7109aa66 | |||
| 758b745254 | |||
| 3f3e9bac1e | |||
| b3b9d40293 | |||
| 14cdd64f7d | |||
| 5d41135190 | |||
| e4c4f1acb7 | |||
| ad3caf9e94 | |||
| fcb421a54e | |||
| 71e6e7007a | |||
| dabe34dae8 | |||
| 346663f704 | |||
| 32345dac41 | |||
| 6efbed6be1 | |||
| 8be306b82d | |||
| 979475b542 | |||
| a829634f83 | |||
| dd9b38b051 | |||
| 0e98719d60 | |||
| 7da9976777 | |||
| 4ca358cad6 | |||
| cf2eda1ab3 | |||
| 5d747eec0c | |||
| f38cbde243 | |||
| 61c18a6ba5 | |||
| 432cd36879 | |||
| e7de86a1f2 | |||
| f23f77cc41 | |||
| 09b5c84d24 | |||
| 604d4aefa7 | |||
| e279b3ebfa |
@ -1,17 +1,20 @@
|
||||
---
|
||||
agents:
|
||||
provider: "gcp"
|
||||
image: family/core-ubuntu-2204
|
||||
memory: "8G"
|
||||
cpu: "2"
|
||||
|
||||
steps:
|
||||
- label: ":elasticsearch: :javascript: ES JavaScript ({{ matrix.nodejs }}) Test Suite: {{ matrix.suite }}"
|
||||
agents:
|
||||
provider: "gcp"
|
||||
- label: ":elasticsearch: :javascript: ES JavaScript ({{ matrix.nodejs }})"
|
||||
env:
|
||||
NODE_VERSION: "{{ matrix.nodejs }}"
|
||||
TEST_SUITE: "{{ matrix.suite }}"
|
||||
STACK_VERSION: 8.16.0
|
||||
TEST_SUITE: "platinum"
|
||||
STACK_VERSION: 9.0.0
|
||||
GITHUB_TOKEN_PATH: "secret/ci/elastic-elasticsearch-js/github-token"
|
||||
TEST_ES_STACK: "1"
|
||||
matrix:
|
||||
setup:
|
||||
suite:
|
||||
- "free"
|
||||
- "platinum"
|
||||
nodejs:
|
||||
- "18"
|
||||
- "20"
|
||||
@ -21,9 +24,6 @@ steps:
|
||||
- wait: ~
|
||||
continue_on_failure: true
|
||||
- label: ":junit: Test results"
|
||||
agents:
|
||||
provider: "gcp"
|
||||
image: family/core-ubuntu-2204
|
||||
plugins:
|
||||
- junit-annotate#v2.4.1:
|
||||
artifacts: "junit-output/junit-*.xml"
|
||||
|
||||
@ -10,22 +10,29 @@ export NODE_VERSION=${NODE_VERSION:-18}
|
||||
|
||||
echo "--- :javascript: Building Docker image"
|
||||
docker build \
|
||||
--file "$script_path/Dockerfile" \
|
||||
--tag elastic/elasticsearch-js \
|
||||
--build-arg NODE_VERSION="$NODE_VERSION" \
|
||||
.
|
||||
--file "$script_path/Dockerfile" \
|
||||
--tag elastic/elasticsearch-js \
|
||||
--build-arg NODE_VERSION="$NODE_VERSION" \
|
||||
.
|
||||
|
||||
echo "--- :javascript: Running $TEST_SUITE tests"
|
||||
GITHUB_TOKEN=$(vault read -field=token "$GITHUB_TOKEN_PATH")
|
||||
export GITHUB_TOKEN
|
||||
|
||||
echo "--- :javascript: Running tests"
|
||||
mkdir -p "$repo/junit-output"
|
||||
docker run \
|
||||
--network="${network_name}" \
|
||||
--env "TEST_ES_SERVER=${elasticsearch_url}" \
|
||||
--env "ELASTIC_PASSWORD=${elastic_password}" \
|
||||
--env "TEST_SUITE=${TEST_SUITE}" \
|
||||
--env "ELASTIC_USER=elastic" \
|
||||
--env "BUILDKITE=true" \
|
||||
--volume "$repo/junit-output:/junit-output" \
|
||||
--name elasticsearch-js \
|
||||
--rm \
|
||||
elastic/elasticsearch-js \
|
||||
bash -c "npm run test:integration; [ -f ./$TEST_SUITE-report-junit.xml ] && mv ./$TEST_SUITE-report-junit.xml /junit-output/junit-$BUILDKITE_JOB_ID.xml || echo 'No JUnit artifact found'"
|
||||
--network="${network_name}" \
|
||||
--env TEST_ES_STACK \
|
||||
--env STACK_VERSION \
|
||||
--env GITHUB_TOKEN \
|
||||
--env "TEST_ES_SERVER=${elasticsearch_url}" \
|
||||
--env "ELASTIC_PASSWORD=${elastic_password}" \
|
||||
--env "ELASTIC_USER=elastic" \
|
||||
--env "BUILDKITE=true" \
|
||||
--volume "/usr/src/app/node_modules" \
|
||||
--volume "$repo:/usr/src/app" \
|
||||
--volume "$repo/junit-output:/junit-output" \
|
||||
--name elasticsearch-js \
|
||||
--rm \
|
||||
elastic/elasticsearch-js \
|
||||
bash -c "npm run test:integration; [ -f ./report-junit.xml ] && mv ./report-junit.xml /junit-output/junit-$BUILDKITE_JOB_ID.xml || echo 'No JUnit artifact found'"
|
||||
|
||||
@ -6,3 +6,6 @@ elasticsearch
|
||||
lib
|
||||
junit-output
|
||||
.tap
|
||||
rest-api-spec
|
||||
yaml-rest-tests
|
||||
generated-tests
|
||||
|
||||
2
.github/make.sh
vendored
2
.github/make.sh
vendored
@ -65,7 +65,7 @@ codegen)
|
||||
if [ -v "$VERSION" ] || [[ -z "$VERSION" ]]; then
|
||||
# fall back to branch name or `main` if no VERSION is set
|
||||
branch_name=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [[ "$branch_name" =~ ^[0-9]+\.[0-9]+ ]]; then
|
||||
if [[ "$branch_name" =~ ^[0-9]+\.([0-9]+|x) ]]; then
|
||||
echo -e "\033[36;1mTARGET: codegen -> No VERSION argument found, using branch name: \`$branch_name\`\033[0m"
|
||||
VERSION="$branch_name"
|
||||
else
|
||||
|
||||
26
.github/workflows/nodejs.yml
vendored
26
.github/workflows/nodejs.yml
vendored
@ -11,10 +11,10 @@ jobs:
|
||||
outputs:
|
||||
src-only: "${{ steps.changes.outputs.src-only }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: dorny/paths-filter/@v3.0.2
|
||||
- uses: dorny/paths-filter/@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
@ -36,12 +36,12 @@ jobs:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
@ -66,12 +66,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
||||
with:
|
||||
node-version: 22.x
|
||||
|
||||
@ -96,12 +96,12 @@ jobs:
|
||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Use Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
@ -118,13 +118,3 @@ jobs:
|
||||
- name: ECMAScript module test
|
||||
run: |
|
||||
bun run test:esm
|
||||
|
||||
auto-approve:
|
||||
name: Auto-approve
|
||||
needs: [test, license]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
if: github.actor == 'elasticmachine'
|
||||
steps:
|
||||
- uses: hmarr/auto-approve-action@v4
|
||||
|
||||
4
.github/workflows/npm-publish.yml
vendored
4
.github/workflows/npm-publish.yml
vendored
@ -12,11 +12,11 @@ jobs:
|
||||
contents: write
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
ref: ${{ github.event.inputs.branch }}
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
||||
with:
|
||||
node-version: "22.x"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
6
.github/workflows/serverless-patch.yml
vendored
6
.github/workflows/serverless-patch.yml
vendored
@ -26,14 +26,14 @@ jobs:
|
||||
)
|
||||
)
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
repository: elastic/elasticsearch-js
|
||||
ref: main
|
||||
path: stack
|
||||
fetch-depth: 0
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
repository: elastic/elasticsearch-serverless-js
|
||||
@ -42,7 +42,7 @@ jobs:
|
||||
- name: Apply patch from stack to serverless
|
||||
id: apply-patch
|
||||
run: $GITHUB_WORKSPACE/stack/.github/workflows/serverless-patch.sh
|
||||
- uses: peter-evans/create-pull-request@v6
|
||||
- uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
path: serverless
|
||||
|
||||
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8
|
||||
with:
|
||||
stale-issue-label: stale
|
||||
stale-pr-label: stale
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -68,3 +68,7 @@ bun.lockb
|
||||
test-results
|
||||
processinfo
|
||||
.tap
|
||||
rest-api-spec
|
||||
yaml-rest-tests
|
||||
generated-tests
|
||||
schema
|
||||
|
||||
@ -74,3 +74,6 @@ CONTRIBUTING.md
|
||||
src
|
||||
bun.lockb
|
||||
.tap
|
||||
rest-api-spec
|
||||
yaml-rest-tests
|
||||
generated-tests
|
||||
|
||||
@ -42,6 +42,9 @@ spec:
|
||||
main:
|
||||
branch: "main"
|
||||
cronline: "@daily"
|
||||
8_14:
|
||||
branch: "8.14"
|
||||
8_x:
|
||||
branch: "8.x"
|
||||
cronline: "@daily"
|
||||
8_14:
|
||||
branch: "8.16"
|
||||
cronline: "@daily"
|
||||
|
||||
@ -167,16 +167,19 @@ const client = new Client({
|
||||
----
|
||||
|
||||
|`nodeFilter`
|
||||
a|`function` - Filters which node not to use for a request. +
|
||||
a|`function` - Takes a `Connection` and returns `true` if it can be sent a request, otherwise `false`. +
|
||||
_Default:_
|
||||
[source,js]
|
||||
----
|
||||
function defaultNodeFilter (node) {
|
||||
// avoid master only nodes
|
||||
if (node.roles.master === true &&
|
||||
node.roles.data === false &&
|
||||
node.roles.ingest === false) {
|
||||
return false
|
||||
function defaultNodeFilter (conn) {
|
||||
if (conn.roles != null) {
|
||||
if (
|
||||
// avoid master-only nodes
|
||||
conn.roles.master &&
|
||||
!conn.roles.data &&
|
||||
!conn.roles.ingest &&
|
||||
!conn.roles.ml
|
||||
) return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
@ -2,20 +2,58 @@
|
||||
== Release notes
|
||||
|
||||
[discrete]
|
||||
=== 8.16.4
|
||||
=== 8.18.2
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Improved support for Elasticsearch `v8.16`
|
||||
===== Ensure Apache Arrow ES|QL helper uses async iterator
|
||||
|
||||
Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
|
||||
The `esql.toArrowReader()` helper function was trying to return `RecordBatchStreamReader`, a synchronous iterator, despite the fact that the `apache-arrow` package was, in most cases, automatically coercing it to `AsyncRecordBatchStreamReader`, its asynchronous counterpart. It now is always returned as an async iterator.
|
||||
|
||||
[discrete]
|
||||
===== Report correct transport connection type in telemetry
|
||||
=== 8.18.1
|
||||
|
||||
The client's telemetry reporting mechanism was incorrectly reporting all traffic as using `HttpConnection` when the default is `UndiciConnection`. https://github.com/elastic/elasticsearch-js/issues/2324[#2324]
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Fix broken node roles and node filter
|
||||
|
||||
The docs note a `nodeFilter` option on the client that will, by default, filter the nodes based on any `roles` values that are set at instantition. At some point, this functionality was partially disabled. This brings the feature back, ensuring that it matches what the documentation has said it does all along.
|
||||
|
||||
[discrete]
|
||||
=== 8.18.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.18`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.18/release-notes-8.18.0.html[here].
|
||||
|
||||
[discrete]
|
||||
==== Fixes
|
||||
|
||||
[discrete]
|
||||
===== Improved Cloud ID parsing
|
||||
|
||||
When using a Cloud ID as the `cloud` parameter to instantiate the client, that ID was assumed to be in the correct format. New assertions have been added to verify that format and throw a `ConfigurationError` if it is invalid. See https://github.com/elastic/elasticsearch-js/issues/2694[#2694].
|
||||
|
||||
[discrete]
|
||||
=== 8.17.0
|
||||
|
||||
[discrete]
|
||||
==== Features
|
||||
|
||||
[discrete]
|
||||
===== Support for Elasticsearch `v8.17`
|
||||
|
||||
You can find all the API changes
|
||||
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/release-notes-8.17.0.html[here].
|
||||
|
||||
[discrete]
|
||||
=== 8.16.3
|
||||
|
||||
@ -3,11 +3,17 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQuery({
|
||||
format: "json",
|
||||
query:
|
||||
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_query/async",
|
||||
querystring: {
|
||||
format: "json",
|
||||
},
|
||||
body: {
|
||||
query:
|
||||
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,20 +3,23 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my-app",
|
||||
params: {
|
||||
query_string: "my first query",
|
||||
text_fields: [
|
||||
{
|
||||
name: "title",
|
||||
boost: 5,
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
boost: 1,
|
||||
},
|
||||
],
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/search_application/my-app/_render_query",
|
||||
body: {
|
||||
params: {
|
||||
query_string: "my first query",
|
||||
text_fields: [
|
||||
{
|
||||
name: "title",
|
||||
boost: 5,
|
||||
},
|
||||
{
|
||||
name: "description",
|
||||
boost: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.chatCompletionUnified({
|
||||
inference_id: "openai-completion",
|
||||
chat_completion_request: {
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_inference/chat_completion/openai-completion/_stream",
|
||||
body: {
|
||||
model: "gpt-4o",
|
||||
messages: [
|
||||
{
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: {
|
||||
settings_override: {
|
||||
index: {
|
||||
number_of_shards: 5,
|
||||
},
|
||||
},
|
||||
mappings_override: {
|
||||
properties: {
|
||||
field2: {
|
||||
type: "boolean",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,7 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.sparseEmbedding({
|
||||
const response = await client.inference.inference({
|
||||
task_type: "sparse_embedding",
|
||||
inference_id: "my-elser-model",
|
||||
input:
|
||||
"The sky above the port was the color of television tuned to a dead channel.",
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.update({
|
||||
inference_id: "my-inference-endpoint",
|
||||
const response = await client.inference.put({
|
||||
task_type: "my-inference-endpoint",
|
||||
inference_id: "_update",
|
||||
inference_config: {
|
||||
service_settings: {
|
||||
api_key: "<API_KEY>",
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.cancelMigrateReindex({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,12 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.delegatePki({
|
||||
x509_certificate_chain: [
|
||||
"MIIDeDCCAmCgAwIBAgIUBzj/nGGKxP2iXawsSquHmQjCJmMwDQYJKoZIhvcNAQELBQAwUzErMCkGA1UEAxMiRWxhc3RpY3NlYXJjaCBUZXN0IEludGVybWVkaWF0ZSBDQTEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMB4XDTIzMDcxODE5MjkwNloXDTQzMDcxMzE5MjkwNlowSjEiMCAGA1UEAxMZRWxhc3RpY3NlYXJjaCBUZXN0IENsaWVudDEWMBQGA1UECxMNRWxhc3RpY3NlYXJjaDEMMAoGA1UEChMDb3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAllHL4pQkkfwAm/oLkxYYO+r950DEy1bjH+4viCHzNADLCTWO+lOZJVlNx7QEzJE3QGMdif9CCBBxQFMapA7oUFCLq84fPSQQu5AnvvbltVD9nwVtCs+9ZGDjMKsz98RhSLMFIkxdxi6HkQ3Lfa4ZSI4lvba4oo+T/GveazBDS+NgmKyq00EOXt3tWi1G9vEVItommzXWfv0agJWzVnLMldwkPqsw0W7zrpyT7FZS4iLbQADGceOW8fiauOGMkscu9zAnDR/SbWl/chYioQOdw6ndFLn1YIFPd37xL0WsdsldTpn0vH3YfzgLMffT/3P6YlwBegWzsx6FnM/93Ecb4wIDAQABo00wSzAJBgNVHRMEAjAAMB0GA1UdDgQWBBQKNRwjW+Ad/FN1Rpoqme/5+jrFWzAfBgNVHSMEGDAWgBRcya0c0x/PaI7MbmJVIylWgLqXNjANBgkqhkiG9w0BAQsFAAOCAQEACZ3PF7Uqu47lplXHP6YlzYL2jL0D28hpj5lGtdha4Muw1m/BjDb0Pu8l0NQ1z3AP6AVcvjNDkQq6Y5jeSz0bwQlealQpYfo7EMXjOidrft1GbqOMFmTBLpLA9SvwYGobSTXWTkJzonqVaTcf80HpMgM2uEhodwTcvz6v1WEfeT/HMjmdIsq4ImrOL9RNrcZG6nWfw0HR3JNOgrbfyEztEI471jHznZ336OEcyX7gQuvHE8tOv5+oD1d7s3Xg1yuFp+Ynh+FfOi3hPCuaHA+7F6fLmzMDLVUBAllugst1C3U+L/paD7tqIa4ka+KNPCbSfwazmJrt4XNiivPR4hwH5g==",
|
||||
],
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,23 +3,27 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.migrateReindex({
|
||||
reindex: {
|
||||
source: {
|
||||
index: "my-data-stream",
|
||||
},
|
||||
mode: "upgrade",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,10 +3,14 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcLogout({
|
||||
token:
|
||||
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
|
||||
refresh_token: "vLBPvmAB6KvwvJZr27cS",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/logout",
|
||||
body: {
|
||||
token:
|
||||
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
|
||||
refresh_token: "vLBPvmAB6KvwvJZr27cS",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQueryGet({
|
||||
id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
|
||||
wait_for_completion_timeout: "30s",
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
|
||||
querystring: {
|
||||
wait_for_completion_timeout: "30s",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: {
|
||||
settings_override: {
|
||||
index: {
|
||||
"blocks.write": null,
|
||||
"blocks.read": null,
|
||||
"blocks.read_only": null,
|
||||
"blocks.read_only_allow_delete": null,
|
||||
"blocks.metadata": null,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,21 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.create({
|
||||
index: "semantic-embeddings",
|
||||
mappings: {
|
||||
properties: {
|
||||
semantic_text: {
|
||||
type: "semantic_text",
|
||||
},
|
||||
content: {
|
||||
type: "text",
|
||||
copy_to: "semantic_text",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,10 +3,14 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQuery({
|
||||
query:
|
||||
"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
|
||||
wait_for_completion_timeout: "2s",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_query/async",
|
||||
body: {
|
||||
query:
|
||||
"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
|
||||
wait_for_completion_timeout: "2s",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQueryGet({
|
||||
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.chatCompletionUnified({
|
||||
inference_id: "openai-completion",
|
||||
chat_completion_request: {
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_inference/chat_completion/openai-completion/_stream",
|
||||
body: {
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.getMigrateReindexStatus({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -6,11 +6,6 @@
|
||||
const response = await client.ml.startTrainedModelDeployment({
|
||||
model_id: "my_model",
|
||||
deployment_id: "my_model_for_search",
|
||||
adaptive_allocations: {
|
||||
enabled: true,
|
||||
min_number_of_allocations: 3,
|
||||
max_number_of_allocations: 10,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.streamCompletion({
|
||||
inference_id: "openai-completion",
|
||||
input: "What is Elastic?",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_inference/completion/openai-completion/_stream",
|
||||
body: {
|
||||
input: "What is Elastic?",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,10 +3,14 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
realm: "oidc1",
|
||||
state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
|
||||
nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/prepare",
|
||||
body: {
|
||||
realm: "oidc1",
|
||||
state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
|
||||
nonce: "zOBXLJGUooRrbLbQk5YCcyC8AXw3iloynvluYhZ5",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,11 +3,17 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQuery({
|
||||
format: "json",
|
||||
query:
|
||||
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_query/async",
|
||||
querystring: {
|
||||
format: "json",
|
||||
},
|
||||
body: {
|
||||
query:
|
||||
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
|
||||
include_ccs_metadata: true,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.getDataLifecycleStats({
|
||||
human: "true",
|
||||
pretty: "true",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,12 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,10 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQueryDelete({
|
||||
id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,8 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/api_key/_bulk_update",
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.textEmbedding({
|
||||
const response = await client.inference.inference({
|
||||
task_type: "text_embedding",
|
||||
inference_id: "my-cohere-endpoint",
|
||||
input:
|
||||
"The sky above the port was the color of television tuned to a dead channel.",
|
||||
|
||||
@ -3,31 +3,35 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.textStructure.findMessageStructure({
|
||||
messages: [
|
||||
"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
|
||||
"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]",
|
||||
"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]",
|
||||
"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]",
|
||||
"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled",
|
||||
"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled",
|
||||
"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled",
|
||||
"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]",
|
||||
"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]",
|
||||
"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized",
|
||||
"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...",
|
||||
],
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_text_structure/find_message_structure",
|
||||
body: {
|
||||
messages: [
|
||||
"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
|
||||
"[2024-03-05T10:52:41,038][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-url]",
|
||||
"[2024-03-05T10:52:41,042][INFO ][o.e.p.PluginsService ] [laptop] loaded module [rest-root]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-core]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-redact]",
|
||||
"[2024-03-05T10:52:41,043][INFO ][o.e.p.PluginsService ] [laptop] loaded module [ingest-user-agent]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-monitoring]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [repository-s3]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-analytics]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-ent-search]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-autoscaling]",
|
||||
"[2024-03-05T10:52:41,044][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-painless]]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [lang-expression]",
|
||||
"[2024-03-05T10:52:41,059][INFO ][o.e.p.PluginsService ] [laptop] loaded module [x-pack-eql]",
|
||||
"[2024-03-05T10:52:43,291][INFO ][o.e.e.NodeEnvironment ] [laptop] heap size [16gb], compressed ordinary object pointers [true]",
|
||||
"[2024-03-05T10:52:46,098][INFO ][o.e.x.s.Security ] [laptop] Security is enabled",
|
||||
"[2024-03-05T10:52:47,227][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] Profiling is enabled",
|
||||
"[2024-03-05T10:52:47,259][INFO ][o.e.x.p.ProfilingPlugin ] [laptop] profiling index templates will not be installed or reinstalled",
|
||||
"[2024-03-05T10:52:47,755][INFO ][o.e.i.r.RecoverySettings ] [laptop] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]",
|
||||
"[2024-03-05T10:52:47,787][INFO ][o.e.d.DiscoveryModule ] [laptop] using discovery type [multi-node] and seed hosts providers [settings]",
|
||||
"[2024-03-05T10:52:49,188][INFO ][o.e.n.Node ] [laptop] initialized",
|
||||
"[2024-03-05T10:52:49,199][INFO ][o.e.n.Node ] [laptop] starting ...",
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.ingest.deleteIpLocationDatabase({
|
||||
id: "my-database-id",
|
||||
const response = await client.transport.request({
|
||||
method: "DELETE",
|
||||
path: "/_ingest/ip_location/database/my-database-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,26 +3,30 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {
|
||||
"role-a": {
|
||||
indices: [
|
||||
{
|
||||
names: ["*"],
|
||||
privileges: ["write"],
|
||||
},
|
||||
],
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/api_key/_bulk_update",
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {
|
||||
"role-a": {
|
||||
indices: [
|
||||
{
|
||||
names: ["*"],
|
||||
privileges: ["write"],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
metadata: {
|
||||
environment: {
|
||||
level: 2,
|
||||
trusted: true,
|
||||
tags: ["production"],
|
||||
metadata: {
|
||||
environment: {
|
||||
level: 2,
|
||||
trusted: true,
|
||||
tags: ["production"],
|
||||
},
|
||||
},
|
||||
expiration: "30d",
|
||||
},
|
||||
expiration: "30d",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.chatCompletionUnified({
|
||||
inference_id: "openai-completion",
|
||||
chat_completion_request: {
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_inference/chat_completion/openai-completion/_stream",
|
||||
body: {
|
||||
messages: [
|
||||
{
|
||||
role: "assistant",
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.ingest.putIpLocationDatabase({
|
||||
id: "my-database-1",
|
||||
configuration: {
|
||||
const response = await client.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_ingest/ip_location/database/my-database-1",
|
||||
body: {
|
||||
name: "GeoIP2-Domain",
|
||||
maxmind: {
|
||||
account_id: "1234567",
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.resolveCluster();
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.ingest.deleteIpLocationDatabase({
|
||||
id: "example-database-id",
|
||||
const response = await client.transport.request({
|
||||
method: "DELETE",
|
||||
path: "/_ingest/ip_location/database/example-database-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,10 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.searchApplication.postBehavioralAnalyticsEvent({
|
||||
collection_name: "my_analytics_collection",
|
||||
event_type: "search_click",
|
||||
payload: {
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/analytics/my_analytics_collection/event/search_click",
|
||||
body: {
|
||||
session: {
|
||||
id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9",
|
||||
},
|
||||
|
||||
@ -3,12 +3,16 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcAuthenticate({
|
||||
redirect_uri:
|
||||
"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
|
||||
realm: "oidc1",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/authenticate",
|
||||
body: {
|
||||
redirect_uri:
|
||||
"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
state: "4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
|
||||
nonce: "WaBPH0KqPVdG5HHdSxPRjfoZbXMCicm5v1OiAj0DUFM",
|
||||
realm: "oidc1",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,10 +3,13 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my_search_application",
|
||||
params: {
|
||||
query_string: "rock climbing",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/search_application/my_search_application/_render_query",
|
||||
body: {
|
||||
params: {
|
||||
query_string: "rock climbing",
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.cancelMigrateReindex({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -1,10 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.getMigrateReindexStatus({
|
||||
index: "my-data-stream",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.searchApplication.renderQuery({
|
||||
name: "my_search_application",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_application/search_application/my_search_application/_render_query",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.esql.asyncQueryStop({
|
||||
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,7 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.completion({
|
||||
const response = await client.inference.inference({
|
||||
task_type: "completion",
|
||||
inference_id: "openai_chat_completions",
|
||||
input: "What is Elastic?",
|
||||
});
|
||||
|
||||
@ -208,9 +208,13 @@ const response = await client.bulk({
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.textStructure.findFieldStructure({
|
||||
index: "test-logs",
|
||||
field: "message",
|
||||
const response1 = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_text_structure/find_field_structure",
|
||||
querystring: {
|
||||
index: "test-logs",
|
||||
field: "message",
|
||||
},
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
|
||||
@ -3,32 +3,36 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
uppercase: {
|
||||
field: "foo",
|
||||
},
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
uppercase: {
|
||||
field: "foo",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@ -3,9 +3,13 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.bulkUpdateApiKeys({
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {},
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/api_key/_bulk_update",
|
||||
body: {
|
||||
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
|
||||
role_descriptors: {},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,65 +3,69 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
set: {
|
||||
field: "field3",
|
||||
value: "value3",
|
||||
},
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "bar",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "id",
|
||||
_source: {
|
||||
foo: "rab",
|
||||
},
|
||||
},
|
||||
],
|
||||
pipeline_substitutions: {
|
||||
"my-pipeline": {
|
||||
processors: [
|
||||
{
|
||||
set: {
|
||||
field: "field3",
|
||||
value: "value3",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
component_template_substitutions: {
|
||||
"my-component-template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "true",
|
||||
properties: {
|
||||
field3: {
|
||||
type: "keyword",
|
||||
component_template_substitutions: {
|
||||
"my-component-template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "true",
|
||||
properties: {
|
||||
field3: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
index: {
|
||||
default_pipeline: "my-pipeline",
|
||||
},
|
||||
},
|
||||
},
|
||||
settings: {
|
||||
index: {
|
||||
default_pipeline: "my-pipeline",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
index_template_substitutions: {
|
||||
"my-index-template": {
|
||||
index_patterns: ["my-index-*"],
|
||||
composed_of: ["component_template_1", "component_template_2"],
|
||||
index_template_substitutions: {
|
||||
"my-index-template": {
|
||||
index_patterns: ["my-index-*"],
|
||||
composed_of: ["component_template_1", "component_template_2"],
|
||||
},
|
||||
},
|
||||
},
|
||||
mapping_addition: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
mapping_addition: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -3,9 +3,13 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
iss: "http://127.0.0.1:8080",
|
||||
login_hint: "this_is_an_opaque_string",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/prepare",
|
||||
body: {
|
||||
iss: "http://127.0.0.1:8080",
|
||||
login_hint: "this_is_an_opaque_string",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.ingest.putIpLocationDatabase({
|
||||
id: "my-database-2",
|
||||
configuration: {
|
||||
const response = await client.transport.request({
|
||||
method: "PUT",
|
||||
path: "/_ingest/ip_location/database/my-database-2",
|
||||
body: {
|
||||
name: "standard_location",
|
||||
ipinfo: {},
|
||||
},
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.ingest.getIpLocationDatabase({
|
||||
id: "my-database-id",
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_ingest/ip_location/database/my-database-id",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.getSettings();
|
||||
const response = await client.transport.request({
|
||||
method: "GET",
|
||||
path: "/_security/settings",
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.createFrom({
|
||||
source: "my-index",
|
||||
dest: "my-new-index",
|
||||
create_from: {
|
||||
remove_index_blocks: false,
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,8 +3,12 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.security.oidcPrepareAuthentication({
|
||||
realm: "oidc1",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_security/oidc/prepare",
|
||||
body: {
|
||||
realm: "oidc1",
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
|
||||
@ -3,34 +3,38 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.simulate.ingest({
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "foo",
|
||||
const response = await client.transport.request({
|
||||
method: "POST",
|
||||
path: "/_ingest/_simulate",
|
||||
body: {
|
||||
docs: [
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "123",
|
||||
_source: {
|
||||
foo: "foo",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
bar: "rab",
|
||||
{
|
||||
_index: "my-index",
|
||||
_id: "456",
|
||||
_source: {
|
||||
bar: "rab",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
component_template_substitutions: {
|
||||
"my-mappings_template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
bar: {
|
||||
type: "keyword",
|
||||
],
|
||||
component_template_substitutions: {
|
||||
"my-mappings_template": {
|
||||
template: {
|
||||
mappings: {
|
||||
dynamic: "strict",
|
||||
properties: {
|
||||
foo: {
|
||||
type: "keyword",
|
||||
},
|
||||
bar: {
|
||||
type: "keyword",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
// This file is autogenerated, DO NOT EDIT
|
||||
// Use `node scripts/generate-docs-examples.js` to generate the docs examples
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.indices.createFrom({
|
||||
source: ".ml-anomalies-custom-example",
|
||||
dest: ".reindexed-v9-ml-anomalies-custom-example",
|
||||
create_from: null,
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
@ -3,7 +3,8 @@
|
||||
|
||||
[source, js]
|
||||
----
|
||||
const response = await client.inference.rerank({
|
||||
const response = await client.inference.inference({
|
||||
task_type: "rerank",
|
||||
inference_id: "cohere_rerank",
|
||||
input: ["luke", "like", "leia", "chewy", "r2d2", "star", "wars"],
|
||||
query: "star wars main character",
|
||||
|
||||
@ -715,7 +715,7 @@ const result = await client.helpers
|
||||
|
||||
ES|QL can return results in multiple binary formats, including https://arrow.apache.org/[Apache Arrow]'s streaming format. Because it is a very efficient format to read, it can be valuable for performing high-performance in-memory analytics. And, because the response is streamed as batches of records, it can be used to produce aggregations and other calculations on larger-than-memory data sets.
|
||||
|
||||
`toArrowReader` returns a https://arrow.apache.org/docs/js/classes/Arrow_dom.RecordBatchReader.html[`RecordBatchStreamReader`].
|
||||
`toArrowReader` returns a https://github.com/apache/arrow/blob/520ae44272d491bbb52eb3c9b84864ed7088f11a/js/src/ipc/reader.ts#L216[`AsyncRecordBatchStreamReader`].
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
@ -724,7 +724,7 @@ const reader = await client.helpers
|
||||
.toArrowReader()
|
||||
|
||||
// print each record as JSON
|
||||
for (const recordBatch of reader) {
|
||||
for await (const recordBatch of reader) {
|
||||
for (const record of recordBatch) {
|
||||
console.log(record.toJSON())
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ client.diagnostic.on('request', (err, result) => {
|
||||
----
|
||||
|
||||
|`deserialization`
|
||||
a|Emitted before starting deserialization and decompression. If you want to measure this phase duration, you should measure the time elapsed between this event and `response`. _(This event might not be emitted in certain situations)_.
|
||||
a|Emitted before starting deserialization and decompression. If you want to measure this phase duration, you should measure the time elapsed between this event and `response`. This event might not be emitted in certain situations, like: when `asStream` is set to true; a response is terminated early due to content length being too large; or a response is terminated early by an `AbortController`.
|
||||
[source,js]
|
||||
----
|
||||
client.diagnostic.on('deserialization', (err, result) => {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
74
package.json
74
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@elastic/elasticsearch",
|
||||
"version": "8.16.4",
|
||||
"versionCanary": "8.16.4-canary.0",
|
||||
"version": "8.18.2",
|
||||
"versionCanary": "8.18.2-canary.0",
|
||||
"description": "The official Elasticsearch client for Node.js",
|
||||
"main": "./index.js",
|
||||
"types": "index.d.ts",
|
||||
@ -18,7 +18,8 @@
|
||||
"test:coverage-100": "npm run build && tap --coverage --100",
|
||||
"test:coverage-report": "npm run build && tap --coverage && nyc report --reporter=text-lcov > coverage.lcov",
|
||||
"test:coverage-ui": "npm run build && tap --coverage --coverage-report=html",
|
||||
"test:integration": "tsc && node test/integration/index.js",
|
||||
"test:integration-build": "npm run build && node test/integration/index.js",
|
||||
"test:integration": "npm run test:integration-build && env tap run --jobs=1 --reporter=junit --reporter-file=report-junit.xml generated-tests/",
|
||||
"lint": "ts-standard src",
|
||||
"lint:fix": "ts-standard --fix src",
|
||||
"license-checker": "license-checker --production --onlyAllow='MIT;Apache-2.0;Apache1.1;ISC;BSD-3-Clause;BSD-2-Clause;0BSD'",
|
||||
@ -56,42 +57,41 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@elastic/request-converter": "^8.16.1",
|
||||
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/ms": "^0.7.31",
|
||||
"@types/node": "^18.19.55",
|
||||
"@types/sinonjs__fake-timers": "^8.1.2",
|
||||
"@types/split2": "^3.2.1",
|
||||
"@types/stoppable": "^1.1.1",
|
||||
"@types/tap": "^15.0.7",
|
||||
"chai": "^4.3.7",
|
||||
"cross-zip": "^4.0.0",
|
||||
"desm": "^1.2.0",
|
||||
"into-stream": "^7.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"license-checker": "^25.0.1",
|
||||
"minimist": "^1.2.6",
|
||||
"ms": "^2.1.3",
|
||||
"node-abort-controller": "^3.0.1",
|
||||
"node-fetch": "^2.6.7",
|
||||
"ora": "^5.4.1",
|
||||
"proxy": "^1.0.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.7",
|
||||
"split2": "^4.1.0",
|
||||
"stoppable": "^1.1.0",
|
||||
"tap": "^21.0.1",
|
||||
"ts-node": "^10.7.0",
|
||||
"ts-standard": "^12.0.2",
|
||||
"typescript": "^4.6.4",
|
||||
"workq": "^3.0.0",
|
||||
"xmlbuilder2": "^3.0.2",
|
||||
"zx": "^7.2.2"
|
||||
"@elastic/request-converter": "8.17.0",
|
||||
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#48f089f",
|
||||
"@types/debug": "4.1.12",
|
||||
"@types/ms": "0.7.34",
|
||||
"@types/node": "22.10.7",
|
||||
"@types/sinonjs__fake-timers": "8.1.5",
|
||||
"@types/split2": "4.2.3",
|
||||
"@types/stoppable": "1.1.3",
|
||||
"chai": "5.1.2",
|
||||
"cross-zip": "4.0.1",
|
||||
"desm": "1.3.1",
|
||||
"into-stream": "8.0.1",
|
||||
"js-yaml": "4.1.0",
|
||||
"license-checker": "25.0.1",
|
||||
"minimist": "1.2.8",
|
||||
"ms": "2.1.3",
|
||||
"node-abort-controller": "3.1.1",
|
||||
"node-fetch": "2.7.0",
|
||||
"ora": "5.4.1",
|
||||
"proxy": "1.0.2",
|
||||
"rimraf": "5.0.10",
|
||||
"semver": "7.7.1",
|
||||
"split2": "4.2.0",
|
||||
"stoppable": "1.1.0",
|
||||
"tap": "21.0.1",
|
||||
"ts-node": "10.9.2",
|
||||
"ts-standard": "12.0.2",
|
||||
"typescript": "5.7.3",
|
||||
"workq": "3.0.0",
|
||||
"xmlbuilder2": "3.1.1",
|
||||
"zx": "7.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/transport": "^8.9.1",
|
||||
"apache-arrow": "^18.0.0",
|
||||
"@elastic/transport": "^8.9.6",
|
||||
"apache-arrow": "18.x - 19.x",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"tap": {
|
||||
|
||||
@ -17,162 +17,102 @@
|
||||
* 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 { rimraf } = require('rimraf')
|
||||
const fetch = require('node-fetch')
|
||||
const crossZip = require('cross-zip')
|
||||
const ora = require('ora')
|
||||
|
||||
const { mkdir, writeFile } = promises
|
||||
const { mkdir, cp } = 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')
|
||||
const testYamlFolder = join(__dirname, '..', 'yaml-rest-tests')
|
||||
const zipFile = join(__dirname, '..', 'elasticsearch-clients-tests.zip')
|
||||
|
||||
async function downloadArtifacts (opts) {
|
||||
if (typeof opts.version !== 'string') {
|
||||
throw new Error('Missing version')
|
||||
}
|
||||
const schemaFolder = join(__dirname, '..', 'schema')
|
||||
const schemaJson = join(schemaFolder, 'schema.json')
|
||||
|
||||
async function downloadArtifacts (localTests, version = 'main') {
|
||||
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)
|
||||
const { GITHUB_TOKEN } = process.env
|
||||
|
||||
if (version !== 'main') {
|
||||
version = version.split('.').slice(0, 2).join('.')
|
||||
}
|
||||
|
||||
opts.id = opts.id || resolved.id
|
||||
opts.hash = opts.hash || resolved.hash
|
||||
opts.version = resolved.version
|
||||
log.text = 'Clean tests folder'
|
||||
await rimraf(testYamlFolder)
|
||||
await mkdir(testYamlFolder, { recursive: true })
|
||||
|
||||
const info = loadInfo()
|
||||
log.text = `Fetch test YAML files for version ${version}`
|
||||
|
||||
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
|
||||
if (localTests) {
|
||||
log.text = `Copying local tests from ${localTests}`
|
||||
await cp(localTests, testYamlFolder, { recursive: true })
|
||||
} else {
|
||||
if (!GITHUB_TOKEN) {
|
||||
log.fail("Missing required environment variable 'GITHUB_TOKEN'")
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const response = await fetch(`https://api.github.com/repos/elastic/elasticsearch-clients-tests/zipball/${version}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${GITHUB_TOKEN}`,
|
||||
Accept: 'application/vnd.github+json'
|
||||
}
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
log.fail(`unexpected response ${response.statusText}`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
log.text = 'Downloading tests zipball'
|
||||
await pipeline(response.body, createWriteStream(zipFile))
|
||||
|
||||
log.text = 'Unzipping tests'
|
||||
await unzip(zipFile, testYamlFolder)
|
||||
|
||||
log.text = 'Cleanup'
|
||||
await rimraf(zipFile)
|
||||
}
|
||||
|
||||
log.text = 'Cleanup checkouts/elasticsearch'
|
||||
await rm(esFolder)
|
||||
await mkdir(esFolder, { recursive: true })
|
||||
log.text = 'Fetching Elasticsearch specification'
|
||||
await rimraf(schemaFolder)
|
||||
await mkdir(schemaFolder, { recursive: true })
|
||||
|
||||
log.text = 'Downloading artifacts'
|
||||
const response = await fetch(resolved.url)
|
||||
const response = await fetch(`https://raw.githubusercontent.com/elastic/elasticsearch-specification/${version}/output/schema/schema.json`)
|
||||
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.text = 'Downloading schema.json'
|
||||
await pipeline(response.body, createWriteStream(schemaJson))
|
||||
|
||||
log.succeed('Done')
|
||||
}
|
||||
|
||||
function loadInfo () {
|
||||
try {
|
||||
return require(artifactInfo)
|
||||
} catch (err) {
|
||||
return null
|
||||
}
|
||||
async function main () {
|
||||
await downloadArtifacts()
|
||||
}
|
||||
|
||||
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 => {
|
||||
main().catch(t => {
|
||||
console.log(t)
|
||||
process.exit(2)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = downloadArtifacts
|
||||
module.exports.locations = {
|
||||
specFolder,
|
||||
freeTestFolder,
|
||||
xPackTestFolder
|
||||
}
|
||||
module.exports.locations = { testYamlFolder, zipFile, schemaJson }
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
const { join } = require('path')
|
||||
const { writeFile } = require('fs/promises')
|
||||
const fetch = require('node-fetch')
|
||||
const rimraf = require('rimraf')
|
||||
const { rimraf } = require('rimraf')
|
||||
const ora = require('ora')
|
||||
const { convertRequests } = require('@elastic/request-converter')
|
||||
const minimist = require('minimist')
|
||||
@ -91,6 +91,7 @@ ${source.trim()}
|
||||
}
|
||||
|
||||
const options = minimist(process.argv.slice(2), {
|
||||
boolean: ['debug'],
|
||||
string: ['version'],
|
||||
default: {
|
||||
version: 'master'
|
||||
@ -102,7 +103,7 @@ generate(options.version)
|
||||
.catch(err => log.fail(err.message))
|
||||
.finally(() => {
|
||||
const keys = Object.keys(failures)
|
||||
if (keys.length > 0) {
|
||||
if (keys.length > 0 && options.debug) {
|
||||
let message = 'Some examples failed to generate:\n\n'
|
||||
for (const key of keys) {
|
||||
message += `${key}: ${failures[key]}\n`
|
||||
|
||||
@ -46,7 +46,7 @@ export default class AsyncSearch {
|
||||
|
||||
/**
|
||||
* Delete an async search. If the asynchronous search is still running, it is cancelled. Otherwise, the saved search results are deleted. If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchDeleteResponse>
|
||||
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchDeleteResponse, unknown>>
|
||||
@ -78,7 +78,7 @@ export default class AsyncSearch {
|
||||
|
||||
/**
|
||||
* Get async search results. Retrieve the results of a previously submitted asynchronous search request. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
|
||||
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument, TAggregations>, unknown>>
|
||||
@ -109,8 +109,8 @@ export default class AsyncSearch {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html | Elasticsearch API documentation}
|
||||
* Get the async search status. Get the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to: * The user or API key that submitted the original async search request. * Users that have the `monitor` cluster privilege or greater privileges.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>
|
||||
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchStatusResponse, unknown>>
|
||||
@ -142,7 +142,7 @@ export default class AsyncSearch {
|
||||
|
||||
/**
|
||||
* Run an async search. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/async-search.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/async-search.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>
|
||||
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument, TAggregations>, unknown>>
|
||||
|
||||
@ -46,7 +46,7 @@ export default class Autoscaling {
|
||||
|
||||
/**
|
||||
* Delete an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>
|
||||
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingDeleteAutoscalingPolicyResponse, unknown>>
|
||||
@ -78,7 +78,7 @@ export default class Autoscaling {
|
||||
|
||||
/**
|
||||
* Get the autoscaling capacity. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported. This API gets the current autoscaling capacity based on the configured autoscaling policy. It will return information to size the cluster appropriately to the current workload. The `required_capacity` is calculated as the maximum of the `required_capacity` result of all individual deciders that are enabled for the policy. The operator should verify that the `current_nodes` match the operator’s knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information. The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required. This information is provided for diagnosis only. Do not use this information to make autoscaling decisions.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingCapacityResponse>
|
||||
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingCapacityResponse, unknown>>
|
||||
@ -108,7 +108,7 @@ export default class Autoscaling {
|
||||
|
||||
/**
|
||||
* Get an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingPolicyResponse>
|
||||
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingPolicyResponse, unknown>>
|
||||
@ -140,7 +140,7 @@ export default class Autoscaling {
|
||||
|
||||
/**
|
||||
* Create or update an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingPutAutoscalingPolicyResponse>
|
||||
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingPutAutoscalingPolicyResponse, unknown>>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -45,8 +45,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get aliases. Retrieves the cluster’s index aliases, including filter and routing information. The API does not return data stream aliases. CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-alias.html | Elasticsearch API documentation}
|
||||
* Get aliases. Get the cluster's index aliases, including filter and routing information. This API does not return data stream aliases. IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-alias.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatAliasesResponse>
|
||||
async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatAliasesResponse, unknown>>
|
||||
@ -85,8 +85,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a snapshot of the number of shards allocated to each data node and their disk space. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-allocation.html | Elasticsearch API documentation}
|
||||
* Get shard allocation information. Get a snapshot of the number of shards allocated to each data node and their disk space. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-allocation.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatAllocationResponse>
|
||||
async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatAllocationResponse, unknown>>
|
||||
@ -125,8 +125,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get component templates. Returns information about component templates in a cluster. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get component template API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-component-templates.html | Elasticsearch API documentation}
|
||||
* Get component templates. Get information about component templates in a cluster. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get component template API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-component-templates.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatComponentTemplatesResponse>
|
||||
async componentTemplates (this: That, params?: T.CatComponentTemplatesRequest | TB.CatComponentTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatComponentTemplatesResponse, unknown>>
|
||||
@ -165,8 +165,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a document count. Provides quick access to a document count for a data stream, an index, or an entire cluster. The document count only includes live documents, not deleted documents which have not yet been removed by the merge process. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the count API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-count.html | Elasticsearch API documentation}
|
||||
* Get a document count. Get quick access to a document count for a data stream, an index, or an entire cluster. The document count only includes live documents, not deleted documents which have not yet been removed by the merge process. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the count API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-count.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatCountResponse>
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatCountResponse, unknown>>
|
||||
@ -205,8 +205,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the amount of heap memory currently used by the field data cache on every data node in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes stats API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-fielddata.html | Elasticsearch API documentation}
|
||||
* Get field data cache information. Get the amount of heap memory currently used by the field data cache on every data node in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes stats API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-fielddata.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatFielddataResponse>
|
||||
async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatFielddataResponse, unknown>>
|
||||
@ -245,8 +245,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the health status of a cluster, similar to the cluster health API. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the cluster health API. This API is often used to check malfunctioning clusters. To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats: `HH:MM:SS`, which is human-readable but includes no date information; `Unix epoch time`, which is machine-sortable and includes date information. The latter format is useful for cluster recoveries that take multiple days. You can use the cat health API to verify cluster health across multiple nodes. You also can use the API to track the recovery of a large cluster over a longer period of time.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-health.html | Elasticsearch API documentation}
|
||||
* Get the cluster health status. IMPORTANT: CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the cluster health API. This API is often used to check malfunctioning clusters. To help you track cluster health alongside log files and alerting systems, the API returns timestamps in two formats: `HH:MM:SS`, which is human-readable but includes no date information; `Unix epoch time`, which is machine-sortable and includes date information. The latter format is useful for cluster recoveries that take multiple days. You can use the cat health API to verify cluster health across multiple nodes. You also can use the API to track the recovery of a large cluster over a longer period of time.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-health.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatHealthResponse>
|
||||
async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatHealthResponse, unknown>>
|
||||
@ -275,8 +275,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get CAT help. Returns help for the CAT APIs.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat.html | Elasticsearch API documentation}
|
||||
* Get CAT help. Get help for the CAT APIs.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatHelpResponse>
|
||||
async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatHelpResponse, unknown>>
|
||||
@ -305,8 +305,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get index information. Returns high-level information about indices in a cluster, including backing indices for data streams. Use this request to get the following information for each index in a cluster: - shard count - document count - deleted document count - primary store size - total store size of all shards, including shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-indices.html | Elasticsearch API documentation}
|
||||
* Get index information. Get high-level information about indices in a cluster, including backing indices for data streams. Use this request to get the following information for each index in a cluster: - shard count - document count - deleted document count - primary store size - total store size of all shards, including shard replicas These metrics are retrieved directly from Lucene, which Elasticsearch uses internally to power indexing and search. As a result, all document counts include hidden nested documents. To get an accurate count of Elasticsearch documents, use the cat count or count APIs. CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use an index endpoint.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-indices.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatIndicesResponse>
|
||||
async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatIndicesResponse, unknown>>
|
||||
@ -345,8 +345,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the master node, including the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-master.html | Elasticsearch API documentation}
|
||||
* Get master node information. Get information about the master node, including the ID, bound IP address, and name. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-master.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMasterResponse>
|
||||
async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMasterResponse, unknown>>
|
||||
@ -375,8 +375,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data frame analytics jobs. Returns configuration and usage information about data frame analytics jobs. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get data frame analytics jobs statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-dfanalytics.html | Elasticsearch API documentation}
|
||||
* Get data frame analytics jobs. Get configuration and usage information about data frame analytics jobs. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get data frame analytics jobs statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-dfanalytics.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlDataFrameAnalyticsResponse>
|
||||
async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlDataFrameAnalyticsResponse, unknown>>
|
||||
@ -415,8 +415,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get datafeeds. Returns configuration and usage information about datafeeds. This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get datafeed statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-datafeeds.html | Elasticsearch API documentation}
|
||||
* Get datafeeds. Get configuration and usage information about datafeeds. This API returns a maximum of 10,000 datafeeds. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get datafeed statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-datafeeds.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlDatafeedsResponse>
|
||||
async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlDatafeedsResponse, unknown>>
|
||||
@ -455,8 +455,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get anomaly detection jobs. Returns configuration and usage information for anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get anomaly detection job statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-anomaly-detectors.html | Elasticsearch API documentation}
|
||||
* Get anomaly detection jobs. Get configuration and usage information for anomaly detection jobs. This API returns a maximum of 10,000 jobs. If the Elasticsearch security features are enabled, you must have `monitor_ml`, `monitor`, `manage_ml`, or `manage` cluster privileges to use this API. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get anomaly detection job statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-anomaly-detectors.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlJobsResponse>
|
||||
async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlJobsResponse, unknown>>
|
||||
@ -495,8 +495,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get trained models. Returns configuration and usage information about inference trained models. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get trained models statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-trained-model.html | Elasticsearch API documentation}
|
||||
* Get trained models. Get configuration and usage information about inference trained models. IMPORTANT: CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get trained models statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-trained-model.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatMlTrainedModelsResponse>
|
||||
async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatMlTrainedModelsResponse, unknown>>
|
||||
@ -535,8 +535,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about custom node attributes. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-nodeattrs.html | Elasticsearch API documentation}
|
||||
* Get node attribute information. Get information about custom node attributes. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-nodeattrs.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatNodeattrsResponse>
|
||||
async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatNodeattrsResponse, unknown>>
|
||||
@ -565,8 +565,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the nodes in a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-nodes.html | Elasticsearch API documentation}
|
||||
* Get node information. Get information about the nodes in a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-nodes.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatNodesResponse>
|
||||
async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatNodesResponse, unknown>>
|
||||
@ -595,8 +595,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns cluster-level changes that have not yet been executed. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-pending-tasks.html | Elasticsearch API documentation}
|
||||
* Get pending task information. Get information about cluster-level changes that have not yet taken effect. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the pending cluster tasks API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-pending-tasks.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatPendingTasksResponse>
|
||||
async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatPendingTasksResponse, unknown>>
|
||||
@ -625,8 +625,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of plugins running on each node of a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-plugins.html | Elasticsearch API documentation}
|
||||
* Get plugin information. Get a list of plugins running on each node of a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-plugins.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatPluginsResponse>
|
||||
async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatPluginsResponse, unknown>>
|
||||
@ -655,8 +655,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the stream’s backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-recovery.html | Elasticsearch API documentation}
|
||||
* Get shard recovery information. Get information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the stream’s backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-recovery.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatRecoveryResponse>
|
||||
async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatRecoveryResponse, unknown>>
|
||||
@ -695,8 +695,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the snapshot repositories for a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-repositories.html | Elasticsearch API documentation}
|
||||
* Get snapshot repository information. Get a list of snapshot repositories for a cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot repository API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-repositories.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatRepositoriesResponse>
|
||||
async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatRepositoriesResponse, unknown>>
|
||||
@ -725,8 +725,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns low-level information about the Lucene segments in index shards. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-segments.html | Elasticsearch API documentation}
|
||||
* Get segment information. Get low-level information about the Lucene segments in index shards. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index segments API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-segments.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatSegmentsResponse>
|
||||
async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatSegmentsResponse, unknown>>
|
||||
@ -765,8 +765,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the shards in a cluster. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-shards.html | Elasticsearch API documentation}
|
||||
* Get shard information. Get information about the shards in a cluster. For data streams, the API returns information about the backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-shards.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatShardsResponse>
|
||||
async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatShardsResponse, unknown>>
|
||||
@ -805,8 +805,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the snapshots stored in one or more repositories. A snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-snapshots.html | Elasticsearch API documentation}
|
||||
* Get snapshot information. Get information about the snapshots stored in one or more repositories. A snapshot is a backup of an index or running Elasticsearch cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get snapshot API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-snapshots.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatSnapshotsResponse>
|
||||
async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatSnapshotsResponse, unknown>>
|
||||
@ -845,8 +845,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about tasks currently executing in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/tasks.html | Elasticsearch API documentation}
|
||||
* Get task information. Get information about tasks currently running in the cluster. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the task management API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-tasks.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTasksResponse>
|
||||
async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatTasksResponse, unknown>>
|
||||
@ -875,8 +875,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about index templates in a cluster. You can use index templates to apply index settings and field mappings to new indices at creation. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-templates.html | Elasticsearch API documentation}
|
||||
* Get index template information. Get information about the index templates in a cluster. You can use index templates to apply index settings and field mappings to new indices at creation. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-templates.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTemplatesResponse>
|
||||
async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatTemplatesResponse, unknown>>
|
||||
@ -915,8 +915,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns thread pool statistics for each node in a cluster. Returned information includes all built-in thread pools and custom thread pools. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-thread-pool.html | Elasticsearch API documentation}
|
||||
* Get thread pool statistics. Get thread pool statistics for each node in a cluster. Returned information includes all built-in thread pools and custom thread pools. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the nodes info API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-thread-pool.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatThreadPoolResponse>
|
||||
async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatThreadPoolResponse, unknown>>
|
||||
@ -955,8 +955,8 @@ export default class Cat {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get transforms. Returns configuration and usage information about transforms. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get transform statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cat-transforms.html | Elasticsearch API documentation}
|
||||
* Get transform information. Get configuration and usage information about transforms. CAT APIs are only intended for human consumption using the Kibana console or command line. They are not intended for use by applications. For application consumption, use the get transform statistics API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cat-transforms.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CatTransformsResponse>
|
||||
async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CatTransformsResponse, unknown>>
|
||||
|
||||
@ -45,8 +45,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes auto-follow patterns.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-delete-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
* Delete auto-follow patterns. Delete a collection of cross-cluster replication auto-follow patterns.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-delete-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrDeleteAutoFollowPatternResponse>
|
||||
async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrDeleteAutoFollowPatternResponse, unknown>>
|
||||
@ -77,15 +77,15 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new follower index configured to follow the referenced leader index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-put-follow.html | Elasticsearch API documentation}
|
||||
* Create a follower. Create a cross-cluster replication follower index that follows a specific leader index. When the API returns, the follower index exists and cross-cluster replication starts replicating operations from the leader index to the follower index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-follow.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrFollowResponse>
|
||||
async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrFollowResponse, unknown>>
|
||||
async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptions): Promise<T.CcrFollowResponse>
|
||||
async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['leader_index', 'max_outstanding_read_requests', 'max_outstanding_write_requests', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size', 'read_poll_timeout', 'remote_cluster']
|
||||
const acceptedBody: string[] = ['data_stream_name', 'leader_index', 'max_outstanding_read_requests', 'max_outstanding_write_requests', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size', 'read_poll_timeout', 'remote_cluster', 'settings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
@ -121,8 +121,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about all follower indices, including parameters and status for each follower index
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-follow-info.html | Elasticsearch API documentation}
|
||||
* Get follower information. Get information about all cross-cluster replication follower indices. For example, the results include follower index names, leader index names, replication options, and whether the follower indices are active or paused.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-info.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrFollowInfoResponse>
|
||||
async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrFollowInfoResponse, unknown>>
|
||||
@ -153,8 +153,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves follower stats. return shard-level stats about the following tasks associated with each shard for the specified indices.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-follow-stats.html | Elasticsearch API documentation}
|
||||
* Get follower stats. Get cross-cluster replication follower stats. The API returns shard-level stats about the "following tasks" associated with each shard for the specified indices.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-follow-stats.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrFollowStatsResponse>
|
||||
async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrFollowStatsResponse, unknown>>
|
||||
@ -185,8 +185,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the follower retention leases from the leader.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-forget-follower.html | Elasticsearch API documentation}
|
||||
* Forget a follower. Remove the cross-cluster replication follower retention leases from the leader. A following index takes out retention leases on its leader index. These leases are used to increase the likelihood that the shards of the leader index retain the history of operations that the shards of the following index need to run replication. When a follower index is converted to a regular index by the unfollow API (either by directly calling the API or by index lifecycle management tasks), these leases are removed. However, removal of the leases can fail, for example when the remote cluster containing the leader index is unavailable. While the leases will eventually expire on their own, their extended existence can cause the leader index to hold more history than necessary and prevent index lifecycle management from performing some operations on the leader index. This API exists to enable manually removing the leases when the unfollow API is unable to do so. NOTE: This API does not stop replication by a following index. If you use this API with a follower index that is still actively following, the following index will add back retention leases on the leader. The only purpose of this API is to handle the case of failure to remove the following retention leases after the unfollow API is invoked.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-forget-follower.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrForgetFollowerResponse>
|
||||
async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrForgetFollowerResponse, unknown>>
|
||||
@ -229,8 +229,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets configured auto-follow patterns. Returns the specified auto-follow pattern collection.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
* Get auto-follow patterns. Get cross-cluster replication auto-follow patterns.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrGetAutoFollowPatternResponse>
|
||||
async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrGetAutoFollowPatternResponse, unknown>>
|
||||
@ -269,8 +269,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Pauses an auto-follow pattern
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-pause-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
* Pause an auto-follow pattern. Pause a cross-cluster replication auto-follow pattern. When the API returns, the auto-follow pattern is inactive. New indices that are created on the remote cluster and match the auto-follow patterns are ignored. You can resume auto-following with the resume auto-follow pattern API. When it resumes, the auto-follow pattern is active again and automatically configures follower indices for newly created indices on the remote cluster that match its patterns. Remote indices that were created while the pattern was paused will also be followed, unless they have been deleted or closed in the interim.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-pause-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrPauseAutoFollowPatternResponse>
|
||||
async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrPauseAutoFollowPatternResponse, unknown>>
|
||||
@ -301,8 +301,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Pauses a follower index. The follower index will not fetch any additional operations from the leader index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-pause-follow.html | Elasticsearch API documentation}
|
||||
* Pause a follower. Pause a cross-cluster replication follower index. The follower index will not fetch any additional operations from the leader index. You can resume following with the resume follower API. You can pause and resume a follower index to change the configuration of the following task.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-pause-follow.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrPauseFollowResponse>
|
||||
async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrPauseFollowResponse, unknown>>
|
||||
@ -333,8 +333,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new named collection of auto-follow patterns against a specified remote cluster. Newly created indices on the remote cluster matching any of the specified patterns will be automatically configured as follower indices.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-put-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
* Create or update auto-follow patterns. Create a collection of cross-cluster replication auto-follow patterns for a remote cluster. Newly created indices on the remote cluster that match any of the patterns are automatically configured as follower indices. Indices on the remote cluster that were created before the auto-follow pattern was created will not be auto-followed even if they match the pattern. This API can also be used to update auto-follow patterns. NOTE: Follower indices that were configured automatically before updating an auto-follow pattern will remain unchanged even if they do not match against the new patterns.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-put-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrPutAutoFollowPatternResponse>
|
||||
async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrPutAutoFollowPatternResponse, unknown>>
|
||||
@ -377,8 +377,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumes an auto-follow pattern that has been paused
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-resume-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
* Resume an auto-follow pattern. Resume a cross-cluster replication auto-follow pattern that was paused. The auto-follow pattern will resume configuring following indices for newly created indices that match its patterns on the remote cluster. Remote indices created while the pattern was paused will also be followed unless they have been deleted or closed in the interim.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-resume-auto-follow-pattern.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrResumeAutoFollowPatternResponse>
|
||||
async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrResumeAutoFollowPatternResponse, unknown>>
|
||||
@ -409,8 +409,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resumes a follower index that has been paused
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-resume-follow.html | Elasticsearch API documentation}
|
||||
* Resume a follower. Resume a cross-cluster replication follower index that was paused. The follower index could have been paused with the pause follower API. Alternatively it could be paused due to replication that cannot be retried due to failures during following tasks. When this API returns, the follower index will resume fetching operations from the leader index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-resume-follow.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrResumeFollowResponse>
|
||||
async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrResumeFollowResponse, unknown>>
|
||||
@ -453,8 +453,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all stats related to cross-cluster replication.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-get-stats.html | Elasticsearch API documentation}
|
||||
* Get cross-cluster replication stats. This API returns stats about auto-following and the same shard-level stats as the get follower stats API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-get-stats.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrStatsResponse>
|
||||
async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrStatsResponse, unknown>>
|
||||
@ -483,8 +483,8 @@ export default class Ccr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/ccr-post-unfollow.html | Elasticsearch API documentation}
|
||||
* Unfollow an index. Convert a cross-cluster replication follower index to a regular index. The API stops the following task associated with a follower index and removes index metadata and settings associated with cross-cluster replication. The follower index must be paused and closed before you call the unfollow API. > info > Currently cross-cluster replication does not support converting an existing regular index to a follower index. Converting a follower index to a regular index is an irreversible operation.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ccr-post-unfollow.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CcrUnfollowResponse>
|
||||
async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CcrUnfollowResponse, unknown>>
|
||||
|
||||
@ -40,7 +40,7 @@ interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Clear a scrolling search. Clear the search context and results for a scrolling search.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/clear-scroll-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/clear-scroll-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClearScrollResponse>
|
||||
export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClearScrollResponse, unknown>>
|
||||
|
||||
@ -40,7 +40,7 @@ interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Close a point in time. A point in time must be opened explicitly before being used in search requests. The `keep_alive` parameter tells Elasticsearch how long it should persist. A point in time is automatically closed when the `keep_alive` period has elapsed. However, keeping points in time has a cost; close them as soon as they are no longer required for search requests.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/point-in-time-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/point-in-time-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClosePointInTimeResponse>
|
||||
export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClosePointInTimeResponse, unknown>>
|
||||
|
||||
@ -46,7 +46,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Explain the shard allocations. Get explanations for shard allocations in the cluster. For unassigned shards, it provides an explanation for why the shard is unassigned. For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-allocation-explain.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-allocation-explain.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterAllocationExplainResponse>
|
||||
async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterAllocationExplainResponse, unknown>>
|
||||
@ -87,8 +87,8 @@ export default class Cluster {
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete component templates. Deletes component templates. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-component-template.html | Elasticsearch API documentation}
|
||||
* Delete component templates. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterDeleteComponentTemplateResponse>
|
||||
async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterDeleteComponentTemplateResponse, unknown>>
|
||||
@ -120,7 +120,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Clear cluster voting config exclusions. Remove master-eligible nodes from the voting configuration exclusion list.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/voting-config-exclusions.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/voting-config-exclusions.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterDeleteVotingConfigExclusionsResponse>
|
||||
async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterDeleteVotingConfigExclusionsResponse, unknown>>
|
||||
@ -150,7 +150,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Check component templates. Returns information about whether a particular component template exists.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-component-template.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterExistsComponentTemplateResponse>
|
||||
async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterExistsComponentTemplateResponse, unknown>>
|
||||
@ -181,8 +181,8 @@ export default class Cluster {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get component templates. Retrieves information about component templates.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-component-template.html | Elasticsearch API documentation}
|
||||
* Get component templates. Get information about component templates.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterGetComponentTemplateResponse>
|
||||
async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterGetComponentTemplateResponse, unknown>>
|
||||
@ -222,7 +222,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Get cluster-wide settings. By default, it returns only settings that have been explicitly defined.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-get-settings.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-get-settings.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterGetSettingsResponse>
|
||||
async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterGetSettingsResponse, unknown>>
|
||||
@ -252,7 +252,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Get the cluster health status. You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices. The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. The index level status is controlled by the worst shard status. One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. The cluster status is controlled by the worst index status.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-health.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-health.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterHealthResponse>
|
||||
async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterHealthResponse, unknown>>
|
||||
@ -292,7 +292,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Get cluster info. Returns basic information about the cluster.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-info.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-info.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async info (this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterInfoResponse>
|
||||
async info (this: That, params: T.ClusterInfoRequest | TB.ClusterInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterInfoResponse, unknown>>
|
||||
@ -324,7 +324,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Get the pending cluster tasks. Get information about cluster-level changes (such as create index, update mapping, allocate or fail shard) that have not yet taken effect. NOTE: This API returns a list of any pending updates to the cluster state. These are distinct from the tasks reported by the task management API which include periodic tasks and tasks initiated by the user, such as node stats, search queries, or create index requests. However, if a user-initiated task such as a create index command causes a cluster state update, the activity of this task might be reported by both task api and pending cluster tasks API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-pending.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-pending.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPendingTasksResponse>
|
||||
async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPendingTasksResponse, unknown>>
|
||||
@ -354,7 +354,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Update voting configuration exclusions. Update the cluster voting config exclusions by node IDs or node names. By default, if there are more than three master-eligible nodes in the cluster and you remove fewer than half of the master-eligible nodes in the cluster at once, the voting configuration automatically shrinks. If you want to shrink the voting configuration to contain fewer than three nodes or to remove half or more of the master-eligible nodes in the cluster at once, use this API to remove departing nodes from the voting configuration manually. The API adds an entry for each specified node to the cluster’s voting configuration exclusions list. It then waits until the cluster has reconfigured its voting configuration to exclude the specified nodes. Clusters should have no voting configuration exclusions in normal operation. Once the excluded nodes have stopped, clear the voting configuration exclusions with `DELETE /_cluster/voting_config_exclusions`. This API waits for the nodes to be fully removed from the cluster before it returns. If your cluster has voting configuration exclusions for nodes that you no longer intend to remove, use `DELETE /_cluster/voting_config_exclusions?wait_for_removal=false` to clear the voting configuration exclusions without waiting for the nodes to leave the cluster. A response to `POST /_cluster/voting_config_exclusions` with an HTTP status code of 200 OK guarantees that the node has been removed from the voting configuration and will not be reinstated until the voting configuration exclusions are cleared by calling `DELETE /_cluster/voting_config_exclusions`. If the call to `POST /_cluster/voting_config_exclusions` fails or returns a response with an HTTP status code other than 200 OK then the node may not have been removed from the voting configuration. In that case, you may safely retry the call. NOTE: Voting exclusions are required only when you remove at least half of the master-eligible nodes from a cluster in a short time period. They are not required when removing master-ineligible nodes or when removing fewer than half of the master-eligible nodes.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/voting-config-exclusions.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/voting-config-exclusions.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPostVotingConfigExclusionsResponse>
|
||||
async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPostVotingConfigExclusionsResponse, unknown>>
|
||||
@ -383,8 +383,8 @@ export default class Cluster {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create or update a component template. Creates or updates a component template. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. An index template can be composed of multiple component templates. To use a component template, specify it in an index template’s `composed_of` list. Component templates are only applied to new data streams and indices as part of a matching index template. Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. Component templates are only used during index creation. For data streams, this includes data stream creation and the creation of a stream’s backing indices. Changes to component templates do not affect existing indices, including a stream’s backing indices. You can use C-style `/* *\/` block comments in component templates. You can include comments anywhere in the request body except before the opening curly bracket.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/indices-component-template.html | Elasticsearch API documentation}
|
||||
* Create or update a component template. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. An index template can be composed of multiple component templates. To use a component template, specify it in an index template’s `composed_of` list. Component templates are only applied to new data streams and indices as part of a matching index template. Settings and mappings specified directly in the index template or the create index request override any settings or mappings specified in a component template. Component templates are only used during index creation. For data streams, this includes data stream creation and the creation of a stream’s backing indices. Changes to component templates do not affect existing indices, including a stream’s backing indices. You can use C-style `/* *\/` block comments in component templates. You can include comments anywhere in the request body except before the opening curly bracket. **Applying component templates** You cannot directly apply a component template to a data stream or index. To be applied, a component template must be included in an index template's `composed_of` list.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-component-template.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPutComponentTemplateResponse>
|
||||
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPutComponentTemplateResponse, unknown>>
|
||||
@ -428,7 +428,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Update the cluster settings. Configure and update dynamic settings on a running cluster. You can also configure dynamic settings locally on an unstarted or shut down node in `elasticsearch.yml`. Updates made with this API can be persistent, which apply across cluster restarts, or transient, which reset after a cluster restart. You can also reset transient or persistent settings by assigning them a null value. If you configure the same setting using multiple methods, Elasticsearch applies the settings in following order of precedence: 1) Transient setting; 2) Persistent setting; 3) `elasticsearch.yml` setting; 4) Default setting value. For example, you can apply a transient setting to override a persistent setting or `elasticsearch.yml` setting. However, a change to an `elasticsearch.yml` setting will not override a defined transient or persistent setting. TIP: In Elastic Cloud, use the user settings feature to configure all cluster settings. This method automatically rejects unsafe settings that could break your cluster. If you run Elasticsearch on your own hardware, use this API to configure dynamic cluster settings. Only use `elasticsearch.yml` for static cluster settings and node settings. The API doesn’t require a restart and ensures a setting’s value is the same on all nodes. WARNING: Transient cluster settings are no longer recommended. Use persistent cluster settings instead. If a cluster becomes unstable, transient settings can clear unexpectedly, resulting in a potentially undesired cluster configuration.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-update-settings.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-update-settings.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterPutSettingsResponse>
|
||||
async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterPutSettingsResponse, unknown>>
|
||||
@ -469,8 +469,8 @@ export default class Cluster {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get remote cluster information. Get all of the configured remote cluster information. This API returns connection and endpoint information keyed by the configured remote cluster alias.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-remote-info.html | Elasticsearch API documentation}
|
||||
* Get remote cluster information. Get information about configured remote clusters. The API returns connection and endpoint information keyed by the configured remote cluster alias. > info > This API returns information that reflects current state on the local cluster. > The `connected` field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it. > Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster. > To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the [resolve cluster endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster).
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-remote-info.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterRemoteInfoResponse>
|
||||
async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterRemoteInfoResponse, unknown>>
|
||||
@ -500,7 +500,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Reroute the cluster. Manually change the allocation of individual shards in the cluster. For example, a shard can be moved from one node to another explicitly, an allocation can be canceled, and an unassigned shard can be explicitly allocated to a specific node. It is important to note that after processing any reroute commands Elasticsearch will perform rebalancing as normal (respecting the values of settings such as `cluster.routing.rebalance.enable`) in order to remain in a balanced state. For example, if the requested allocation includes moving a shard from node1 to node2 then this may cause a shard to be moved from node2 back to node1 to even things out. The cluster can be set to disable allocations using the `cluster.routing.allocation.enable` setting. If allocations are disabled then the only allocations that will be performed are explicit ones given using the reroute command, and consequent allocations due to rebalancing. The cluster will attempt to allocate a shard a maximum of `index.allocation.max_retries` times in a row (defaults to `5`), before giving up and leaving the shard unallocated. This scenario can be caused by structural problems such as having an analyzer which refers to a stopwords file which doesn’t exist on all nodes. Once the problem has been corrected, allocation can be manually retried by calling the reroute API with the `?retry_failed` URI query parameter, which will attempt a single retry round for these shards.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-reroute.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-reroute.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterRerouteResponse>
|
||||
async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterRerouteResponse, unknown>>
|
||||
@ -542,7 +542,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Get the cluster state. Get comprehensive information about the state of the cluster. The cluster state is an internal data structure which keeps track of a variety of information needed by every node, including the identity and attributes of the other nodes in the cluster; cluster-wide settings; index metadata, including the mapping and settings for each index; the location and status of every shard copy in the cluster. The elected master node ensures that every node in the cluster has a copy of the same cluster state. This API lets you retrieve a representation of this internal state for debugging or diagnostic purposes. You may need to consult the Elasticsearch source code to determine the precise meaning of the response. By default the API will route requests to the elected master node since this node is the authoritative source of cluster states. You can also retrieve the cluster state held on the node handling the API request by adding the `?local=true` query parameter. Elasticsearch may need to expend significant effort to compute a response to this API in larger clusters, and the response may comprise a very large quantity of data. If you use this API repeatedly, your cluster may become unstable. WARNING: The response is a representation of an internal data structure. Its format is not subject to the same compatibility guarantees as other more stable APIs and may change from version to version. Do not query this API using external monitoring tools. Instead, obtain the information you require using other more stable cluster APIs.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-state.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-state.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterStateResponse>
|
||||
async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterStateResponse, unknown>>
|
||||
@ -586,7 +586,7 @@ export default class Cluster {
|
||||
|
||||
/**
|
||||
* Get cluster statistics. Get basic index metrics (shard numbers, store size, memory usage) and information about the current nodes that form the cluster (number, roles, os, jvm versions, memory usage, cpu and installed plugins).
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cluster-stats.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster-stats.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterStatsResponse>
|
||||
async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ClusterStatsResponse, unknown>>
|
||||
|
||||
@ -46,7 +46,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Check in a connector. Update the `last_seen` field in the connector and set it to the current timestamp.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/check-in-connector-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/check-in-connector-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async checkIn (this: That, params: T.ConnectorCheckInRequest | TB.ConnectorCheckInRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorCheckInResponse>
|
||||
async checkIn (this: That, params: T.ConnectorCheckInRequest | TB.ConnectorCheckInRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorCheckInResponse, unknown>>
|
||||
@ -78,7 +78,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Delete a connector. Removes a connector and associated sync jobs. This is a destructive action that is not recoverable. NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector. These need to be removed manually.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-connector-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-connector-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async delete (this: That, params: T.ConnectorDeleteRequest | TB.ConnectorDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorDeleteResponse>
|
||||
async delete (this: That, params: T.ConnectorDeleteRequest | TB.ConnectorDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorDeleteResponse, unknown>>
|
||||
@ -110,7 +110,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Get a connector. Get the details about a connector.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-connector-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-connector-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async get (this: That, params: T.ConnectorGetRequest | TB.ConnectorGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorGetResponse>
|
||||
async get (this: That, params: T.ConnectorGetRequest | TB.ConnectorGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorGetResponse, unknown>>
|
||||
@ -142,7 +142,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector last sync stats. Update the fields related to the last sync of a connector. This action is used for analytics and monitoring.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-last-sync-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-last-sync-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async lastSync (this: That, params: T.ConnectorLastSyncRequest | TB.ConnectorLastSyncRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorLastSyncResponse>
|
||||
async lastSync (this: That, params: T.ConnectorLastSyncRequest | TB.ConnectorLastSyncRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorLastSyncResponse, unknown>>
|
||||
@ -186,7 +186,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Get all connectors. Get information about all connectors.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/list-connector-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-connector-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async list (this: That, params?: T.ConnectorListRequest | TB.ConnectorListRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorListResponse>
|
||||
async list (this: That, params?: T.ConnectorListRequest | TB.ConnectorListRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorListResponse, unknown>>
|
||||
@ -216,7 +216,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Create a connector. Connectors are Elasticsearch integrations that bring content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure. Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud. Self-managed connectors (Connector clients) are self-managed on your infrastructure.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/create-connector-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async post (this: That, params?: T.ConnectorPostRequest | TB.ConnectorPostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorPostResponse>
|
||||
async post (this: That, params?: T.ConnectorPostRequest | TB.ConnectorPostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorPostResponse, unknown>>
|
||||
@ -258,7 +258,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Create or update a connector.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/create-connector-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async put (this: That, params?: T.ConnectorPutRequest | TB.ConnectorPutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorPutResponse>
|
||||
async put (this: That, params?: T.ConnectorPutRequest | TB.ConnectorPutRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorPutResponse, unknown>>
|
||||
@ -431,7 +431,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Cancel a connector sync job. Cancel a connector sync job, which sets the status to cancelling and updates `cancellation_requested_at` to the current time. The connector service is then responsible for setting the status of connector sync jobs to cancelled.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/cancel-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cancel-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobCancel (this: That, params: T.ConnectorSyncJobCancelRequest | TB.ConnectorSyncJobCancelRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobCancelResponse>
|
||||
async syncJobCancel (this: That, params: T.ConnectorSyncJobCancelRequest | TB.ConnectorSyncJobCancelRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobCancelResponse, unknown>>
|
||||
@ -462,22 +462,22 @@ export default class Connector {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks in a connector sync job (refreshes 'last_seen').
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/check-in-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
* Check in a connector sync job. Check in a connector sync job and set the `last_seen` field to the current time before updating it in the internal index. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/check-in-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobCheckIn (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async syncJobCheckIn (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async syncJobCheckIn (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async syncJobCheckIn (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async syncJobCheckIn (this: That, params: T.ConnectorSyncJobCheckInRequest | TB.ConnectorSyncJobCheckInRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobCheckInResponse>
|
||||
async syncJobCheckIn (this: That, params: T.ConnectorSyncJobCheckInRequest | TB.ConnectorSyncJobCheckInRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobCheckInResponse, unknown>>
|
||||
async syncJobCheckIn (this: That, params: T.ConnectorSyncJobCheckInRequest | TB.ConnectorSyncJobCheckInRequest, options?: TransportRequestOptions): Promise<T.ConnectorSyncJobCheckInResponse>
|
||||
async syncJobCheckIn (this: That, params: T.ConnectorSyncJobCheckInRequest | TB.ConnectorSyncJobCheckInRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['connector_sync_job_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -494,22 +494,34 @@ export default class Connector {
|
||||
}
|
||||
|
||||
/**
|
||||
* Claims a connector sync job.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/claim-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
* Claim a connector sync job. This action updates the job status to `in_progress` and sets the `last_seen` and `started_at` timestamps to the current time. Additionally, it can set the `sync_cursor` property for the sync job. This API is not intended for direct connector management by users. It supports the implementation of services that utilize the connector protocol to communicate with Elasticsearch. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/claim-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobClaim (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async syncJobClaim (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async syncJobClaim (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async syncJobClaim (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async syncJobClaim (this: That, params: T.ConnectorSyncJobClaimRequest | TB.ConnectorSyncJobClaimRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobClaimResponse>
|
||||
async syncJobClaim (this: That, params: T.ConnectorSyncJobClaimRequest | TB.ConnectorSyncJobClaimRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobClaimResponse, unknown>>
|
||||
async syncJobClaim (this: That, params: T.ConnectorSyncJobClaimRequest | TB.ConnectorSyncJobClaimRequest, options?: TransportRequestOptions): Promise<T.ConnectorSyncJobClaimResponse>
|
||||
async syncJobClaim (this: That, params: T.ConnectorSyncJobClaimRequest | TB.ConnectorSyncJobClaimRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['connector_sync_job_id']
|
||||
const acceptedBody: string[] = ['sync_cursor', 'worker_hostname']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -527,7 +539,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Delete a connector sync job. Remove a connector sync job and its associated data. This is a destructive action that is not recoverable.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobDelete (this: That, params: T.ConnectorSyncJobDeleteRequest | TB.ConnectorSyncJobDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobDeleteResponse>
|
||||
async syncJobDelete (this: That, params: T.ConnectorSyncJobDeleteRequest | TB.ConnectorSyncJobDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobDeleteResponse, unknown>>
|
||||
@ -558,22 +570,34 @@ export default class Connector {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets an error for a connector sync job.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/set-connector-sync-job-error-api.html | Elasticsearch API documentation}
|
||||
* Set a connector sync job error. Set the `error` field for a connector sync job and set its `status` to `error`. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/set-connector-sync-job-error-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobError (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async syncJobError (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async syncJobError (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async syncJobError (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async syncJobError (this: That, params: T.ConnectorSyncJobErrorRequest | TB.ConnectorSyncJobErrorRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobErrorResponse>
|
||||
async syncJobError (this: That, params: T.ConnectorSyncJobErrorRequest | TB.ConnectorSyncJobErrorRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobErrorResponse, unknown>>
|
||||
async syncJobError (this: That, params: T.ConnectorSyncJobErrorRequest | TB.ConnectorSyncJobErrorRequest, options?: TransportRequestOptions): Promise<T.ConnectorSyncJobErrorResponse>
|
||||
async syncJobError (this: That, params: T.ConnectorSyncJobErrorRequest | TB.ConnectorSyncJobErrorRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['connector_sync_job_id']
|
||||
const acceptedBody: string[] = ['error']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -591,7 +615,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Get a connector sync job.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobGet (this: That, params: T.ConnectorSyncJobGetRequest | TB.ConnectorSyncJobGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobGetResponse>
|
||||
async syncJobGet (this: That, params: T.ConnectorSyncJobGetRequest | TB.ConnectorSyncJobGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobGetResponse, unknown>>
|
||||
@ -623,7 +647,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Get all connector sync jobs. Get information about all stored connector sync jobs listed by their creation date in ascending order.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/list-connector-sync-jobs-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/list-connector-sync-jobs-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobList (this: That, params?: T.ConnectorSyncJobListRequest | TB.ConnectorSyncJobListRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobListResponse>
|
||||
async syncJobList (this: That, params?: T.ConnectorSyncJobListRequest | TB.ConnectorSyncJobListRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobListResponse, unknown>>
|
||||
@ -653,7 +677,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Create a connector sync job. Create a connector sync job document in the internal index and initialize its counters and timestamps with default values.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/create-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-connector-sync-job-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobPost (this: That, params: T.ConnectorSyncJobPostRequest | TB.ConnectorSyncJobPostRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobPostResponse>
|
||||
async syncJobPost (this: That, params: T.ConnectorSyncJobPostRequest | TB.ConnectorSyncJobPostRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobPostResponse, unknown>>
|
||||
@ -693,22 +717,34 @@ export default class Connector {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the stats fields in the connector sync job document.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/set-connector-sync-job-stats-api.html | Elasticsearch API documentation}
|
||||
* Set the connector sync job stats. Stats include: `deleted_document_count`, `indexed_document_count`, `indexed_document_volume`, and `total_document_count`. You can also update `last_seen`. This API is mainly used by the connector service for updating sync job information. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/set-connector-sync-job-stats-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async syncJobUpdateStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async syncJobUpdateStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async syncJobUpdateStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async syncJobUpdateStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async syncJobUpdateStats (this: That, params: T.ConnectorSyncJobUpdateStatsRequest | TB.ConnectorSyncJobUpdateStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorSyncJobUpdateStatsResponse>
|
||||
async syncJobUpdateStats (this: That, params: T.ConnectorSyncJobUpdateStatsRequest | TB.ConnectorSyncJobUpdateStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorSyncJobUpdateStatsResponse, unknown>>
|
||||
async syncJobUpdateStats (this: That, params: T.ConnectorSyncJobUpdateStatsRequest | TB.ConnectorSyncJobUpdateStatsRequest, options?: TransportRequestOptions): Promise<T.ConnectorSyncJobUpdateStatsResponse>
|
||||
async syncJobUpdateStats (this: That, params: T.ConnectorSyncJobUpdateStatsRequest | TB.ConnectorSyncJobUpdateStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['connector_sync_job_id']
|
||||
const acceptedBody: string[] = ['deleted_document_count', 'indexed_document_count', 'indexed_document_volume', 'last_seen', 'metadata', 'total_document_count']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -726,7 +762,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Activate the connector draft filter. Activates the valid draft filtering for a connector.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-filtering-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-filtering-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateActiveFiltering (this: That, params: T.ConnectorUpdateActiveFilteringRequest | TB.ConnectorUpdateActiveFilteringRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateActiveFilteringResponse>
|
||||
async updateActiveFiltering (this: That, params: T.ConnectorUpdateActiveFilteringRequest | TB.ConnectorUpdateActiveFilteringRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateActiveFilteringResponse, unknown>>
|
||||
@ -758,7 +794,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector API key ID. Update the `api_key_id` and `api_key_secret_id` fields of a connector. You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored. The connector secret ID is required only for Elastic managed (native) connectors. Self-managed connectors (connector clients) do not use this field.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-api-key-id-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-api-key-id-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateApiKeyId (this: That, params: T.ConnectorUpdateApiKeyIdRequest | TB.ConnectorUpdateApiKeyIdRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateApiKeyIdResponse>
|
||||
async updateApiKeyId (this: That, params: T.ConnectorUpdateApiKeyIdRequest | TB.ConnectorUpdateApiKeyIdRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateApiKeyIdResponse, unknown>>
|
||||
@ -802,7 +838,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector configuration. Update the configuration field in the connector document.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-configuration-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-configuration-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateConfiguration (this: That, params: T.ConnectorUpdateConfigurationRequest | TB.ConnectorUpdateConfigurationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateConfigurationResponse>
|
||||
async updateConfiguration (this: That, params: T.ConnectorUpdateConfigurationRequest | TB.ConnectorUpdateConfigurationRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateConfigurationResponse, unknown>>
|
||||
@ -846,7 +882,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector error field. Set the error field for the connector. If the error provided in the request body is non-null, the connector’s status is updated to error. Otherwise, if the error is reset to null, the connector status is updated to connected.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-error-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-error-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateError (this: That, params: T.ConnectorUpdateErrorRequest | TB.ConnectorUpdateErrorRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateErrorResponse>
|
||||
async updateError (this: That, params: T.ConnectorUpdateErrorRequest | TB.ConnectorUpdateErrorRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateErrorResponse, unknown>>
|
||||
@ -889,22 +925,34 @@ export default class Connector {
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the connector features in the connector document.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-features-api.html | Elasticsearch API documentation}
|
||||
* Update the connector features. Update the connector features in the connector document. This API can be used to control the following aspects of a connector: * document-level security * incremental syncs * advanced sync rules * basic sync rules Normally, the running connector service automatically manages these features. However, you can use this API to override the default behavior. To sync data using self-managed connectors, you need to deploy the Elastic connector service on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-features-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateFeatures (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async updateFeatures (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async updateFeatures (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async updateFeatures (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async updateFeatures (this: That, params: T.ConnectorUpdateFeaturesRequest | TB.ConnectorUpdateFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateFeaturesResponse>
|
||||
async updateFeatures (this: That, params: T.ConnectorUpdateFeaturesRequest | TB.ConnectorUpdateFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateFeaturesResponse, unknown>>
|
||||
async updateFeatures (this: That, params: T.ConnectorUpdateFeaturesRequest | TB.ConnectorUpdateFeaturesRequest, options?: TransportRequestOptions): Promise<T.ConnectorUpdateFeaturesResponse>
|
||||
async updateFeatures (this: That, params: T.ConnectorUpdateFeaturesRequest | TB.ConnectorUpdateFeaturesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['connector_id']
|
||||
const acceptedBody: string[] = ['features']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -922,7 +970,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector filtering. Update the draft filtering configuration of a connector and marks the draft validation state as edited. The filtering draft is activated once validated by the running Elastic connector service. The filtering property is used to configure sync rules (both basic and advanced) for a connector.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-filtering-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-filtering-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateFiltering (this: That, params: T.ConnectorUpdateFilteringRequest | TB.ConnectorUpdateFilteringRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateFilteringResponse>
|
||||
async updateFiltering (this: That, params: T.ConnectorUpdateFilteringRequest | TB.ConnectorUpdateFilteringRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateFilteringResponse, unknown>>
|
||||
@ -966,7 +1014,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector draft filtering validation. Update the draft filtering validation info for a connector.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-filtering-validation-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-filtering-validation-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateFilteringValidation (this: That, params: T.ConnectorUpdateFilteringValidationRequest | TB.ConnectorUpdateFilteringValidationRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateFilteringValidationResponse>
|
||||
async updateFilteringValidation (this: That, params: T.ConnectorUpdateFilteringValidationRequest | TB.ConnectorUpdateFilteringValidationRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateFilteringValidationResponse, unknown>>
|
||||
@ -1010,7 +1058,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector index name. Update the `index_name` field of a connector, specifying the index where the data ingested by the connector is stored.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-index-name-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-index-name-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateIndexName (this: That, params: T.ConnectorUpdateIndexNameRequest | TB.ConnectorUpdateIndexNameRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateIndexNameResponse>
|
||||
async updateIndexName (this: That, params: T.ConnectorUpdateIndexNameRequest | TB.ConnectorUpdateIndexNameRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateIndexNameResponse, unknown>>
|
||||
@ -1054,7 +1102,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector name and description.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-name-description-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-name-description-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateName (this: That, params: T.ConnectorUpdateNameRequest | TB.ConnectorUpdateNameRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateNameResponse>
|
||||
async updateName (this: That, params: T.ConnectorUpdateNameRequest | TB.ConnectorUpdateNameRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateNameResponse, unknown>>
|
||||
@ -1098,7 +1146,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector is_native flag.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-native-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-native-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateNative (this: That, params: T.ConnectorUpdateNativeRequest | TB.ConnectorUpdateNativeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateNativeResponse>
|
||||
async updateNative (this: That, params: T.ConnectorUpdateNativeRequest | TB.ConnectorUpdateNativeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateNativeResponse, unknown>>
|
||||
@ -1142,7 +1190,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector pipeline. When you create a new connector, the configuration of an ingest pipeline is populated with default settings.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-pipeline-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-pipeline-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updatePipeline (this: That, params: T.ConnectorUpdatePipelineRequest | TB.ConnectorUpdatePipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdatePipelineResponse>
|
||||
async updatePipeline (this: That, params: T.ConnectorUpdatePipelineRequest | TB.ConnectorUpdatePipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdatePipelineResponse, unknown>>
|
||||
@ -1186,7 +1234,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector scheduling.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-scheduling-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-scheduling-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateScheduling (this: That, params: T.ConnectorUpdateSchedulingRequest | TB.ConnectorUpdateSchedulingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateSchedulingResponse>
|
||||
async updateScheduling (this: That, params: T.ConnectorUpdateSchedulingRequest | TB.ConnectorUpdateSchedulingRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateSchedulingResponse, unknown>>
|
||||
@ -1230,7 +1278,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector service type.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-service-type-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-service-type-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateServiceType (this: That, params: T.ConnectorUpdateServiceTypeRequest | TB.ConnectorUpdateServiceTypeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateServiceTypeResponse>
|
||||
async updateServiceType (this: That, params: T.ConnectorUpdateServiceTypeRequest | TB.ConnectorUpdateServiceTypeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateServiceTypeResponse, unknown>>
|
||||
@ -1274,7 +1322,7 @@ export default class Connector {
|
||||
|
||||
/**
|
||||
* Update the connector status.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/update-connector-status-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-connector-status-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async updateStatus (this: That, params: T.ConnectorUpdateStatusRequest | TB.ConnectorUpdateStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ConnectorUpdateStatusResponse>
|
||||
async updateStatus (this: That, params: T.ConnectorUpdateStatusRequest | TB.ConnectorUpdateStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ConnectorUpdateStatusResponse, unknown>>
|
||||
|
||||
@ -39,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Count search results. Get the number of documents matching a query.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-count.html | Elasticsearch API documentation}
|
||||
* Count search results. Get the number of documents matching a query. The query can be provided either by using a simple query string as a parameter, or by defining Query DSL within the request body. The query is optional. When no query is provided, the API uses `match_all` to count all the documents. The count API supports multi-target syntax. You can run a single count API search across multiple data streams and indices. The operation is broadcast across all shards. For each shard ID group, a replica is chosen and the search is run against it. This means that replicas increase the scalability of the count.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-count.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.CountResponse>
|
||||
export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.CountResponse, unknown>>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -46,7 +46,7 @@ export default class DanglingIndices {
|
||||
|
||||
/**
|
||||
* Delete a dangling index. If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-gateway-dangling-indices.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-index-delete.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DanglingIndicesDeleteDanglingIndexResponse>
|
||||
async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DanglingIndicesDeleteDanglingIndexResponse, unknown>>
|
||||
@ -78,7 +78,7 @@ export default class DanglingIndices {
|
||||
|
||||
/**
|
||||
* Import a dangling index. If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-gateway-dangling-indices.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-index-import.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DanglingIndicesImportDanglingIndexResponse>
|
||||
async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DanglingIndicesImportDanglingIndexResponse, unknown>>
|
||||
@ -110,7 +110,7 @@ export default class DanglingIndices {
|
||||
|
||||
/**
|
||||
* Get the dangling indices. If Elasticsearch encounters index data that is absent from the current cluster state, those indices are considered to be dangling. For example, this can happen if you delete more than `cluster.indices.tombstones.size` indices while an Elasticsearch node is offline. Use this API to list dangling indices, which you can then import or delete.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-gateway-dangling-indices.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/dangling-indices-list.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DanglingIndicesListDanglingIndicesResponse>
|
||||
async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DanglingIndicesListDanglingIndicesResponse, unknown>>
|
||||
|
||||
@ -39,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Delete a document. Removes a JSON document from the specified index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete.html | Elasticsearch API documentation}
|
||||
* Delete a document. Remove a JSON document from the specified index. NOTE: You cannot send deletion requests directly to a data stream. To delete a document in a data stream, you must target the backing index containing the document. **Optimistic concurrency control** Delete operations can be made conditional and only be performed if the last modification to the document was assigned the sequence number and primary term specified by the `if_seq_no` and `if_primary_term` parameters. If a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`. **Versioning** Each document indexed is versioned. When deleting a document, the version can be specified to make sure the relevant document you are trying to delete is actually being deleted and it has not changed in the meantime. Every write operation run on a document, deletes included, causes its version to be incremented. The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations. The length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting. **Routing** If routing is used during indexing, the routing value also needs to be specified to delete a document. If the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request. For example: ``` DELETE /my-index-000001/_doc/1?routing=shard-1 ``` This request deletes the document with ID 1, but it is routed based on the user. The document is not deleted if the correct routing is not specified. **Distributed** The delete operation gets hashed into a specific shard ID. It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteResponse>
|
||||
export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteResponse, unknown>>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -40,7 +40,7 @@ interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Throttle a delete by query operation. Change the number of requests per second for a particular delete by query operation. Rethrottling that speeds up the query takes effect immediately but rethrotting that slows down the query takes effect after completing the current batch to prevent scroll timeouts.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-delete-by-query.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-delete-by-query.html#docs-delete-by-query-rethrottle | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteByQueryRethrottleResponse>
|
||||
export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteByQueryRethrottleResponse, unknown>>
|
||||
|
||||
@ -40,7 +40,7 @@ interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Delete a script or search template. Deletes a stored script or search template.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-scripting.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-stored-script-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.DeleteScriptResponse>
|
||||
export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.DeleteScriptResponse, unknown>>
|
||||
|
||||
@ -46,7 +46,7 @@ export default class Enrich {
|
||||
|
||||
/**
|
||||
* Delete an enrich policy. Deletes an existing enrich policy and its enrich index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichDeletePolicyResponse>
|
||||
async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichDeletePolicyResponse, unknown>>
|
||||
@ -78,7 +78,7 @@ export default class Enrich {
|
||||
|
||||
/**
|
||||
* Run an enrich policy. Create the enrich index for an existing enrich policy.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/execute-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/execute-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichExecutePolicyResponse>
|
||||
async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichExecutePolicyResponse, unknown>>
|
||||
@ -110,7 +110,7 @@ export default class Enrich {
|
||||
|
||||
/**
|
||||
* Get an enrich policy. Returns information about an enrich policy.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichGetPolicyResponse>
|
||||
async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichGetPolicyResponse, unknown>>
|
||||
@ -150,7 +150,7 @@ export default class Enrich {
|
||||
|
||||
/**
|
||||
* Create an enrich policy. Creates an enrich policy.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/put-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/put-enrich-policy-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichPutPolicyResponse>
|
||||
async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichPutPolicyResponse, unknown>>
|
||||
@ -194,7 +194,7 @@ export default class Enrich {
|
||||
|
||||
/**
|
||||
* Get enrich stats. Returns enrich coordinator statistics and information about enrich policies that are currently executing.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/enrich-stats-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/enrich-stats-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichStatsResponse>
|
||||
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichStatsResponse, unknown>>
|
||||
|
||||
@ -46,7 +46,7 @@ export default class Eql {
|
||||
|
||||
/**
|
||||
* Delete an async EQL search. Delete an async EQL search or a stored synchronous EQL search. The API also deletes results for the search.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/eql-search-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-eql-delete | Elasticsearch API documentation}
|
||||
*/
|
||||
async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlDeleteResponse>
|
||||
async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlDeleteResponse, unknown>>
|
||||
@ -78,7 +78,7 @@ export default class Eql {
|
||||
|
||||
/**
|
||||
* Get async EQL search results. Get the current status and available results for an async EQL search or a stored synchronous EQL search.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-async-eql-search-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-eql-search-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async get<TEvent = unknown> (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlGetResponse<TEvent>>
|
||||
async get<TEvent = unknown> (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlGetResponse<TEvent>, unknown>>
|
||||
@ -110,7 +110,7 @@ export default class Eql {
|
||||
|
||||
/**
|
||||
* Get the async EQL status. Get the current status for an async EQL search or a stored synchronous EQL search without returning results.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-async-eql-status-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-async-eql-status-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlGetStatusResponse>
|
||||
async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlGetStatusResponse, unknown>>
|
||||
@ -142,14 +142,14 @@ export default class Eql {
|
||||
|
||||
/**
|
||||
* Get EQL search results. Returns search results for an Event Query Language (EQL) query. EQL assumes each document in a data stream or index corresponds to an event.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/eql-search-api.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/eql-search-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async search<TEvent = unknown> (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EqlSearchResponse<TEvent>>
|
||||
async search<TEvent = unknown> (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EqlSearchResponse<TEvent>, unknown>>
|
||||
async search<TEvent = unknown> (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptions): Promise<T.EqlSearchResponse<TEvent>>
|
||||
async search<TEvent = unknown> (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedBody: string[] = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'keep_alive', 'keep_on_completion', 'wait_for_completion_timeout', 'size', 'fields', 'result_position', 'runtime_mappings']
|
||||
const acceptedBody: string[] = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'keep_alive', 'keep_on_completion', 'wait_for_completion_timeout', 'allow_partial_search_results', 'allow_partial_sequence_results', 'size', 'fields', 'result_position', 'runtime_mappings', 'max_samples_per_key']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -45,22 +45,34 @@ export default class Esql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes an ESQL request asynchronously
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/esql-async-query-api.html | Elasticsearch API documentation}
|
||||
* Run an async ES|QL query. Asynchronously run an ES|QL (Elasticsearch query language) query, monitor its progress, and retrieve results when they become available. The API accepts the same parameters and request body as the synchronous query API, along with additional async related properties.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async asyncQuery (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryResponse>
|
||||
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryResponse, unknown>>
|
||||
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryResponse>
|
||||
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'profile', 'query', 'tables', 'include_ccs_metadata', 'wait_for_completion_timeout']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
let body: Record<string, any> | string
|
||||
if (typeof userBody === 'string') {
|
||||
body = userBody
|
||||
} else {
|
||||
body = userBody != null ? { ...userBody } : undefined
|
||||
}
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -74,22 +86,54 @@ export default class Esql {
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the results of a previously submitted async query request given its ID.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/esql-async-query-get-api.html | Elasticsearch API documentation}
|
||||
* Delete an async ES|QL query. If the query is still running, it is cancelled. Otherwise, the stored results are deleted. If the Elasticsearch security features are enabled, only the following users can use this API to delete a query: * The authenticated user that submitted the original query request * Users with the `cancel_task` cluster privilege
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-delete-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async asyncQueryGet (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryDeleteResponse>
|
||||
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryDeleteResponse, unknown>>
|
||||
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryDeleteResponse>
|
||||
async asyncQueryDelete (this: That, params: T.EsqlAsyncQueryDeleteRequest | TB.EsqlAsyncQueryDeleteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'DELETE'
|
||||
const path = `/_query/async/${encodeURIComponent(params.id.toString())}`
|
||||
const meta: TransportRequestMetadata = {
|
||||
name: 'esql.async_query_delete',
|
||||
pathParts: {
|
||||
id: params.id
|
||||
}
|
||||
}
|
||||
return await this.transport.request({ path, method, querystring, body, meta }, options)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get async ES|QL query results. Get the current status and available results or stored results for an ES|QL asynchronous query. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can retrieve the results using this API.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-get-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryGetResponse>
|
||||
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryGetResponse, unknown>>
|
||||
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryGetResponse>
|
||||
async asyncQueryGet (this: That, params: T.EsqlAsyncQueryGetRequest | TB.EsqlAsyncQueryGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
@ -105,16 +149,48 @@ export default class Esql {
|
||||
return await this.transport.request({ path, method, querystring, body, meta }, options)
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop async ES|QL query. This API interrupts the query execution and returns the results so far. If the Elasticsearch security features are enabled, only the user who first submitted the ES|QL query can stop it.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-async-query-stop-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async asyncQueryStop (this: That, params: T.EsqlAsyncQueryStopRequest | TB.EsqlAsyncQueryStopRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlAsyncQueryStopResponse>
|
||||
async asyncQueryStop (this: That, params: T.EsqlAsyncQueryStopRequest | TB.EsqlAsyncQueryStopRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlAsyncQueryStopResponse, unknown>>
|
||||
async asyncQueryStop (this: That, params: T.EsqlAsyncQueryStopRequest | TB.EsqlAsyncQueryStopRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryStopResponse>
|
||||
async asyncQueryStop (this: That, params: T.EsqlAsyncQueryStopRequest | TB.EsqlAsyncQueryStopRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = `/_query/async/${encodeURIComponent(params.id.toString())}/stop`
|
||||
const meta: TransportRequestMetadata = {
|
||||
name: 'esql.async_query_stop',
|
||||
pathParts: {
|
||||
id: params.id
|
||||
}
|
||||
}
|
||||
return await this.transport.request({ path, method, querystring, body, meta }, options)
|
||||
}
|
||||
|
||||
/**
|
||||
* Run an ES|QL query. Get search results for an ES|QL (Elasticsearch query language) query.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/esql-rest.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/esql-rest.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EsqlQueryResponse>
|
||||
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EsqlQueryResponse, unknown>>
|
||||
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlQueryResponse>
|
||||
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'profile', 'query', 'tables']
|
||||
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'profile', 'query', 'tables', 'include_ccs_metadata']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
const userBody: any = params?.body
|
||||
|
||||
@ -39,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Check a document. Checks if a specified document exists.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html | Elasticsearch API documentation}
|
||||
* Check a document. Verify that a document exists. For example, check to see if a document with the `_id` 0 exists: ``` HEAD my-index-000001/_doc/0 ``` If the document exists, the API returns a status code of `200 - OK`. If the document doesn’t exist, the API returns `404 - Not Found`. **Versioning support** You can use the `version` parameter to check the document only if its current version is equal to the specified one. Internally, Elasticsearch has marked the old document as deleted and added an entirely new document. The old version of the document doesn't disappear immediately, although you won't be able to access it. Elasticsearch cleans up deleted documents in the background as you continue to index more data.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsResponse>
|
||||
export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExistsResponse, unknown>>
|
||||
|
||||
@ -39,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Check for a document source. Checks if a document's `_source` is stored.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html | Elasticsearch API documentation}
|
||||
* Check for a document source. Check whether a document source exists in an index. For example: ``` HEAD my-index-000001/_source/1 ``` A document's source is not available if it is disabled in the mapping.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExistsSourceResponse>
|
||||
export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExistsSourceResponse, unknown>>
|
||||
|
||||
@ -39,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Explain a document match result. Returns information about why a specific document matches, or doesn’t match, a query.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-explain.html | Elasticsearch API documentation}
|
||||
* Explain a document match result. Get information about why a specific document matches, or doesn't match, a query. It computes a score explanation for a query and a specific document.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-explain.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function ExplainApi<TDocument = unknown> (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ExplainResponse<TDocument>>
|
||||
export default async function ExplainApi<TDocument = unknown> (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.ExplainResponse<TDocument>, unknown>>
|
||||
|
||||
@ -45,8 +45,8 @@ export default class Features {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of features which can be included in snapshots using the feature_states field when creating a snapshot
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-features-api.html | Elasticsearch API documentation}
|
||||
* Get the features. Get a list of features that can be included in snapshots using the `feature_states` field when creating a snapshot. You can use this API to determine which feature states to include when taking a snapshot. By default, all feature states are included in a snapshot if that snapshot includes the global state, or none if it does not. A feature state includes one or more system indices necessary for a given feature to function. In order to ensure data integrity, all system indices that comprise a feature state are snapshotted and restored together. The features listed by this API are a combination of built-in features and features defined by plugins. In order for a feature state to be listed in this API and recognized as a valid feature state by the create snapshot API, the plugin that defines that feature must be installed on the master node.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-features-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FeaturesGetFeaturesResponse>
|
||||
async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FeaturesGetFeaturesResponse, unknown>>
|
||||
@ -75,8 +75,8 @@ export default class Features {
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the internal state of features, usually by deleting system indices
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/modules-snapshots.html | Elasticsearch API documentation}
|
||||
* Reset the features. Clear all of the state information stored in system indices by Elasticsearch features, including the security and machine learning indices. WARNING: Intended for development and testing use only. Do not reset features on a production cluster. Return a cluster to the same state as a new installation by resetting the feature state for all Elasticsearch features. This deletes all state information stored in system indices. The response code is HTTP 200 if the state is successfully reset for all features. It is HTTP 500 if the reset operation failed for any feature. Note that select features might provide a way to reset particular system indices. Using this API resets all features, both those that are built-in and implemented as plugins. To list the features that will be affected, use the get features API. IMPORTANT: The features installed on the node you submit this request to are the features that will be reset. Run on the master node if you have any doubts about which plugins are installed on individual nodes.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/reset-features-api.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FeaturesResetFeaturesResponse>
|
||||
async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FeaturesResetFeaturesResponse, unknown>>
|
||||
|
||||
@ -40,7 +40,7 @@ interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Get the field capabilities. Get information about the capabilities of fields among multiple indices. For data streams, the API returns field capabilities among the stream’s backing indices. It returns runtime fields like any other field. For example, a runtime field with a type of keyword is returned the same as any other field that belongs to the `keyword` family.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/search-field-caps.html | Elasticsearch API documentation}
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-field-caps.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FieldCapsResponse>
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FieldCapsResponse, unknown>>
|
||||
|
||||
@ -107,8 +107,8 @@ export default class Fleet {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current global checkpoints for an index. This API is design for internal use by the fleet server project.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-global-checkpoints.html | Elasticsearch API documentation}
|
||||
* Get global checkpoints. Get the current global checkpoints for an index. This API is designed for internal use by the Fleet server project.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-global-checkpoints.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetGlobalCheckpointsResponse>
|
||||
async globalCheckpoints (this: That, params: T.FleetGlobalCheckpointsRequest | TB.FleetGlobalCheckpointsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetGlobalCheckpointsResponse, unknown>>
|
||||
@ -140,6 +140,7 @@ export default class Fleet {
|
||||
|
||||
/**
|
||||
* Executes several [fleet searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) with a single API request. The API follows the same structure as the [multi search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) API. However, similar to the fleet search API, it supports the wait_for_checkpoints parameter.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-multi-search.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async msearch<TDocument = unknown> (this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetMsearchResponse<TDocument>>
|
||||
async msearch<TDocument = unknown> (this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetMsearchResponse<TDocument>, unknown>>
|
||||
@ -211,6 +212,7 @@ export default class Fleet {
|
||||
|
||||
/**
|
||||
* The purpose of the fleet search api is to provide a search api where the search will only be executed after provided checkpoint has been processed and is visible for searches inside of Elasticsearch.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/fleet-search.html | Elasticsearch API documentation}
|
||||
*/
|
||||
async search<TDocument = unknown> (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetSearchResponse<TDocument>>
|
||||
async search<TDocument = unknown> (this: That, params: T.FleetSearchRequest | TB.FleetSearchRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.FleetSearchResponse<TDocument>, unknown>>
|
||||
|
||||
@ -39,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
|
||||
interface That { transport: Transport }
|
||||
|
||||
/**
|
||||
* Get a document by its ID. Retrieves the document with the specified ID from an index.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.16/docs-get.html | Elasticsearch API documentation}
|
||||
* Get a document by its ID. Get a document and its source or stored fields from an index. By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search). In the case where stored fields are requested with the `stored_fields` parameter and the document has been updated but is not yet refreshed, the API will have to parse and analyze the source to extract the stored fields. To turn off realtime behavior, set the `realtime` parameter to false. **Source filtering** By default, the API returns the contents of the `_source` field unless you have used the `stored_fields` parameter or the `_source` field is turned off. You can turn off `_source` retrieval by using the `_source` parameter: ``` GET my-index-000001/_doc/0?_source=false ``` If you only need one or two fields from the `_source`, use the `_source_includes` or `_source_excludes` parameters to include or filter out particular fields. This can be helpful with large documents where partial retrieval can save on network overhead Both parameters take a comma separated list of fields or wildcard expressions. For example: ``` GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities ``` If you only want to specify includes, you can use a shorter notation: ``` GET my-index-000001/_doc/0?_source=*.id ``` **Routing** If routing is used during indexing, the routing value also needs to be specified to retrieve a document. For example: ``` GET my-index-000001/_doc/2?routing=user1 ``` This request gets the document with ID 2, but it is routed based on the user. The document is not fetched if the correct routing is not specified. **Distributed** The GET operation is hashed into a specific shard ID. It is then redirected to one of the replicas within that shard ID and returns the result. The replicas are the primary shard and its replicas within that shard ID group. This means that the more replicas you have, the better your GET scaling will be. **Versioning support** You can use the `version` parameter to retrieve the document only if its current version is equal to the specified one. Internally, Elasticsearch has marked the old document as deleted and added an entirely new document. The old version of the document doesn't disappear immediately, although you won't be able to access it. Elasticsearch cleans up deleted documents in the background as you continue to index more data.
|
||||
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-get.html | Elasticsearch API documentation}
|
||||
*/
|
||||
export default async function GetApi<TDocument = unknown> (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.GetResponse<TDocument>>
|
||||
export default async function GetApi<TDocument = unknown> (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.GetResponse<TDocument>, unknown>>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user