Skip to content

Commit 27a8ad5

Browse files
Auto-generated API code
1 parent a1b3412 commit 27a8ad5

File tree

4 files changed

+144
-54
lines changed

4 files changed

+144
-54
lines changed

docs/reference.asciidoc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ client.indices.create({ index })
19521952
* *Request (object):*
19531953
** *`index` (string)*: Name of the index you wish to create.
19541954
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
1955-
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled })*: Mapping for fields in the index. If specified, this mapping can include:
1955+
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects })*: Mapping for fields in the index. If specified, this mapping can include:
19561956
- Field names
19571957
- Field data types
19581958
- Mapping parameters
@@ -2540,7 +2540,7 @@ a new date field is added instead of string.
25402540
not used at all by Elasticsearch, but can be used to store
25412541
application-specific metadata.
25422542
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
2543-
** *`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, normalizer, norms, null_value, split_queries_on_whitespace, 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 } | { 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, dims, similarity, index, index_options } | { type } | { 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, 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, 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 }>)*: Mapping for a field. For new fields, this mapping can include:
2543+
** *`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, normalizer, norms, null_value, split_queries_on_whitespace, 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 } | { 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, dims, similarity, index, index_options } | { type } | { 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 } | { 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, 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 }>)*: Mapping for a field. For new fields, this mapping can include:
25442544

25452545
- Field name
25462546
- Field data type
@@ -2615,7 +2615,7 @@ client.indices.putTemplate({ name })
26152615
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
26162616
** *`index_patterns` (Optional, string | string[])*: Array of wildcard expressions used to match the names
26172617
of indices during creation.
2618-
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled })*: Mapping for fields in the index.
2618+
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects })*: Mapping for fields in the index.
26192619
** *`order` (Optional, number)*: Order in which Elasticsearch applies this template if index
26202620
matches multiple templates.
26212621

@@ -2703,7 +2703,7 @@ If specified, Elasticsearch only performs the rollover if the current index sati
27032703
If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
27042704
If conditions are specified, at least one of them must be a `max_*` condition.
27052705
The index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.
2706-
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled })*: Mapping for fields in the index.
2706+
** *`mappings` (Optional, { all_field, date_detection, dynamic, dynamic_date_formats, dynamic_templates, _field_names, index_field, _meta, numeric_detection, properties, _routing, _size, _source, runtime, enabled, subobjects })*: Mapping for fields in the index.
27072707
If specified, this mapping can include field names, field data types, and mapping paramaters.
27082708
** *`settings` (Optional, Record<string, User-defined value>)*: Configuration options for the index.
27092709
Data streams do not support this parameter.
@@ -4755,9 +4755,17 @@ client.security.queryApiKeys({ ... })
47554755
==== Arguments
47564756

