Skip to content

Commit

Permalink
Auto-generated API code
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Mar 15, 2024
1 parent fa33037 commit f8def36
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 49 deletions.
9 changes: 5 additions & 4 deletions docs/reference.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3377,7 +3377,7 @@ client.indices.create({ index })
* *Request (object):*
** *`index` (string)*: Name of the index you wish to create.
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
** *`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, _data_stream_timestamp })*: Mapping for fields in the index. If specified, this mapping can include:
** *`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, _data_stream_timestamp })*: Mapping for fields in the index. If specified, this mapping can include:
- Field names
- Field data types
- Mapping parameters
Expand Down Expand Up @@ -4234,7 +4234,7 @@ a new date field is added instead of string.
not used at all by Elasticsearch, but can be used to store
application-specific metadata.
** *`numeric_detection` (Optional, boolean)*: Automatically map strings into numeric data types for all fields.
** *`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, 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, 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, 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 }>)*: Mapping for a field. For new fields, this mapping can include:
** *`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, 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, 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, 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 }>)*: Mapping for a field. For new fields, this mapping can include:

- Field name
- Field data type
Expand Down Expand Up @@ -4309,7 +4309,7 @@ client.indices.putTemplate({ name })
** *`aliases` (Optional, Record<string, { filter, index_routing, is_hidden, is_write_index, routing, search_routing }>)*: Aliases for the index.
** *`index_patterns` (Optional, string | string[])*: Array of wildcard expressions used to match the names
of indices during creation.
** *`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, _data_stream_timestamp })*: Mapping for fields in the index.
** *`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, _data_stream_timestamp })*: Mapping for fields in the index.
** *`order` (Optional, number)*: Order in which Elasticsearch applies this template if index
matches multiple templates.

Expand Down Expand Up @@ -4462,7 +4462,7 @@ If specified, Elasticsearch only performs the rollover if the current index sati
If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
If conditions are specified, at least one of them must be a `max_*` condition.
The index will rollover if any `max_*` condition is satisfied and all `min_*` conditions are satisfied.
** *`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, _data_stream_timestamp })*: Mapping for fields in the index.
** *`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, _data_stream_timestamp })*: Mapping for fields in the index.
If specified, this mapping can include field names, field data types, and mapping paramaters.
** *`settings` (Optional, Record<string, User-defined value>)*: Configuration options for the index.
Data streams do not support this parameter.
Expand Down Expand Up @@ -6436,6 +6436,7 @@ so one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,
or `windows-x86_64`. For portable models (those that work independent of processor
architecture or OS features), leave this field unset.
** *`tags` (Optional, string[])*: An array of tags to organize the model.
** *`prefix_strings` (Optional, { ingest, search })*: Optional prefix strings applied at inference
** *`defer_definition_decompression` (Optional, boolean)*: If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations.

