From c11b5865a8ae64ba4fce2b4abefe052ca26e6fcf Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 12 Aug 2025 11:26:18 +0400 Subject: [PATCH 1/2] Remove unused EIS types (#5107) They were removed in PR 4212. (cherry picked from commit dcfb0ffe0fd80dbc0aa57ef5ad63ebbef438a203) # Conflicts: # output/schema/schema.json # specification/inference/_types/CommonTypes.ts --- output/schema/schema.json | 115 ++++---- output/schema/validation-errors.json | 17 +- output/typescript/types.ts | 6 +- specification/inference/_types/CommonTypes.ts | 278 +++++++++++++++++- 4 files changed, 334 insertions(+), 82 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 09ededf598..82f7469e5a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -479,7 +479,7 @@ "stability": "stable" } }, - "description": "Bulk index or delete documents.\nPerform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", + "description": "Bulk index or delete documents.\nPerform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n* Ruby: Check out `Elasticsearch::Helpers::BulkHelper`\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", "docId": "docs-bulk", "docTag": "document", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-bulk", @@ -8442,7 +8442,7 @@ "stability": "stable" } }, - "description": "Update field mappings.\nAdd new fields to an existing data stream or index.\nYou can use the update mapping API to:\n\n- Add a new field to an existing index\n- Update mappings for multiple indices in a single request\n- Add new properties to an object field\n- Enable multi-fields for an existing field\n- Update supported mapping parameters\n- Change a field's mapping using reindexing\n- Rename a field using a field alias\n\nLearn how to use the update mapping API with practical examples in the [Update mapping API examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) guide.", + "description": "Update field mappings.\nAdd new fields to an existing data stream or index.\nYou can use the update mapping API to:\n\n- Add a new field to an existing index\n- Update mappings for multiple indices in a single request\n- Add new properties to an object field\n- Enable multi-fields for an existing field\n- Update supported mapping parameters\n- Change a field's mapping using reindexing\n- Rename a field using a field alias\n\nLearn how to use the update mapping API with practical examples in the [Update mapping API examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) guide.", "docId": "indices-put-mapping", "docUrl": "https://www.elastic.co/docs/api/doc/elasticsearch/v9/operation/operation-indices-put-mapping", "extDocId": "mapping-params", @@ -24254,7 +24254,7 @@ } } }, - "description": "Bulk index or delete documents.\nPerform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", + "description": "Bulk index or delete documents.\nPerform multiple `index`, `create`, `delete`, and `update` actions in a single request.\nThis reduces overhead and can greatly increase indexing speed.\n\nIf the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or index alias:\n\n* To use the `create` action, you must have the `create_doc`, `create`, `index`, or `write` index privilege. Data streams support only the `create` action.\n* To use the `index` action, you must have the `create`, `index`, or `write` index privilege.\n* To use the `delete` action, you must have the `delete` or `write` index privilege.\n* To use the `update` action, you must have the `index` or `write` index privilege.\n* To automatically create a data stream or index with a bulk API request, you must have the `auto_configure`, `create_index`, or `manage` index privilege.\n* To make the result of a bulk operation visible to search using the `refresh` parameter, you must have the `maintenance` or `manage` index privilege.\n\nAutomatic data stream creation requires a matching index template with data stream enabled.\n\nThe actions are specified in the request body using a newline delimited JSON (NDJSON) structure:\n\n```\naction_and_meta_data\\n\noptional_source\\n\naction_and_meta_data\\n\noptional_source\\n\n....\naction_and_meta_data\\n\noptional_source\\n\n```\n\nThe `index` and `create` actions expect a source on the next line and have the same semantics as the `op_type` parameter in the standard index API.\nA `create` action fails if a document with the same ID already exists in the target\nAn `index` action adds or replaces a document as necessary.\n\nNOTE: Data streams support only the `create` action.\nTo update or delete a document in a data stream, you must target the backing index containing the document.\n\nAn `update` action expects that the partial doc, upsert, and script and its options are specified on the next line.\n\nA `delete` action does not expect a source on the next line and has the same semantics as the standard delete API.\n\nNOTE: The final line of data must end with a newline character (`\\n`).\nEach newline character may be preceded by a carriage return (`\\r`).\nWhen sending NDJSON data to the `_bulk` endpoint, use a `Content-Type` header of `application/json` or `application/x-ndjson`.\nBecause this format uses literal newline characters (`\\n`) as delimiters, make sure that the JSON actions and sources are not pretty printed.\n\nIf you provide a target in the request path, it is used for any actions that don't explicitly specify an `_index` argument.\n\nA note on the format: the idea here is to make processing as fast as possible.\nAs some of the actions are redirected to other shards on other nodes, only `action_meta_data` is parsed on the receiving node side.\n\nClient libraries using this protocol should try and strive to do something similar on the client side, and reduce buffering as much as possible.\n\nThere is no \"correct\" number of actions to perform in a single bulk request.\nExperiment with different settings to find the optimal size for your particular workload.\nNote that Elasticsearch limits the maximum size of a HTTP request to 100mb by default so clients must ensure that no request exceeds this size.\nIt is not possible to index a single document that exceeds the size limit, so you must pre-process any such documents into smaller pieces before sending them to Elasticsearch.\nFor instance, split documents into pages or chapters before indexing them, or store raw binary data in a system outside Elasticsearch and replace the raw data with a link to the external system in the documents that you send to Elasticsearch.\n\n**Client suppport for bulk requests**\n\nSome of the officially supported clients provide helpers to assist with bulk requests and reindexing:\n\n* Go: Check out `esutil.BulkIndexer`\n* Perl: Check out `Search::Elasticsearch::Client::5_0::Bulk` and `Search::Elasticsearch::Client::5_0::Scroll`\n* Python: Check out `elasticsearch.helpers.*`\n* JavaScript: Check out `client.helpers.*`\n* .NET: Check out `BulkAllObservable`\n* PHP: Check out bulk indexing.\n* Ruby: Check out `Elasticsearch::Helpers::BulkHelper`\n\n**Submitting bulk requests with cURL**\n\nIf you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.\nThe latter doesn't preserve newlines. For example:\n\n```\n$ cat requests\n{ \"index\" : { \"_index\" : \"test\", \"_id\" : \"1\" } }\n{ \"field1\" : \"value1\" }\n$ curl -s -H \"Content-Type: application/x-ndjson\" -XPOST localhost:9200/_bulk --data-binary \"@requests\"; echo\n{\"took\":7, \"errors\": false, \"items\":[{\"index\":{\"_index\":\"test\",\"_id\":\"1\",\"_version\":1,\"result\":\"created\",\"forced_refresh\":false}}]}\n```\n\n**Optimistic concurrency control**\n\nEach `index` and `delete` action within a bulk API call may include the `if_seq_no` and `if_primary_term` parameters in their respective action and meta data lines.\nThe `if_seq_no` and `if_primary_term` parameters control how operations are run, based on the last modification to existing documents. See Optimistic concurrency control for more details.\n\n**Versioning**\n\nEach bulk item can include the version value using the `version` field.\nIt automatically follows the behavior of the index or delete operation based on the `_version` mapping.\nIt also support the `version_type`.\n\n**Routing**\n\nEach bulk item can include the routing value using the `routing` field.\nIt automatically follows the behavior of the index or delete operation based on the `_routing` mapping.\n\nNOTE: Data streams do not support custom routing unless they were created with the `allow_custom_routing` setting enabled in the template.\n\n**Wait for active shards**\n\nWhen making bulk calls, you can set the `wait_for_active_shards` parameter to require a minimum number of shard copies to be active before starting to process the bulk request.\n\n**Refresh**\n\nControl when the changes made by this request are visible to search.\n\nNOTE: Only the shards that receive the bulk request will be affected by refresh.\nImagine a `_bulk?refresh=wait_for` request with three documents in it that happen to be routed to different shards in an index with five shards.\nThe request will only wait for those three shards to refresh.\nThe other two shards that make up the index do not participate in the `_bulk` request at all.\n\nYou might want to disable the refresh interval temporarily to improve indexing throughput for large bulk requests.\nRefer to the linked documentation for step-by-step instructions using the index settings API.", "examples": { "BulkRequestExample1": { "alternatives": [ @@ -24556,7 +24556,7 @@ } } ], - "specLocation": "_global/bulk/BulkRequest.ts#L32-L251" + "specLocation": "_global/bulk/BulkRequest.ts#L32-L252" }, { "kind": "response", @@ -46725,10 +46725,13 @@ "name": "fields", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "Fields", - "namespace": "_types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } } } }, @@ -65869,7 +65872,7 @@ { "kind": "instance_of", "type": { - "name": "long", + "name": "double", "namespace": "_types" } }, @@ -156825,7 +156828,7 @@ } ] }, - "description": "Update field mappings.\nAdd new fields to an existing data stream or index.\nYou can use the update mapping API to:\n\n- Add a new field to an existing index\n- Update mappings for multiple indices in a single request\n- Add new properties to an object field\n- Enable multi-fields for an existing field\n- Update supported mapping parameters\n- Change a field's mapping using reindexing\n- Rename a field using a field alias\n\nLearn how to use the update mapping API with practical examples in the [Update mapping API examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) guide.", + "description": "Update field mappings.\nAdd new fields to an existing data stream or index.\nYou can use the update mapping API to:\n\n- Add a new field to an existing index\n- Update mappings for multiple indices in a single request\n- Add new properties to an object field\n- Enable multi-fields for an existing field\n- Update supported mapping parameters\n- Change a field's mapping using reindexing\n- Rename a field using a field alias\n\nLearn how to use the update mapping API with practical examples in the [Update mapping API examples](https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples) guide.", "examples": { "indicesPutMappingRequestExample1": { "alternatives": [ @@ -165706,7 +165709,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L777-L811" + "specLocation": "inference/_types/CommonTypes.ts#L1035-L1069" }, { "kind": "enum", @@ -165719,7 +165722,7 @@ "name": "ElasticsearchServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L827-L829" + "specLocation": "inference/_types/CommonTypes.ts#L1085-L1087" }, { "kind": "interface", @@ -165742,7 +165745,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L813-L819" + "specLocation": "inference/_types/CommonTypes.ts#L1071-L1077" }, { "kind": "enum", @@ -165761,7 +165764,7 @@ "name": "ElasticsearchTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L821-L825" + "specLocation": "inference/_types/CommonTypes.ts#L1079-L1083" }, { "kind": "interface", @@ -165807,7 +165810,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L831-L857" + "specLocation": "inference/_types/CommonTypes.ts#L1089-L1115" }, { "kind": "enum", @@ -165820,7 +165823,7 @@ "name": "ElserServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L863-L865" + "specLocation": "inference/_types/CommonTypes.ts#L1121-L1123" }, { "kind": "enum", @@ -165833,7 +165836,7 @@ "name": "ElserTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L859-L861" + "specLocation": "inference/_types/CommonTypes.ts#L1117-L1119" }, { "kind": "enum", @@ -165846,7 +165849,7 @@ "name": "GoogleAiServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L890-L892" + "specLocation": "inference/_types/CommonTypes.ts#L1148-L1150" }, { "kind": "interface", @@ -165894,7 +165897,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L867-L883" + "specLocation": "inference/_types/CommonTypes.ts#L1125-L1141" }, { "kind": "enum", @@ -165910,7 +165913,7 @@ "name": "GoogleAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L885-L888" + "specLocation": "inference/_types/CommonTypes.ts#L1143-L1146" }, { "kind": "interface", @@ -165984,7 +165987,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L894-L920" + "specLocation": "inference/_types/CommonTypes.ts#L1152-L1178" }, { "kind": "enum", @@ -165997,7 +166000,7 @@ "name": "GoogleVertexAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L938-L940" + "specLocation": "inference/_types/CommonTypes.ts#L1196-L1198" }, { "kind": "interface", @@ -166031,7 +166034,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L922-L931" + "specLocation": "inference/_types/CommonTypes.ts#L1180-L1189" }, { "kind": "enum", @@ -166047,7 +166050,7 @@ "name": "GoogleVertexAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L933-L936" + "specLocation": "inference/_types/CommonTypes.ts#L1191-L1194" }, { "kind": "interface", @@ -166095,7 +166098,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L942-L963" + "specLocation": "inference/_types/CommonTypes.ts#L1200-L1221" }, { "kind": "enum", @@ -166108,7 +166111,7 @@ "name": "HuggingFaceServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L969-L971" + "specLocation": "inference/_types/CommonTypes.ts#L1227-L1229" }, { "kind": "enum", @@ -166121,7 +166124,7 @@ "name": "HuggingFaceTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L965-L967" + "specLocation": "inference/_types/CommonTypes.ts#L1223-L1225" }, { "kind": "interface", @@ -167084,7 +167087,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L973-L1002" + "specLocation": "inference/_types/CommonTypes.ts#L1231-L1260" }, { "kind": "enum", @@ -167097,7 +167100,7 @@ "name": "JinaAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1032-L1034" + "specLocation": "inference/_types/CommonTypes.ts#L1290-L1292" }, { "kind": "enum", @@ -167116,7 +167119,7 @@ "name": "JinaAISimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1036-L1040" + "specLocation": "inference/_types/CommonTypes.ts#L1294-L1298" }, { "kind": "interface", @@ -167162,7 +167165,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1004-L1025" + "specLocation": "inference/_types/CommonTypes.ts#L1262-L1283" }, { "kind": "enum", @@ -167178,7 +167181,7 @@ "name": "JinaAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1027-L1030" + "specLocation": "inference/_types/CommonTypes.ts#L1285-L1288" }, { "kind": "enum", @@ -167200,7 +167203,7 @@ "name": "JinaAITextEmbeddingTask", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1042-L1047" + "specLocation": "inference/_types/CommonTypes.ts#L1300-L1305" }, { "kind": "interface", @@ -167358,7 +167361,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1049-L1076" + "specLocation": "inference/_types/CommonTypes.ts#L1307-L1334" }, { "kind": "enum", @@ -167371,7 +167374,7 @@ "name": "MistralServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1082-L1084" + "specLocation": "inference/_types/CommonTypes.ts#L1340-L1342" }, { "kind": "enum", @@ -167384,7 +167387,7 @@ "name": "MistralTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1078-L1080" + "specLocation": "inference/_types/CommonTypes.ts#L1336-L1338" }, { "kind": "interface", @@ -167471,7 +167474,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1086-L1128" + "specLocation": "inference/_types/CommonTypes.ts#L1344-L1386" }, { "kind": "enum", @@ -167484,7 +167487,7 @@ "name": "OpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1144-L1146" + "specLocation": "inference/_types/CommonTypes.ts#L1402-L1404" }, { "kind": "interface", @@ -167506,7 +167509,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1130-L1136" + "specLocation": "inference/_types/CommonTypes.ts#L1388-L1394" }, { "kind": "enum", @@ -167525,7 +167528,7 @@ "name": "OpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1138-L1142" + "specLocation": "inference/_types/CommonTypes.ts#L1396-L1400" }, { "kind": "interface", @@ -168354,7 +168357,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1148-L1179" + "specLocation": "inference/_types/CommonTypes.ts#L1406-L1437" }, { "kind": "enum", @@ -168367,7 +168370,7 @@ "name": "VoyageAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1212-L1214" + "specLocation": "inference/_types/CommonTypes.ts#L1470-L1472" }, { "kind": "interface", @@ -168427,7 +168430,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1181-L1205" + "specLocation": "inference/_types/CommonTypes.ts#L1439-L1463" }, { "kind": "enum", @@ -168443,7 +168446,7 @@ "name": "VoyageAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1207-L1210" + "specLocation": "inference/_types/CommonTypes.ts#L1465-L1468" }, { "kind": "interface", @@ -168531,7 +168534,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1216-L1253" + "specLocation": "inference/_types/CommonTypes.ts#L1474-L1511" }, { "kind": "enum", @@ -168544,7 +168547,7 @@ "name": "WatsonxServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1259-L1261" + "specLocation": "inference/_types/CommonTypes.ts#L1517-L1519" }, { "kind": "enum", @@ -168557,7 +168560,7 @@ "name": "WatsonxTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1255-L1257" + "specLocation": "inference/_types/CommonTypes.ts#L1513-L1515" }, { "kind": "request", @@ -242710,7 +242713,7 @@ "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. Since both documents are being ingested into `my-index`, both pipelines are run using the pipeline definitions that are already in the system.", "method_request": "POST /_ingest/_simulate", "summary": "Existing pipeline definitions", - "value": "{\n \"docs\": [\n {\n \"_id\": 123,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": 456,\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" + "value": "{\n \"docs\": [\n {\n \"_id\": \"123\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_id\": \"456\",\n \"_index\": \"my-index\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ]\n}" }, "SimulateIngestRequestExample2": { "alternatives": [ @@ -242742,7 +242745,7 @@ "description": "In this example the index `my-index` has a default pipeline called `my-pipeline` and a final pipeline called `my-final-pipeline`. But a substitute definition of `my-pipeline` is provided in `pipeline_substitutions`. The substitute `my-pipeline` will be used in place of the `my-pipeline` that is in the system, and then the `my-final-pipeline` that is already defined in the system will run.", "method_request": "POST /_ingest/_simulate", "summary": "Pipeline substitions", - "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": 123,\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": 456,\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" + "value": "{\n \"docs\": [\n {\n \"_index\": \"my-index\",\n \"_id\": \"123\",\n \"_source\": {\n \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"my-index\",\n \"_id\": \"456\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n }\n ],\n \"pipeline_substitutions\": {\n \"my-pipeline\": {\n \"processors\": [\n {\n \"uppercase\": {\n \"field\": \"foo\"\n }\n }\n ]\n }\n }\n}" }, "SimulateIngestRequestExample3": { "alternatives": [ @@ -251258,15 +251261,7 @@ "name": "params", "required": false, "type": { - "kind": "dictionary_of", - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "singleKey": false, + "kind": "array_of", "value": { "kind": "user_defined_value" } @@ -251401,7 +251396,7 @@ } } ], - "specLocation": "sql/query/QuerySqlRequest.ts#L28-L152" + "specLocation": "sql/query/QuerySqlRequest.ts#L27-L151" }, { "kind": "response", @@ -251523,7 +251518,7 @@ "name": "SqlFormat", "namespace": "sql.query" }, - "specLocation": "sql/query/QuerySqlRequest.ts#L154-L162" + "specLocation": "sql/query/QuerySqlRequest.ts#L153-L161" }, { "kind": "request", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index edc81f78cc..9b635c10df 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -55,15 +55,14 @@ "Dangling type 'indices._types:StringFielddata'", "Dangling type 'indices._types:StringFielddataFormat'", "Dangling type 'indices.stats:ShardFielddata'", - "Dangling type 'inference._types:AmazonSageMakerElasticServiceSettings'", - "Dangling type 'inference._types:AmazonSageMakerElasticTaskSettings'", - "Dangling type 'inference._types:AmazonSageMakerElementType'", - "Dangling type 'inference._types:AmazonSageMakerOpenAiTaskSettings'", - "Dangling type 'inference._types:AmazonSageMakerSimilarity'", - "Dangling type 'inference._types:EisServiceSettings'", - "Dangling type 'inference._types:EisServiceType'", - "Dangling type 'inference._types:EisTaskSettings'", - "Dangling type 'inference._types:EisTaskType'", + "Dangling type 'inference._types:CustomRequestParams'", + "Dangling type 'inference._types:CustomResponseParams'", + "Dangling type 'inference._types:CustomServiceSettings'", + "Dangling type 'inference._types:CustomServiceType'", + "Dangling type 'inference._types:CustomTaskSettings'", + "Dangling type 'inference._types:CustomTaskType'", + "Dangling type 'inference._types:DeepSeekServiceSettings'", + "Dangling type 'inference._types:DeepSeekServiceType'", "Dangling type 'ingest._types:PipelineFailure'", "Dangling type 'ml._types:CountFunction'", "Dangling type 'ml._types:DistinctCountFunction'", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5fd7a9e501..4c95dba75e 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2006,7 +2006,7 @@ export interface TermvectorsRequest extends RequestBase { doc?: TDocument filter?: TermvectorsFilter per_field_analyzer?: Record - fields?: Fields + fields?: Field[] field_statistics?: boolean offsets?: boolean payloads?: boolean @@ -3846,7 +3846,7 @@ export interface AggregationsIpRangeBucketKeys extends AggregationsMultiBucketBa export type AggregationsIpRangeBucket = AggregationsIpRangeBucketKeys & { [property: string]: AggregationsAggregate | string | long } -export type AggregationsKeyedPercentiles = Record +export type AggregationsKeyedPercentiles = Record export interface AggregationsLinearMovingAverageAggregation extends AggregationsMovingAverageAggregationBase { model: 'linear' @@ -21431,7 +21431,7 @@ export interface SqlQueryRequest extends RequestBase { keep_alive?: Duration keep_on_completion?: boolean page_timeout?: Duration - params?: Record + params?: any[] query?: string request_timeout?: Duration runtime_mappings?: MappingRuntimeFields diff --git a/specification/inference/_types/CommonTypes.ts b/specification/inference/_types/CommonTypes.ts index eb9e58fcc5..de336d9106 100644 --- a/specification/inference/_types/CommonTypes.ts +++ b/specification/inference/_types/CommonTypes.ts @@ -754,24 +754,282 @@ export class CohereTaskSettings { truncate?: CohereTruncateType } -export class EisServiceSettings { +export class CustomServiceSettings { /** - * The name of the model to use for the inference task. + * Specifies the HTTPS header parameters – such as `Authentication` or `Contet-Type` – that are required to access the custom service. + * For example: + * ``` + * "headers":{ + * "Authorization": "Bearer ${api_key}", + * "Content-Type": "application/json;charset=utf-8" + * } + * ``` */ - model_id: string + headers?: UserDefinedValue /** - * This setting helps to minimize the number of rate limit errors returned. - * By default, the `elastic` service sets the number of requests allowed per minute to `240` in case of `chat_completion`. + * Specifies the input type translation values that are used to replace the `${input_type}` template in the request body. + * For example: + * ``` + * "input_type": { + * "translation": { + * "ingest": "do_ingest", + * "search": "do_search" + * }, + * "default": "a_default" + * }, + * ``` + * If the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`. + * If it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used. + * `translation` can be: + * * `classification` + * * `clustering` + * * `ingest` + * * `search` + */ + input_type?: UserDefinedValue + /** + * Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value. + * For example: + * ``` + * "query_parameters":[ + * ["param_key", "some_value"], + * ["param_key", "another_value"], + * ["other_key", "other_value"] + * ] + * ``` + * If the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`. */ - rate_limit?: RateLimitSetting + query_parameters?: UserDefinedValue + /** + * The request configuration object. + */ + request: CustomRequestParams + /** + * The response configuration object. + */ + response: CustomResponseParams + /** + * Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service. + * For example: + * ``` + * "secret_parameters":{ + * "api_key":"" + * } + * ``` + */ + secret_parameters: UserDefinedValue + /** + * The URL endpoint to use for the requests. + */ + url?: string +} + +export class CustomRequestParams { + /** + * The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body. + * For example: + * ``` + * "request": "{\"input\":${input}}" + * ``` + * > info + * > The content string needs to be a single line except when using the Kibana console. + */ + content: string +} + +export class CustomResponseParams { + /** + * Specifies the JSON parser that is used to parse the response from the custom service. + * Different task types require different json_parser parameters. + * For example: + * ``` + * # text_embedding + * # For a response like this: + * + * { + * "object": "list", + * "data": [ + * { + * "object": "embedding", + * "index": 0, + * "embedding": [ + * 0.014539449, + * -0.015288644 + * ] + * } + * ], + * "model": "text-embedding-ada-002-v2", + * "usage": { + * "prompt_tokens": 8, + * "total_tokens": 8 + * } + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "text_embeddings":"$.data[*].embedding[*]" + * } + * } + * + * # sparse_embedding + * # For a response like this: + * + * { + * "request_id": "75C50B5B-E79E-4930-****-F48DBB392231", + * "latency": 22, + * "usage": { + * "token_count": 11 + * }, + * "result": { + * "sparse_embeddings": [ + * { + * "index": 0, + * "embedding": [ + * { + * "token_id": 6, + * "weight": 0.101 + * }, + * { + * "token_id": 163040, + * "weight": 0.28417 + * } + * ] + * } + * ] + * } + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "token_path":"$.result.sparse_embeddings[*].embedding[*].token_id", + * "weight_path":"$.result.sparse_embeddings[*].embedding[*].weight" + * } + * } + * + * # rerank + * # For a response like this: + * + * { + * "results": [ + * { + * "index": 3, + * "relevance_score": 0.999071, + * "document": "abc" + * }, + * { + * "index": 4, + * "relevance_score": 0.7867867, + * "document": "123" + * }, + * { + * "index": 0, + * "relevance_score": 0.32713068, + * "document": "super" + * } + * ], + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "reranked_index":"$.result.scores[*].index", // optional + * "relevance_score":"$.result.scores[*].score", + * "document_text":"xxx" // optional + * } + * } + * + * # completion + * # For a response like this: + * + * { + * "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT", + * "object": "chat.completion", + * "created": 1741569952, + * "model": "gpt-4.1-2025-04-14", + * "choices": [ + * { + * "index": 0, + * "message": { + * "role": "assistant", + * "content": "Hello! How can I assist you today?", + * "refusal": null, + * "annotations": [] + * }, + * "logprobs": null, + * "finish_reason": "stop" + * } + * ] + * } + * + * # the json_parser definition should look like this: + * + * "response":{ + * "json_parser":{ + * "completion_result":"$.choices[*].message.content" + * } + * } + */ + json_parser: UserDefinedValue +} + +export enum CustomTaskType { + text_embedding, + sparse_embedding, + rerank, + completion +} + +export enum CustomServiceType { + custom } -export enum EisTaskType { - chat_completion +export class CustomTaskSettings { + /** + * Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses. + * For example: + * ``` + * "task_settings":{ + * "parameters":{ + * "input_type":"query", + * "return_token":true + * } + * } + * ``` + */ + parameters?: UserDefinedValue +} + +export class DeepSeekServiceSettings { + /** + * A valid API key for your DeepSeek account. + * You can find or create your DeepSeek API keys on the DeepSeek API key page. + * + * IMPORTANT: You need to provide the API key only once, during the inference model creation. + * The get inference endpoint API does not retrieve your API key. + * After creating the inference model, you cannot change the associated API key. + * If you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key. + * @ext_doc_id deepseek-api-keys + */ + api_key: string + /** + * For a `completion` or `chat_completion` task, the name of the model to use for the inference task. + * + * For the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing). + */ + model_id: string + /** + * The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`. + */ + url?: string } -export enum EisServiceType { - elastic +export enum DeepSeekServiceType { + deepseek } export class ElasticsearchServiceSettings { From 25545506ce4fb624f676deedd5e27f3773f112b5 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 12 Aug 2025 13:24:59 +0400 Subject: [PATCH 2/2] Fix merge --- output/schema/schema.json | 74 ++--- output/schema/validation-errors.json | 8 - specification/inference/_types/CommonTypes.ts | 278 ------------------ 3 files changed, 37 insertions(+), 323 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 82f7469e5a..ed720b2f42 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -165709,7 +165709,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1035-L1069" + "specLocation": "inference/_types/CommonTypes.ts#L757-L791" }, { "kind": "enum", @@ -165722,7 +165722,7 @@ "name": "ElasticsearchServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1085-L1087" + "specLocation": "inference/_types/CommonTypes.ts#L807-L809" }, { "kind": "interface", @@ -165745,7 +165745,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1071-L1077" + "specLocation": "inference/_types/CommonTypes.ts#L793-L799" }, { "kind": "enum", @@ -165764,7 +165764,7 @@ "name": "ElasticsearchTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1079-L1083" + "specLocation": "inference/_types/CommonTypes.ts#L801-L805" }, { "kind": "interface", @@ -165810,7 +165810,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1089-L1115" + "specLocation": "inference/_types/CommonTypes.ts#L811-L837" }, { "kind": "enum", @@ -165823,7 +165823,7 @@ "name": "ElserServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1121-L1123" + "specLocation": "inference/_types/CommonTypes.ts#L843-L845" }, { "kind": "enum", @@ -165836,7 +165836,7 @@ "name": "ElserTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1117-L1119" + "specLocation": "inference/_types/CommonTypes.ts#L839-L841" }, { "kind": "enum", @@ -165849,7 +165849,7 @@ "name": "GoogleAiServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1148-L1150" + "specLocation": "inference/_types/CommonTypes.ts#L870-L872" }, { "kind": "interface", @@ -165897,7 +165897,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1125-L1141" + "specLocation": "inference/_types/CommonTypes.ts#L847-L863" }, { "kind": "enum", @@ -165913,7 +165913,7 @@ "name": "GoogleAiStudioTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1143-L1146" + "specLocation": "inference/_types/CommonTypes.ts#L865-L868" }, { "kind": "interface", @@ -165987,7 +165987,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1152-L1178" + "specLocation": "inference/_types/CommonTypes.ts#L874-L900" }, { "kind": "enum", @@ -166000,7 +166000,7 @@ "name": "GoogleVertexAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1196-L1198" + "specLocation": "inference/_types/CommonTypes.ts#L918-L920" }, { "kind": "interface", @@ -166034,7 +166034,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1180-L1189" + "specLocation": "inference/_types/CommonTypes.ts#L902-L911" }, { "kind": "enum", @@ -166050,7 +166050,7 @@ "name": "GoogleVertexAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1191-L1194" + "specLocation": "inference/_types/CommonTypes.ts#L913-L916" }, { "kind": "interface", @@ -166098,7 +166098,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1200-L1221" + "specLocation": "inference/_types/CommonTypes.ts#L922-L943" }, { "kind": "enum", @@ -166111,7 +166111,7 @@ "name": "HuggingFaceServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1227-L1229" + "specLocation": "inference/_types/CommonTypes.ts#L949-L951" }, { "kind": "enum", @@ -166124,7 +166124,7 @@ "name": "HuggingFaceTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1223-L1225" + "specLocation": "inference/_types/CommonTypes.ts#L945-L947" }, { "kind": "interface", @@ -167087,7 +167087,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1231-L1260" + "specLocation": "inference/_types/CommonTypes.ts#L953-L982" }, { "kind": "enum", @@ -167100,7 +167100,7 @@ "name": "JinaAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1290-L1292" + "specLocation": "inference/_types/CommonTypes.ts#L1012-L1014" }, { "kind": "enum", @@ -167119,7 +167119,7 @@ "name": "JinaAISimilarityType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1294-L1298" + "specLocation": "inference/_types/CommonTypes.ts#L1016-L1020" }, { "kind": "interface", @@ -167165,7 +167165,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1262-L1283" + "specLocation": "inference/_types/CommonTypes.ts#L984-L1005" }, { "kind": "enum", @@ -167181,7 +167181,7 @@ "name": "JinaAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1285-L1288" + "specLocation": "inference/_types/CommonTypes.ts#L1007-L1010" }, { "kind": "enum", @@ -167203,7 +167203,7 @@ "name": "JinaAITextEmbeddingTask", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1300-L1305" + "specLocation": "inference/_types/CommonTypes.ts#L1022-L1027" }, { "kind": "interface", @@ -167361,7 +167361,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1307-L1334" + "specLocation": "inference/_types/CommonTypes.ts#L1029-L1056" }, { "kind": "enum", @@ -167374,7 +167374,7 @@ "name": "MistralServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1340-L1342" + "specLocation": "inference/_types/CommonTypes.ts#L1062-L1064" }, { "kind": "enum", @@ -167387,7 +167387,7 @@ "name": "MistralTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1336-L1338" + "specLocation": "inference/_types/CommonTypes.ts#L1058-L1060" }, { "kind": "interface", @@ -167474,7 +167474,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1344-L1386" + "specLocation": "inference/_types/CommonTypes.ts#L1066-L1108" }, { "kind": "enum", @@ -167487,7 +167487,7 @@ "name": "OpenAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1402-L1404" + "specLocation": "inference/_types/CommonTypes.ts#L1124-L1126" }, { "kind": "interface", @@ -167509,7 +167509,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1388-L1394" + "specLocation": "inference/_types/CommonTypes.ts#L1110-L1116" }, { "kind": "enum", @@ -167528,7 +167528,7 @@ "name": "OpenAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1396-L1400" + "specLocation": "inference/_types/CommonTypes.ts#L1118-L1122" }, { "kind": "interface", @@ -168357,7 +168357,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1406-L1437" + "specLocation": "inference/_types/CommonTypes.ts#L1128-L1159" }, { "kind": "enum", @@ -168370,7 +168370,7 @@ "name": "VoyageAIServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1470-L1472" + "specLocation": "inference/_types/CommonTypes.ts#L1192-L1194" }, { "kind": "interface", @@ -168430,7 +168430,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1439-L1463" + "specLocation": "inference/_types/CommonTypes.ts#L1161-L1185" }, { "kind": "enum", @@ -168446,7 +168446,7 @@ "name": "VoyageAITaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1465-L1468" + "specLocation": "inference/_types/CommonTypes.ts#L1187-L1190" }, { "kind": "interface", @@ -168534,7 +168534,7 @@ } } ], - "specLocation": "inference/_types/CommonTypes.ts#L1474-L1511" + "specLocation": "inference/_types/CommonTypes.ts#L1196-L1233" }, { "kind": "enum", @@ -168547,7 +168547,7 @@ "name": "WatsonxServiceType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1517-L1519" + "specLocation": "inference/_types/CommonTypes.ts#L1239-L1241" }, { "kind": "enum", @@ -168560,7 +168560,7 @@ "name": "WatsonxTaskType", "namespace": "inference._types" }, - "specLocation": "inference/_types/CommonTypes.ts#L1513-L1515" + "specLocation": "inference/_types/CommonTypes.ts#L1235-L1237" }, { "kind": "request", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 9b635c10df..5f5e688f56 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -55,14 +55,6 @@ "Dangling type 'indices._types:StringFielddata'", "Dangling type 'indices._types:StringFielddataFormat'", "Dangling type 'indices.stats:ShardFielddata'", - "Dangling type 'inference._types:CustomRequestParams'", - "Dangling type 'inference._types:CustomResponseParams'", - "Dangling type 'inference._types:CustomServiceSettings'", - "Dangling type 'inference._types:CustomServiceType'", - "Dangling type 'inference._types:CustomTaskSettings'", - "Dangling type 'inference._types:CustomTaskType'", - "Dangling type 'inference._types:DeepSeekServiceSettings'", - "Dangling type 'inference._types:DeepSeekServiceType'", "Dangling type 'ingest._types:PipelineFailure'", "Dangling type 'ml._types:CountFunction'", "Dangling type 'ml._types:DistinctCountFunction'", diff --git a/specification/inference/_types/CommonTypes.ts b/specification/inference/_types/CommonTypes.ts index de336d9106..2b34ff7d4e 100644 --- a/specification/inference/_types/CommonTypes.ts +++ b/specification/inference/_types/CommonTypes.ts @@ -754,284 +754,6 @@ export class CohereTaskSettings { truncate?: CohereTruncateType } -export class CustomServiceSettings { - /** - * Specifies the HTTPS header parameters – such as `Authentication` or `Contet-Type` – that are required to access the custom service. - * For example: - * ``` - * "headers":{ - * "Authorization": "Bearer ${api_key}", - * "Content-Type": "application/json;charset=utf-8" - * } - * ``` - */ - headers?: UserDefinedValue - /** - * Specifies the input type translation values that are used to replace the `${input_type}` template in the request body. - * For example: - * ``` - * "input_type": { - * "translation": { - * "ingest": "do_ingest", - * "search": "do_search" - * }, - * "default": "a_default" - * }, - * ``` - * If the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`. - * If it comes from the ingest context `do_ingest` is used. If it's a different context that is not specified, the default value will be used. If no default is specified an empty string is used. - * `translation` can be: - * * `classification` - * * `clustering` - * * `ingest` - * * `search` - */ - input_type?: UserDefinedValue - /** - * Specifies the query parameters as a list of tuples. The arrays inside the `query_parameters` must have two items, a key and a value. - * For example: - * ``` - * "query_parameters":[ - * ["param_key", "some_value"], - * ["param_key", "another_value"], - * ["other_key", "other_value"] - * ] - * ``` - * If the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value¶m_key=another_value&other_key=other_value`. - */ - query_parameters?: UserDefinedValue - /** - * The request configuration object. - */ - request: CustomRequestParams - /** - * The response configuration object. - */ - response: CustomResponseParams - /** - * Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service. - * For example: - * ``` - * "secret_parameters":{ - * "api_key":"" - * } - * ``` - */ - secret_parameters: UserDefinedValue - /** - * The URL endpoint to use for the requests. - */ - url?: string -} - -export class CustomRequestParams { - /** - * The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body. - * For example: - * ``` - * "request": "{\"input\":${input}}" - * ``` - * > info - * > The content string needs to be a single line except when using the Kibana console. - */ - content: string -} - -export class CustomResponseParams { - /** - * Specifies the JSON parser that is used to parse the response from the custom service. - * Different task types require different json_parser parameters. - * For example: - * ``` - * # text_embedding - * # For a response like this: - * - * { - * "object": "list", - * "data": [ - * { - * "object": "embedding", - * "index": 0, - * "embedding": [ - * 0.014539449, - * -0.015288644 - * ] - * } - * ], - * "model": "text-embedding-ada-002-v2", - * "usage": { - * "prompt_tokens": 8, - * "total_tokens": 8 - * } - * } - * - * # the json_parser definition should look like this: - * - * "response":{ - * "json_parser":{ - * "text_embeddings":"$.data[*].embedding[*]" - * } - * } - * - * # sparse_embedding - * # For a response like this: - * - * { - * "request_id": "75C50B5B-E79E-4930-****-F48DBB392231", - * "latency": 22, - * "usage": { - * "token_count": 11 - * }, - * "result": { - * "sparse_embeddings": [ - * { - * "index": 0, - * "embedding": [ - * { - * "token_id": 6, - * "weight": 0.101 - * }, - * { - * "token_id": 163040, - * "weight": 0.28417 - * } - * ] - * } - * ] - * } - * } - * - * # the json_parser definition should look like this: - * - * "response":{ - * "json_parser":{ - * "token_path":"$.result.sparse_embeddings[*].embedding[*].token_id", - * "weight_path":"$.result.sparse_embeddings[*].embedding[*].weight" - * } - * } - * - * # rerank - * # For a response like this: - * - * { - * "results": [ - * { - * "index": 3, - * "relevance_score": 0.999071, - * "document": "abc" - * }, - * { - * "index": 4, - * "relevance_score": 0.7867867, - * "document": "123" - * }, - * { - * "index": 0, - * "relevance_score": 0.32713068, - * "document": "super" - * } - * ], - * } - * - * # the json_parser definition should look like this: - * - * "response":{ - * "json_parser":{ - * "reranked_index":"$.result.scores[*].index", // optional - * "relevance_score":"$.result.scores[*].score", - * "document_text":"xxx" // optional - * } - * } - * - * # completion - * # For a response like this: - * - * { - * "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT", - * "object": "chat.completion", - * "created": 1741569952, - * "model": "gpt-4.1-2025-04-14", - * "choices": [ - * { - * "index": 0, - * "message": { - * "role": "assistant", - * "content": "Hello! How can I assist you today?", - * "refusal": null, - * "annotations": [] - * }, - * "logprobs": null, - * "finish_reason": "stop" - * } - * ] - * } - * - * # the json_parser definition should look like this: - * - * "response":{ - * "json_parser":{ - * "completion_result":"$.choices[*].message.content" - * } - * } - */ - json_parser: UserDefinedValue -} - -export enum CustomTaskType { - text_embedding, - sparse_embedding, - rerank, - completion -} - -export enum CustomServiceType { - custom -} - -export class CustomTaskSettings { - /** - * Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses. - * For example: - * ``` - * "task_settings":{ - * "parameters":{ - * "input_type":"query", - * "return_token":true - * } - * } - * ``` - */ - parameters?: UserDefinedValue -} - -export class DeepSeekServiceSettings { - /** - * A valid API key for your DeepSeek account. - * You can find or create your DeepSeek API keys on the DeepSeek API key page. - * - * IMPORTANT: You need to provide the API key only once, during the inference model creation. - * The get inference endpoint API does not retrieve your API key. - * After creating the inference model, you cannot change the associated API key. - * If you want to use a different API key, delete the inference model and recreate it with the same name and the updated API key. - * @ext_doc_id deepseek-api-keys - */ - api_key: string - /** - * For a `completion` or `chat_completion` task, the name of the model to use for the inference task. - * - * For the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing). - */ - model_id: string - /** - * The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`. - */ - url?: string -} - -export enum DeepSeekServiceType { - deepseek -} - export class ElasticsearchServiceSettings { /** * Adaptive allocations configuration details.