Compare commits

...

2 Commits

Author SHA1 Message Date
fb1a42cadc Prep 8.15.1 (#2378) 2024-10-15 11:38:06 -05:00
e3863d7b77 Auto-generated code for 8.15 (#2373) 2024-10-14 11:19:18 -05:00
44 changed files with 667 additions and 181 deletions

View File

@ -1,6 +1,17 @@
[[changelog-client]]
== Release notes
[discrete]
=== 8.15.1
[discrete]
==== Features
[discrete]
===== Improved support for Elasticsearch `v8.15`
Updated TypeScript types based on fixes and improvements to the Elasticsearch specification.
[discrete]
=== 8.15.0

View File

@ -0,0 +1,15 @@
// 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: "GET",
path: "/_connector/_sync_job",
querystring: {
connector_id: "my-connector-id",
size: "1",
},
});
console.log(response);
----

View File

@ -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.update({
index: ".elastic-connectors",
id: "connector_id",
doc: {
features: {
native_connector_api_keys: {
enabled: true,
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,25 @@
// 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: "idx_keep",
mappings: {
_source: {
mode: "synthetic",
},
properties: {
path: {
type: "object",
synthetic_source_keep: "all",
},
ids: {
type: "integer",
synthetic_source_keep: "arrays",
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,19 @@
// 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.updateConfiguration({
connector_id: "my-connector-id",
values: {
host: "127.0.0.1",
port: 5432,
username: "myuser",
password: "mypassword",
database: "chinook",
schema: "public",
tables: "album,artist",
},
});
console.log(response);
----

View File

@ -0,0 +1,15 @@
// 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.delete({
index: "books",
});
console.log(response);
const response1 = await client.indices.delete({
index: "my-explicit-mappings-books",
});
console.log(response1);
----

View File

@ -0,0 +1,26 @@
// 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.createApiKey({
name: "my-connector-api-key",
role_descriptors: {
"my-connector-connector-role": {
cluster: ["monitor", "manage_connector"],
indices: [
{
names: [
"my-index_name",
".search-acl-filter-my-index_name",
".elastic-connectors*",
],
privileges: ["all"],
allow_restricted_indices: false,
},
],
},
},
});
console.log(response);
----

View File

@ -0,0 +1,10 @@
// 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: "books",
});
console.log(response);
----

View File

@ -4,7 +4,7 @@
[source, js]
----
const response = await client.indices.create({
index: "my-index-000003",
index: "my-index-000002",
mappings: {
properties: {
metrics: {
@ -29,7 +29,7 @@ const response = await client.indices.create({
console.log(response);
const response1 = await client.indices.getMapping({
index: "my-index-000003",
index: "my-index-000002",
});
console.log(response1);
----

View File

@ -0,0 +1,10 @@
// 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.delete({
index: "music",
});
console.log(response);
----

View File

@ -0,0 +1,33 @@
// 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.createApiKey({
name: "john-api-key",
expiration: "1d",
role_descriptors: {
"sharepoint-online-role": {
index: [
{
names: ["sharepoint-search-application"],
privileges: ["read"],
query: {
template: {
params: {
access_control: ["john@example.co", "Engineering Members"],
},
source:
'\n {\n "bool": {\n "should": [\n {\n "bool": {\n "must_not": {\n "exists": {\n "field": "_allow_access_control"\n }\n }\n }\n },\n {\n "terms": {\n "_allow_access_control.enum": {{#toJson}}access_control{{/toJson}}\n }\n }\n ]\n }\n }\n ',
},
},
},
],
restriction: {
workflows: ["search_application_query"],
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,28 @@
// 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-explicit-mappings-books",
mappings: {
dynamic: false,
properties: {
name: {
type: "text",
},
author: {
type: "text",
},
release_date: {
type: "date",
format: "yyyy-MM-dd",
},
page_count: {
type: "integer",
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,25 @@
// 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.index({
index: "idx_keep",
id: 1,
document: {
path: {
to: [
{
foo: [3, 2, 1],
},
{
foo: [30, 20, 10],
},
],
bar: "baz",
},
ids: [200, 100, 300, 100],
},
});
console.log(response);
----

View File

@ -0,0 +1,38 @@
// 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.updateByQuery({
index: "INDEX_NAME",
conflicts: "proceed",
query: {
bool: {
filter: [
{
match: {
object_type: "drive_item",
},
},
{
exists: {
field: "file",
},
},
{
range: {
lastModifiedDateTime: {
lte: "now-180d",
},
},
},
],
},
},
script: {
source: "ctx._source.body = ''",
lang: "painless",
},
});
console.log(response);
----

View File

@ -0,0 +1,31 @@
// 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.update({
index: ".elastic-connectors",
id: "connector_id",
doc: {
configuration: {
field_a: {
type: "str",
value: "",
},
field_b: {
type: "bool",
value: false,
},
field_c: {
type: "int",
value: 1,
},
field_d: {
type: "list",
value: "a,b",
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,15 @@
// 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.putMapping({
index: ".elastic-connectors-sync-jobs-v1",
properties: {
job_type: {
type: "keyword",
},
},
});
console.log(response);
----

View File

@ -0,0 +1,10 @@
// 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.getMapping({
index: "books",
});
console.log(response);
----

View File

@ -0,0 +1,20 @@
// 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: "completion",
inference_id: "alibabacloud_ai_search_completion",
inference_config: {
service: "alibabacloud-ai-search",
service_settings: {
host: "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
api_key: "{{API_KEY}}",
service_id: "ops-qwen-turbo",
workspace: "default",
},
},
});
console.log(response);
----

View File

@ -0,0 +1,10 @@
// 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.stats({
include_remotes: "true",
});
console.log(response);
----

View File

@ -0,0 +1,10 @@
// 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.delete({
connector_id: "my-connector-id&delete_sync_jobs=true",
});
console.log(response);
----

