Skip to content

Commit 8166b3b

Browse files
Auto-generated API code (#2878)
1 parent 05b7ee6 commit 8166b3b

File tree

8 files changed

+214
-89
lines changed

8 files changed

+214
-89
lines changed

docs/reference.asciidoc

Lines changed: 104 additions & 71 deletions
Large diffs are not rendered by default.

src/api/api/cluster.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ export default class Cluster {
469469
}
470470

471471
/**
472-
* Get remote cluster information. Get information about configured remote clusters. The API returns connection and endpoint information keyed by the configured remote cluster alias. > info > This API returns information that reflects current state on the local cluster. > The `connected` field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it. > Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster. > To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the [resolve cluster endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster).
472+
* Get remote cluster information. Get information about configured remote clusters. The API returns connection and endpoint information keyed by the configured remote cluster alias. > info > This API returns information that reflects current state on the local cluster. > The `connected` field does not necessarily reflect whether a remote cluster is down or unavailable, only whether there is currently an open connection to it. > Elasticsearch does not spontaneously try to reconnect to a disconnected remote cluster. > To trigger a reconnection, attempt a cross-cluster search, ES|QL cross-cluster search, or try the `/_resolve/cluster` endpoint.
473473
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/cluster-remote-info.html | Elasticsearch API documentation}
474474
*/
475475
async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.ClusterRemoteInfoResponse>

src/api/api/esql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default class Esql {
5353
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlAsyncQueryResponse>
5454
async asyncQuery (this: That, params: T.EsqlAsyncQueryRequest | TB.EsqlAsyncQueryRequest, options?: TransportRequestOptions): Promise<any> {
5555
const acceptedPath: string[] = []
56-
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'profile', 'query', 'tables', 'include_ccs_metadata', 'wait_for_completion_timeout']
56+
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'profile', 'query', 'tables', 'include_ccs_metadata', 'wait_for_completion_timeout', 'keep_alive', 'keep_on_completion']
5757
const querystring: Record<string, any> = {}
5858
// @ts-expect-error
5959
const userBody: any = params?.body

src/api/api/fleet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default class Fleet {
139139
}
140140

141141
/**
142-
* Executes several [fleet searches](https://www.elastic.co/guide/en/elasticsearch/reference/current/fleet-search.html) with a single API request. The API follows the same structure as the [multi search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) API. However, similar to the fleet search API, it supports the wait_for_checkpoints parameter.
142+
* Executes several fleet searches with a single API request. The API follows the same structure as the multi search (`_msearch`) API. However, similar to the fleet search API, it supports the `wait_for_checkpoints` parameter.
143143
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/fleet-multi-search.html | Elasticsearch API documentation}
144144
*/
145145
async msearch<TDocument = unknown> (this: That, params: T.FleetMsearchRequest | TB.FleetMsearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.FleetMsearchResponse<TDocument>>

src/api/api/indices.ts

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default class Indices {
7979

8080
/**
8181
* Get tokens from text analysis. The analyze API performs analysis on a text string and returns the resulting tokens. Generating excessive amount of tokens may cause a node to run out of memory. The `index.analyze.max_token_count` setting enables you to limit the number of tokens that can be produced. If more than this limit of tokens gets generated, an error occurs. The `_analyze` endpoint without a specified index will always use `10000` as its limit.
82-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-analyze.html | Elasticsearch API documentation}
82+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-analyze | Elasticsearch API documentation}
8383
*/
8484
async analyze (this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesAnalyzeResponse>
8585
async analyze (this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesAnalyzeResponse, unknown>>
@@ -1227,6 +1227,38 @@ export default class Indices {
12271227
return await this.transport.request({ path, method, querystring, body, meta }, options)
12281228
}
12291229

1230+
/**
1231+
* Gets a data stream's settings
1232+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams.html | Elasticsearch API documentation}
1233+
*/
1234+
async getDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
1235+
async getDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
1236+
async getDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
1237+
async getDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
1238+
const acceptedPath: string[] = ['name']
1239+
const querystring: Record<string, any> = {}
1240+
const body = undefined
1241+
1242+
params = params ?? {}
1243+
for (const key in params) {
1244+
if (acceptedPath.includes(key)) {
1245+
continue
1246+
} else if (key !== 'body') {
1247+
querystring[key] = params[key]
1248+
}
1249+
}
1250+
1251+
const method = 'GET'
1252+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_settings`
1253+
const meta: TransportRequestMetadata = {
1254+
name: 'indices.get_data_stream_settings',
1255+
pathParts: {
1256+
name: params.name
1257+
}
1258+
}
1259+
return await this.transport.request({ path, method, querystring, body, meta }, options)
1260+
}
1261+
12301262
/**
12311263
* Get mapping definitions. Retrieves mapping definitions for one or more fields. For data streams, the API retrieves field mappings for the stream’s backing indices. This API is useful if you don't need a complete mapping or if an index mapping contains a large number of fields.
12321264
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/indices-get-field-mapping.html | Elasticsearch API documentation}
@@ -1765,6 +1797,38 @@ export default class Indices {
17651797
return await this.transport.request({ path, method, querystring, body, meta }, options)
17661798
}
17671799

1800+
/**
1801+
* Updates a data stream's settings
1802+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.19/data-streams.html | Elasticsearch API documentation}
1803+
*/
1804+
async putDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
1805+
async putDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
1806+
async putDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
1807+
async putDataStreamSettings (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
1808+
const acceptedPath: string[] = ['name']
1809+
const querystring: Record<string, any> = {}
1810+
const body = undefined
1811+
1812+
params = params ?? {}
1813+
for (const key in params) {
1814+
if (acceptedPath.includes(key)) {
1815+
continue
1816+
} else if (key !== 'body') {
1817+
querystring[key] = params[key]
1818+
}
1819+
}
1820+
1821+
const method = 'PUT'
1822+
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_settings`
1823+
const meta: TransportRequestMetadata = {
1824+
name: 'indices.put_data_stream_settings',
1825+
pathParts: {
1826+
name: params.name
1827+
}
1828+
}
1829+
return await this.transport.request({ path, method, querystring, body, meta }, options)
1830+
}
1831+
17681832
/**
17691833
* Create or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices. Elasticsearch applies templates to new indices based on an wildcard pattern that matches the index name. Index templates are applied during data stream or index creation. For data streams, these settings and mappings are applied when the stream's backing indices are created. Settings and mappings specified in a create index API request override any settings or mappings specified in an index template. Changes to index templates do not affect existing indices, including the existing backing indices of a data stream. You can use C-style `/* *\/` block comments in index templates. You can include comments anywhere in the request body, except before the opening curly bracket. **Multiple matching templates** If multiple index templates match the name of a new index or data stream, the template with the highest priority is used. Multiple templates with overlapping index patterns at the same priority are not allowed and an error will be thrown when attempting to create a template matching an existing index template at identical priorities. **Composing aliases, mappings, and settings** When multiple component templates are specified in the `composed_of` field for an index template, they are merged in the order specified, meaning that later component templates override earlier component templates. Any mappings, settings, or aliases from the parent index template are merged in next. Finally, any configuration on the index request itself is merged. Mapping definitions are merged recursively, which means that later mapping components can introduce new field mappings and update the mapping configuration. If a field mapping is already contained in an earlier component, its definition will be completely overwritten by the later one. This recursive merging strategy applies not only to field mappings, but also root options like `dynamic_templates` and `meta`. If an earlier component contains a `dynamic_templates` block, then by default new `dynamic_templates` entries are appended onto the end. If an entry already exists with the same key, then it is overwritten by the new definition.
17701834
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/v8/operation/operation-indices-put-index-template | Elasticsearch API documentation}

0 commit comments

Comments
 (0)