Skip to content

Commit 30c6793

Browse files
Auto-generated code for 8.15 (#2308)
1 parent 6df75b6 commit 30c6793

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+5949
-1916
lines changed

docs/reference.asciidoc

Lines changed: 1199 additions & 455 deletions
Large diffs are not rendered by default.

src/api/api/async_search.ts

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import {
3030
Transport,
31+
TransportRequestMetadata,
3132
TransportRequestOptions,
3233
TransportRequestOptionsWithMeta,
3334
TransportRequestOptionsWithOutMeta,
@@ -44,8 +45,8 @@ export default class AsyncSearch {
4445
}
4546

4647
/**
47-
* Deletes an async search by ID. If the search is still running, the search request will be cancelled. Otherwise, the saved search results are deleted.
48-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
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.
49+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/async-search.html | Elasticsearch API documentation}
4950
*/
5051
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchDeleteResponse>
5152
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchDeleteResponse, unknown>>
@@ -66,12 +67,18 @@ export default class AsyncSearch {
6667

6768
const method = 'DELETE'
6869
const path = `/_async_search/${encodeURIComponent(params.id.toString())}`
69-
return await this.transport.request({ path, method, querystring, body }, options)
70+
const meta: TransportRequestMetadata = {
71+
name: 'async_search.delete',
72+
pathParts: {
73+
id: params.id
74+
}
75+
}
76+
return await this.transport.request({ path, method, querystring, body, meta }, options)
7077
}
7178

7279
/**
73-
* Retrieves the results of a previously submitted async search request given its ID.
74-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
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.
81+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/async-search.html | Elasticsearch API documentation}
7582
*/
7683
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchGetResponse<TDocument, TAggregations>>
7784
async get<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchGetResponse<TDocument, TAggregations>, unknown>>
@@ -92,12 +99,18 @@ export default class AsyncSearch {
9299

93100
const method = 'GET'
94101
const path = `/_async_search/${encodeURIComponent(params.id.toString())}`
95-
return await this.transport.request({ path, method, querystring, body }, options)
102+
const meta: TransportRequestMetadata = {
103+
name: 'async_search.get',
104+
pathParts: {
105+
id: params.id
106+
}
107+
}
108+
return await this.transport.request({ path, method, querystring, body, meta }, options)
96109
}
97110

98111
/**
99-
* Retrieves the status of a previously submitted async search request given its ID.
100-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
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.
113+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/async-search.html | Elasticsearch API documentation}
101114
*/
102115
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchStatusResponse>
103116
async status (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchStatusResponse, unknown>>
@@ -118,12 +131,18 @@ export default class AsyncSearch {
118131

119132
const method = 'GET'
120133
const path = `/_async_search/status/${encodeURIComponent(params.id.toString())}`
121-
return await this.transport.request({ path, method, querystring, body }, options)
134+
const meta: TransportRequestMetadata = {
135+
name: 'async_search.status',
136+
pathParts: {
137+
id: params.id
138+
}
139+
}
140+
return await this.transport.request({ path, method, querystring, body, meta }, options)
122141
}
123142

124143
/**
125-
* Executes a search request asynchronously.
126-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/async-search.html | Elasticsearch API documentation}
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.
145+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/async-search.html | Elasticsearch API documentation}
127146
*/
128147
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AsyncSearchSubmitResponse<TDocument, TAggregations>>
129148
async submit<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AsyncSearchSubmitResponse<TDocument, TAggregations>, unknown>>
@@ -170,6 +189,12 @@ export default class AsyncSearch {
170189
method = 'POST'
171190
path = '/_async_search'
172191
}
173-
return await this.transport.request({ path, method, querystring, body }, options)
192+
const meta: TransportRequestMetadata = {
193+
name: 'async_search.submit',
194+
pathParts: {
195+
index: params.index
196+
}
197+
}
198+
return await this.transport.request({ path, method, querystring, body, meta }, options)
174199
}
175200
}

src/api/api/autoscaling.ts

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import {
3030
Transport,
31+
TransportRequestMetadata,
3132
TransportRequestOptions,
3233
TransportRequestOptionsWithMeta,
3334
TransportRequestOptionsWithOutMeta,
@@ -45,7 +46,7 @@ export default class Autoscaling {
4546

4647
/**
4748
* Deletes an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
48-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
49+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/autoscaling-delete-autoscaling-policy.html | Elasticsearch API documentation}
4950
*/
5051
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>
5152
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingDeleteAutoscalingPolicyResponse, unknown>>
@@ -66,12 +67,18 @@ export default class Autoscaling {
6667

6768
const method = 'DELETE'
6869
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`
69-
return await this.transport.request({ path, method, querystring, body }, options)
70+
const meta: TransportRequestMetadata = {
71+
name: 'autoscaling.delete_autoscaling_policy',
72+
pathParts: {
73+
name: params.name
74+
}
75+
}
76+
return await this.transport.request({ path, method, querystring, body, meta }, options)
7077
}
7178

7279
/**
7380
* Gets the current autoscaling capacity based on the configured autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
74-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
81+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
7582
*/
7683
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingCapacityResponse>
7784
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingCapacityResponse, unknown>>
@@ -93,12 +100,15 @@ export default class Autoscaling {
93100

94101
const method = 'GET'
95102
const path = '/_autoscaling/capacity'
96-
return await this.transport.request({ path, method, querystring, body }, options)
103+
const meta: TransportRequestMetadata = {
104+
name: 'autoscaling.get_autoscaling_capacity'
105+
}
106+
return await this.transport.request({ path, method, querystring, body, meta }, options)
97107
}
98108

99109
/**
100110
* Retrieves an autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
101-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
111+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/autoscaling-get-autoscaling-capacity.html | Elasticsearch API documentation}
102112
*/
103113
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingGetAutoscalingPolicyResponse>
104114
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingGetAutoscalingPolicyResponse, unknown>>
@@ -119,12 +129,18 @@ export default class Autoscaling {
119129

120130
const method = 'GET'
121131
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`
122-
return await this.transport.request({ path, method, querystring, body }, options)
132+
const meta: TransportRequestMetadata = {
133+
name: 'autoscaling.get_autoscaling_policy',
134+
pathParts: {
135+
name: params.name
136+
}
137+
}
138+
return await this.transport.request({ path, method, querystring, body, meta }, options)
123139
}
124140

125141
/**
126142
* Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
127-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
143+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/autoscaling-put-autoscaling-policy.html | Elasticsearch API documentation}
128144
*/
129145
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.AutoscalingPutAutoscalingPolicyResponse>
130146
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.AutoscalingPutAutoscalingPolicyResponse, unknown>>
@@ -150,6 +166,12 @@ export default class Autoscaling {
150166

151167
const method = 'PUT'
152168
const path = `/_autoscaling/policy/${encodeURIComponent(params.name.toString())}`
153-
return await this.transport.request({ path, method, querystring, body }, options)
169+
const meta: TransportRequestMetadata = {
170+
name: 'autoscaling.put_autoscaling_policy',
171+
pathParts: {
172+
name: params.name
173+
}
174+
}
175+
return await this.transport.request({ path, method, querystring, body, meta }, options)
154176
}
155177
}

src/api/api/bulk.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import {
3030
Transport,
31+
TransportRequestMetadata,
3132
TransportRequestOptions,
3233
TransportRequestOptionsWithMeta,
3334
TransportRequestOptionsWithOutMeta,
@@ -38,8 +39,8 @@ import * as TB from '../typesWithBodyKey'
3839
interface That { transport: Transport }
3940

4041
/**
41-
* Allows to perform multiple index/update/delete operations in a single request.
42-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html | Elasticsearch API documentation}
42+
* Performs multiple indexing or delete operations in a single API call. This reduces overhead and can greatly increase indexing speed.
43+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-bulk.html | Elasticsearch API documentation}
4344
*/
4445
export default async function BulkApi<TDocument = unknown, TPartialDocument = unknown> (this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithOutMeta): Promise<T.BulkResponse>
4546
export default async function BulkApi<TDocument = unknown, TPartialDocument = unknown> (this: That, params: T.BulkRequest<TDocument, TPartialDocument> | TB.BulkRequest<TDocument, TPartialDocument>, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.BulkResponse, unknown>>
@@ -72,5 +73,11 @@ export default async function BulkApi<TDocument = unknown, TPartialDocument = un
7273
method = 'POST'
7374
path = '/_bulk'
7475
}
75-
return await this.transport.request({ path, method, querystring, bulkBody: body }, options)
76+
const meta: TransportRequestMetadata = {
77+
name: 'bulk',
78+
pathParts: {
79+
index: params.index
80+
}
81+
}
82+
return await this.transport.request({ path, method, querystring, bulkBody: body, meta }, options)
7683
}

src/api/api/capabilities.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
/* eslint-disable import/export */
21+
/* eslint-disable @typescript-eslint/no-misused-new */
22+
/* eslint-disable @typescript-eslint/no-extraneous-class */
23+
/* eslint-disable @typescript-eslint/no-unused-vars */
24+
25+
// This file was automatically generated by elastic/elastic-client-generator-js
26+
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
27+
// and elastic/elastic-client-generator-js to regenerate this file again.
28+
29+
import {
30+
Transport,
31+
TransportRequestMetadata,
32+
TransportRequestOptions,
33+
TransportRequestOptionsWithMeta,
34+
TransportRequestOptionsWithOutMeta,
35+
TransportResult
36+
} from '@elastic/transport'
37+
import * as T from '../types'
38+
import * as TB from '../typesWithBodyKey'
39+
interface That { transport: Transport }
40+
41+
/**
42+
* Checks if the specified combination of method, API, parameters, and arbitrary capabilities are supported
43+
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/8.15/capabilities.html | Elasticsearch API documentation}
44+
*/
45+
export default async function CapabilitiesApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
46+
export default async function CapabilitiesApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
47+
export default async function CapabilitiesApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
48+
export default async function CapabilitiesApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
49+
const acceptedPath: string[] = []
50+
const querystring: Record<string, any> = {}
51+
const body = undefined
52+
53+
params = params ?? {}
54+
for (const key in params) {
55+
if (acceptedPath.includes(key)) {
56+
continue
57+
} else if (key !== 'body') {
58+
querystring[key] = params[key]
59+
}
60+
}
61+
62+
const method = 'GET'
63+
const path = '/_capabilities'
64+
const meta: TransportRequestMetadata = {
65+
name: 'capabilities'
66+
}
67+
return await this.transport.request({ path, method, querystring, body, meta }, options)
68+
}

0 commit comments

Comments
 (0)