View File

@ -4,14 +4,7 @@
[source, js]
----
const response = await client.search({
index: "my-index",
query: {
semantic: {
field: "inference_field",
query: "mountain lake",
inner_hits: {},
},
},
index: "music",
});
console.log(response);
----

View File

@ -0,0 +1,50 @@
// 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.createApiKey({
name: "my-api-key",
role_descriptors: {
"role-source1": {
indices: [
{
names: ["source1"],
privileges: ["read"],
query: {
template: {
params: {
access_control: [
"example.user@example.com",
"source1-user-group",
],
},
},
source: "...",
},
},
],
},
"role-source2": {
indices: [
{
names: ["source2"],
privileges: ["read"],
query: {
template: {
params: {
access_control: [
"example.user@example.com",
"source2-user-group",
],
},
},
source: "...",
},
},
],
},
},
});
console.log(response);
----

View File

@ -0,0 +1,22 @@
// 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.createApiKey({
name: "music-connector",
role_descriptors: {
"music-connector-role": {
cluster: ["monitor", "manage_connector"],
indices: [
{
names: ["music", ".search-acl-filter-music", ".elastic-connectors*"],
privileges: ["all"],
allow_restricted_indices: false,
},
],
},
},
});
console.log(response);
----

View File

@ -1,51 +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: "my-index-000004",
mappings: {
properties: {
metrics: {
subobjects: "auto",
properties: {
time: {
type: "object",
properties: {
min: {
type: "long",
},
},
},
to: {
type: "object",
properties: {
inner_metrics: {
type: "object",
subobjects: "auto",
properties: {
time: {
type: "object",
properties: {
max: {
type: "long",
},
},
},
},
},
},
},
},
},
},
},
});
console.log(response);
const response1 = await client.indices.getMapping({
index: "my-index-000004",
});
console.log(response1);
----

View File

@ -1,20 +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.search({
index: "my-index",
query: {
semantic: {
field: "inference_field",
query: "mountain lake",
inner_hits: {
from: 1,
size: 1,
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,10 @@
// 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.count({
index: "music",
});
console.log(response);
----

View File

@ -0,0 +1,35 @@
// 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.update({
index: ".elastic-connectors",
id: "connector_id",
doc: {
configuration: {
tables: {
type: "list",
value: "*",
},
ssl_enabled: {
type: "bool",
value: false,
},
ssl_ca: {
type: "str",
value: "",
},
fetch_size: {
type: "int",
value: 50,
},
retry_count: {
type: "int",
value: 3,
},
},
},
});
console.log(response);
----

View File

@ -0,0 +1,10 @@
// 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.get({
connector_id: "my-connector-id",
});
console.log(response);
----

View File

@ -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.esql.asyncQuery({
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 ",
},
});
console.log(response);
----

View File

@ -0,0 +1,26 @@
// 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.createApiKey({
name: "connector_name-connector-api-key",
role_descriptors: {
"connector_name-connector-role": {
cluster: ["monitor", "manage_connector"],
indices: [
{
names: [
"index_name",
".search-acl-filter-index_name",
".elastic-connectors*",
],
privileges: ["all"],
allow_restricted_indices: false,
},
],
},
},
});
console.log(response);
----

