Skip to content

Commit dd4937d

Browse files
Auto-generated API code
1 parent ad61cc3 commit dd4937d

File tree

6 files changed

+57
-32
lines changed

6 files changed

+57
-32
lines changed

docs/reference.asciidoc

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2097,7 +2097,7 @@ client.indices.deleteDataStream({ name })
20972097
==== delete_index_template
20982098
Deletes an index template.
20992099

2100-
{ref}/indices-templates.html[Endpoint documentation]
2100+
{ref}/indices-delete-template.html[Endpoint documentation]
21012101
[source,ts]
21022102
----
21032103
client.indices.deleteIndexTemplate({ name })
@@ -2167,7 +2167,7 @@ Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
21672167
==== exists_index_template
21682168
Returns information about whether a particular index template exists.
21692169

2170-
{ref}/indices-templates.html[Endpoint documentation]
2170+
{ref}/index-templates.html[Endpoint documentation]
21712171
[source,ts]
21722172
----
21732173
client.indices.existsIndexTemplate({ name })
@@ -2300,7 +2300,7 @@ Supports a list of values, such as `open,hidden`.
23002300
==== get_index_template
23012301
Returns an index template.
23022302

2303-
{ref}/indices-templates.html[Endpoint documentation]
2303+
{ref}/indices-get-template.html[Endpoint documentation]
23042304
[source,ts]
23052305
----
23062306
client.indices.getIndexTemplate({ ... })
@@ -2483,7 +2483,7 @@ If no response is received before the timeout expires, the request fails and ret
24832483
==== put_index_template
24842484
Creates or updates an index template.
24852485

2486-
{ref}/indices-templates.html[Endpoint documentation]
2486+
{ref}/indices-put-template.html[Endpoint documentation]
24872487
[source,ts]
24882488
----
24892489
client.indices.putIndexTemplate({ name })
@@ -2600,7 +2600,7 @@ error.
26002600
==== put_template
26012601
Creates or updates an index template.
26022602

2603-
{ref}/indices-templates.html[Endpoint documentation]
2603+
{ref}/indices-templates-v1.html[Endpoint documentation]
26042604
[source,ts]
26052605
----
26062606
client.indices.putTemplate({ name })
@@ -2718,7 +2718,7 @@ Set to all or any positive integer up to the total number of shards in the index
27182718
==== simulate_index_template
27192719
Simulate matching the given index name against the index templates in the system
27202720

2721-
{ref}/indices-templates.html[Endpoint documentation]
2721+
{ref}/indices-simulate-index.html[Endpoint documentation]
27222722
[source,ts]
27232723
----
27242724
client.indices.simulateIndexTemplate({ name })
@@ -2761,7 +2761,7 @@ before the timeout expires, the request fails and returns an error.
27612761
==== simulate_template
27622762
Simulate resolving the given template name or body
27632763

2764-
{ref}/indices-templates.html[Endpoint documentation]
2764+
{ref}/indices-simulate-template.html[Endpoint documentation]
27652765
[source,ts]
27662766
----
27672767
client.indices.simulateTemplate({ ... })
@@ -2980,14 +2980,14 @@ Retrieves Logstash Pipelines used by Central Management
29802980
{ref}/logstash-api-get-pipeline.html[Endpoint documentation]
29812981
[source,ts]
29822982
----
2983-
client.logstash.getPipeline({ id })
2983+
client.logstash.getPipeline({ ... })
29842984
----
29852985

29862986
[discrete]
29872987
==== Arguments
29882988

29892989
* *Request (object):*
2990-
** *`id` (string | string[])*: List of pipeline identifiers.
2990+
** *`id` (Optional, string | string[])*: List of pipeline identifiers.
29912991

29922992
[discrete]
29932993
==== put_pipeline
@@ -4434,7 +4434,7 @@ client.queryRuleset.put({ ruleset_id, rules })
44344434
==== delete
44354435
Deletes a search application.
44364436

