From 7d5ab38a19a78244cf39974d27b499bcab6ac20c Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Mon, 2 Dec 2024 06:04:02 +0000 Subject: [PATCH] Auto-generated API code --- .../015e6e6132b6d6d44bddb06bc3b316ed.asciidoc | 46 ++++++ .../0165d22da5f2fc7678392b31d8eb5566.asciidoc | 18 ++ .../0bc6155e0c88062a4d8490da49db3aa8.asciidoc | 49 ++++++ .../0d689ac6e78be5d438f9b5d441be2b44.asciidoc | 57 +++++++ ...17b1647c8509543f2388c886f2584a20.asciidoc} | 2 +- ...22b176a184517cf1b5801f5eb4f17f97.asciidoc} | 4 +- .../2577acb462b95bd4394523cf2f8a661f.asciidoc | 28 ---- .../2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc | 16 -- .../30d051f534aeb884176eedb2c11dac85.asciidoc | 23 +++ ...4edfb5934d14ad7655bd7e19a112b5c0.asciidoc} | 10 +- ...5f16358ebb5d14b86f57612d5f92d923.asciidoc} | 1 - ...68d7f7d4d268ee98caead5aef19933d6.asciidoc} | 2 +- .../76e02434835630cb830724beb92df354.asciidoc | 44 +++++ .../78043831fd32004a82930c8ac8a1d809.asciidoc | 46 ++++++ .../79d206a528be704050a437adce2496dd.asciidoc | 23 +++ ...7a2fdfd7b0553d63440af7598f9ad867.asciidoc} | 2 +- ...8a0b5f759de3f27f0801c1176e616117.asciidoc} | 1 - .../9313f534e1aa266cde7d4af74665497f.asciidoc | 13 ++ .../96e88611f99e6834bd64b58dc8a282c1.asciidoc | 18 ++ .../97c6c07f46f4177f0565a04bc50924a3.asciidoc | 37 +++++ .../a9f14efc26fdd3c37a71f06c310163d9.asciidoc | 27 +++ .../ac22cc2b0f4ad659055feed2852a2d59.asciidoc | 37 +++++ ...ad9889fd8a4b5930e312a51f3bc996dc.asciidoc} | 2 +- .../ae3473adaf1515afcf7773f26c018e5c.asciidoc | 14 ++ .../bb2ba5d1885f87506f90dbb002e518f4.asciidoc | 45 +++++ .../bee3fda7bb07086243424b62e5b16ca7.asciidoc | 83 ++++++++++ .../d01a590fa9ea8a0cb34ed8dda502296c.asciidoc | 11 -- .../d4158d486e7fee2702a14068b69e3b33.asciidoc | 154 ++++++++++++++++++ .../e22a1da3c622611be6855e534c0709ae.asciidoc | 16 ++ .../e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc | 44 +++++ .../ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc | 94 +++++++++++ docs/reference.asciidoc | 29 +++- src/api/types.ts | 65 ++++++-- src/api/typesWithBodyKey.ts | 65 ++++++-- 34 files changed, 1024 insertions(+), 102 deletions(-) create mode 100644 docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc create mode 100644 docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc create mode 100644 docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc create mode 100644 docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc rename docs/doc_examples/{c02c2916b97b6fa7db82dbc7f0378310.asciidoc => 17b1647c8509543f2388c886f2584a20.asciidoc} (92%) rename docs/doc_examples/{4dab4c5168047ba596af1beb0e55b845.asciidoc => 22b176a184517cf1b5801f5eb4f17f97.asciidoc} (69%) delete mode 100644 docs/doc_examples/2577acb462b95bd4394523cf2f8a661f.asciidoc delete mode 100644 docs/doc_examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc create mode 100644 docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc rename docs/doc_examples/{191074b2eebd5f74e628c2ada4b6d2e4.asciidoc => 4edfb5934d14ad7655bd7e19a112b5c0.asciidoc} (95%) rename docs/doc_examples/{19f1f9f25933f8e7aba59a10881c648b.asciidoc => 5f16358ebb5d14b86f57612d5f92d923.asciidoc} (89%) rename docs/doc_examples/{2fd458d37aab509fe2d970c0b6e2a10f.asciidoc => 68d7f7d4d268ee98caead5aef19933d6.asciidoc} (97%) create mode 100644 docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc create mode 100644 docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc create mode 100644 docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc rename docs/doc_examples/{58f6b72009512851843c7b7a20e9504a.asciidoc => 7a2fdfd7b0553d63440af7598f9ad867.asciidoc} (94%) rename docs/doc_examples/{c8fa8d7e029792d539464fede18ce258.asciidoc => 8a0b5f759de3f27f0801c1176e616117.asciidoc} (89%) create mode 100644 docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc create mode 100644 docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc create mode 100644 docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc create mode 100644 docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc create mode 100644 docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc rename docs/doc_examples/{7b9691bd34a02dd859562eb927f175e0.asciidoc => ad9889fd8a4b5930e312a51f3bc996dc.asciidoc} (93%) create mode 100644 docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc create mode 100644 docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc create mode 100644 docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc delete mode 100644 docs/doc_examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc create mode 100644 docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc create mode 100644 docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc create mode 100644 docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc create mode 100644 docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc diff --git a/docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc b/docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc new file mode 100644 index 000000000..dc90ae673 --- /dev/null +++ b/docs/doc_examples/015e6e6132b6d6d44bddb06bc3b316ed.asciidoc @@ -0,0 +1,46 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + range: { + year: { + gt: 2023, + }, + }, + }, + }, + }, + { + standard: { + query: { + term: { + topic: "elastic", + }, + }, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + _source: false, + aggs: { + topics: { + terms: { + field: "topic", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc b/docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc new file mode 100644 index 000000000..279e91656 --- /dev/null +++ b/docs/doc_examples/0165d22da5f2fc7678392b31d8eb5566.asciidoc @@ -0,0 +1,18 @@ +// 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.inference.put({ + task_type: "rerank", + inference_id: "my-rerank-model", + inference_config: { + service: "cohere", + service_settings: { + model_id: "rerank-english-v3.0", + api_key: "{{COHERE_API_KEY}}", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc b/docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc new file mode 100644 index 000000000..01200be80 --- /dev/null +++ b/docs/doc_examples/0bc6155e0c88062a4d8490da49db3aa8.asciidoc @@ -0,0 +1,49 @@ +// 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.search({ + index: "retrievers_example_nested", + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + nested: { + path: "nested_field", + inner_hits: { + name: "nested_vector", + _source: false, + fields: ["nested_field.paragraph_id"], + }, + query: { + knn: { + field: "nested_field.nested_vector", + query_vector: [1, 0, 0.5], + k: 10, + }, + }, + }, + }, + }, + }, + { + standard: { + query: { + term: { + topic: "ai", + }, + }, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + _source: ["topic"], +}); +console.log(response); +---- diff --git a/docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc b/docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc new file mode 100644 index 000000000..c95b502ca --- /dev/null +++ b/docs/doc_examples/0d689ac6e78be5d438f9b5d441be2b44.asciidoc @@ -0,0 +1,57 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + term: { + topic: "elastic", + }, + }, + }, + }, + { + rrf: { + retrievers: [ + { + standard: { + query: { + query_string: { + query: + "(information retrieval) OR (artificial intelligence)", + default_field: "text", + }, + }, + }, + }, + { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + _source: false, + size: 1, + explain: true, +}); +console.log(response); +---- diff --git a/docs/doc_examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc b/docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc similarity index 92% rename from docs/doc_examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc rename to docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc index df440d14e..e1f4fbd3c 100644 --- a/docs/doc_examples/c02c2916b97b6fa7db82dbc7f0378310.asciidoc +++ b/docs/doc_examples/17b1647c8509543f2388c886f2584a20.asciidoc @@ -16,7 +16,7 @@ const response = await client.search({ }, }, field: "text", - inference_id: "my-cohere-rerank-model", + inference_id: "elastic-rerank", inference_text: "How often does the moon hide the sun?", rank_window_size: 100, min_score: 0.5, diff --git a/docs/doc_examples/4dab4c5168047ba596af1beb0e55b845.asciidoc b/docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc similarity index 69% rename from docs/doc_examples/4dab4c5168047ba596af1beb0e55b845.asciidoc rename to docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc index 0ba906074..a0c450d19 100644 --- a/docs/doc_examples/4dab4c5168047ba596af1beb0e55b845.asciidoc +++ b/docs/doc_examples/22b176a184517cf1b5801f5eb4f17f97.asciidoc @@ -3,8 +3,8 @@ [source, js] ---- -const response = await client.cluster.getSettings({ - flat_settings: "true", +const response = await client.indices.rollover({ + alias: "datastream", }); console.log(response); ---- diff --git a/docs/doc_examples/2577acb462b95bd4394523cf2f8a661f.asciidoc b/docs/doc_examples/2577acb462b95bd4394523cf2f8a661f.asciidoc deleted file mode 100644 index 9c0aff110..000000000 --- a/docs/doc_examples/2577acb462b95bd4394523cf2f8a661f.asciidoc +++ /dev/null @@ -1,28 +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.query({ - format: "txt", - query: - "\n FROM library\n | SORT page_count DESC\n | KEEP name, author\n | LOOKUP era ON author\n | LIMIT 5\n ", - tables: { - era: { - author: { - keyword: [ - "Frank Herbert", - "Peter F. Hamilton", - "Vernor Vinge", - "Alastair Reynolds", - "James S.A. Corey", - ], - }, - era: { - keyword: ["The New Wave", "Diamond", "Diamond", "Diamond", "Hadron"], - }, - }, - }, -}); -console.log(response); ----- diff --git a/docs/doc_examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc b/docs/doc_examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc deleted file mode 100644 index 5317e039e..000000000 --- a/docs/doc_examples/2bb41b0b4876ce98cd0cd8fb6d337f18.asciidoc +++ /dev/null @@ -1,16 +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.cluster.putSettings({ - persistent: { - "cluster.indices.close.enable": false, - "indices.recovery.max_bytes_per_sec": "50mb", - }, - transient: { - "*": null, - }, -}); -console.log(response); ----- diff --git a/docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc b/docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc new file mode 100644 index 000000000..0ea31b07a --- /dev/null +++ b/docs/doc_examples/30d051f534aeb884176eedb2c11dac85.asciidoc @@ -0,0 +1,23 @@ +// 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.inference.put({ + task_type: "rerank", + inference_id: "my-elastic-rerank", + inference_config: { + service: "elasticsearch", + service_settings: { + model_id: ".rerank-v1", + num_threads: 1, + adaptive_allocations: { + enabled: true, + min_number_of_allocations: 1, + max_number_of_allocations: 4, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc b/docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc similarity index 95% rename from docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc rename to docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc index 9b24f99c0..3bce99ecc 100644 --- a/docs/doc_examples/191074b2eebd5f74e628c2ada4b6d2e4.asciidoc +++ b/docs/doc_examples/4edfb5934d14ad7655bd7e19a112b5c0.asciidoc @@ -8,11 +8,6 @@ const response = await client.search({ query: { bool: { must: [ - { - term: { - "category.keyword": "Main Course", - }, - }, { term: { tags: "vegetarian", @@ -27,6 +22,11 @@ const response = await client.search({ }, ], should: [ + { + term: { + category: "Main Course", + }, + }, { multi_match: { query: "curry spicy", diff --git a/docs/doc_examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc b/docs/doc_examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc similarity index 89% rename from docs/doc_examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc rename to docs/doc_examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc index 1d9708b3c..454dd9502 100644 --- a/docs/doc_examples/19f1f9f25933f8e7aba59a10881c648b.asciidoc +++ b/docs/doc_examples/5f16358ebb5d14b86f57612d5f92d923.asciidoc @@ -9,7 +9,6 @@ const response = await client.indices.create({ properties: { inference_field: { type: "semantic_text", - inference_id: "my-elser-endpoint", }, }, }, diff --git a/docs/doc_examples/2fd458d37aab509fe2d970c0b6e2a10f.asciidoc b/docs/doc_examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc similarity index 97% rename from docs/doc_examples/2fd458d37aab509fe2d970c0b6e2a10f.asciidoc rename to docs/doc_examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc index 2f15a5eb4..021aa7e19 100644 --- a/docs/doc_examples/2fd458d37aab509fe2d970c0b6e2a10f.asciidoc +++ b/docs/doc_examples/68d7f7d4d268ee98caead5aef19933d6.asciidoc @@ -45,7 +45,7 @@ console.log(response); const response1 = await client.indices.putIndexTemplate({ name: 2, - index_patterns: ["k8s*"], + index_patterns: ["k9s*"], composed_of: ["destination_template"], data_stream: {}, }); diff --git a/docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc b/docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc new file mode 100644 index 000000000..ab4d1fc80 --- /dev/null +++ b/docs/doc_examples/76e02434835630cb830724beb92df354.asciidoc @@ -0,0 +1,44 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + rrf: { + retrievers: [ + { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + { + text_similarity_reranker: { + retriever: { + standard: { + query: { + term: { + topic: "ai", + }, + }, + }, + }, + field: "text", + inference_id: "my-rerank-model", + inference_text: + "Can I use generative AI to identify user intent and improve search relevance?", + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + _source: false, +}); +console.log(response); +---- diff --git a/docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc b/docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc new file mode 100644 index 000000000..5151bb769 --- /dev/null +++ b/docs/doc_examples/78043831fd32004a82930c8ac8a1d809.asciidoc @@ -0,0 +1,46 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + text_similarity_reranker: { + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + query_string: { + query: + "(information retrieval) OR (artificial intelligence)", + default_field: "text", + }, + }, + }, + }, + { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + field: "text", + inference_id: "my-rerank-model", + inference_text: + "What are the state of the art applications of AI in information retrieval?", + }, + }, + _source: false, +}); +console.log(response); +---- diff --git a/docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc b/docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc new file mode 100644 index 000000000..60583c320 --- /dev/null +++ b/docs/doc_examples/79d206a528be704050a437adce2496dd.asciidoc @@ -0,0 +1,23 @@ +// 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.inference.put({ + task_type: "rerank", + inference_id: "my-elastic-rerank", + inference_config: { + service: "elasticsearch", + service_settings: { + model_id: ".rerank-v1", + num_threads: 1, + adaptive_allocations: { + enabled: true, + min_number_of_allocations: 1, + max_number_of_allocations: 10, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc b/docs/doc_examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc similarity index 94% rename from docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc rename to docs/doc_examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc index ab21c2d80..63fb1f69a 100644 --- a/docs/doc_examples/58f6b72009512851843c7b7a20e9504a.asciidoc +++ b/docs/doc_examples/7a2fdfd7b0553d63440af7598f9ad867.asciidoc @@ -4,7 +4,7 @@ [source, js] ---- const response = await client.indices.create({ - index: "my-index-000002", + index: "my-index-000003", mappings: { properties: { inference_field: { diff --git a/docs/doc_examples/c8fa8d7e029792d539464fede18ce258.asciidoc b/docs/doc_examples/8a0b5f759de3f27f0801c1176e616117.asciidoc similarity index 89% rename from docs/doc_examples/c8fa8d7e029792d539464fede18ce258.asciidoc rename to docs/doc_examples/8a0b5f759de3f27f0801c1176e616117.asciidoc index 598fd1f7b..5ac85568d 100644 --- a/docs/doc_examples/c8fa8d7e029792d539464fede18ce258.asciidoc +++ b/docs/doc_examples/8a0b5f759de3f27f0801c1176e616117.asciidoc @@ -9,7 +9,6 @@ const response = await client.indices.create({ properties: { content: { type: "semantic_text", - inference_id: "my-elser-endpoint", }, }, }, diff --git a/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc b/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc new file mode 100644 index 000000000..86e737ce5 --- /dev/null +++ b/docs/doc_examples/9313f534e1aa266cde7d4af74665497f.asciidoc @@ -0,0 +1,13 @@ +// 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.connector.put({ + connector_id: "my-{service-name-stub}-connector", + index_name: "my-elasticsearch-index", + name: "Content synced from {service-name}", + service_type: "{service-name-stub}", +}); +console.log(response); +---- diff --git a/docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc b/docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc new file mode 100644 index 000000000..d3786611f --- /dev/null +++ b/docs/doc_examples/96e88611f99e6834bd64b58dc8a282c1.asciidoc @@ -0,0 +1,18 @@ +// 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: "my-index-000002", + mappings: { + properties: { + inference_field: { + type: "semantic_text", + inference_id: "my-openai-endpoint", + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc b/docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc new file mode 100644 index 000000000..ae96b5501 --- /dev/null +++ b/docs/doc_examples/97c6c07f46f4177f0565a04bc50924a3.asciidoc @@ -0,0 +1,37 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + query_string: { + query: "(information retrieval) OR (artificial intelligence)", + default_field: "text", + }, + }, + }, + }, + { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + _source: false, +}); +console.log(response); +---- diff --git a/docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc b/docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc new file mode 100644 index 000000000..488fb5205 --- /dev/null +++ b/docs/doc_examples/a9f14efc26fdd3c37a71f06c310163d9.asciidoc @@ -0,0 +1,27 @@ +// 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.search({ + retriever: { + text_similarity_reranker: { + retriever: { + standard: { + query: { + match: { + text: "How often does the moon hide the sun?", + }, + }, + }, + }, + field: "text", + inference_id: "my-elastic-rerank", + inference_text: "How often does the moon hide the sun?", + rank_window_size: 100, + min_score: 0.5, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc b/docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc new file mode 100644 index 000000000..0e3921a75 --- /dev/null +++ b/docs/doc_examples/ac22cc2b0f4ad659055feed2852a2d59.asciidoc @@ -0,0 +1,37 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + text_similarity_reranker: { + retriever: { + text_similarity_reranker: { + retriever: { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + rank_window_size: 100, + field: "text", + inference_id: "my-rerank-model", + inference_text: + "What are the state of the art applications of AI in information retrieval?", + }, + }, + rank_window_size: 10, + field: "text", + inference_id: "my-other-more-expensive-rerank-model", + inference_text: + "Applications of Large Language Models in technology and their impact on user satisfaction", + }, + }, + _source: false, +}); +console.log(response); +---- diff --git a/docs/doc_examples/7b9691bd34a02dd859562eb927f175e0.asciidoc b/docs/doc_examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc similarity index 93% rename from docs/doc_examples/7b9691bd34a02dd859562eb927f175e0.asciidoc rename to docs/doc_examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc index 847cbc4b8..ca15245b8 100644 --- a/docs/doc_examples/7b9691bd34a02dd859562eb927f175e0.asciidoc +++ b/docs/doc_examples/ad9889fd8a4b5930e312a51f3bc996dc.asciidoc @@ -12,7 +12,7 @@ const response = await client.inference.put({ adaptive_allocations: { enabled: true, min_number_of_allocations: 1, - max_number_of_allocations: 10, + max_number_of_allocations: 4, }, num_threads: 1, model_id: ".elser_model_2", diff --git a/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc b/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc new file mode 100644 index 000000000..67a3d5d75 --- /dev/null +++ b/docs/doc_examples/ae3473adaf1515afcf7773f26c018e5c.asciidoc @@ -0,0 +1,14 @@ +// 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.connector.put({ + connector_id: "my-{service-name-stub}-connector", + index_name: "my-elasticsearch-index", + name: "Content synced from {service-name}", + service_type: "{service-name-stub}", + is_native: true, +}); +console.log(response); +---- diff --git a/docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc b/docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc new file mode 100644 index 000000000..ac5f2bf5b --- /dev/null +++ b/docs/doc_examples/bb2ba5d1885f87506f90dbb002e518f4.asciidoc @@ -0,0 +1,45 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + query_string: { + query: "(information retrieval) OR (artificial intelligence)", + default_field: "text", + }, + }, + }, + }, + { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + highlight: { + fields: { + text: { + fragment_size: 150, + number_of_fragments: 3, + }, + }, + }, + _source: false, +}); +console.log(response); +---- diff --git a/docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc b/docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc new file mode 100644 index 000000000..9ab13275d --- /dev/null +++ b/docs/doc_examples/bee3fda7bb07086243424b62e5b16ca7.asciidoc @@ -0,0 +1,83 @@ +// 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: "retrievers_example_nested", + mappings: { + properties: { + nested_field: { + type: "nested", + properties: { + paragraph_id: { + type: "keyword", + }, + nested_vector: { + type: "dense_vector", + dims: 3, + similarity: "l2_norm", + index: true, + }, + }, + }, + topic: { + type: "keyword", + }, + }, + }, +}); +console.log(response); + +const response1 = await client.index({ + index: "retrievers_example_nested", + id: 1, + document: { + nested_field: [ + { + paragraph_id: "1a", + nested_vector: [-1.12, -0.59, 0.78], + }, + { + paragraph_id: "1b", + nested_vector: [-0.12, 1.56, 0.42], + }, + { + paragraph_id: "1c", + nested_vector: [1, -1, 0], + }, + ], + topic: ["ai"], + }, +}); +console.log(response1); + +const response2 = await client.index({ + index: "retrievers_example_nested", + id: 2, + document: { + nested_field: [ + { + paragraph_id: "2a", + nested_vector: [0.23, 1.24, 0.65], + }, + ], + topic: ["information_retrieval"], + }, +}); +console.log(response2); + +const response3 = await client.index({ + index: "retrievers_example_nested", + id: 3, + document: { + topic: ["ai"], + }, +}); +console.log(response3); + +const response4 = await client.indices.refresh({ + index: "retrievers_example_nested", +}); +console.log(response4); +---- diff --git a/docs/doc_examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc b/docs/doc_examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc deleted file mode 100644 index ec1e35374..000000000 --- a/docs/doc_examples/d01a590fa9ea8a0cb34ed8dda502296c.asciidoc +++ /dev/null @@ -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.cluster.getSettings({ - flat_settings: "true", - filter_path: "transient", -}); -console.log(response); ----- diff --git a/docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc b/docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc new file mode 100644 index 000000000..ccee5c776 --- /dev/null +++ b/docs/doc_examples/d4158d486e7fee2702a14068b69e3b33.asciidoc @@ -0,0 +1,154 @@ +// 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.putIndexTemplate({ + name: "datastream_template", + index_patterns: ["datastream*"], + data_stream: {}, + template: { + lifecycle: { + downsampling: [ + { + after: "1m", + fixed_interval: "1h", + }, + ], + }, + settings: { + index: { + mode: "time_series", + }, + }, + mappings: { + properties: { + "@timestamp": { + type: "date", + }, + kubernetes: { + properties: { + container: { + properties: { + cpu: { + properties: { + usage: { + properties: { + core: { + properties: { + ns: { + type: "long", + }, + }, + }, + limit: { + properties: { + pct: { + type: "float", + }, + }, + }, + nanocores: { + type: "long", + time_series_metric: "gauge", + }, + node: { + properties: { + pct: { + type: "float", + }, + }, + }, + }, + }, + }, + }, + memory: { + properties: { + available: { + properties: { + bytes: { + type: "long", + time_series_metric: "gauge", + }, + }, + }, + majorpagefaults: { + type: "long", + }, + pagefaults: { + type: "long", + time_series_metric: "gauge", + }, + rss: { + properties: { + bytes: { + type: "long", + time_series_metric: "gauge", + }, + }, + }, + usage: { + properties: { + bytes: { + type: "long", + time_series_metric: "gauge", + }, + limit: { + properties: { + pct: { + type: "float", + }, + }, + }, + node: { + properties: { + pct: { + type: "float", + }, + }, + }, + }, + }, + workingset: { + properties: { + bytes: { + type: "long", + time_series_metric: "gauge", + }, + }, + }, + }, + }, + name: { + type: "keyword", + }, + start_time: { + type: "date", + }, + }, + }, + host: { + type: "keyword", + time_series_dimension: true, + }, + namespace: { + type: "keyword", + time_series_dimension: true, + }, + node: { + type: "keyword", + time_series_dimension: true, + }, + pod: { + type: "keyword", + time_series_dimension: true, + }, + }, + }, + }, + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc b/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc new file mode 100644 index 000000000..26c4b9b0a --- /dev/null +++ b/docs/doc_examples/e22a1da3c622611be6855e534c0709ae.asciidoc @@ -0,0 +1,16 @@ +// 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.transport.request({ + method: "POST", + path: "/_query_rules/my-ruleset/_test", + body: { + match_criteria: { + query_string: "puggles", + }, + }, +}); +console.log(response); +---- diff --git a/docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc b/docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc new file mode 100644 index 000000000..a0bffb528 --- /dev/null +++ b/docs/doc_examples/e6f6d3aeea7ecea47cfd5c3d727f7004.asciidoc @@ -0,0 +1,44 @@ +// 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.search({ + index: "retrievers_example", + retriever: { + rrf: { + retrievers: [ + { + standard: { + query: { + query_string: { + query: "(information retrieval) OR (artificial intelligence)", + default_field: "text", + }, + }, + }, + }, + { + knn: { + field: "vector", + query_vector: [0.23, 0.67, 0.89], + k: 3, + num_candidates: 5, + }, + }, + ], + rank_window_size: 10, + rank_constant: 1, + }, + }, + collapse: { + field: "year", + inner_hits: { + name: "topic related documents", + _source: ["year"], + }, + }, + _source: false, +}); +console.log(response); +---- diff --git a/docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc b/docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc new file mode 100644 index 000000000..abb8e0b60 --- /dev/null +++ b/docs/doc_examples/ee05714a83d75fb6858e3b9fcbeb8f8b.asciidoc @@ -0,0 +1,94 @@ +// 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: "retrievers_example", + mappings: { + properties: { + vector: { + type: "dense_vector", + dims: 3, + similarity: "l2_norm", + index: true, + }, + text: { + type: "text", + }, + year: { + type: "integer", + }, + topic: { + type: "keyword", + }, + }, + }, +}); +console.log(response); + +const response1 = await client.index({ + index: "retrievers_example", + id: 1, + document: { + vector: [0.23, 0.67, 0.89], + text: "Large language models are revolutionizing information retrieval by boosting search precision, deepening contextual understanding, and reshaping user experiences in data-rich environments.", + year: 2024, + topic: ["llm", "ai", "information_retrieval"], + }, +}); +console.log(response1); + +const response2 = await client.index({ + index: "retrievers_example", + id: 2, + document: { + vector: [0.12, 0.56, 0.78], + text: "Artificial intelligence is transforming medicine, from advancing diagnostics and tailoring treatment plans to empowering predictive patient care for improved health outcomes.", + year: 2023, + topic: ["ai", "medicine"], + }, +}); +console.log(response2); + +const response3 = await client.index({ + index: "retrievers_example", + id: 3, + document: { + vector: [0.45, 0.32, 0.91], + text: "AI is redefining security by enabling advanced threat detection, proactive risk analysis, and dynamic defenses against increasingly sophisticated cyber threats.", + year: 2024, + topic: ["ai", "security"], + }, +}); +console.log(response3); + +const response4 = await client.index({ + index: "retrievers_example", + id: 4, + document: { + vector: [0.34, 0.21, 0.98], + text: "Elastic introduces Elastic AI Assistant, the open, generative AI sidekick powered by ESRE to democratize cybersecurity and enable users of every skill level.", + year: 2023, + topic: ["ai", "elastic", "assistant"], + }, +}); +console.log(response4); + +const response5 = await client.index({ + index: "retrievers_example", + id: 5, + document: { + vector: [0.11, 0.65, 0.47], + text: "Learn how to spin up a deployment of our hosted Elasticsearch Service and use Elastic Observability to gain deeper insight into the behavior of your applications and systems.", + year: 2024, + topic: ["documentation", "observability", "elastic"], + }, +}); +console.log(response5); + +const response6 = await client.indices.refresh({ + index: "retrievers_example", +}); +console.log(response6); +---- diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index bab82b7fb..6f315c485 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -818,6 +818,8 @@ Random by default. ** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports a list of values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. +** *`allow_partial_search_results` (Optional, boolean)*: If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception. +If `true`, the point in time will contain all the shards that are available at the time of the request. [discrete] === ping @@ -1558,6 +1560,8 @@ client.asyncSearch.status({ id }) * *Request (object):* ** *`id` (string)*: A unique identifier for the async search. +** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search needs to be available. +Ongoing async searches and any saved search results are deleted after this period. [discrete] ==== submit @@ -1659,14 +1663,13 @@ A partial reduction is performed every time the coordinating node has received a ** *`pre_filter_shard_size` (Optional, number)*: The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped. ** *`request_cache` (Optional, boolean)*: Specify if request cache should be used for this request or not, defaults to true ** *`routing` (Optional, string)*: A list of specific routing values -** *`scroll` (Optional, string | -1 | 0)* ** *`search_type` (Optional, Enum("query_then_fetch" | "dfs_query_then_fetch"))*: Search operation type ** *`suggest_field` (Optional, string)*: Specifies which field to use for suggestions. ** *`suggest_mode` (Optional, Enum("missing" | "popular" | "always"))*: Specify suggest mode ** *`suggest_size` (Optional, number)*: How many suggestions to return in response ** *`suggest_text` (Optional, string)*: The source text for which the suggestions should be returned. ** *`typed_keys` (Optional, boolean)*: Specify whether aggregation and suggester names should be prefixed by their respective types in the response -** *`rest_total_hits_as_int` (Optional, boolean)* +** *`rest_total_hits_as_int` (Optional, boolean)*: Indicates whether hits.total should be rendered as an integer or an object in the rest search response ** *`_source_excludes` (Optional, string | string[])*: A list of fields to exclude from the returned _source field ** *`_source_includes` (Optional, string | string[])*: A list of fields to extract and return from the _source field ** *`q` (Optional, string)*: Query in the Lucene query string syntax @@ -1690,6 +1693,9 @@ client.autoscaling.deleteAutoscalingPolicy({ name }) * *Request (object):* ** *`name` (string)*: the name of the autoscaling policy +** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. +If no response is received before the timeout expires, the request fails and returns an error. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. [discrete] ==== get_autoscaling_capacity @@ -1711,9 +1717,15 @@ Do not use this information to make autoscaling decisions. {ref}/autoscaling-get-autoscaling-capacity.html[Endpoint documentation] [source,ts] ---- -client.autoscaling.getAutoscalingCapacity() +client.autoscaling.getAutoscalingCapacity({ ... }) ---- +[discrete] +==== Arguments + +* *Request (object):* +** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. +If no response is received before the timeout expires, the request fails and returns an error. [discrete] ==== get_autoscaling_policy @@ -1732,6 +1744,8 @@ client.autoscaling.getAutoscalingPolicy({ name }) * *Request (object):* ** *`name` (string)*: the name of the autoscaling policy +** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. +If no response is received before the timeout expires, the request fails and returns an error. [discrete] ==== put_autoscaling_policy @@ -1751,6 +1765,9 @@ client.autoscaling.putAutoscalingPolicy({ name }) * *Request (object):* ** *`name` (string)*: the name of the autoscaling policy ** *`policy` (Optional, { roles, deciders })* +** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. +If no response is received before the timeout expires, the request fails and returns an error. +** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. [discrete] === cat @@ -9204,7 +9221,7 @@ client.security.bulkPutRole({ roles }) ==== Arguments * *Request (object):* -** *`roles` (Record)*: A dictionary of role name to RoleDescriptor objects to add or update +** *`roles` (Record)*: A dictionary of role name to RoleDescriptor objects to add or update ** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. [discrete] @@ -9361,7 +9378,7 @@ client.security.createApiKey({ ... }) * *Request (object):* ** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key. By default, API keys never expire. ** *`name` (Optional, string)*: Specifies the name for this API key. -** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. +** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. ** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with `_` are reserved for system usage. ** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. @@ -10431,7 +10448,7 @@ client.security.updateApiKey({ id }) * *Request (object):* ** *`id` (string)*: The ID of the API key to update. -** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. +** *`role_descriptors` (Optional, Record)*: An array of role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, then the API key will have a point in time snapshot of permissions of the authenticated user. If you supply role descriptors then the resultant permissions would be an intersection of API keys permissions and authenticated user’s permissions thereby limiting the access scope for API keys. The structure of role descriptor is the same as the request for create role API. For more details, see create or update roles API. ** *`metadata` (Optional, Record)*: Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. ** *`expiration` (Optional, string | -1 | 0)*: Expiration time for the API key. diff --git a/src/api/types.ts b/src/api/types.ts index 7a92daa1d..d576ad3c0 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -498,6 +498,15 @@ export interface HealthReportDiskIndicatorDetails { nodes_with_unknown_disk_status: long } +export interface HealthReportFileSettingsIndicator extends HealthReportBaseIndicator { + details?: HealthReportFileSettingsIndicatorDetails +} + +export interface HealthReportFileSettingsIndicatorDetails { + failure_streak: long + most_recent_failure: string +} + export interface HealthReportIlmIndicator extends HealthReportBaseIndicator { details?: HealthReportIlmIndicatorDetails } @@ -533,6 +542,7 @@ export interface HealthReportIndicators { ilm?: HealthReportIlmIndicator slm?: HealthReportSlmIndicator shards_capacity?: HealthReportShardsCapacityIndicator + file_settings?: HealthReportFileSettingsIndicator } export interface HealthReportMasterIsStableIndicator extends HealthReportBaseIndicator { @@ -884,6 +894,7 @@ export interface OpenPointInTimeRequest extends RequestBase { preference?: string routing?: Routing expand_wildcards?: ExpandWildcards + allow_partial_search_results?: boolean index_filter?: QueryDslQueryContainer } @@ -6663,6 +6674,7 @@ export type AsyncSearchGetResponse + rule_type_counts: Record } export interface QueryRulesListRulesetsRequest extends RequestBase { @@ -17267,21 +17285,26 @@ export interface SecurityAccess { } export interface SecurityApiKey { - creation?: long - expiration?: long id: Id - invalidated?: boolean name: Name - realm?: string + type: SecurityApiKeyType + creation: EpochTime + expiration?: EpochTime + invalidated: boolean + invalidation?: EpochTime + username: Username + realm: string realm_type?: string - username?: Username - profile_uid?: string - metadata?: Metadata + metadata: Metadata role_descriptors?: Record limited_by?: Record[] + access?: SecurityAccess + profile_uid?: string _sort?: SortResults } +export type SecurityApiKeyType = 'rest' | 'cross_cluster' + export interface SecurityApplicationGlobalUserPrivileges { manage: SecurityManageUserPrivileges } @@ -17328,7 +17351,7 @@ export type SecurityIndexPrivilege = 'all' | 'auto_configure' | 'create' | 'crea export interface SecurityIndicesPrivileges { field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean @@ -17355,17 +17378,23 @@ export interface SecurityRemoteClusterPrivileges { export interface SecurityRemoteIndicesPrivileges { clusters: Names field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean } export interface SecurityReplicationAccess { - names: IndexName[] + names: IndexName | IndexName[] allow_restricted_indices?: boolean } +export interface SecurityRestriction { + workflows: SecurityRestrictionWorkflow[] +} + +export type SecurityRestrictionWorkflow = 'search_application_query' | string + export interface SecurityRoleDescriptor { cluster?: SecurityClusterPrivilege[] indices?: SecurityIndicesPrivileges[] @@ -17377,6 +17406,7 @@ export interface SecurityRoleDescriptor { metadata?: Metadata run_as?: string[] description?: string + restriction?: SecurityRestriction transient_metadata?: Record } @@ -17391,6 +17421,7 @@ export interface SecurityRoleDescriptorRead { metadata?: Metadata run_as?: string[] description?: string + restriction?: SecurityRestriction transient_metadata?: Record } @@ -17430,7 +17461,7 @@ export interface SecurityRoleTemplateScript { export interface SecuritySearchAccess { field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean } @@ -17449,7 +17480,7 @@ export interface SecurityUser { export interface SecurityUserIndicesPrivileges { field_security?: SecurityFieldSecurity[] - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery[] allow_restricted_indices: boolean @@ -17493,11 +17524,16 @@ export interface SecurityActivateUserProfileRequest extends RequestBase { export type SecurityActivateUserProfileResponse = SecurityUserProfileWithMetadata +export interface SecurityAuthenticateAuthenticateApiKey { + id: Id + name?: Name +} + export interface SecurityAuthenticateRequest extends RequestBase { } export interface SecurityAuthenticateResponse { - api_key?: SecurityApiKey + api_key?: SecurityAuthenticateAuthenticateApiKey authentication_realm: SecurityRealmInfo email?: string | null full_name?: Name | null @@ -19884,6 +19920,7 @@ export interface WatcherReportingEmailAttachment { export type WatcherResponseContentType = 'json' | 'yaml' | 'text' export interface WatcherScheduleContainer { + timezone?: string cron?: WatcherCronExpression daily?: WatcherDailySchedule hourly?: WatcherHourlySchedule diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index 1782c9bbf..516bdefc2 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -519,6 +519,15 @@ export interface HealthReportDiskIndicatorDetails { nodes_with_unknown_disk_status: long } +export interface HealthReportFileSettingsIndicator extends HealthReportBaseIndicator { + details?: HealthReportFileSettingsIndicatorDetails +} + +export interface HealthReportFileSettingsIndicatorDetails { + failure_streak: long + most_recent_failure: string +} + export interface HealthReportIlmIndicator extends HealthReportBaseIndicator { details?: HealthReportIlmIndicatorDetails } @@ -554,6 +563,7 @@ export interface HealthReportIndicators { ilm?: HealthReportIlmIndicator slm?: HealthReportSlmIndicator shards_capacity?: HealthReportShardsCapacityIndicator + file_settings?: HealthReportFileSettingsIndicator } export interface HealthReportMasterIsStableIndicator extends HealthReportBaseIndicator { @@ -917,6 +927,7 @@ export interface OpenPointInTimeRequest extends RequestBase { preference?: string routing?: Routing expand_wildcards?: ExpandWildcards + allow_partial_search_results?: boolean /** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */ body?: { index_filter?: QueryDslQueryContainer @@ -6739,6 +6750,7 @@ export type AsyncSearchGetResponse + rule_type_counts: Record } export interface QueryRulesListRulesetsRequest extends RequestBase { @@ -17645,21 +17663,26 @@ export interface SecurityAccess { } export interface SecurityApiKey { - creation?: long - expiration?: long id: Id - invalidated?: boolean name: Name - realm?: string + type: SecurityApiKeyType + creation: EpochTime + expiration?: EpochTime + invalidated: boolean + invalidation?: EpochTime + username: Username + realm: string realm_type?: string - username?: Username - profile_uid?: string - metadata?: Metadata + metadata: Metadata role_descriptors?: Record limited_by?: Record[] + access?: SecurityAccess + profile_uid?: string _sort?: SortResults } +export type SecurityApiKeyType = 'rest' | 'cross_cluster' + export interface SecurityApplicationGlobalUserPrivileges { manage: SecurityManageUserPrivileges } @@ -17706,7 +17729,7 @@ export type SecurityIndexPrivilege = 'all' | 'auto_configure' | 'create' | 'crea export interface SecurityIndicesPrivileges { field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean @@ -17733,17 +17756,23 @@ export interface SecurityRemoteClusterPrivileges { export interface SecurityRemoteIndicesPrivileges { clusters: Names field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean } export interface SecurityReplicationAccess { - names: IndexName[] + names: IndexName | IndexName[] allow_restricted_indices?: boolean } +export interface SecurityRestriction { + workflows: SecurityRestrictionWorkflow[] +} + +export type SecurityRestrictionWorkflow = 'search_application_query' | string + export interface SecurityRoleDescriptor { cluster?: SecurityClusterPrivilege[] indices?: SecurityIndicesPrivileges[] @@ -17755,6 +17784,7 @@ export interface SecurityRoleDescriptor { metadata?: Metadata run_as?: string[] description?: string + restriction?: SecurityRestriction transient_metadata?: Record } @@ -17769,6 +17799,7 @@ export interface SecurityRoleDescriptorRead { metadata?: Metadata run_as?: string[] description?: string + restriction?: SecurityRestriction transient_metadata?: Record } @@ -17808,7 +17839,7 @@ export interface SecurityRoleTemplateScript { export interface SecuritySearchAccess { field_security?: SecurityFieldSecurity - names: IndexName[] + names: IndexName | IndexName[] query?: SecurityIndicesPrivilegesQuery allow_restricted_indices?: boolean } @@ -17827,7 +17858,7 @@ export interface SecurityUser { export interface SecurityUserIndicesPrivileges { field_security?: SecurityFieldSecurity[] - names: IndexName[] + names: IndexName | IndexName[] privileges: SecurityIndexPrivilege[] query?: SecurityIndicesPrivilegesQuery[] allow_restricted_indices: boolean @@ -17874,11 +17905,16 @@ export interface SecurityActivateUserProfileRequest extends RequestBase { export type SecurityActivateUserProfileResponse = SecurityUserProfileWithMetadata +export interface SecurityAuthenticateAuthenticateApiKey { + id: Id + name?: Name +} + export interface SecurityAuthenticateRequest extends RequestBase { } export interface SecurityAuthenticateResponse { - api_key?: SecurityApiKey + api_key?: SecurityAuthenticateAuthenticateApiKey authentication_realm: SecurityRealmInfo email?: string | null full_name?: Name | null @@ -20389,6 +20425,7 @@ export interface WatcherReportingEmailAttachment { export type WatcherResponseContentType = 'json' | 'yaml' | 'text' export interface WatcherScheduleContainer { + timezone?: string cron?: WatcherCronExpression daily?: WatcherDailySchedule hourly?: WatcherHourlySchedule