47574757
* *Request (object):*
4758-
** *`query` (Optional, { bool, boosting, common, 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, wildcard, wrapper, type })*: A query to filter which API keys to return.
4759-
The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `ids`, `prefix`, `wildcard`, and `range`.
4760-
You can query all public information associated with an API key.
4758+
** *`aggregations` (Optional, Record<string, { aggregations, meta, cardinality, composite, date_range, filter, filters, missing, range, terms, value_count }>)*: Any aggregations to run over the corpus of returned API keys.
4759+
Aggregations and queries work together. Aggregations are computed only on the API keys that match the query.
4760+
This supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,
4761+
`cardinality`, `value_count`, `composite`, `filter`, and `filters`.
4762+
Additionally, aggregations only run over the same subset of fields that query works with.
4763+
** *`query` (Optional, { bool, exists, ids, match, match_all, prefix, range, simple_query_string, term, terms, wildcard })*: A query to filter which API keys to return.
4764+
If the query parameter is missing, it is equivalent to a `match_all` query.
4765+
The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
4766+
`ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
4767+
You can query the following public information associated with an API key: `id`, `type`, `name`,
4768+
`creation`, `expiration`, `invalidated`, `invalidation`, `username`, `realm`, and `metadata`.
47614769
** *`from` (Optional, number)*: Starting document offset.
47624770
By default, you cannot page through more than 10,000 hits using the from and size parameters.
47634771
To page through more hits, use the `search_after` parameter.

src/api/api/security.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default class Security {
230230
async queryApiKeys (this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptions): Promise<T.SecurityQueryApiKeysResponse>
231231
async queryApiKeys (this: That, params?: T.SecurityQueryApiKeysRequest | TB.SecurityQueryApiKeysRequest, options?: TransportRequestOptions): Promise<any> {
232232
const acceptedPath: string[] = []
233-
const acceptedBody: string[] = ['query', 'from', 'sort', 'size', 'search_after']
233+
const acceptedBody: string[] = ['aggregations', 'aggs', 'query', 'from', 'sort', 'size', 'search_after']
234234
const querystring: Record<string, any> = {}
235235
// @ts-expect-error
236236
const userBody: any = params?.body

src/api/types.ts

Lines changed: 64 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5074,6 +5074,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase
50745074

50755075
export interface MappingObjectProperty extends MappingCorePropertyBase {
50765076
enabled?: boolean
5077+
subobjects?: boolean
50775078
type?: 'object'
50785079
}
50795080

@@ -5248,6 +5249,7 @@ export interface MappingTypeMapping {
52485249
_source?: MappingSourceField
52495250
runtime?: Record<string, MappingRuntimeField>
52505251
enabled?: boolean
5252+
subobjects?: boolean
52515253
}
52525254

52535255
export interface MappingUnsignedLongNumberProperty extends MappingNumberPropertyBase {
@@ -9700,7 +9702,7 @@ export interface IndicesIndexSettingsKeys {
97009702
settings?: IndicesIndexSettings
97019703
time_series?: IndicesIndexSettingsTimeSeries
97029704
queries?: IndicesQueries
9703-
similarity?: IndicesSettingsSimilarity
9705+
similarity?: Record<string, IndicesSettingsSimilarity>
97049706
mapping?: IndicesMappingLimitSettings
97059707
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
97069708
indexing_pressure?: IndicesIndexingPressure
@@ -9876,55 +9878,52 @@ export interface IndicesSettingsSearch {
98769878
slowlog?: IndicesSlowlogSettings
98779879
}
98789880

9879-
export interface IndicesSettingsSimilarity {
9880-
bm25?: IndicesSettingsSimilarityBm25
9881-
dfi?: IndicesSettingsSimilarityDfi
9882-
dfr?: IndicesSettingsSimilarityDfr
9883-
ib?: IndicesSettingsSimilarityIb
9884-
lmd?: IndicesSettingsSimilarityLmd
9885-
lmj?: IndicesSettingsSimilarityLmj
9886-
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
9887-
}
9881+
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted
98889882

98899883
export interface IndicesSettingsSimilarityBm25 {
9890-
b: double
9891-
discount_overlaps: boolean
9892-
k1: double
98939884
type: 'BM25'
9885+
b?: double
9886+
discount_overlaps?: boolean
9887+
k1?: double
9888+
}
9889+
9890+
export interface IndicesSettingsSimilarityBoolean {
9891+
type: 'boolean'
98949892
}
98959893

98969894
export interface IndicesSettingsSimilarityDfi {
9897-
independence_measure: DFIIndependenceMeasure
98989895
type: 'DFI'
9896+
independence_measure: DFIIndependenceMeasure
98999897
}
99009898

99019899
export interface IndicesSettingsSimilarityDfr {
9900+
type: 'DFR'
99029901
after_effect: DFRAfterEffect
99039902
basic_model: DFRBasicModel
99049903
normalization: Normalization
9905-
type: 'DFR'
99069904
}
99079905

99089906
export interface IndicesSettingsSimilarityIb {
9907+
type: 'IB'
99099908
distribution: IBDistribution
99109909
lambda: IBLambda
99119910
normalization: Normalization
9912-
type: 'IB'
99139911
}
99149912

99159913
export interface IndicesSettingsSimilarityLmd {
9916-
mu: integer
99179914
type: 'LMDirichlet'
9915+
mu?: double
99189916
}
99199917

99209918
export interface IndicesSettingsSimilarityLmj {
9921-
lambda: double
99229919
type: 'LMJelinekMercer'
9920+
lambda?: double
99239921
}
99249922

9925-
export interface IndicesSettingsSimilarityScriptedTfidf {
9926-
script: Script
9923+
export interface IndicesSettingsSimilarityScripted {
99279924
type: 'scripted'
9925+
script: Script
9926+
weight_script?: Script
99289927
}
99299928

99309929
export interface IndicesSlowlogSettings {
@@ -13139,8 +13138,8 @@ export interface MlTrainedModelLocationIndex {
1313913138
}
1314013139

1314113140
export interface MlTrainedModelPrefixStrings {
13142-
ingest: string
13143-
search: string
13141+
ingest?: string
13142+
search?: string
1314413143
}
1314513144

1314613145
export interface MlTrainedModelSizeStats {
@@ -16459,8 +16458,49 @@ export interface SecurityPutUserResponse {
1645916458
created: boolean
1646016459
}
1646116460

16461+
export type SecurityQueryApiKeysAPIKeyAggregate = AggregationsCardinalityAggregate | AggregationsValueCountAggregate | AggregationsStringTermsAggregate | AggregationsLongTermsAggregate | AggregationsDoubleTermsAggregate | AggregationsUnmappedTermsAggregate | AggregationsMultiTermsAggregate | AggregationsMissingAggregate | AggregationsFilterAggregate | AggregationsFiltersAggregate | AggregationsRangeAggregate | AggregationsDateRangeAggregate | AggregationsCompositeAggregate
16462+
16463+
export interface SecurityQueryApiKeysAPIKeyAggregationContainer {
16464+
aggregations?: Record<string, SecurityQueryApiKeysAPIKeyAggregationContainer>
16465+
aggs?: Record<string, SecurityQueryApiKeysAPIKeyAggregationContainer>
16466+
meta?: Metadata
16467+
cardinality?: AggregationsCardinalityAggregation
16468+
composite?: AggregationsCompositeAggregation
16469+
date_range?: AggregationsDateRangeAggregation
16470+
filter?: SecurityQueryApiKeysAPIKeyQueryContainer
16471+
filters?: SecurityQueryApiKeysAPIKeyFiltersAggregation
16472+
missing?: AggregationsMissingAggregation
16473+
range?: AggregationsRangeAggregation
16474+
terms?: AggregationsTermsAggregation
16475+
value_count?: AggregationsValueCountAggregation
16476+
}
16477+
16478+
export interface SecurityQueryApiKeysAPIKeyFiltersAggregation extends AggregationsBucketAggregationBase {
16479+
filters?: AggregationsBuckets<SecurityQueryApiKeysAPIKeyQueryContainer>
16480+
other_bucket?: boolean
16481+
other_bucket_key?: string
16482+
keyed?: boolean
16483+
}
16484+
16485+
export interface SecurityQueryApiKeysAPIKeyQueryContainer {
16486+
bool?: QueryDslBoolQuery
16487+
exists?: QueryDslExistsQuery
16488+
ids?: QueryDslIdsQuery
16489+
match?: Partial<Record<Field, QueryDslMatchQuery | string | float | boolean>>
16490+
match_all?: QueryDslMatchAllQuery
16491+
prefix?: Partial<Record<Field, QueryDslPrefixQuery | string>>
16492+
range?: Partial<Record<Field, QueryDslRangeQuery>>
16493+
simple_query_string?: QueryDslSimpleQueryStringQuery
16494+
term?: Partial<Record<Field, QueryDslTermQuery | FieldValue>>
16495+
terms?: QueryDslTermsQuery
16496+
wildcard?: Partial<Record<Field, QueryDslWildcardQuery | string>>
16497+
}
16498+
1646216499
export interface SecurityQueryApiKeysRequest extends RequestBase {
16463-
query?: QueryDslQueryContainer
16500+
aggregations?: Record<string, SecurityQueryApiKeysAPIKeyAggregationContainer>
16501+
/** @alias aggregations */
16502+
aggs?: Record<string, SecurityQueryApiKeysAPIKeyAggregationContainer>
16503+
query?: SecurityQueryApiKeysAPIKeyQueryContainer
1646416504
from?: integer
1646516505
sort?: Sort
1646616506
size?: integer
@@ -16471,6 +16511,7 @@ export interface SecurityQueryApiKeysResponse {
1647116511
total: integer
1647216512
count: integer
1647316513
api_keys: SecurityApiKey[]
16514+
aggregations?: Record<AggregateName, SecurityQueryApiKeysAPIKeyAggregate>
1647416515
}
1647516516

1647616517
export interface SecuritySamlAuthenticateRequest extends RequestBase {

0 commit comments

Comments
 (0)