Skip to content

Commit 6e2681d

Browse files
Auto-generated API code
1 parent f0724ad commit 6e2681d

File tree

7 files changed

+430
-255
lines changed

7 files changed

+430
-255
lines changed

docs/reference.asciidoc

Lines changed: 89 additions & 80 deletions
Large diffs are not rendered by default.

src/api/api/async_search.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default class AsyncSearch {
4545
}
4646

4747
/**
48-
* Deletes an async search by identifier. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted. If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
48+
* Delete an async search. If the asynchronous search is still running, it is cancelled. Otherwise, the saved search results are deleted. If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
4949
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
5050
*/
5151
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchDeleteResponse>
@@ -77,7 +77,7 @@ export default class AsyncSearch {
7777
}
7878

7979
/**
80-
* Retrieves the results of a previously submitted async search request given its identifier. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
80+
* Get async search results. Retrieve the results of a previously submitted asynchronous search request. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
8181
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
8282
*/
8383
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
@@ -109,7 +109,7 @@ export default class AsyncSearch {
109109
}
110110

111111
/**
112-
* Get async search status Retrieves the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
112+
* Get async search status. Retrieve the status of a previously submitted async search request given its identifier, without retrieving search results. If the Elasticsearch security features are enabled, use of this API is restricted to the `monitoring_user` role.
113113
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
114114
*/
115115
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>
@@ -141,7 +141,7 @@ export default class AsyncSearch {
141141
}
142142

143143
/**
144-
* Runs a search request asynchronously. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field, hence partial results become available following the sort criteria that was requested. Warning: Async search does not support scroll nor search requests that only include the suggest section. By default, Elasticsearch doesn’t allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.
144+
* Run an async search. When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested. Warning: Asynchronous search does not support scroll or search requests that include only the suggest section. By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error. The maximum allowed size for a stored async search response can be set by changing the `search.max_async_search_response_size` cluster level setting.
145145
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
146146
*/
147147
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>

src/api/api/enrich.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -191,34 +191,4 @@ export default class Enrich {
191191
}
192192
return await this.transport.request({ path, method, querystring, body, meta }, options)
193193
}
194-
195-
/**
196-
* Get enrich stats. Returns enrich coordinator statistics and information about enrich policies that are currently executing.
197-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/enrich-stats-api.html | Elasticsearch API documentation}
198-
*/
199-
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.EnrichStatsResponse>
200-
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.EnrichStatsResponse, unknown>>
201-
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptions): Promise<T.EnrichStatsResponse>
202-
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptions): Promise<any> {
203-
const acceptedPath: string[] = []
204-
const querystring: Record<string, any> = {}
205-
const body = undefined
206-
207-
params = params ?? {}
208-
for (const key in params) {
209-
if (acceptedPath.includes(key)) {
210-
continue
211-
} else if (key !== 'body') {
212-
// @ts-expect-error
213-
querystring[key] = params[key]
214-
}
215-
}
216-
217-
const method = 'GET'
218-
const path = '/_enrich/_stats'
219-
const meta: TransportRequestMetadata = {
220-
name: 'enrich.stats'
221-
}
222-
return await this.transport.request({ path, method, querystring, body, meta }, options)
223-
}
224194
}

src/api/api/indices.ts

Lines changed: 1 addition & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class Indices {
7878
}
7979

8080
/**
81-
* Performs analysis on a text string and returns the resulting tokens.
81+
* Get tokens from text analysis. The analyze API performs [analysis](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis.html) on a text string and returns the resulting tokens.
8282
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html | Elasticsearch API documentation}
8383
*/
8484
async analyze (this: That, params?: T.IndicesAnalyzeRequest | TB.IndicesAnalyzeRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesAnalyzeResponse>
@@ -277,38 +277,6 @@ export default class Indices {
277277
return await this.transport.request({ path, method, querystring, body, meta }, options)
278278
}
279279

280-
/**
281-
* Delete data stream lifecycles. Removes the data stream lifecycle from a data stream, rendering it not managed by the data stream lifecycle.
282-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-delete-lifecycle.html | Elasticsearch API documentation}
283-
*/
284-
async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDeleteDataLifecycleResponse>
285-
async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDeleteDataLifecycleResponse, unknown>>
286-
async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptions): Promise<T.IndicesDeleteDataLifecycleResponse>
287-
async deleteDataLifecycle (this: That, params: T.IndicesDeleteDataLifecycleRequest | TB.IndicesDeleteDataLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
288-
const acceptedPath: string[] = ['name']
289-
const querystring: Record<string, any> = {}
290-
const body = undefined
291-
292-
for (const key in params) {
293-
if (acceptedPath.includes(key)) {
294-
continue
295-
} else if (key !== 'body') {
296-
// @ts-expect-error
297-
querystring[key] = params[key]
298-
}
299-
}
300-
301-
const method = 'DELETE'
302-
const path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_lifecycle`
303-
const meta: TransportRequestMetadata = {
304-
name: 'indices.delete_data_lifecycle',
305-
pathParts: {
306-
name: params.name
307-
}
308-
}
309-
return await this.transport.request({ path, method, querystring, body, meta }, options)
310-
}
311-
312280
/**
313281
* Delete data streams. Deletes one or more data streams and their backing indices.
314282
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html | Elasticsearch API documentation}
@@ -1088,50 +1056,6 @@ export default class Indices {
10881056
return await this.transport.request({ path, method, querystring, body, meta }, options)
10891057
}
10901058

1091-
/**
1092-
* Create or update an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices.
1093-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates-v1.html | Elasticsearch API documentation}
1094-
*/
1095-
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutTemplateResponse>
1096-
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutTemplateResponse, unknown>>
1097-
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesPutTemplateResponse>
1098-
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptions): Promise<any> {
1099-
const acceptedPath: string[] = ['name']
1100-
const acceptedBody: string[] = ['aliases', 'index_patterns', 'mappings', 'order', 'settings', 'version']
1101-
const querystring: Record<string, any> = {}
1102-
// @ts-expect-error
1103-
const userBody: any = params?.body
1104-
let body: Record<string, any> | string
1105-
if (typeof userBody === 'string') {
1106-
body = userBody
1107-
} else {
1108-
body = userBody != null ? { ...userBody } : undefined
1109-
}
1110-
1111-
for (const key in params) {
1112-
if (acceptedBody.includes(key)) {
1113-
body = body ?? {}
1114-
// @ts-expect-error
1115-
body[key] = params[key]
1116-
} else if (acceptedPath.includes(key)) {
1117-
continue
1118-
} else if (key !== 'body') {
1119-
// @ts-expect-error
1120-
querystring[key] = params[key]
1121-
}
1122-
}
1123-
1124-
const method = 'PUT'
1125-
const path = `/_template/${encodeURIComponent(params.name.toString())}`
1126-
const meta: TransportRequestMetadata = {
1127-
name: 'indices.put_template',
1128-
pathParts: {
1129-
name: params.name
1130-
}
1131-
}
1132-
return await this.transport.request({ path, method, querystring, body, meta }, options)
1133-
}
1134-
11351059
/**
11361060
* Refresh an index. A refresh makes recent operations performed on one or more indices available for search. For data streams, the API runs the refresh operation on the stream’s backing indices.
11371061
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html | Elasticsearch API documentation}

0 commit comments

Comments
 (0)