Skip to content

Commit 4d307f1

Browse files
feat: Latest serverless specification changes
Auto-generated API code
1 parent ff7998d commit 4d307f1

File tree

5 files changed

+292
-107
lines changed

5 files changed

+292
-107
lines changed

docs/reference.asciidoc

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,27 +2591,6 @@ Cannot be longer than 255 bytes. Multi-byte characters count towards this limit
25912591
** *`master_timeout` (Optional, string | -1 | 0)*: Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
25922592
** *`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.
25932593

2594-
[discrete]
2595-
==== data_streams_stats
2596-
Get data stream stats.
2597-
Retrieves statistics for one or more data streams.
2598-
2599-
{ref}/data-streams.html[Endpoint documentation]
2600-
[source,ts]
2601-
----
2602-
client.indices.dataStreamsStats({ ... })
2603-
----
2604-
2605-
[discrete]
2606-
==== Arguments
2607-
2608-
* *Request (object):*
2609-
** *`name` (Optional, string)*: List of data streams used to limit the request.
2610-
Wildcard expressions (`*`) are supported.
2611-
To target all data streams in a cluster, omit this parameter or use `*`.
2612-
** *`expand_wildcards` (Optional, Enum("all" | "open" | "closed" | "hidden" | "none") | Enum("all" | "open" | "closed" | "hidden" | "none")[])*: Type of data stream that wildcard patterns can match.
2613-
Supports a list of values, such as `open,hidden`.
2614-
26152594
[discrete]
26162595
==== delete
26172596
Delete indices.
@@ -3203,7 +3182,7 @@ a new date field is added instead of string.
32033182
not used at all by Elasticsearch, but can be used to store
32043183
application-specific metadata.
32053184
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
3206-
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, script, on_script_error, normalizer, norms, null_value, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, element_type, dims, similarity, index, index_options } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { type, meta, inference_id } | { type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type } | { type, norms, index_options, index, null_value, rules, language, country, variant, strength, decomposition, alternate, case_level, case_first, numeric, variable_top, hiragana_quaternary_mode }>)*: Mapping for a field. For new fields, this mapping can include:
3185+
** *`properties` (Optional, Record<string, { type } | { boost, fielddata, index, null_value, type } | { type, enabled, null_value, boost, coerce, script, on_script_error, ignore_malformed, time_series_metric, analyzer, eager_global_ordinals, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, term_vector, format, precision_step, locale } | { relations, eager_global_ordinals, type } | { boost, eager_global_ordinals, index, index_options, script, on_script_error, normalizer, norms, null_value, similarity, split_queries_on_whitespace, time_series_dimension, type } | { type, fields, meta, copy_to } | { type } | { positive_score_impact, type } | { positive_score_impact, type } | { analyzer, index, index_options, max_shingle_size, norms, search_analyzer, search_quote_analyzer, similarity, term_vector, type } | { analyzer, boost, eager_global_ordinals, fielddata, fielddata_frequency_filter, index, index_options, index_phrases, index_prefixes, norms, position_increment_gap, search_analyzer, search_quote_analyzer, similarity, term_vector, type } | { type } | { type, null_value } | { boost, format, ignore_malformed, index, null_value, precision_step, type } | { boost, fielddata, format, ignore_malformed, index, null_value, precision_step, locale, type } | { type, default_metric, metrics, time_series_metric } | { type, element_type, dims, similarity, index, index_options } | { boost, depth_limit, doc_values, eager_global_ordinals, index, index_options, null_value, similarity, split_queries_on_whitespace, type } | { enabled, include_in_parent, include_in_root, type } | { enabled, subobjects, type } | { type, meta, inference_id } | { type } | { analyzer, contexts, max_input_length, preserve_position_increments, preserve_separators, search_analyzer, type } | { value, type } | { path, type } | { ignore_malformed, type } | { boost, index, ignore_malformed, null_value, on_script_error, script, time_series_dimension, type } | { type } | { analyzer, boost, index, null_value, enable_position_increments, type } | { ignore_malformed, ignore_z_value, null_value, index, on_script_error, script, type } | { coerce, ignore_malformed, ignore_z_value, orientation, strategy, type } | { ignore_malformed, ignore_z_value, null_value, type } | { coerce, ignore_malformed, ignore_z_value, orientation, type } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value } | { type, null_value, scaling_factor } | { type, null_value } | { type, null_value } | { format, type } | { type } | { type } | { type } | { type } | { type } | { type, norms, index_options, index, null_value, rules, language, country, variant, strength, decomposition, alternate, case_level, case_first, numeric, variable_top, hiragana_quaternary_mode }>)*: Mapping for a field. For new fields, this mapping can include:
32073186

32083187
- Field name
32093188
- Field data type
@@ -4489,7 +4468,7 @@ client.ml.postCalendarEvents({ calendar_id, events })
44894468

44904469
* *Request (object):*
44914470
** *`calendar_id` (string)*: A string that uniquely identifies a calendar.
4492-
** *`events` ({ calendar_id, event_id, description, end_time, start_time }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format.
4471+
** *`events` ({ calendar_id, event_id, description, end_time, start_time, skip_result, skip_model_update, force_time_shift }[])*: A list of one of more scheduled events. The event’s start and end times can be specified as integer milliseconds since the epoch or as a string in ISO 8601 format.
44934472

44944473
[discrete]
44954474
==== preview_data_frame_analytics
@@ -5443,7 +5422,8 @@ client.queryRules.putRuleset({ ruleset_id, rules })
54435422
=== search_application
54445423
[discrete]
54455424
==== delete
5446-
Deletes a search application.
5425+
Delete a search application.
5426+
Remove a search application and its associated alias. Indices attached to the search application are not removed.
54475427

54485428
{ref}/delete-search-application.html[Endpoint documentation]
54495429
[source,ts]
@@ -5460,6 +5440,7 @@ client.searchApplication.delete({ name })
54605440
[discrete]
54615441
==== delete_behavioral_analytics
54625442
Delete a behavioral analytics collection.
5443+
The associated data stream is also deleted.
54635444

54645445
{ref}/delete-analytics-collection.html[Endpoint documentation]
54655446
[source,ts]
@@ -5475,7 +5456,7 @@ client.searchApplication.deleteBehavioralAnalytics({ name })
54755456

54765457
[discrete]
54775458
==== get
5478-
Returns the details about a search application
5459+
Get search application details.
54795460

54805461
{ref}/get-search-application.html[Endpoint documentation]
54815462
[source,ts]
@@ -5491,7 +5472,7 @@ client.searchApplication.get({ name })
54915472

54925473
[discrete]
54935474
==== get_behavioral_analytics
5494-
Returns the existing behavioral analytics collections.
5475+
Get behavioral analytics collections.
54955476

54965477
{ref}/list-analytics-collection.html[Endpoint documentation]
54975478
[source,ts]
@@ -5525,7 +5506,7 @@ client.searchApplication.list({ ... })
55255506

55265507
[discrete]
55275508
==== put
5528-
Creates or updates a search application.
5509+
Create or update a search application.
55295510

55305511
{ref}/put-search-application.html[Endpoint documentation]
55315512
[source,ts]
@@ -5543,7 +5524,7 @@ client.searchApplication.put({ name })
55435524

55445525
[discrete]
55455526
==== put_behavioral_analytics
5546-
Creates a behavioral analytics collection.
5527+
Create a behavioral analytics collection.
55475528

55485529
{ref}/put-analytics-collection.html[Endpoint documentation]
55495530
[source,ts]
@@ -5559,7 +5540,9 @@ client.searchApplication.putBehavioralAnalytics({ name })
55595540

55605541
[discrete]
55615542
==== search
5562-
Perform a search against a search application.
5543+
Run a search application search.
5544+
Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template.
5545+
Unspecified template parameters are assigned their default values if applicable.
55635546

55645547
{ref}/search-application-search.html[Endpoint documentation]
55655548
[source,ts]
@@ -5882,7 +5865,7 @@ precedence over mapped fields with the same name.
58825865
** *`keep_alive` (Optional, string | -1 | 0)*: Retention period for an async or saved synchronous search.
58835866
** *`keep_on_completion` (Optional, boolean)*: If true, Elasticsearch stores synchronous searches if you also specify the wait_for_completion_timeout parameter. If false, Elasticsearch only stores async searches that don’t finish before the wait_for_completion_timeout.
58845867
** *`index_using_frozen` (Optional, boolean)*: If true, the search can run on frozen indices. Defaults to false.
5885-
** *`format` (Optional, string)*: Format for the response.
5868+
** *`format` (Optional, Enum("csv" | "json" | "tsv" | "txt" | "yaml" | "cbor" | "smile"))*: Format for the response.
58865869

58875870
[discrete]
58885871
==== translate

src/api/api/indices.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -205,46 +205,6 @@ export default class Indices {
205205
return await this.transport.request({ path, method, querystring, body, meta }, options)
206206
}
207207

208-
/**
209-
* Get data stream stats. Retrieves statistics for one or more data streams.
210-
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html | Elasticsearch API documentation}
211-
*/
212-
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesDataStreamsStatsResponse>
213-
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesDataStreamsStatsResponse, unknown>>
214-
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): Promise<T.IndicesDataStreamsStatsResponse>
215-
async dataStreamsStats (this: That, params?: T.IndicesDataStreamsStatsRequest | TB.IndicesDataStreamsStatsRequest, options?: TransportRequestOptions): Promise<any> {
216-
const acceptedPath: string[] = ['name']
217-
const querystring: Record<string, any> = {}
218-
const body = undefined
219-
220-
params = params ?? {}
221-
for (const key in params) {
222-
if (acceptedPath.includes(key)) {
223-
continue
224-
} else if (key !== 'body') {
225-
// @ts-expect-error
226-
querystring[key] = params[key]
227-
}
228-
}
229-
230-
let method = ''
231-
let path = ''
232-
if (params.name != null) {
233-
method = 'GET'
234-
path = `/_data_stream/${encodeURIComponent(params.name.toString())}/_stats`
235-
} else {
236-
method = 'GET'
237-
path = '/_data_stream/_stats'
238-
}
239-
const meta: TransportRequestMetadata = {
240-
name: 'indices.data_streams_stats',
241-
pathParts: {
242-
name: params.name
243-
}
244-
}
245-
return await this.transport.request({ path, method, querystring, body, meta }, options)
246-
}
247-
248208
/**
249209
* Delete indices. Deletes one or more indices.
250210
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html | Elasticsearch API documentation}

src/api/api/search_application.ts

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

4747
/**
48-
* Deletes a search application.
48+
* Delete a search application. Remove a search application and its associated alias. Indices attached to the search application are not removed.
4949
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-search-application.html | Elasticsearch API documentation}
5050
*/
5151
async delete (this: That, params: T.SearchApplicationDeleteRequest | TB.SearchApplicationDeleteRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationDeleteResponse>
@@ -77,7 +77,7 @@ export default class SearchApplication {
7777
}
7878

7979
/**
80-
* Delete a behavioral analytics collection.
80+
* Delete a behavioral analytics collection. The associated data stream is also deleted.
8181
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-analytics-collection.html | Elasticsearch API documentation}
8282
*/
8383
async deleteBehavioralAnalytics (this: That, params: T.SearchApplicationDeleteBehavioralAnalyticsRequest | TB.SearchApplicationDeleteBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationDeleteBehavioralAnalyticsResponse>
@@ -109,7 +109,7 @@ export default class SearchApplication {
109109
}
110110

111111
/**
112-
* Returns the details about a search application
112+
* Get search application details.
113113
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/get-search-application.html | Elasticsearch API documentation}
114114
*/
115115
async get (this: That, params: T.SearchApplicationGetRequest | TB.SearchApplicationGetRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationGetResponse>
@@ -141,7 +141,7 @@ export default class SearchApplication {
141141
}
142142

143143
/**
144-
* Returns the existing behavioral analytics collections.
144+
* Get behavioral analytics collections.
145145
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/list-analytics-collection.html | Elasticsearch API documentation}
146146
*/
147147
async getBehavioralAnalytics (this: That, params?: T.SearchApplicationGetBehavioralAnalyticsRequest | TB.SearchApplicationGetBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationGetBehavioralAnalyticsResponse>
@@ -211,7 +211,7 @@ export default class SearchApplication {
211211
}
212212

213213
/**
214-
* Creates or updates a search application.
214+
* Create or update a search application.
215215
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-search-application.html | Elasticsearch API documentation}
216216
*/
217217
async put (this: That, params: T.SearchApplicationPutRequest | TB.SearchApplicationPutRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationPutResponse>
@@ -248,7 +248,7 @@ export default class SearchApplication {
248248
}
249249

250250
/**
251-
* Creates a behavioral analytics collection.
251+
* Create a behavioral analytics collection.
252252
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/put-analytics-collection.html | Elasticsearch API documentation}
253253
*/
254254
async putBehavioralAnalytics (this: That, params: T.SearchApplicationPutBehavioralAnalyticsRequest | TB.SearchApplicationPutBehavioralAnalyticsRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationPutBehavioralAnalyticsResponse>
@@ -280,7 +280,7 @@ export default class SearchApplication {
280280
}
281281

282282
/**
283-
* Perform a search against a search application.
283+
* Run a search application search. Generate and run an Elasticsearch query that uses the specified query parameteter and the search template associated with the search application or default template. Unspecified template parameters are assigned their default values if applicable.
284284
* @see {@link https://www.elastic.co/guide/en/elasticsearch/reference/master/search-application-search.html | Elasticsearch API documentation}
285285
*/
286286
async search<TDocument = unknown, TAggregations = Record<T.AggregateName, T.AggregationsAggregate>> (this: That, params: T.SearchApplicationSearchRequest | TB.SearchApplicationSearchRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.SearchApplicationSearchResponse<TDocument, TAggregations>>

0 commit comments

Comments
 (0)