4437-
{ref}/put-search-application.html[Endpoint documentation]
4437+
{ref}/delete-search-application.html[Endpoint documentation]
44384438
[source,ts]
44394439
----
44404440
client.searchApplication.delete({ name })
@@ -5000,6 +5000,8 @@ client.transform.deleteTransform({ transform_id })
50005000
** *`transform_id` (string)*: Identifier for the transform.
50015001
** *`force` (Optional, boolean)*: If this value is false, the transform must be stopped before it can be deleted. If true, the transform is
50025002
deleted regardless of its current state.
5003+
** *`delete_dest_index` (Optional, boolean)*: If this value is true, the destination index is deleted together with the transform. If false, the destination
5004+
index will not be deleted
50035005
** *`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.
50045006

50055007
[discrete]

src/api/api/indices.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export default class Indices {
326326

327327
/**
328328
* Deletes an index template.
329-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
329+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-template.html | Elasticsearch API documentation}
330330
*/
331331
async deleteIndexTemplate (this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteIndexTemplateResponse>
332332
async deleteIndexTemplate (this: That, params: T.IndicesDeleteIndexTemplateRequest | TB.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteIndexTemplateResponse, unknown>>
@@ -411,7 +411,7 @@ export default class Indices {
411411

412412
/**
413413
* Returns information about whether a particular index template exists.
414-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
414+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/index-templates.html | Elasticsearch API documentation}
415415
*/
416416
async existsIndexTemplate (this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesExistsIndexTemplateResponse>
417417
async existsIndexTemplate (this: That, params: T.IndicesExistsIndexTemplateRequest | TB.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesExistsIndexTemplateResponse, unknown>>
@@ -589,7 +589,7 @@ export default class Indices {
589589

590590
/**
591591
* Returns an index template.
592-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
592+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-template.html | Elasticsearch API documentation}
593593
*/
594594
async getIndexTemplate (this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetIndexTemplateResponse>
595595
async getIndexTemplate (this: That, params?: T.IndicesGetIndexTemplateRequest | TB.IndicesGetIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetIndexTemplateResponse, unknown>>
@@ -844,7 +844,7 @@ export default class Indices {
844844

845845
/**
846846
* Creates or updates an index template.
847-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
847+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-template.html | Elasticsearch API documentation}
848848
*/
849849
async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutIndexTemplateResponse>
850850
async putIndexTemplate (this: That, params: T.IndicesPutIndexTemplateRequest | TB.IndicesPutIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutIndexTemplateResponse, unknown>>
@@ -958,7 +958,7 @@ export default class Indices {
958958

959959
/**
960960
* Creates or updates an index template.
961-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
961+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html | Elasticsearch API documentation}
962962
*/
963963
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutTemplateResponse>
964964
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutTemplateResponse, unknown>>
@@ -1101,7 +1101,7 @@ export default class Indices {
11011101

11021102
/**
11031103
* Simulate matching the given index name against the index templates in the system
1104-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
1104+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html | Elasticsearch API documentation}
11051105
*/
11061106
async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSimulateIndexTemplateResponse>
11071107
async simulateIndexTemplate (this: That, params: T.IndicesSimulateIndexTemplateRequest | TB.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSimulateIndexTemplateResponse, unknown>>
@@ -1139,7 +1139,7 @@ export default class Indices {
11391139

11401140
/**
11411141
* Simulate resolving the given template name or body
1142-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html | Elasticsearch API documentation}
1142+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-template.html | Elasticsearch API documentation}
11431143
*/
11441144
async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesSimulateTemplateResponse>
11451145
async simulateTemplate (this: That, params: T.IndicesSimulateTemplateRequest | TB.IndicesSimulateTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesSimulateTemplateResponse, unknown>>

src/api/api/logstash.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,15 @@ export default class Logstash {
7373
* Retrieves Logstash Pipelines used by Central Management
7474
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/logstash-api-get-pipeline.html | Elasticsearch API documentation}
7575
*/
76-
async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LogstashGetPipelineResponse>
77-
async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LogstashGetPipelineResponse, unknown>>
78-
async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashGetPipelineResponse>
79-
async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<any> {
76+
async getPipeline (this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.LogstashGetPipelineResponse>
77+
async getPipeline (this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.LogstashGetPipelineResponse, unknown>>
78+
async getPipeline (this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashGetPipelineResponse>
79+
async getPipeline (this: That, params?: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<any> {
8080
const acceptedPath: string[] = ['id']
8181
const querystring: Record<string, any> = {}
8282
const body = undefined
8383

84+
params = params ?? {}
8485
for (const key in params) {
8586
if (acceptedPath.includes(key)) {
8687
continue

src/api/api/search_application.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class SearchApplication {
4545

4646
/**
4747
* Deletes a search application.
48-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html | Elasticsearch API documentation}
48+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html | Elasticsearch API documentation}
4949
*/
5050
async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationDeleteResponse>
5151
async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.SearchApplicationDeleteResponse, unknown>>

src/api/types.ts

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ export interface MsearchMultiSearchItem<TDocument = unknown> extends SearchRespo
699699
status?: integer
700700
}
701701

702-
export interface MsearchMultiSearchResult<TDocument = unknown> {
702+
export interface MsearchMultiSearchResult<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> {
703703
took: long
704704
responses: MsearchResponseItem<TDocument>[]
705705
}
@@ -771,7 +771,7 @@ export interface MsearchRequest extends RequestBase {
771771

772772
export type MsearchRequestItem = MsearchMultisearchHeader | MsearchMultisearchBody
773773

774-
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>
774+
export type MsearchResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
775775

776776
export type MsearchResponseItem<TDocument = unknown> = MsearchMultiSearchItem<TDocument> | ErrorResponseBase
777777

@@ -787,7 +787,7 @@ export interface MsearchTemplateRequest extends RequestBase {
787787

788788
export type MsearchTemplateRequestItem = MsearchMultisearchHeader | MsearchTemplateTemplateConfig
789789

790-
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument>
790+
export type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<AggregateName, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
791791

792792
export interface MsearchTemplateTemplateConfig {
793793
explain?: boolean
@@ -1998,6 +1998,9 @@ export interface ClusterStatistics {
19981998
skipped: integer
19991999
successful: integer
20002000
total: integer
2001+
running: integer
2002+
partial: integer
2003+
failed: integer
20012004
details?: Record<ClusterAlias, ClusterDetails>
20022005
}
20032006

@@ -2272,6 +2275,8 @@ export type Level = 'cluster' | 'indices' | 'shards'
22722275

22732276
export type LifecycleOperationMode = 'RUNNING' | 'STOPPING' | 'STOPPED'
22742277

2278+
export type ManagedBy = 'Index Lifecycle Management' | 'Data stream lifecycle' | 'Unmanaged'
2279+
22752280
export type MapboxVectorTiles = ArrayBuffer
22762281

22772282
export interface MergesStats {
@@ -4915,7 +4920,7 @@ export interface MappingFieldNamesField {
49154920
enabled: boolean
49164921
}
49174922

4918-
export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'match_only_text'
4923+
export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'sparse_vector' | 'match_only_text'
49194924

49204925
export interface MappingFlattenedProperty extends MappingPropertyBase {
49214926
boost?: double
@@ -9481,6 +9486,8 @@ export interface IndicesDataStream {
94819486
generation: integer
94829487
hidden: boolean
94839488
ilm_policy?: Name
9489+
next_generation_managed_by: ManagedBy
9490+
prefer_ilm: boolean
94849491
indices: IndicesDataStreamIndex[]
94859492
name: DataStreamName
94869493
replicated?: boolean
@@ -9492,6 +9499,9 @@ export interface IndicesDataStream {
94929499
export interface IndicesDataStreamIndex {
94939500
index_name: IndexName
94949501
index_uuid: Uuid
9502+
ilm_policy?: Name
9503+
managed_by: ManagedBy
9504+
prefer_ilm: boolean
94959505
}
94969506

94979507
export interface IndicesDataStreamLifecycle {
@@ -11756,7 +11766,7 @@ export interface LogstashDeletePipelineRequest extends RequestBase {
1175611766
export type LogstashDeletePipelineResponse = boolean
1175711767

1175811768
export interface LogstashGetPipelineRequest extends RequestBase {
11759-
id: Ids
11769+
id?: Ids
1176011770
}
1176111771

1176211772
export type LogstashGetPipelineResponse = Record<Id, LogstashPipeline>
@@ -17269,6 +17279,7 @@ export interface TransformTimeSync {
1726917279
export interface TransformDeleteTransformRequest extends RequestBase {
1727017280
transform_id: Id
1727117281
force?: boolean
17282+
delete_dest_index?: boolean
1727217283
timeout?: Duration
1727317284
}
1727417285

0 commit comments

Comments
 (0)