Skip to content

Commit 4be14a1

Browse files
Auto-generated code for main (#2261)
1 parent a71ebb5 commit 4be14a1

File tree

4 files changed

+3
-24
lines changed

4 files changed

+3
-24
lines changed

docs/reference.asciidoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,6 @@ client.esql.query({ query })
28262826
** *`filter` (Optional, { bool, boosting, common, combined_fields, constant_score, dis_max, distance_feature, exists, function_score, fuzzy, geo_bounding_box, geo_distance, geo_polygon, geo_shape, has_child, has_parent, ids, intervals, knn, match, match_all, match_bool_prefix, match_none, match_phrase, match_phrase_prefix, more_like_this, multi_match, nested, parent_id, percolate, pinned, prefix, query_string, range, rank_feature, regexp, rule_query, script, script_score, shape, simple_query_string, span_containing, field_masking_span, span_first, span_multi, span_near, span_not, span_or, span_term, span_within, term, terms, terms_set, text_expansion, weighted_tokens, wildcard, wrapper, type })*: Specify a Query DSL query in the filter parameter to filter the set of documents that an ES|QL query runs on.
28272827
** *`locale` (Optional, string)*
28282828
** *`params` (Optional, number | number | string | boolean | null[])*: To avoid any attempts of hacking or code injection, extract the values in a separate list of parameters. Use question mark placeholders (?) in the query string for each of the parameters.
2829-
** *`version` (Optional, Enum("2024.04.01"))*: The version of the ES|QL language in which the "query" field was written.
28302829
** *`format` (Optional, string)*: A short version of the Accept header, e.g. json, yaml.
28312830
** *`delimiter` (Optional, string)*: The character to use between values within a CSV row. Only valid for the CSV format.
28322831

src/api/api/esql.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class Esql {
5252
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<T.EsqlQueryResponse>
5353
async query (this: That, params: T.EsqlQueryRequest | TB.EsqlQueryRequest, options?: TransportRequestOptions): Promise<any> {
5454
const acceptedPath: string[] = []
55-
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'query', 'version']
55+
const acceptedBody: string[] = ['columnar', 'filter', 'locale', 'params', 'query']
5656
const querystring: Record<string, any> = {}
5757
// @ts-expect-error
5858
const userBody: any = params?.body
@@ -63,12 +63,6 @@ export default class Esql {
6363
body = userBody != null ? { ...userBody } : undefined
6464
}
6565

66-
// a version number is required for all ES|QL queries.
67-
// inject a default value if none is provided.
68-
if (typeof body === 'object' && body.version == null) {
69-
body.version = '2024.04.01'
70-
}
71-
7266
for (const key in params) {
7367
if (acceptedBody.includes(key)) {
7468
body = body ?? {}

src/api/types.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9693,12 +9693,6 @@ export type EqlSearchResponse<TEvent = unknown> = EqlEqlSearchResponseBase<TEven
96939693

96949694
export type EqlSearchResultPosition = 'tail' | 'head'
96959695

9696-
export type EsqlBaseServerlessEsqlVersion = '2024.04.01'
9697-
9698-
export type EsqlBaseStatefulEsqlVersion = '2024.04.01'
9699-
9700-
export type EsqlEsqlVersion = '2024.04.01'
9701-
97029696
export interface EsqlQueryRequest extends RequestBase {
97039697
format?: string
97049698
delimiter?: string
@@ -9707,7 +9701,6 @@ export interface EsqlQueryRequest extends RequestBase {
97079701
locale?: string
97089702
params?: ScalarValue[]
97099703
query: string
9710-
version?: EsqlEsqlVersion
97119704
}
97129705

97139706
export type EsqlQueryResponse = EsqlColumns
@@ -10555,7 +10548,7 @@ export interface IndicesStorage {
1055510548
allow_mmap?: boolean
1055610549
}
1055710550

10558-
export type IndicesStorageType = 'fs' | '' | 'niofs' | 'mmapfs' | 'hybridfs' | string
10551+
export type IndicesStorageType = 'fs' | 'niofs' | 'mmapfs' | 'hybridfs' | string
1055910552

1056010553
export interface IndicesTemplateMapping {
1056110554
aliases: Record<IndexName, IndicesAlias>

src/api/typesWithBodyKey.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9848,12 +9848,6 @@ export type EqlSearchResponse<TEvent = unknown> = EqlEqlSearchResponseBase<TEven
98489848

98499849
export type EqlSearchResultPosition = 'tail' | 'head'
98509850

9851-
export type EsqlBaseServerlessEsqlVersion = '2024.04.01'
9852-
9853-
export type EsqlBaseStatefulEsqlVersion = '2024.04.01'
9854-
9855-
export type EsqlEsqlVersion = '2024.04.01'
9856-
98579851
export interface EsqlQueryRequest extends RequestBase {
98589852
format?: string
98599853
delimiter?: string
@@ -9864,7 +9858,6 @@ export interface EsqlQueryRequest extends RequestBase {
98649858
locale?: string
98659859
params?: ScalarValue[]
98669860
query: string
9867-
version?: EsqlEsqlVersion
98689861
}
98699862
}
98709863

@@ -10729,7 +10722,7 @@ export interface IndicesStorage {
1072910722
allow_mmap?: boolean
1073010723
}
1073110724

10732-
export type IndicesStorageType = 'fs' | '' | 'niofs' | 'mmapfs' | 'hybridfs' | string
10725+
export type IndicesStorageType = 'fs' | 'niofs' | 'mmapfs' | 'hybridfs' | string
1073310726

1073410727
export interface IndicesTemplateMapping {
1073510728
aliases: Record<IndexName, IndicesAlias>

0 commit comments

Comments
 (0)