Skip to content

Commit 54e2088

Browse files
Auto-generated API code (#2628)
1 parent c480a24 commit 54e2088

File tree

4 files changed

+207
-13
lines changed

4 files changed

+207
-13
lines changed

docs/reference.asciidoc

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,8 @@ aggregation for its associated searches. You can retrieve these stats using
24592459
the indices stats API.
24602460
** *`wait_for_completion_timeout` (Optional, string | -1 | 0)*: Blocks and waits until the search is completed up to a certain timeout.
24612461
When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
2462+
** *`keep_alive` (Optional, string | -1 | 0)*: Specifies how long the async search needs to be available.
2463+
Ongoing async searches and any saved search results are deleted after this period.
24622464
** *`keep_on_completion` (Optional, boolean)*: If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
24632465
** *`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)
24642466
** *`allow_partial_search_results` (Optional, boolean)*: Indicate if an error should be returned if there is a partial search failure or timeout
@@ -2606,6 +2608,10 @@ client.cat.aliases({ ... })
26062608

26072609
* *Request (object):*
26082610
** *`name` (Optional, string | string[])*: A list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
2611+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2612+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2613+
Sorting defaults to ascending and can be changed by setting `:asc`
2614+
or `:desc` as a suffix to the column name.
26092615
** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: The type of index that wildcard patterns can match.
26102616
If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
26112617
It supports a list of values, such as `open,hidden`.
@@ -2637,6 +2643,10 @@ client.cat.allocation({ ... })
26372643
* *Request (object):*
26382644
** *`node_id` (Optional, string | string[])*: A list of node identifiers or names used to limit the returned information.
26392645
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
2646+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2647+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2648+
Sorting defaults to ascending and can be changed by setting `:asc`
2649+
or `:desc` as a suffix to the column name.
26402650
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
26412651
local cluster state. If `false` the list of selected nodes are computed
26422652
from the cluster state of the master node. In both cases the coordinating
@@ -2666,6 +2676,10 @@ client.cat.componentTemplates({ ... })
26662676
** *`name` (Optional, string)*: The name of the component template.
26672677
It accepts wildcard expressions.
26682678
If it is omitted, all component templates are returned.
2679+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2680+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2681+
Sorting defaults to ascending and can be changed by setting `:asc`
2682+
or `:desc` as a suffix to the column name.
26692683
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
26702684
local cluster state. If `false` the list of selected nodes are computed
26712685
from the cluster state of the master node. In both cases the coordinating
@@ -2695,6 +2709,10 @@ client.cat.count({ ... })
26952709
** *`index` (Optional, string | string[])*: A list of data streams, indices, and aliases used to limit the request.
26962710
It supports wildcards (`*`).
26972711
To target all data streams and indices, omit this parameter or use `*` or `_all`.
2712+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2713+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2714+
Sorting defaults to ascending and can be changed by setting `:asc`
2715+
or `:desc` as a suffix to the column name.
26982716

26992717
[discrete]
27002718
==== fielddata
@@ -2718,6 +2736,10 @@ client.cat.fielddata({ ... })
27182736
** *`fields` (Optional, string | string[])*: List of fields used to limit returned information.
27192737
To retrieve all fields, omit this parameter.
27202738
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
2739+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2740+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2741+
Sorting defaults to ascending and can be changed by setting `:asc`
2742+
or `:desc` as a suffix to the column name.
27212743

27222744
[discrete]
27232745
==== health
@@ -2745,6 +2767,10 @@ client.cat.health({ ... })
27452767
* *Request (object):*
27462768
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
27472769
** *`ts` (Optional, boolean)*: If true, returns `HH:MM:SS` and Unix epoch timestamps.
2770+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2771+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2772+
Sorting defaults to ascending and can be changed by setting `:asc`
2773+
or `:desc` as a suffix to the column name.
27482774

27492775
[discrete]
27502776
==== help
@@ -2797,6 +2823,10 @@ Supports wildcards (`*`). To target all data streams and indices, omit this para
27972823
** *`pri` (Optional, boolean)*: If true, the response only includes information from primary shards.
27982824
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
27992825
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
2826+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2827+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2828+
Sorting defaults to ascending and can be changed by setting `:asc`
2829+
or `:desc` as a suffix to the column name.
28002830

28012831
[discrete]
28022832
==== master
@@ -2816,6 +2846,10 @@ client.cat.master({ ... })
28162846
==== Arguments
28172847

28182848
* *Request (object):*
2849+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
2850+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
2851+
Sorting defaults to ascending and can be changed by setting `:asc`
2852+
or `:desc` as a suffix to the column name.
28192853
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
28202854
local cluster state. If `false` the list of selected nodes are computed
28212855
from the cluster state of the master node. In both cases the coordinating
@@ -2973,6 +3007,10 @@ client.cat.nodeattrs({ ... })
29733007
==== Arguments
29743008

29753009
* *Request (object):*
3010+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3011+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3012+
Sorting defaults to ascending and can be changed by setting `:asc`
3013+
or `:desc` as a suffix to the column name.
29763014
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
29773015
local cluster state. If `false` the list of selected nodes are computed
29783016
from the cluster state of the master node. In both cases the coordinating
@@ -2999,6 +3037,10 @@ client.cat.nodes({ ... })
29993037
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
30003038
** *`full_id` (Optional, boolean | string)*: If `true`, return the full node ID. If `false`, return the shortened node ID.
30013039
** *`include_unloaded_segments` (Optional, boolean)*: If true, the response includes information from segments that are not loaded into memory.
3040+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3041+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3042+
Sorting defaults to ascending and can be changed by setting `:asc`
3043+
or `:desc` as a suffix to the column name.
30023044
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
30033045
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Unit used to display time values.
30043046

@@ -3019,6 +3061,10 @@ client.cat.pendingTasks({ ... })
30193061
==== Arguments
30203062

30213063
* *Request (object):*
3064+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3065+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3066+
Sorting defaults to ascending and can be changed by setting `:asc`
3067+
or `:desc` as a suffix to the column name.
30223068
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
30233069
local cluster state. If `false` the list of selected nodes are computed
30243070
from the cluster state of the master node. In both cases the coordinating
@@ -3043,6 +3089,10 @@ client.cat.plugins({ ... })
30433089
==== Arguments
30443090

30453091
* *Request (object):*
3092+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3093+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3094+
Sorting defaults to ascending and can be changed by setting `:asc`
3095+
or `:desc` as a suffix to the column name.
30463096
** *`include_bootstrap` (Optional, boolean)*: Include bootstrap plugins in the response
30473097
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
30483098
local cluster state. If `false` the list of selected nodes are computed
@@ -3074,6 +3124,10 @@ Supports wildcards (`*`). To target all data streams and indices, omit this para
30743124
** *`active_only` (Optional, boolean)*: If `true`, the response only includes ongoing shard recoveries.
30753125
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
30763126
** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
3127+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3128+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3129+
Sorting defaults to ascending and can be changed by setting `:asc`
3130+
or `:desc` as a suffix to the column name.
30773131
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Unit used to display time values.
30783132

30793133
[discrete]
@@ -3093,6 +3147,10 @@ client.cat.repositories({ ... })
30933147
==== Arguments
30943148

30953149
* *Request (object):*
3150+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3151+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3152+
Sorting defaults to ascending and can be changed by setting `:asc`
3153+
or `:desc` as a suffix to the column name.
30963154
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
30973155
local cluster state. If `false` the list of selected nodes are computed
30983156
from the cluster state of the master node. In both cases the coordinating
@@ -3121,6 +3179,10 @@ client.cat.segments({ ... })
31213179
Supports wildcards (`*`).
31223180
To target all data streams and indices, omit this parameter or use `*` or `_all`.
31233181
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
3182+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3183+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3184+
Sorting defaults to ascending and can be changed by setting `:asc`
3185+
or `:desc` as a suffix to the column name.
31243186
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
31253187
local cluster state. If `false` the list of selected nodes are computed
31263188
from the cluster state of the master node. In both cases the coordinating
@@ -3149,6 +3211,10 @@ client.cat.shards({ ... })
31493211
Supports wildcards (`*`).
31503212
To target all data streams and indices, omit this parameter or use `*` or `_all`.
31513213
** *`bytes` (Optional, Enum("b" | "kb" | "mb" | "gb" | "tb" | "pb"))*: The unit used to display byte values.
3214+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3215+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3216+
Sorting defaults to ascending and can be changed by setting `:asc`
3217+
or `:desc` as a suffix to the column name.
31523218
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
31533219
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Unit used to display time values.
31543220

@@ -3175,6 +3241,10 @@ Accepts wildcard expressions.
31753241
`_all` returns all repositories.
31763242
If any repository fails during the request, Elasticsearch returns an error.
31773243
** *`ignore_unavailable` (Optional, boolean)*: If `true`, the response does not include information from unavailable snapshots.
3244+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3245+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3246+
Sorting defaults to ascending and can be changed by setting `:asc`
3247+
or `:desc` as a suffix to the column name.
31783248
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node.
31793249
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Unit used to display time values.
31803250

@@ -3199,6 +3269,10 @@ client.cat.tasks({ ... })
31993269
** *`detailed` (Optional, boolean)*: If `true`, the response includes detailed information about shard recoveries.
32003270
** *`nodes` (Optional, string[])*: Unique node identifiers, which are used to limit the response.
32013271
** *`parent_task_id` (Optional, string)*: The parent task identifier, which is used to limit the response.
3272+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3273+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3274+
Sorting defaults to ascending and can be changed by setting `:asc`
3275+
or `:desc` as a suffix to the column name.
32023276
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: Unit used to display time values.
32033277
** *`timeout` (Optional, string | -1 | 0)*: Period to wait for a response.
32043278
If no response is received before the timeout expires, the request fails and returns an error.
@@ -3224,6 +3298,10 @@ client.cat.templates({ ... })
32243298
* *Request (object):*
32253299
** *`name` (Optional, string)*: The name of the template to return.
32263300
Accepts wildcard expressions. If omitted, all templates are returned.
3301+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3302+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3303+
Sorting defaults to ascending and can be changed by setting `:asc`
3304+
or `:desc` as a suffix to the column name.
32273305
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
32283306
local cluster state. If `false` the list of selected nodes are computed
32293307
from the cluster state of the master node. In both cases the coordinating
@@ -3250,6 +3328,10 @@ client.cat.threadPool({ ... })
32503328
* *Request (object):*
32513329
** *`thread_pool_patterns` (Optional, string | string[])*: A list of thread pool names used to limit the request.
32523330
Accepts wildcard expressions.
3331+
** *`h` (Optional, string | string[])*: List of columns to appear in the response. Supports simple wildcards.
3332+
** *`s` (Optional, string | string[])*: List of columns that determine how the table should be sorted.
3333+
Sorting defaults to ascending and can be changed by setting `:asc`
3334+
or `:desc` as a suffix to the column name.
32533335
** *`time` (Optional, Enum("nanos" | "micros" | "ms" | "s" | "m" | "h" | "d"))*: The unit used to display time values.
32543336
** *`local` (Optional, boolean)*: If `true`, the request computes the list of selected nodes from the
32553337
local cluster state. If `false` the list of selected nodes are computed
@@ -6926,7 +7008,12 @@ client.indices.putDataLifecycle({ name })
69267008
** *`name` (string | string[])*: List of data streams used to limit the request.
69277009
Supports wildcards (`*`).
69287010
To target all data streams use `*` or `_all`.
6929-
** *`lifecycle` (Optional, { data_retention, downsampling, enabled })*
7011+
** *`data_retention` (Optional, string | -1 | 0)*: If defined, every document added to this data stream will be stored at least for this time frame.
7012+
Any time after this duration the document could be deleted.
7013+
When empty, every document in this data stream will be stored indefinitely.
7014+
** *`downsampling` (Optional, { rounds })*: The downsampling configuration to execute for the managed backing index after rollover.
7015+
** *`enabled` (Optional, boolean)*: If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
7016+
that's disabled (enabled: `false`) will have no effect on the data stream.
69307017
** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
69317018
Supports a list of values, such as `open,hidden`.
69327019
Valid values are: `all`, `hidden`, `open`, `closed`, `none`.
@@ -7957,7 +8044,7 @@ client.inference.put({ inference_id })
79578044
* *Request (object):*
79588045
** *`inference_id` (string)*: The inference Id
79598046
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The task type
7960-
** *`inference_config` (Optional, { service, service_settings, task_settings })*
8047+
** *`inference_config` (Optional, { chunking_settings, service, service_settings, task_settings })*
79618048

79628049
[discrete]
79638050
==== stream_inference
@@ -8032,7 +8119,7 @@ client.inference.update({ inference_id })
80328119
* *Request (object):*
80338120
** *`inference_id` (string)*: The unique identifier of the inference endpoint.
80348121
** *`task_type` (Optional, Enum("sparse_embedding" | "text_embedding" | "rerank" | "completion"))*: The type of inference task that the model performs.
8035-
** *`inference_config` (Optional, { service, service_settings, task_settings })*
8122+
** *`inference_config` (Optional, { chunking_settings, service, service_settings, task_settings })*
80368123

80378124
[discrete]
80388125
=== ingest

src/api/api/indices.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,15 +1634,22 @@ export default class Indices {
16341634
async putDataLifecycle (this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptions): Promise<T.IndicesPutDataLifecycleResponse>
16351635
async putDataLifecycle (this: That, params: T.IndicesPutDataLifecycleRequest | TB.IndicesPutDataLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
16361636
const acceptedPath: string[] = ['name']
1637-
const acceptedBody: string[] = ['lifecycle']
1637+
const acceptedBody: string[] = ['data_retention', 'downsampling', 'enabled']
16381638
const querystring: Record<string, any> = {}
16391639
// @ts-expect-error
1640-
let body: any = params.body ?? undefined
1640+
const userBody: any = params?.body
1641+
let body: Record<string, any> | string
1642+
if (typeof userBody === 'string') {
1643+
body = userBody
1644+
} else {
1645+
body = userBody != null ? { ...userBody } : undefined
1646+
}
16411647

16421648
for (const key in params) {
16431649
if (acceptedBody.includes(key)) {
1650+
body = body ?? {}
16441651
// @ts-expect-error
1645-
body = params[key]
1652+
body[key] = params[key]
16461653
} else if (acceptedPath.includes(key)) {
16471654
continue
16481655
} else if (key !== 'body') {

0 commit comments

Comments
 (0)