From 67b2bf4d128685c635af42373813e92eaaf63310 Mon Sep 17 00:00:00 2001 From: Elastic Machine Date: Tue, 19 Mar 2024 17:29:50 +0100 Subject: [PATCH] Auto-generated code for 8.12 (#2157) --- docs/reference.asciidoc | 9 +++++---- src/api/api/ml.ts | 2 +- src/api/types.ts | 9 +++++++++ src/api/typesWithBodyKey.ts | 9 +++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 473aa263f..91fa09692 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -3375,7 +3375,7 @@ client.indices.create({ index }) * *Request (object):* ** *`index` (string)*: Name of the index you wish to create. ** *`aliases` (Optional, Record)*: 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 @@ -4232,7 +4232,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)*: Mapping for a field. For new fields, this mapping can include: +** *`properties` (Optional, Record)*: Mapping for a field. For new fields, this mapping can include: - Field name - Field data type @@ -4307,7 +4307,7 @@ client.indices.putTemplate({ name }) ** *`aliases` (Optional, Record)*: 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. @@ -4434,7 +4434,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)*: Configuration options for the index. Data streams do not support this parameter. @@ -6408,6 +6408,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] diff --git a/src/api/api/ml.ts b/src/api/api/ml.ts index 3adc875ff..c42d27945 100644 --- a/src/api/api/ml.ts +++ b/src/api/api/ml.ts @@ -1821,7 +1821,7 @@ export default class Ml { async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise async putTrainedModel (this: That, params: T.MlPutTrainedModelRequest | TB.MlPutTrainedModelRequest, options?: TransportRequestOptions): Promise { 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 = {} // @ts-expect-error const userBody: any = params?.body diff --git a/src/api/types.ts b/src/api/types.ts index 3613acbe6..ac59a9410 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -5083,6 +5083,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase export interface MappingObjectProperty extends MappingCorePropertyBase { enabled?: boolean + subobjects?: boolean type?: 'object' } @@ -5256,6 +5257,7 @@ export interface MappingTypeMapping { _source?: MappingSourceField runtime?: Record enabled?: boolean + subobjects?: boolean _data_stream_timestamp?: MappingDataStreamTimestamp } @@ -13068,6 +13070,7 @@ export interface MlTrainedModelConfig { metadata?: MlTrainedModelConfigMetadata model_size_bytes?: ByteSize location?: MlTrainedModelLocation + prefix_strings?: MlTrainedModelPrefixStrings } export interface MlTrainedModelConfigInput { @@ -13155,6 +13158,11 @@ export interface MlTrainedModelLocationIndex { name: IndexName } +export interface MlTrainedModelPrefixStrings { + ingest?: string + search?: string +} + export interface MlTrainedModelSizeStats { model_size_bytes: ByteSize required_native_memory_bytes: integer @@ -14089,6 +14097,7 @@ export interface MlPutTrainedModelRequest extends RequestBase { model_size_bytes?: long platform_architecture?: string tags?: string[] + prefix_strings?: MlTrainedModelPrefixStrings } export type MlPutTrainedModelResponse = MlTrainedModelConfig diff --git a/src/api/typesWithBodyKey.ts b/src/api/typesWithBodyKey.ts index f7ec496a6..a617e64e3 100644 --- a/src/api/typesWithBodyKey.ts +++ b/src/api/typesWithBodyKey.ts @@ -5156,6 +5156,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase export interface MappingObjectProperty extends MappingCorePropertyBase { enabled?: boolean + subobjects?: boolean type?: 'object' } @@ -5329,6 +5330,7 @@ export interface MappingTypeMapping { _source?: MappingSourceField runtime?: Record enabled?: boolean + subobjects?: boolean _data_stream_timestamp?: MappingDataStreamTimestamp } @@ -13256,6 +13258,7 @@ export interface MlTrainedModelConfig { metadata?: MlTrainedModelConfigMetadata model_size_bytes?: ByteSize location?: MlTrainedModelLocation + prefix_strings?: MlTrainedModelPrefixStrings } export interface MlTrainedModelConfigInput { @@ -13343,6 +13346,11 @@ export interface MlTrainedModelLocationIndex { name: IndexName } +export interface MlTrainedModelPrefixStrings { + ingest?: string + search?: string +} + export interface MlTrainedModelSizeStats { model_size_bytes: ByteSize required_native_memory_bytes: integer @@ -14352,6 +14360,7 @@ export interface MlPutTrainedModelRequest extends RequestBase { model_size_bytes?: long platform_architecture?: string tags?: string[] + prefix_strings?: MlTrainedModelPrefixStrings } }