Skip to content

Commit 63b4b4c

Browse files
Auto-generated code for main (#1998)
1 parent a4be774 commit 63b4b4c

File tree

3 files changed

+93
-44
lines changed

3 files changed

+93
-44
lines changed

docs/reference.asciidoc

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,34 @@ client.count({ ... })
9393
==== Arguments
9494

9595
* *Request (object):*
96-
** *`index` (Optional, string | string[])*: A list of indices to restrict the results
97-
** *`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, 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_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*
98-
** *`allow_no_indices` (Optional, boolean)*: Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
99-
** *`analyzer` (Optional, string)*: The analyzer to use for the query string
100-
** *`analyze_wildcard` (Optional, boolean)*: Specify whether wildcard and prefix queries should be analyzed (default: false)
101-
** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query (AND or OR)
102-
** *`df` (Optional, string)*: The field to use as default where no field prefix is given in the query string
103-
** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Whether to expand wildcard expression to concrete indices that are open, closed or both.
104-
** *`ignore_throttled` (Optional, boolean)*: Whether specified concrete, expanded or aliased indices should be ignored when throttled
105-
** *`ignore_unavailable` (Optional, boolean)*: Whether specified concrete indices should be ignored when unavailable (missing or closed)
106-
** *`lenient` (Optional, boolean)*: Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
107-
** *`min_score` (Optional, number)*: Include only documents with a specific `_score` value in the result
108-
** *`preference` (Optional, string)*: Specify the node or shard the operation should be performed on (default: random)
109-
** *`routing` (Optional, string)*: A list of specific routing values
110-
** *`terminate_after` (Optional, number)*: The maximum count for each shard, upon reaching which the query execution will terminate early
111-
** *`q` (Optional, string)*: Query in the Lucene query string syntax
96+
** *`index` (Optional, string | string[])*: List of data streams, indices, and aliases to search.
97+
Supports wildcards (`*`).
98+
To search all data streams and indices, omit this parameter or use `*` or `_all`.
99+
** *`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, 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_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Defines the search definition using the Query DSL.
100+
** *`allow_no_indices` (Optional, boolean)*: If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
101+
This behavior applies even if the request targets other open indices.
102+
** *`analyzer` (Optional, string)*: Analyzer to use for the query string.
103+
This parameter can only be used when the `q` query string parameter is specified.
104+
** *`analyze_wildcard` (Optional, boolean)*: If `true`, wildcard and prefix queries are analyzed.
105+
This parameter can only be used when the `q` query string parameter is specified.
106+
** *`default_operator` (Optional, Enum("and" | "or"))*: The default operator for query string query: `AND` or `OR`.
107+
This parameter can only be used when the `q` query string parameter is specified.
108+
** *`df` (Optional, string)*: Field to use as default where no field prefix is given in the query string.
109+
This parameter can only be used when the `q` query string parameter is specified.
110+
** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of index that wildcard patterns can match.
111+
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
112+
Supports a list of values, such as `open,hidden`.
113+
** *`ignore_throttled` (Optional, boolean)*: If `true`, concrete, expanded or aliased indices are ignored when frozen.
114+
** *`ignore_unavailable` (Optional, boolean)*: If `false`, the request returns an error if it targets a missing or closed index.
115+
** *`lenient` (Optional, boolean)*: If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
116+
** *`min_score` (Optional, number)*: Sets the minimum `_score` value that documents must have to be included in the result.
117+
** *`preference` (Optional, string)*: Specifies the node or shard the operation should be performed on.
118+
Random by default.
119+
** *`routing` (Optional, string)*: Custom value used to route operations to a specific shard.
120+
** *`terminate_after` (Optional, number)*: Maximum number of documents to collect for each shard.
121+
If a query reaches this limit, Elasticsearch terminates the query early.
122+
Elasticsearch collects documents before sorting.
123+
** *`q` (Optional, string)*: Query in the Lucene query string syntax.
112124

113125
[discrete]
114126
=== create
@@ -7156,9 +7168,9 @@ client.searchApplication.list({ ... })
71567168
==== Arguments
71577169

71587170
* *Request (object):*
7159-
** *`q` (Optional, string)*: Query in the Lucene query string syntax"
7160-
** *`from` (Optional, number)*: Starting offset (default: 0)
7161-
** *`size` (Optional, number)*: specifies a max number of results to get
7171+
** *`q` (Optional, string)*: Query in the Lucene query string syntax.
7172+
** *`from` (Optional, number)*: Starting offset.
7173+
** *`size` (Optional, number)*: Specifies a max number of results to get.
71627174

71637175
[discrete]
71647176
==== post_behavioral_analytics_event
@@ -7185,9 +7197,9 @@ client.searchApplication.put({ name })
71857197
==== Arguments
71867198

71877199
* *Request (object):*
7188-
** *`name` (string)*: The name of the search application to be created or updated
7200+
** *`name` (string)*: The name of the search application to be created or updated.
71897201
** *`search_application` (Optional, { name, indices, updated_at_millis, analytics_collection_name, template })*
7190-
** *`create` (Optional, boolean)*: If true, requires that a search application with the specified resource_id does not already exist. (default: false)
7202+
** *`create` (Optional, boolean)*: If `true`, this request cannot replace or update existing Search Applications.
71917203

71927204
[discrete]
71937205
==== put_behavioral_analytics
@@ -7203,7 +7215,7 @@ client.searchApplication.putBehavioralAnalytics({ name })
72037215
==== Arguments
72047216

72057217
* *Request (object):*
7206-
** *`name` (string)*: The name of the analytics collection to be created or updated
7218+
** *`name` (string)*: The name of the analytics collection to be created or updated.
72077219

72087220
[discrete]
72097221
==== render_query
@@ -7230,8 +7242,8 @@ client.searchApplication.search({ name })
72307242
==== Arguments
72317243

72327244
* *Request (object):*
7233-
** *`name` (string)*: The name of the search application to be searched
7234-
** *`params` (Optional, Record<string, User-defined value>)*
7245+
** *`name` (string)*: The name of the search application to be searched.
7246+
** *`params` (Optional, Record<string, User-defined value>)*: Query parameters specific to this request, which will override any defaults specified in the template.
72357247

72367248
[discrete]
72377249
=== searchable_snapshots
@@ -8575,7 +8587,7 @@ client.sql.clearCursor({ cursor })
85758587
==== Arguments
85768588

85778589
* *Request (object):*
8578-
** *`cursor` (string)*
8590+
** *`cursor` (string)*: Cursor to clear.
85798591

85808592
[discrete]
85818593
==== delete_async
@@ -8591,7 +8603,7 @@ client.sql.deleteAsync({ id })
85918603
==== Arguments
85928604

85938605
* *Request (object):*
8594-
** *`id` (string)*: The async search ID
8606+
** *`id` (string)*: Identifier for the search.
85958607

85968608
[discrete]
85978609
==== get_async
@@ -8607,7 +8619,7 @@ client.sql.getAsync({ id })
86078619
==== Arguments
86088620

86098621
* *Request (object):*
8610-
** *`id` (string)*: The async search ID
8622+
** *`id` (string)*: Identifier for the search.
86118623
** *`delimiter` (Optional, string)*: Separator for CSV results. The API only supports this parameter for CSV responses.
86128624
** *`format` (Optional, string)*: Format for the response. You must specify a format using this parameter or the
86138625
Accept HTTP header. If you specify both, the API uses this parameter.
@@ -8630,7 +8642,7 @@ client.sql.getAsyncStatus({ id })
86308642
==== Arguments
86318643

86328644
* *Request (object):*
8633-
** *`id` (string)*: The async search ID
8645+
** *`id` (string)*: Identifier for the search.
86348646

86358647
[discrete]
86368648
==== query
@@ -8648,13 +8660,15 @@ client.sql.query({ ... })
86488660
* *Request (object):*
86498661
** *`catalog` (Optional, string)*: Default catalog (cluster) for queries. If unspecified, the queries execute on the data in the local cluster only.
86508662
** *`columnar` (Optional, boolean)*: If true, the results in a columnar fashion: one row represents all the values of a certain column from the current page of results.
8651-
** *`cursor` (Optional, string)*
8663+
** *`cursor` (Optional, string)*: Cursor used to retrieve a set of paginated results.
8664+
If you specify a cursor, the API only uses the `columnar` and `time_zone` request body parameters.
8665+
It ignores other request body parameters.
86528666
** *`fetch_size` (Optional, number)*: The maximum number of rows (or entries) to return in one response
8653-
** *`filter` (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, 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_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Optional Elasticsearch query DSL for additional filtering.
8654-
** *`query` (Optional, string)*: SQL query to execute
8667+
** *`filter` (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, 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_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Elasticsearch query DSL for additional filtering.
8668+
** *`query` (Optional, string)*: SQL query to run.
86558669
** *`request_timeout` (Optional, string | -1 | 0)*: The timeout before the request fails.
86568670
** *`page_timeout` (Optional, string | -1 | 0)*: The timeout before a pagination request fails.
8657-
** *`time_zone` (Optional, string)*: Time-zone in ISO 8601 used for executing the query on the server. More information available here.
8671+
** *`time_zone` (Optional, string)*: ISO-8601 time zone ID for the search.
86588672
** *`field_multi_value_leniency` (Optional, boolean)*: Throw an exception when encountering multiple values for a field (default) or be lenient and return the first value from the list (without any guarantees of what that will be - typically the first in natural ascending order).
86598673
** *`runtime_mappings` (Optional, Record<string, { fetch_fields, format, input_field, target_field, target_index, script, type }>)*: Defines one or more runtime fields in the search request. These fields take
86608674
precedence over mapped fields with the same name.
@@ -8663,7 +8677,7 @@ precedence over mapped fields with the same name.
86638677
** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for an async or saved synchronous search.
86648678
** *`keep_on_completion` (Optional, boolean)*: If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout.
86658679
** *`index_using_frozen` (Optional, boolean)*: If true, the search can run on frozen indices. Defaults to false.
8666-
** *`format` (Optional, string)*: a short version of the Accept header, e.g. json, yaml
8680+
** *`format` (Optional, string)*: Format for the response.
86678681

86688682
[discrete]
86698683
==== translate
@@ -8679,10 +8693,10 @@ client.sql.translate({ query })
86798693
==== Arguments
86808694

86818695
* *Request (object):*
8682-
** *`query` (string)*
8683-
** *`fetch_size` (Optional, number)*
8684-
** *`filter` (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, 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_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*
8685-
** *`time_zone` (Optional, string)*
8696+
** *`query` (string)*: SQL query to run.
8697+
** *`fetch_size` (Optional, number)*: The maximum number of rows (or entries) to return in one response.
8698+
** *`filter` (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, 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_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, wildcard, wrapper, type })*: Elasticsearch query DSL for additional filtering.
8699+
** *`time_zone` (Optional, string)*: ISO-8601 time zone ID for the search.
86868700

86878701
[discrete]
86888702
=== ssl
@@ -8835,10 +8849,10 @@ client.tasks.cancel({ ... })
88358849
==== Arguments
88368850

88378851
* *Request (object):*
8838-
** *`task_id` (Optional, string | number)*: Cancel the task with specified task id (node_id:task_number)
8839-
** *`actions` (Optional, string | string[])*: A list of actions that should be cancelled. Leave empty to cancel all.
8840-
** *`nodes` (Optional, string[])*: A list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
8841-
** *`parent_task_id` (Optional, string)*: Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
8852+
** *`task_id` (Optional, string | number)*: ID of the task.
8853+
** *`actions` (Optional, string | string[])*: List or wildcard expression of actions used to limit the request.
8854+
** *`nodes` (Optional, string[])*: List of node IDs or names used to limit the request.
8855+
** *`parent_task_id` (Optional, string)*: Parent task ID used to limit the tasks.
88428856
** *`wait_for_completion` (Optional, boolean)*: Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false
88438857

88448858
[discrete]
@@ -8855,9 +8869,10 @@ client.tasks.get({ task_id })
88558869
==== Arguments
88568870

88578871
* *Request (object):*
8858-
** *`task_id` (string)*: Return the task with specified id (node_id:task_number)
8859-
** *`timeout` (Optional, string | -1 | 0)*: Explicit operation timeout
8860-
** *`wait_for_completion` (Optional, boolean)*: Wait for the matching tasks to complete (default: false)
8872+
** *`task_id` (string)*: ID of the task.
8873+
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
8874+
If no response is received before the timeout expires, the request fails and returns an error.
8875+
** *`wait_for_completion` (Optional, boolean)*: If `true`, the request blocks until the task has completed.
88618876

88628877
[discrete]
88638878
==== list

src/api/types.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,14 +1988,28 @@ export type Bytes = 'b' | 'kb' | 'mb' | 'gb' | 'tb' | 'pb'
19881988

19891989
export type CategoryId = string
19901990

1991+
export type ClusterAlias = string
1992+
1993+
export interface ClusterDetails {
1994+
status: ClusterSearchStatus
1995+
indices: string
1996+
took?: DurationValue<UnitMillis>
1997+
timed_out: boolean
1998+
_shards?: ShardStatistics
1999+
failures?: ShardFailure[]
2000+
}
2001+
19912002
export type ClusterInfoTarget = '_all' | 'http' | 'ingest' | 'thread_pool' | 'script'
19922003

19932004
export type ClusterInfoTargets = ClusterInfoTarget | ClusterInfoTarget[]
19942005

2006+
export type ClusterSearchStatus = 'running' | 'successful' | 'partial' | 'skipped' | 'failed'
2007+
19952008
export interface ClusterStatistics {
19962009
skipped: integer
19972010
successful: integer
19982011
total: integer
2012+
details?: Record<ClusterAlias, ClusterDetails>
19992013
}
20002014

20012015
export interface CompletionStats {
@@ -6033,6 +6047,8 @@ export interface AsyncSearchAsyncSearchResponseBase {
60336047
expiration_time_in_millis: EpochTime<UnitMillis>
60346048
start_time?: DateTime
60356049
start_time_in_millis: EpochTime<UnitMillis>
6050+
completion_time?: DateTime
6051+
completion_time_in_millis?: EpochTime<UnitMillis>
60366052
}
60376053

60386054
export interface AsyncSearchDeleteRequest extends RequestBase {
@@ -6058,6 +6074,7 @@ export type AsyncSearchStatusResponse = AsyncSearchStatusStatusResponseBase
60586074

60596075
export interface AsyncSearchStatusStatusResponseBase extends AsyncSearchAsyncSearchResponseBase {
60606076
_shards: ShardStatistics
6077+
_clusters?: ClusterStatistics
60616078
completion_status?: integer
60626079
}
60636080

src/api/typesWithBodyKey.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,14 +2061,28 @@ export type Bytes = 'b' | 'kb' | 'mb' | 'gb' | 'tb' | 'pb'
20612061

20622062
export type CategoryId = string
20632063

2064+
export type ClusterAlias = string
2065+
2066+
export interface ClusterDetails {
2067+
status: ClusterSearchStatus
2068+
indices: string
2069+
took?: DurationValue<UnitMillis>
2070+
timed_out: boolean
2071+
_shards?: ShardStatistics
2072+
failures?: ShardFailure[]
2073+
}
2074+
20642075
export type ClusterInfoTarget = '_all' | 'http' | 'ingest' | 'thread_pool' | 'script'
20652076

20662077
export type ClusterInfoTargets = ClusterInfoTarget | ClusterInfoTarget[]
20672078

2079+
export type ClusterSearchStatus = 'running' | 'successful' | 'partial' | 'skipped' | 'failed'
2080+
20682081
export interface ClusterStatistics {
20692082
skipped: integer
20702083
successful: integer
20712084
total: integer
2085+
details?: Record<ClusterAlias, ClusterDetails>
20722086
}
20732087

20742088
export interface CompletionStats {
@@ -6106,6 +6120,8 @@ export interface AsyncSearchAsyncSearchResponseBase {
61066120
expiration_time_in_millis: EpochTime<UnitMillis>
61076121
start_time?: DateTime
61086122
start_time_in_millis: EpochTime<UnitMillis>
6123+
completion_time?: DateTime
6124+
completion_time_in_millis?: EpochTime<UnitMillis>
61096125
}
61106126

61116127
export interface AsyncSearchDeleteRequest extends RequestBase {
@@ -6131,6 +6147,7 @@ export type AsyncSearchStatusResponse = AsyncSearchStatusStatusResponseBase
61316147

61326148
export interface AsyncSearchStatusStatusResponseBase extends AsyncSearchAsyncSearchResponseBase {
61336149
_shards: ShardStatistics
6150+
_clusters?: ClusterStatistics
61346151
completion_status?: integer
61356152
}
61366153

0 commit comments

Comments
 (0)