View File

@ -1,68 +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: "my-index-000002",
mappings: {
properties: {
metrics: {
type: "object",
subobjects: "auto",
properties: {
inner: {
type: "object",
enabled: false,
},
nested: {
type: "nested",
},
},
},
},
},
});
console.log(response);
const response1 = await client.index({
index: "my-index-000002",
id: "metric_1",
document: {
"metrics.time": 100,
"metrics.time.min": 10,
"metrics.time.max": 900,
},
});
console.log(response1);
const response2 = await client.index({
index: "my-index-000002",
id: "metric_2",
document: {
metrics: {
time: 100,
"time.min": 10,
"time.max": 900,
inner: {
foo: "bar",
"path.to.some.field": "baz",
},
nested: [
{
id: 10,
},
{
id: 1,
},
],
},
},
});
console.log(response2);
const response3 = await client.indices.getMapping({
index: "my-index-000002",
});
console.log(response3);
----

View File

@ -16,7 +16,7 @@ const response = await client.indices.create({
filter: {
my_snow: {
type: "snowball",
language: "Lovins",
language: "English",
},
},
},

View File

@ -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.esql.asyncQuery({
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 ",
},
});
console.log(response);
----

View File

@ -4,13 +4,13 @@
[source, js]
----
const response = await client.index({
index: "my-index",
id: "lake_tahoe",
index: "books",
document: {
inference_field: [
"Lake Tahoe is the largest alpine lake in North America",
"When hiking in the area, please be on alert for bears",
],
name: "The Great Gatsby",
author: "F. Scott Fitzgerald",
release_date: "1925-04-10",
page_count: 180,
language: "EN",
},
});
console.log(response);

View File

@ -0,0 +1,15 @@
// 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: "/_connector/_sync_job",
body: {
id: "my-connector-id",
job_type: "full",
},
});
console.log(response);
----

View File

@ -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.update({
index: ".elastic-connectors",
id: "connector-id",
doc: {
custom_scheduling: {},
},
});
console.log(response);
----

View File

@ -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-connector-id",
name: "Music catalog",
index_name: "music",
service_type: "postgresql",
});
console.log(response);
----

View File

@ -0,0 +1,12 @@
// 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.secretPost({
body: {
value: "encoded_api_key",
},
});
console.log(response);
----

View File

@ -0,0 +1,12 @@
// 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.updateApiKeyId({
connector_id: "my_connector_id>",
api_key_id: "API key_id",
api_key_secret_id: "secret_id",
});
console.log(response);
----

View File

