From 95c66a9a5af4ddc4690df2b84c1fe0799f81a8e9 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Thu, 5 Sep 2024 12:05:26 +0400 Subject: [PATCH] Fix most pipeline API errors (#2854) * Fix most pipeline API errors * Remove options, add properties --- output/openapi/elasticsearch-openapi.json | 65 +++-- .../elasticsearch-serverless-openapi.json | 65 +++-- output/schema/schema-serverless.json | 251 +++++++++++------ output/schema/schema.json | 253 ++++++++++++------ output/typescript/types.ts | 11 +- specification/ingest/_types/Pipeline.ts | 6 + specification/ingest/_types/Processors.ts | 48 ++-- .../ingest/put_pipeline/PutPipelineRequest.ts | 6 + 8 files changed, 472 insertions(+), 233 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index ea702e6e12..5af347d193 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -16122,6 +16122,10 @@ }, "version": { "$ref": "#/components/schemas/_types:VersionNumber" + }, + "deprecated": { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } } } @@ -86369,6 +86373,10 @@ "version": { "$ref": "#/components/schemas/_types:VersionNumber" }, + "deprecated": { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "type": "boolean" + }, "_meta": { "$ref": "#/components/schemas/_types:Metadata" } @@ -86508,10 +86516,17 @@ }, "value": { "description": "The value to be appended. Supports template snippets.", - "type": "array", - "items": { - "type": "object" - } + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] }, "allow_duplicates": { "description": "If `false`, the processor does not append values already present in the field.", @@ -86875,6 +86890,10 @@ "field": { "$ref": "#/components/schemas/_types:Field" }, + "override": { + "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "type": "boolean" + }, "path": { "description": "The field that contains the field to expand.\nOnly required if the field to expand is part another object field, because the `field` option can only understand leaf fields.", "type": "string" @@ -87084,6 +87103,10 @@ }, "target_field": { "$ref": "#/components/schemas/_types:Field" + }, + "download_database_on_pipeline_creation": { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "type": "boolean" } }, "required": [ @@ -87817,18 +87840,25 @@ "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", "type": "boolean" }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types:UserAgentProperty" - } - }, "regex_file": { "description": "The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with.", "type": "string" }, "target_field": { "$ref": "#/components/schemas/_types:Field" + }, + "properties": { + "description": "Controls what properties are added to `target_field`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types:UserAgentProperty" + } + }, + "extract_device_type": { + "description": "Extracts device type from the user agent string on a best-effort basis.", + "x-available-since": "8.9.0", + "x-beta": true, + "type": "boolean" } }, "required": [ @@ -87840,16 +87870,11 @@ "ingest._types:UserAgentProperty": { "type": "string", "enum": [ - "NAME", - "MAJOR", - "MINOR", - "PATCH", - "OS", - "OS_NAME", - "OS_MAJOR", - "OS_MINOR", - "DEVICE", - "BUILD" + "name", + "os", + "device", + "original", + "version" ] }, "ingest.simulate:Document": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 682a5d3080..4477d71174 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9669,6 +9669,10 @@ }, "version": { "$ref": "#/components/schemas/_types:VersionNumber" + }, + "deprecated": { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } } } @@ -55152,6 +55156,10 @@ "version": { "$ref": "#/components/schemas/_types:VersionNumber" }, + "deprecated": { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "type": "boolean" + }, "_meta": { "$ref": "#/components/schemas/_types:Metadata" } @@ -55291,10 +55299,17 @@ }, "value": { "description": "The value to be appended. Supports template snippets.", - "type": "array", - "items": { - "type": "object" - } + "oneOf": [ + { + "type": "object" + }, + { + "type": "array", + "items": { + "type": "object" + } + } + ] }, "allow_duplicates": { "description": "If `false`, the processor does not append values already present in the field.", @@ -55658,6 +55673,10 @@ "field": { "$ref": "#/components/schemas/_types:Field" }, + "override": { + "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "type": "boolean" + }, "path": { "description": "The field that contains the field to expand.\nOnly required if the field to expand is part another object field, because the `field` option can only understand leaf fields.", "type": "string" @@ -55867,6 +55886,10 @@ }, "target_field": { "$ref": "#/components/schemas/_types:Field" + }, + "download_database_on_pipeline_creation": { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "type": "boolean" } }, "required": [ @@ -56600,18 +56623,25 @@ "description": "If `true` and `field` does not exist, the processor quietly exits without modifying the document.", "type": "boolean" }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ingest._types:UserAgentProperty" - } - }, "regex_file": { "description": "The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with.", "type": "string" }, "target_field": { "$ref": "#/components/schemas/_types:Field" + }, + "properties": { + "description": "Controls what properties are added to `target_field`.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ingest._types:UserAgentProperty" + } + }, + "extract_device_type": { + "description": "Extracts device type from the user agent string on a best-effort basis.", + "x-available-since": "8.9.0", + "x-beta": true, + "type": "boolean" } }, "required": [ @@ -56623,16 +56653,11 @@ "ingest._types:UserAgentProperty": { "type": "string", "enum": [ - "NAME", - "MAJOR", - "MINOR", - "PATCH", - "OS", - "OS_NAME", - "OS_MAJOR", - "OS_MINOR", - "DEVICE", - "BUILD" + "name", + "os", + "device", + "original", + "version" ] }, "ingest.simulate:Document": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index e1bb4d9c6f..6539ddb40c 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -25448,6 +25448,19 @@ "namespace": "_types" } } + }, + { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -25517,7 +25530,7 @@ } } ], - "specLocation": "ingest/put_pipeline/PutPipelineRequest.ts#L25-L77" + "specLocation": "ingest/put_pipeline/PutPipelineRequest.ts#L25-L83" }, { "body": { @@ -92728,7 +92741,7 @@ "name": "ConvertType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L507-L515" + "specLocation": "ingest/_types/Processors.ts#L518-L526" }, { "kind": "enum", @@ -92744,7 +92757,7 @@ "name": "GeoGridTargetFormat", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L406-L409" + "specLocation": "ingest/_types/Processors.ts#L393-L396" }, { "kind": "enum", @@ -92763,7 +92776,7 @@ "name": "GeoGridTileType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L400-L404" + "specLocation": "ingest/_types/Processors.ts#L387-L391" }, { "kind": "enum", @@ -92781,7 +92794,7 @@ "name": "JsonProcessorConflictStrategy", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L939-L944" + "specLocation": "ingest/_types/Processors.ts#L957-L962" }, { "kind": "enum", @@ -92797,47 +92810,32 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1164-L1167" + "specLocation": "ingest/_types/Processors.ts#L1182-L1185" }, { "kind": "enum", "members": [ { - "name": "NAME" - }, - { - "name": "MAJOR" - }, - { - "name": "MINOR" - }, - { - "name": "PATCH" - }, - { - "name": "OS" - }, - { - "name": "OS_NAME" + "name": "name" }, { - "name": "OS_MAJOR" + "name": "os" }, { - "name": "OS_MINOR" + "name": "device" }, { - "name": "DEVICE" + "name": "original" }, { - "name": "BUILD" + "name": "version" } ], "name": { "name": "UserAgentProperty", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L284-L295" + "specLocation": "ingest/_types/Processors.ts#L467-L473" }, { "kind": "enum", @@ -119193,6 +119191,19 @@ } } }, + { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch.", "name": "_meta", @@ -119206,7 +119217,7 @@ } } ], - "specLocation": "ingest/_types/Pipeline.ts#L23-L45" + "specLocation": "ingest/_types/Pipeline.ts#L23-L51" }, { "kind": "interface", @@ -119782,10 +119793,18 @@ "name": "value", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "user_defined_value" - } + "items": [ + { + "kind": "user_defined_value" + }, + { + "kind": "array_of", + "value": { + "kind": "user_defined_value" + } + } + ], + "kind": "union_of" } }, { @@ -119802,7 +119821,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L297-L312" + "specLocation": "ingest/_types/Processors.ts#L284-L299" }, { "kind": "interface", @@ -119995,7 +120014,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L314-L355" + "specLocation": "ingest/_types/Processors.ts#L301-L342" }, { "inherits": { @@ -120049,7 +120068,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L464-L480" + "specLocation": "ingest/_types/Processors.ts#L475-L491" }, { "inherits": { @@ -120126,7 +120145,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L482-L505" + "specLocation": "ingest/_types/Processors.ts#L493-L516" }, { "inherits": { @@ -120192,7 +120211,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L517-L537" + "specLocation": "ingest/_types/Processors.ts#L528-L548" }, { "inherits": { @@ -120290,7 +120309,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L539-L572" + "specLocation": "ingest/_types/Processors.ts#L550-L583" }, { "inherits": { @@ -120372,7 +120391,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L614-L641" + "specLocation": "ingest/_types/Processors.ts#L625-L652" }, { "inherits": { @@ -120478,7 +120497,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L574-L612" + "specLocation": "ingest/_types/Processors.ts#L585-L623" }, { "inherits": { @@ -120544,7 +120563,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L643-L662" + "specLocation": "ingest/_types/Processors.ts#L654-L673" }, { "inherits": { @@ -120571,6 +120590,19 @@ } } }, + { + "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "name": "override", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "The field that contains the field to expand.\nOnly required if the field to expand is part another object field, because the `field` option can only understand leaf fields.", "name": "path", @@ -120584,7 +120616,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L664-L675" + "specLocation": "ingest/_types/Processors.ts#L675-L693" }, { "inherits": { @@ -120599,7 +120631,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L677-L677" + "specLocation": "ingest/_types/Processors.ts#L695-L695" }, { "inherits": { @@ -120703,7 +120735,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L679-L718" + "specLocation": "ingest/_types/Processors.ts#L697-L736" }, { "inherits": { @@ -120731,7 +120763,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L720-L726" + "specLocation": "ingest/_types/Processors.ts#L738-L744" }, { "inherits": { @@ -120784,7 +120816,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L728-L742" + "specLocation": "ingest/_types/Processors.ts#L746-L760" }, { "inherits": { @@ -120911,7 +120943,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L357-L398" + "specLocation": "ingest/_types/Processors.ts#L344-L385" }, { "inherits": { @@ -121004,9 +121036,21 @@ "namespace": "_types" } } + }, + { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "name": "download_database_on_pipeline_creation", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "ingest/_types/Processors.ts#L411-L440" + "specLocation": "ingest/_types/Processors.ts#L398-L432" }, { "inherits": { @@ -121098,7 +121142,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L744-L769" + "specLocation": "ingest/_types/Processors.ts#L762-L787" }, { "inherits": { @@ -121176,7 +121220,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L771-L795" + "specLocation": "ingest/_types/Processors.ts#L789-L813" }, { "inherits": { @@ -121230,7 +121274,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L797-L813" + "specLocation": "ingest/_types/Processors.ts#L815-L831" }, { "inherits": { @@ -121302,7 +121346,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L815-L834" + "specLocation": "ingest/_types/Processors.ts#L833-L852" }, { "kind": "interface", @@ -121336,7 +121380,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L836-L848", + "specLocation": "ingest/_types/Processors.ts#L854-L866", "variants": { "kind": "container" } @@ -121375,7 +121419,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L850-L861" + "specLocation": "ingest/_types/Processors.ts#L868-L879" }, { "kind": "interface", @@ -121449,7 +121493,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L863-L889" + "specLocation": "ingest/_types/Processors.ts#L881-L907" }, { "inherits": { @@ -121502,7 +121546,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L891-L906" + "specLocation": "ingest/_types/Processors.ts#L909-L924" }, { "inherits": { @@ -121581,7 +121625,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L908-L937" + "specLocation": "ingest/_types/Processors.ts#L926-L955" }, { "inherits": { @@ -121738,7 +121782,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L946-L998" + "specLocation": "ingest/_types/Processors.ts#L964-L1016" }, { "inherits": { @@ -121792,7 +121836,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1000-L1016" + "specLocation": "ingest/_types/Processors.ts#L1018-L1034" }, { "inherits": { @@ -121833,7 +121877,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1018-L1029" + "specLocation": "ingest/_types/Processors.ts#L1036-L1047" }, { "inherits": { @@ -121886,7 +121930,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1031-L1045" + "specLocation": "ingest/_types/Processors.ts#L1049-L1063" }, { "inherits": { @@ -121939,7 +121983,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1047-L1063" + "specLocation": "ingest/_types/Processors.ts#L1065-L1081" }, { "inherits": { @@ -122021,7 +122065,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1065-L1093" + "specLocation": "ingest/_types/Processors.ts#L1083-L1111" }, { "inherits": { @@ -122093,7 +122137,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1095-L1115" + "specLocation": "ingest/_types/Processors.ts#L1113-L1133" }, { "inherits": { @@ -122179,7 +122223,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1117-L1151" + "specLocation": "ingest/_types/Processors.ts#L1135-L1169" }, { "inherits": { @@ -122222,7 +122266,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1153-L1162" + "specLocation": "ingest/_types/Processors.ts#L1171-L1180" }, { "inherits": { @@ -122275,7 +122319,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1169-L1185" + "specLocation": "ingest/_types/Processors.ts#L1187-L1203" }, { "inherits": { @@ -122354,7 +122398,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1187-L1212" + "specLocation": "ingest/_types/Processors.ts#L1205-L1230" }, { "inherits": { @@ -122408,7 +122452,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1214-L1230" + "specLocation": "ingest/_types/Processors.ts#L1232-L1248" }, { "inherits": { @@ -122462,7 +122506,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1232-L1248" + "specLocation": "ingest/_types/Processors.ts#L1250-L1266" }, { "inherits": { @@ -122516,7 +122560,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1250-L1266" + "specLocation": "ingest/_types/Processors.ts#L1268-L1284" }, { "inherits": { @@ -122596,7 +122640,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1268-L1294" + "specLocation": "ingest/_types/Processors.ts#L1286-L1312" }, { "inherits": { @@ -122636,20 +122680,6 @@ } } }, - { - "name": "options", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "UserAgentProperty", - "namespace": "ingest._types" - } - } - } - }, { "description": "The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with.", "name": "regex_file", @@ -122674,9 +122704,56 @@ "namespace": "_types" } } + }, + { + "description": "Controls what properties are added to `target_field`.", + "name": "properties", + "required": false, + "serverDefault": [ + "name", + "major", + "minor", + "patch", + "build", + "os", + "os_name", + "os_major", + "os_minor", + "device" + ], + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "UserAgentProperty", + "namespace": "ingest._types" + } + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.9.0", + "stability": "beta" + } + }, + "description": "Extracts device type from the user agent string on a best-effort basis.", + "name": "extract_device_type", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "ingest/_types/Processors.ts#L442-L462" + "specLocation": "ingest/_types/Processors.ts#L434-L465" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index c162abe023..ac3eafe6f0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -138962,10 +138962,18 @@ "name": "value", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "user_defined_value" - } + "kind": "union_of", + "items": [ + { + "kind": "user_defined_value" + }, + { + "kind": "array_of", + "value": { + "kind": "user_defined_value" + } + } + ] } }, { @@ -138982,7 +138990,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L297-L312" + "specLocation": "ingest/_types/Processors.ts#L284-L299" }, { "kind": "interface", @@ -139102,7 +139110,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L314-L355" + "specLocation": "ingest/_types/Processors.ts#L301-L342" }, { "kind": "interface", @@ -139156,7 +139164,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L464-L480" + "specLocation": "ingest/_types/Processors.ts#L475-L491" }, { "kind": "interface", @@ -139233,7 +139241,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L482-L505" + "specLocation": "ingest/_types/Processors.ts#L493-L516" }, { "kind": "interface", @@ -139299,7 +139307,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L517-L537" + "specLocation": "ingest/_types/Processors.ts#L528-L548" }, { "kind": "enum", @@ -139330,7 +139338,7 @@ "name": "ConvertType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L507-L515" + "specLocation": "ingest/_types/Processors.ts#L518-L526" }, { "kind": "interface", @@ -139428,7 +139436,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L539-L572" + "specLocation": "ingest/_types/Processors.ts#L550-L583" }, { "kind": "interface", @@ -139568,7 +139576,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L574-L612" + "specLocation": "ingest/_types/Processors.ts#L585-L623" }, { "kind": "interface", @@ -139650,7 +139658,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L614-L641" + "specLocation": "ingest/_types/Processors.ts#L625-L652" }, { "kind": "interface", @@ -139716,7 +139724,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L643-L662" + "specLocation": "ingest/_types/Processors.ts#L654-L673" }, { "kind": "interface", @@ -139743,6 +139751,19 @@ } } }, + { + "description": "Controls the behavior when there is already an existing nested object that conflicts with the expanded field.\nWhen `false`, the processor will merge conflicts by combining the old and the new values into an array.\nWhen `true`, the value from the expanded field will overwrite the existing value.", + "name": "override", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "The field that contains the field to expand.\nOnly required if the field to expand is part another object field, because the `field` option can only understand leaf fields.", "name": "path", @@ -139756,7 +139777,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L664-L675" + "specLocation": "ingest/_types/Processors.ts#L675-L693" }, { "kind": "interface", @@ -139771,7 +139792,7 @@ "namespace": "ingest._types" }, "properties": [], - "specLocation": "ingest/_types/Processors.ts#L677-L677" + "specLocation": "ingest/_types/Processors.ts#L695-L695" }, { "kind": "interface", @@ -139875,7 +139896,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L679-L718" + "specLocation": "ingest/_types/Processors.ts#L697-L736" }, { "kind": "interface", @@ -139903,7 +139924,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L720-L726" + "specLocation": "ingest/_types/Processors.ts#L738-L744" }, { "kind": "interface", @@ -139956,7 +139977,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L728-L742" + "specLocation": "ingest/_types/Processors.ts#L746-L760" }, { "kind": "interface", @@ -140083,7 +140104,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L357-L398" + "specLocation": "ingest/_types/Processors.ts#L344-L385" }, { "kind": "enum", @@ -140099,7 +140120,7 @@ "name": "GeoGridTargetFormat", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L406-L409" + "specLocation": "ingest/_types/Processors.ts#L393-L396" }, { "kind": "enum", @@ -140118,7 +140139,7 @@ "name": "GeoGridTileType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L400-L404" + "specLocation": "ingest/_types/Processors.ts#L387-L391" }, { "kind": "interface", @@ -140211,9 +140232,21 @@ "namespace": "_types" } } + }, + { + "description": "If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created.\nElse, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.", + "name": "download_database_on_pipeline_creation", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "ingest/_types/Processors.ts#L411-L440" + "specLocation": "ingest/_types/Processors.ts#L398-L432" }, { "kind": "interface", @@ -140305,7 +140338,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L744-L769" + "specLocation": "ingest/_types/Processors.ts#L762-L787" }, { "kind": "interface", @@ -140383,7 +140416,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L771-L795" + "specLocation": "ingest/_types/Processors.ts#L789-L813" }, { "kind": "interface", @@ -140437,7 +140470,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L797-L813" + "specLocation": "ingest/_types/Processors.ts#L815-L831" }, { "kind": "interface", @@ -140471,7 +140504,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L836-L848", + "specLocation": "ingest/_types/Processors.ts#L854-L866", "variants": { "kind": "container" } @@ -140548,7 +140581,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L863-L889" + "specLocation": "ingest/_types/Processors.ts#L881-L907" }, { "kind": "interface", @@ -140584,7 +140617,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L850-L861" + "specLocation": "ingest/_types/Processors.ts#L868-L879" }, { "kind": "interface", @@ -140656,7 +140689,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L815-L834" + "specLocation": "ingest/_types/Processors.ts#L833-L852" }, { "kind": "interface", @@ -140709,7 +140742,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L891-L906" + "specLocation": "ingest/_types/Processors.ts#L909-L924" }, { "kind": "interface", @@ -140788,7 +140821,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L908-L937" + "specLocation": "ingest/_types/Processors.ts#L926-L955" }, { "kind": "enum", @@ -140806,7 +140839,7 @@ "name": "JsonProcessorConflictStrategy", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L939-L944" + "specLocation": "ingest/_types/Processors.ts#L957-L962" }, { "kind": "interface", @@ -140963,7 +140996,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L946-L998" + "specLocation": "ingest/_types/Processors.ts#L964-L1016" }, { "kind": "interface", @@ -141017,7 +141050,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1000-L1016" + "specLocation": "ingest/_types/Processors.ts#L1018-L1034" }, { "kind": "interface", @@ -141101,6 +141134,19 @@ } } }, + { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch.", "name": "_meta", @@ -141114,7 +141160,7 @@ } } ], - "specLocation": "ingest/_types/Pipeline.ts#L23-L45" + "specLocation": "ingest/_types/Pipeline.ts#L23-L51" }, { "kind": "interface", @@ -141163,7 +141209,7 @@ } } ], - "specLocation": "ingest/_types/Pipeline.ts#L61-L75" + "specLocation": "ingest/_types/Pipeline.ts#L67-L81" }, { "kind": "interface", @@ -141204,7 +141250,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1018-L1029" + "specLocation": "ingest/_types/Processors.ts#L1036-L1047" }, { "kind": "interface", @@ -141874,7 +141920,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1031-L1045" + "specLocation": "ingest/_types/Processors.ts#L1049-L1063" }, { "kind": "interface", @@ -141927,7 +141973,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1047-L1063" + "specLocation": "ingest/_types/Processors.ts#L1065-L1081" }, { "kind": "interface", @@ -142009,7 +142055,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1065-L1093" + "specLocation": "ingest/_types/Processors.ts#L1083-L1111" }, { "kind": "interface", @@ -142081,7 +142127,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1095-L1115" + "specLocation": "ingest/_types/Processors.ts#L1113-L1133" }, { "kind": "interface", @@ -142167,7 +142213,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1117-L1151" + "specLocation": "ingest/_types/Processors.ts#L1135-L1169" }, { "kind": "interface", @@ -142210,7 +142256,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1153-L1162" + "specLocation": "ingest/_types/Processors.ts#L1171-L1180" }, { "kind": "enum", @@ -142226,7 +142272,7 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1164-L1167" + "specLocation": "ingest/_types/Processors.ts#L1182-L1185" }, { "kind": "interface", @@ -142279,7 +142325,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1169-L1185" + "specLocation": "ingest/_types/Processors.ts#L1187-L1203" }, { "kind": "interface", @@ -142358,7 +142404,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1187-L1212" + "specLocation": "ingest/_types/Processors.ts#L1205-L1230" }, { "kind": "interface", @@ -142412,7 +142458,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1214-L1230" + "specLocation": "ingest/_types/Processors.ts#L1232-L1248" }, { "kind": "interface", @@ -142466,7 +142512,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1232-L1248" + "specLocation": "ingest/_types/Processors.ts#L1250-L1266" }, { "kind": "interface", @@ -142546,7 +142592,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1268-L1294" + "specLocation": "ingest/_types/Processors.ts#L1286-L1312" }, { "kind": "interface", @@ -142600,7 +142646,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1250-L1266" + "specLocation": "ingest/_types/Processors.ts#L1268-L1284" }, { "kind": "interface", @@ -142640,20 +142686,6 @@ } } }, - { - "name": "options", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "UserAgentProperty", - "namespace": "ingest._types" - } - } - } - }, { "description": "The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with.", "name": "regex_file", @@ -142678,49 +142710,81 @@ "namespace": "_types" } } + }, + { + "description": "Controls what properties are added to `target_field`.", + "name": "properties", + "required": false, + "serverDefault": [ + "name", + "major", + "minor", + "patch", + "build", + "os", + "os_name", + "os_major", + "os_minor", + "device" + ], + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "UserAgentProperty", + "namespace": "ingest._types" + } + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.9.0", + "stability": "beta" + } + }, + "description": "Extracts device type from the user agent string on a best-effort basis.", + "name": "extract_device_type", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "ingest/_types/Processors.ts#L442-L462" + "specLocation": "ingest/_types/Processors.ts#L434-L465" }, { "kind": "enum", "members": [ { - "name": "NAME" - }, - { - "name": "MAJOR" - }, - { - "name": "MINOR" - }, - { - "name": "PATCH" - }, - { - "name": "OS" - }, - { - "name": "OS_NAME" + "name": "name" }, { - "name": "OS_MAJOR" + "name": "os" }, { - "name": "OS_MINOR" + "name": "device" }, { - "name": "DEVICE" + "name": "original" }, { - "name": "BUILD" + "name": "version" } ], "name": { "name": "UserAgentProperty", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L284-L295" + "specLocation": "ingest/_types/Processors.ts#L467-L473" }, { "kind": "request", @@ -143579,6 +143643,19 @@ "namespace": "_types" } } + }, + { + "description": "Marks this ingest pipeline as deprecated.\nWhen a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -143647,7 +143724,7 @@ } } ], - "specLocation": "ingest/put_pipeline/PutPipelineRequest.ts#L25-L77" + "specLocation": "ingest/put_pipeline/PutPipelineRequest.ts#L25-L83" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 941e0b1afc..e29c1283ae 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12621,7 +12621,7 @@ export type InferencePutResponse = InferenceInferenceEndpointInfo export interface IngestAppendProcessor extends IngestProcessorBase { field: Field - value: any[] + value: any | any[] allow_duplicates?: boolean } @@ -12701,6 +12701,7 @@ export interface IngestDissectProcessor extends IngestProcessorBase { export interface IngestDotExpanderProcessor extends IngestProcessorBase { field: Field + override?: boolean path?: string } @@ -12750,6 +12751,7 @@ export interface IngestGeoIpProcessor extends IngestProcessorBase { ignore_missing?: boolean properties?: string[] target_field?: Field + download_database_on_pipeline_creation?: boolean } export interface IngestGrokProcessor extends IngestProcessorBase { @@ -12844,6 +12846,7 @@ export interface IngestPipeline { on_failure?: IngestProcessorContainer[] processors?: IngestProcessorContainer[] version?: VersionNumber + deprecated?: boolean _meta?: Metadata } @@ -12991,12 +12994,13 @@ export interface IngestUrlDecodeProcessor extends IngestProcessorBase { export interface IngestUserAgentProcessor extends IngestProcessorBase { field: Field ignore_missing?: boolean - options?: IngestUserAgentProperty[] regex_file?: string target_field?: Field + properties?: IngestUserAgentProperty[] + extract_device_type?: boolean } -export type IngestUserAgentProperty = 'NAME' | 'MAJOR' | 'MINOR' | 'PATCH' | 'OS' | 'OS_NAME' | 'OS_MAJOR' | 'OS_MINOR' | 'DEVICE' | 'BUILD' +export type IngestUserAgentProperty = 'name' | 'os' | 'device' | 'original' | 'version' export interface IngestDeleteGeoipDatabaseRequest extends RequestBase { id: Ids @@ -13094,6 +13098,7 @@ export interface IngestPutPipelineRequest extends RequestBase { on_failure?: IngestProcessorContainer[] processors?: IngestProcessorContainer[] version?: VersionNumber + deprecated?: boolean } } diff --git a/specification/ingest/_types/Pipeline.ts b/specification/ingest/_types/Pipeline.ts index 8863f1794c..8eb1b252dd 100644 --- a/specification/ingest/_types/Pipeline.ts +++ b/specification/ingest/_types/Pipeline.ts @@ -38,6 +38,12 @@ export class Pipeline { * Version number used by external systems to track ingest pipelines. */ version?: VersionNumber + /** + * Marks this ingest pipeline as deprecated. + * When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + * @server_default false + */ + deprecated?: boolean /** * Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch. */ diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index 9f9891e95b..053a5deb31 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -281,19 +281,6 @@ export class ProcessorBase { tag?: string } -export enum UserAgentProperty { - NAME, - MAJOR, - MINOR, - PATCH, - OS, - OS_NAME, - OS_MAJOR, - OS_MINOR, - DEVICE, - BUILD -} - export class AppendProcessor extends ProcessorBase { /** * The field to be appended to. @@ -303,7 +290,7 @@ export class AppendProcessor extends ProcessorBase { /** * The value to be appended. Supports template snippets. */ - value: UserDefinedValue[] + value: UserDefinedValue | UserDefinedValue[] /** * If `false`, the processor does not append values already present in the field. * @server_default true @@ -437,6 +424,11 @@ export class GeoIpProcessor extends ProcessorBase { * @server_default geoip */ target_field?: Field + /** + * If `true` (and if `ingest.geoip.downloader.eager.download` is `false`), the missing database is downloaded when the pipeline is created. + * Else, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index. + */ + download_database_on_pipeline_creation?: boolean } export class UserAgentProcessor extends ProcessorBase { @@ -449,7 +441,6 @@ export class UserAgentProcessor extends ProcessorBase { * @server_default false */ ignore_missing?: boolean - options?: UserAgentProperty[] /** * The name of the file in the `config/ingest-user-agent` directory containing the regular expressions for parsing the user agent string. Both the directory and the file have to be created before starting Elasticsearch. If not specified, ingest-user-agent will use the `regexes.yaml` from uap-core it ships with. */ @@ -459,6 +450,26 @@ export class UserAgentProcessor extends ProcessorBase { * @server_default user_agent */ target_field?: Field + /** + * Controls what properties are added to `target_field`. + * @server_default ['name', 'major', 'minor', 'patch', 'build', 'os', 'os_name', 'os_major', 'os_minor', 'device'] + */ + properties?: UserAgentProperty[] + /** + * Extracts device type from the user agent string on a best-effort basis. + * @server_default false + * @availability stack since=8.9.0 stability=beta + * @availability serverless + */ + extract_device_type?: boolean +} + +export enum UserAgentProperty { + name, + os, + device, + original, + version } export class BytesProcessor extends ProcessorBase { @@ -667,6 +678,13 @@ export class DotExpanderProcessor extends ProcessorBase { * If set to `*`, all top-level fields will be expanded. */ field: Field + /** + * Controls the behavior when there is already an existing nested object that conflicts with the expanded field. + * When `false`, the processor will merge conflicts by combining the old and the new values into an array. + * When `true`, the value from the expanded field will overwrite the existing value. + * @server_default false + */ + override?: boolean /** * The field that contains the field to expand. * Only required if the field to expand is part another object field, because the `field` option can only understand leaf fields. diff --git a/specification/ingest/put_pipeline/PutPipelineRequest.ts b/specification/ingest/put_pipeline/PutPipelineRequest.ts index 4f966a9e82..ba6bec0e97 100644 --- a/specification/ingest/put_pipeline/PutPipelineRequest.ts +++ b/specification/ingest/put_pipeline/PutPipelineRequest.ts @@ -73,5 +73,11 @@ export interface Request extends RequestBase { * Version number used by external systems to track ingest pipelines. This parameter is intended for external systems only. Elasticsearch does not use or validate pipeline version numbers. */ version?: VersionNumber + /** + * Marks this ingest pipeline as deprecated. + * When a deprecated ingest pipeline is referenced as the default or final pipeline when creating or updating a non-deprecated index template, Elasticsearch will emit a deprecation warning. + * @server_default false + */ + deprecated?: boolean } }