[discrete]
Expand Down
2 changes: 1 addition & 1 deletion src/api/api/ml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ export default class Ml {
async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise<T.MlPutTrainedModelResponse>
async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['model_id']
const acceptedBody: string[] = ['compressed_definition', 'definition', 'description', 'inference_config', 'input', 'metadata', 'model_type', 'model_size_bytes', 'platform_architecture', 'tags']
const acceptedBody: string[] = ['compressed_definition', 'definition', 'description', 'inference_config', 'input', 'metadata', 'model_type', 'model_size_bytes', 'platform_architecture', 'tags', 'prefix_strings']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body
Expand Down
44 changes: 22 additions & 22 deletions src/api/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5095,6 +5095,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase

export interface MappingObjectProperty extends MappingCorePropertyBase {
enabled?: boolean
subobjects?: boolean
type?: 'object'
}

Expand Down Expand Up @@ -5269,6 +5270,7 @@ export interface MappingTypeMapping {
_source?: MappingSourceField
runtime?: Record<string, MappingRuntimeField>
enabled?: boolean
subobjects?: boolean
_data_stream_timestamp?: MappingDataStreamTimestamp
}

Expand Down Expand Up @@ -9747,7 +9749,7 @@ export interface IndicesIndexSettingsKeys {
settings?: IndicesIndexSettings
time_series?: IndicesIndexSettingsTimeSeries
queries?: IndicesQueries
similarity?: IndicesSettingsSimilarity
similarity?: Record<string, IndicesSettingsSimilarity>
mapping?: IndicesMappingLimitSettings
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
indexing_pressure?: IndicesIndexingPressure
Expand Down Expand Up @@ -9925,55 +9927,52 @@ export interface IndicesSettingsSearch {
slowlog?: IndicesSlowlogSettings
}

export interface IndicesSettingsSimilarity {
bm25?: IndicesSettingsSimilarityBm25
dfi?: IndicesSettingsSimilarityDfi
dfr?: IndicesSettingsSimilarityDfr
ib?: IndicesSettingsSimilarityIb
lmd?: IndicesSettingsSimilarityLmd
lmj?: IndicesSettingsSimilarityLmj
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
}
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted

export interface IndicesSettingsSimilarityBm25 {
b: double
discount_overlaps: boolean
k1: double
type: 'BM25'
b?: double
discount_overlaps?: boolean
k1?: double
}

export interface IndicesSettingsSimilarityBoolean {
type: 'boolean'
}

export interface IndicesSettingsSimilarityDfi {
independence_measure: DFIIndependenceMeasure
type: 'DFI'
independence_measure: DFIIndependenceMeasure
}

export interface IndicesSettingsSimilarityDfr {
type: 'DFR'
after_effect: DFRAfterEffect
basic_model: DFRBasicModel
normalization: Normalization
type: 'DFR'
}

export interface IndicesSettingsSimilarityIb {
type: 'IB'
distribution: IBDistribution
lambda: IBLambda
normalization: Normalization
type: 'IB'
}

export interface IndicesSettingsSimilarityLmd {
mu: integer
type: 'LMDirichlet'
mu?: double
}

export interface IndicesSettingsSimilarityLmj {
lambda: double
type: 'LMJelinekMercer'
lambda?: double
}

export interface IndicesSettingsSimilarityScriptedTfidf {
script: Script
export interface IndicesSettingsSimilarityScripted {
type: 'scripted'
script: Script
weight_script?: Script
}

export interface IndicesSlowlogSettings {
Expand Down Expand Up @@ -13216,8 +13215,8 @@ export interface MlTrainedModelLocationIndex {
}

export interface MlTrainedModelPrefixStrings {
ingest: string
search: string
ingest?: string
search?: string
}

export interface MlTrainedModelSizeStats {
Expand Down Expand Up @@ -14154,6 +14153,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
model_size_bytes?: long
platform_architecture?: string
tags?: string[]
prefix_strings?: MlTrainedModelPrefixStrings
}

export type MlPutTrainedModelResponse = MlTrainedModelConfig
Expand Down
44 changes: 22 additions & 22 deletions src/api/typesWithBodyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5168,6 +5168,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase

export interface MappingObjectProperty extends MappingCorePropertyBase {
enabled?: boolean
subobjects?: boolean
type?: 'object'
}

Expand Down Expand Up @@ -5342,6 +5343,7 @@ export interface MappingTypeMapping {
_source?: MappingSourceField
runtime?: Record<string, MappingRuntimeField>
enabled?: boolean
subobjects?: boolean
_data_stream_timestamp?: MappingDataStreamTimestamp
}

Expand Down Expand Up @@ -9873,7 +9875,7 @@ export interface IndicesIndexSettingsKeys {
settings?: IndicesIndexSettings
time_series?: IndicesIndexSettingsTimeSeries
queries?: IndicesQueries
similarity?: IndicesSettingsSimilarity
similarity?: Record<string, IndicesSettingsSimilarity>
mapping?: IndicesMappingLimitSettings
'indexing.slowlog'?: IndicesIndexingSlowlogSettings
indexing_pressure?: IndicesIndexingPressure
Expand Down Expand Up @@ -10051,55 +10053,52 @@ export interface IndicesSettingsSearch {
slowlog?: IndicesSlowlogSettings
}

export interface IndicesSettingsSimilarity {
bm25?: IndicesSettingsSimilarityBm25
dfi?: IndicesSettingsSimilarityDfi
dfr?: IndicesSettingsSimilarityDfr
ib?: IndicesSettingsSimilarityIb
lmd?: IndicesSettingsSimilarityLmd
lmj?: IndicesSettingsSimilarityLmj
scripted_tfidf?: IndicesSettingsSimilarityScriptedTfidf
}
export type IndicesSettingsSimilarity = IndicesSettingsSimilarityBm25 | IndicesSettingsSimilarityBoolean | IndicesSettingsSimilarityDfi | IndicesSettingsSimilarityDfr | IndicesSettingsSimilarityIb | IndicesSettingsSimilarityLmd | IndicesSettingsSimilarityLmj | IndicesSettingsSimilarityScripted

export interface IndicesSettingsSimilarityBm25 {
b: double
discount_overlaps: boolean
k1: double
type: 'BM25'
b?: double
discount_overlaps?: boolean
k1?: double
}

export interface IndicesSettingsSimilarityBoolean {
type: 'boolean'
}

export interface IndicesSettingsSimilarityDfi {
independence_measure: DFIIndependenceMeasure
type: 'DFI'
independence_measure: DFIIndependenceMeasure
}

export interface IndicesSettingsSimilarityDfr {
type: 'DFR'
after_effect: DFRAfterEffect
basic_model: DFRBasicModel
normalization: Normalization
type: 'DFR'
}

export interface IndicesSettingsSimilarityIb {
type: 'IB'
distribution: IBDistribution
lambda: IBLambda
normalization: Normalization
type: 'IB'
}

export interface IndicesSettingsSimilarityLmd {
mu: integer
type: 'LMDirichlet'
mu?: double
}

export interface IndicesSettingsSimilarityLmj {
lambda: double
type: 'LMJelinekMercer'
lambda?: double
}

export interface IndicesSettingsSimilarityScriptedTfidf {
script: Script
export interface IndicesSettingsSimilarityScripted {
type: 'scripted'
script: Script
weight_script?: Script
}

export interface IndicesSlowlogSettings {
Expand Down Expand Up @@ -13404,8 +13403,8 @@ export interface MlTrainedModelLocationIndex {
}

export interface MlTrainedModelPrefixStrings {
ingest: string
search: string
ingest?: string
search?: string
}

export interface MlTrainedModelSizeStats {
Expand Down Expand Up @@ -14417,6 +14416,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
model_size_bytes?: long
platform_architecture?: string
tags?: string[]
prefix_strings?: MlTrainedModelPrefixStrings
}
}

Expand Down

0 comments on commit f8def36

Please sign in to comment.