@ -925,7 +925,7 @@ client.search({ ... })
** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search.
Supports wildcards (`*`).
To search all data streams and indices, omit this parameter or use `*` or `_all`.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: Defines the aggregations that are run as part of the search request.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: Defines the aggregations that are run as part of the search request.
** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*: Collapses search results the values of the specified field.
** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit.
** *`ext` (Optional, Record<string, User-defined value>)*: Configuration of search extensions defined by Elasticsearch plugins.
@ -1082,7 +1082,7 @@ client.searchMvt({ index, field, zoom, x, y })
** *`zoom` (number)*: Zoom level for the vector tile to search
** *`x` (number)*: X coordinate for the vector tile to search
** *`y` (number)*: Y coordinate for the vector tile to search
** *`aggs` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: Sub-aggregations for the geotile_grid.
** *`aggs` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: Sub-aggregations for the geotile_grid.
Supports the following aggregation types:
- avg
@ -1458,7 +1458,7 @@ client.asyncSearch.submit({ ... })
* *Request (object):*
** *`index` (Optional, string | string[])*: A list of index names to search; use `_all` or empty string to perform the operation on all indices
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*
** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*
** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit.
** *`ext` (Optional, Record<string, User-defined value>)*: Configuration of search extensions defined by Elasticsearch plugins.
@ -3611,7 +3611,7 @@ client.fleet.search({ index })
* *Request (object):*
** *`index` (string | string)*: A single target to search. If the target is an index alias, it must resolve to a single index.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*
** *`collapse` (Optional, { field, inner_hits, max_concurrent_group_searches, collapse })*
** *`explain` (Optional, boolean)*: If true, returns detailed information about score computation as part of a hit.
** *`ext` (Optional, Record<string, User-defined value>)*: Configuration of search extensions defined by Elasticsearch plugins.
@ -3824,7 +3824,7 @@ Manually moves an index into the specified step and executes that step.
{ref}/ilm-move-to-step.html[Endpoint documentation]
[source,ts]
----
client.ilm.moveToStep({ index })
client.ilm.moveToStep({ index, current_step, next_step })
----
[discrete]
@ -3832,8 +3832,8 @@ client.ilm.moveToStep({ index })
* *Request (object):*
** *`index` (string)*: The name of the index whose lifecycle step is to change
** *`current_step` (Optional, { action, name, phase })*
** *`next_step` (Optional, { action, name, phase })*
** *`current_step` ({ action, name, phase })*
** *`next_step` ({ action, name, phase })*
[discrete]
==== put_lifecycle
@ -4914,7 +4914,7 @@ client.indices.putIndexTemplate({ name })
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
** *`template` (Optional, { aliases, mappings, settings, lifecycle })*: Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
** *`data_stream` (Optional, { hidden })*: If this object is included, the template is used to create data streams and their backing indices.
** *`data_stream` (Optional, { hidden, allow_custom_routing })*: If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
** *`priority` (Optional, number)*: Priority to determine index template precedence when a new data stream or index is created.
@ -5335,7 +5335,7 @@ If set to `false`, then indices or data streams matching the template must alway
Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.
** *`template` (Optional, { aliases, mappings, settings, lifecycle })*: Template to be applied.
It may optionally include an `aliases`, `mappings`, or `settings` configuration.
** *`data_stream` (Optional, { hidden })*: If this object is included, the template is used to create data streams and their backing indices.
** *`data_stream` (Optional, { hidden, allow_custom_routing })*: If this object is included, the template is used to create data streams and their backing indices.
Supports an empty object.
Data streams require a matching index template with a `data_stream` object.
** *`priority` (Optional, number)*: Priority to determine index template precedence when a new data stream or index is created.
@ -7267,7 +7267,7 @@ client.ml.putDatafeed({ datafeed_id })
** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed.
This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
It must start and end with alphanumeric characters.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: If set, the datafeed performs aggregation searches.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: If set, the datafeed performs aggregation searches.
Support for aggregations is limited and should be used only with low cardinality data.
** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might be required to search over long time periods, for several months or years.
This search is split into time chunks in order to ensure the load on Elasticsearch is managed.
@ -7798,7 +7798,7 @@ client.ml.updateDatafeed({ datafeed_id })
** *`datafeed_id` (string)*: A numerical character string that uniquely identifies the datafeed.
This identifier can contain lowercase alphanumeric characters (a-z and 0-9), hyphens, and underscores.
It must start and end with alphanumeric characters.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: If set, the datafeed performs aggregation searches. Support for aggregations is limited and should be used only
with low cardinality data.
** *`chunking_config` (Optional, { mode, time_span })*: Datafeeds might search over long time periods, for several months or years. This search is split into time
chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of
@ -8431,7 +8431,7 @@ client.rollup.rollupSearch({ index })
* *Request (object):*
** *`index` (string | string[])*: Enables searching rolled-up data using the standard Query DSL.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: Specifies aggregations.
** *`aggregations` (Optional, Record<string, { aggregations, meta, adjacency_matrix, auto_date_histogram, avg, avg_bucket, boxplot, bucket_script, bucket_selector, bucket_sort, bucket_count_ks_test, bucket_correlation, cardinality, categorize_text, children, composite, cumulative_cardinality, cumulative_sum, date_histogram, date_range, derivative, diversified_sampler, extended_stats, extended_stats_bucket, frequent_item_sets, filter, filters, geo_bounds, geo_centroid, geo_distance, geohash_grid, geo_line, geotile_grid, geohex_grid, global, histogram, ip_range, ip_prefix, inference, line, matrix_stats, max, max_bucket, median_absolute_deviation, min, min_bucket, missing, moving_avg, moving_percentiles, moving_fn, multi_terms, nested, normalize, parent, percentile_ranks, percentiles, percentiles_bucket, range, rare_terms, rate, reverse_nested, random_sampler, sampler, scripted_metric, serial_diff, significant_terms, significant_text, stats, stats_bucket, string_stats, sum, sum_bucket, terms, time_series, top_hits, t_test, top_metrics, value_count, weighted_avg, variable_width_histogram }>)*: Specifies aggregations.
** *`query` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule, script, script_score, semantic, shape, simple_query_string, span_containing, span_field_masking, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, sparse_vector, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specifies a DSL query.
** *`size` (Optional, number)*: Must be zero if set, as rollups work on pre-aggregated data.
** *`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

View File

@ -1,7 +1,7 @@
{
"name": "@elastic/elasticsearch",
"version": "8.15.0",
"versionCanary": "8.15.0-canary.0",
"version": "8.15.1",
"versionCanary": "8.15.1-canary.0",
"description": "The official Elasticsearch client for Node.js",
"main": "index.js",
"types": "index.d.ts",
@ -54,7 +54,7 @@
"@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1",
"@types/debug": "^4.1.7",
"@types/ms": "^0.7.31",
"@types/node": "^17.0.31",
"@types/node": "^18.19.55",
"@types/sinonjs__fake-timers": "^8.1.2",
"@types/split2": "^3.2.1",
"@types/stoppable": "^1.1.1",

View File

@ -2742,7 +2742,7 @@ export interface ShardStatistics {
}
export interface ShardsOperationResponseBase {
_shards: ShardStatistics
_shards?: ShardStatistics
}
export interface SlicedScroll {
@ -3002,6 +3002,7 @@ export interface AggregationsAggregationContainer {
rare_terms?: AggregationsRareTermsAggregation
rate?: AggregationsRateAggregation
reverse_nested?: AggregationsReverseNestedAggregation
random_sampler?: AggregationsRandomSamplerAggregation
sampler?: AggregationsSamplerAggregation
scripted_metric?: AggregationsScriptedMetricAggregation
serial_diff?: AggregationsSerialDifferencingAggregation
@ -3889,6 +3890,12 @@ export interface AggregationsPipelineAggregationBase extends AggregationsBucketP
gap_policy?: AggregationsGapPolicy
}
export interface AggregationsRandomSamplerAggregation extends AggregationsBucketAggregationBase {
probability: double
seed?: integer
shard_seed?: integer
}
export interface AggregationsRangeAggregate extends AggregationsMultiBucketAggregateBase<AggregationsRangeBucket> {
}
@ -10284,15 +10291,15 @@ export interface IlmMigrateToDataTiersResponse {
export interface IlmMoveToStepRequest extends RequestBase {
index: IndexName
current_step?: IlmMoveToStepStepKey
next_step?: IlmMoveToStepStepKey
current_step: IlmMoveToStepStepKey
next_step: IlmMoveToStepStepKey
}
export type IlmMoveToStepResponse = AcknowledgedResponseBase
export interface IlmMoveToStepStepKey {
action: string
name: string
action?: string
name?: string
phase: string
}
@ -10416,6 +10423,7 @@ export interface IndicesDataStreamTimestampField {
export interface IndicesDataStreamVisibility {
hidden?: boolean
allow_custom_routing?: boolean
}
export interface IndicesDownsampleConfig {

View File

@ -2815,7 +2815,7 @@ export interface ShardStatistics {
}
export interface ShardsOperationResponseBase {
_shards: ShardStatistics
_shards?: ShardStatistics
}
export interface SlicedScroll {
@ -3075,6 +3075,7 @@ export interface AggregationsAggregationContainer {
rare_terms?: AggregationsRareTermsAggregation
rate?: AggregationsRateAggregation
reverse_nested?: AggregationsReverseNestedAggregation
random_sampler?: AggregationsRandomSamplerAggregation
sampler?: AggregationsSamplerAggregation
scripted_metric?: AggregationsScriptedMetricAggregation
serial_diff?: AggregationsSerialDifferencingAggregation
@ -3962,6 +3963,12 @@ export interface AggregationsPipelineAggregationBase extends AggregationsBucketP
gap_policy?: AggregationsGapPolicy
}
export interface AggregationsRandomSamplerAggregation extends AggregationsBucketAggregationBase {
probability: double
seed?: integer
shard_seed?: integer
}
export interface AggregationsRangeAggregate extends AggregationsMultiBucketAggregateBase<AggregationsRangeBucket> {
}
@ -10454,16 +10461,16 @@ export interface IlmMoveToStepRequest extends RequestBase {
index: IndexName
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
current_step?: IlmMoveToStepStepKey
next_step?: IlmMoveToStepStepKey
current_step: IlmMoveToStepStepKey
next_step: IlmMoveToStepStepKey
}
}
export type IlmMoveToStepResponse = AcknowledgedResponseBase
export interface IlmMoveToStepStepKey {
action: string
name: string
action?: string
name?: string
phase: string
}
@ -10590,6 +10597,7 @@ export interface IndicesDataStreamTimestampField {
export interface IndicesDataStreamVisibility {
hidden?: boolean
allow_custom_routing?: boolean
}
export interface IndicesDownsampleConfig {