diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 7583881a86..3f0d57af76 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -8467,7 +8467,7 @@ "description": "A short version of the Accept header, for example `json` or `yaml`.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/esql._types:EsqlFormat" + "$ref": "#/components/schemas/esql.query:EsqlFormat" }, "style": "form" }, @@ -8558,23 +8558,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "columns": { - "$ref": "#/components/schemas/_types:EsqlColumns" - }, - "id": { - "description": "A query identifier that is provided only when one of the following conditions is met:\n\n* A query request does not return complete results during the period specified in the `wait_for_completion_timeout` parameter.\n* The `keep_on_completion` parameter value is true.\n\nYou can use this ID with the `GET /_query/async/` API to get the current status and available results for the query.", - "type": "string" - }, - "is_running": { - "description": "Indicates whether the query is still running.\nIf the value is false, the async query has finished and the results are returned.", - "type": "boolean" - } - }, - "required": [ - "is_running" - ] + "$ref": "#/components/schemas/_types:EsqlResult" } } } @@ -8643,19 +8627,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "columns": { - "$ref": "#/components/schemas/_types:EsqlColumns" - }, - "is_running": { - "description": "Indicates whether the query is still running.\nIf the value is false, the async query has finished and the results are returned.", - "type": "boolean" - } - }, - "required": [ - "is_running" - ] + "$ref": "#/components/schemas/_types:EsqlResult" } } } @@ -8719,7 +8691,7 @@ "description": "A short version of the Accept header, e.g. json, yaml.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/esql._types:EsqlFormat" + "$ref": "#/components/schemas/esql.query:EsqlFormat" }, "style": "form" }, @@ -8800,7 +8772,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlColumns" + "$ref": "#/components/schemas/_types:EsqlResult" } } } @@ -68545,7 +68517,7 @@ "head" ] }, - "esql._types:EsqlFormat": { + "esql.query:EsqlFormat": { "type": "string", "enum": [ "csv", @@ -68641,7 +68613,7 @@ } ] }, - "_types:EsqlColumns": { + "_types:EsqlResult": { "type": "object" }, "_types:InlineGet": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 6799a1ad2d..777b0eb9c8 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -5142,7 +5142,7 @@ "description": "A short version of the Accept header, e.g. json, yaml.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/esql._types:EsqlFormat" + "$ref": "#/components/schemas/esql.query:EsqlFormat" }, "style": "form" }, @@ -5223,7 +5223,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlColumns" + "$ref": "#/components/schemas/_types:EsqlResult" } } } @@ -44779,7 +44779,7 @@ "head" ] }, - "esql._types:EsqlFormat": { + "esql.query:EsqlFormat": { "type": "string", "enum": [ "csv", @@ -44875,7 +44875,7 @@ } ] }, - "_types:EsqlColumns": { + "_types:EsqlResult": { "type": "object" }, "_types:InlineGet": { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 228e6f3142..413ac4246b 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -18310,7 +18310,7 @@ "kind": "instance_of", "type": { "name": "EsqlFormat", - "namespace": "esql._types" + "namespace": "esql.query" } } }, @@ -18348,7 +18348,7 @@ "value": { "kind": "instance_of", "type": { - "name": "EsqlColumns", + "name": "EsqlResult", "namespace": "_types" } } @@ -77583,7 +77583,7 @@ { "kind": "type_alias", "name": { - "name": "EsqlColumns", + "name": "EsqlResult", "namespace": "_types" }, "specLocation": "_types/Binary.ts#L24-L24", @@ -94024,40 +94024,6 @@ }, "specLocation": "eql/search/types.ts#L20-L32" }, - { - "kind": "enum", - "members": [ - { - "name": "csv" - }, - { - "name": "json" - }, - { - "name": "tsv" - }, - { - "name": "txt" - }, - { - "name": "yaml" - }, - { - "name": "cbor" - }, - { - "name": "smile" - }, - { - "name": "arrow" - } - ], - "name": { - "name": "EsqlFormat", - "namespace": "esql._types" - }, - "specLocation": "esql/_types/QueryParameters.ts#L20-L29" - }, { "kind": "type_alias", "name": { @@ -94178,6 +94144,40 @@ "kind": "union_of" } }, + { + "kind": "enum", + "members": [ + { + "name": "csv" + }, + { + "name": "json" + }, + { + "name": "tsv" + }, + { + "name": "txt" + }, + { + "name": "yaml" + }, + { + "name": "cbor" + }, + { + "name": "smile" + }, + { + "name": "arrow" + } + ], + "name": { + "name": "EsqlFormat", + "namespace": "esql.query" + }, + "specLocation": "esql/query/QueryParameters.ts#L20-L29" + }, { "kind": "type_alias", "name": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 2473f50208..a967de0f12 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -45860,7 +45860,7 @@ { "kind": "type_alias", "name": { - "name": "EsqlColumns", + "name": "EsqlResult", "namespace": "_types" }, "specLocation": "_types/Binary.ts#L24-L24", @@ -120514,40 +120514,6 @@ }, "specLocation": "eql/search/types.ts#L20-L32" }, - { - "kind": "enum", - "members": [ - { - "name": "csv" - }, - { - "name": "json" - }, - { - "name": "tsv" - }, - { - "name": "txt" - }, - { - "name": "yaml" - }, - { - "name": "cbor" - }, - { - "name": "smile" - }, - { - "name": "arrow" - } - ], - "name": { - "name": "EsqlFormat", - "namespace": "esql._types" - }, - "specLocation": "esql/_types/QueryParameters.ts#L20-L29" - }, { "kind": "interface", "name": { @@ -120903,7 +120869,7 @@ "kind": "instance_of", "type": { "name": "EsqlFormat", - "namespace": "esql._types" + "namespace": "esql.query" } } }, @@ -120952,50 +120918,20 @@ { "kind": "response", "body": { - "kind": "properties", - "properties": [ - { - "name": "columns", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "EsqlColumns", - "namespace": "_types" - } - } - }, - { - "description": "A query identifier that is provided only when one of the following conditions is met:\n\n* A query request does not return complete results during the period specified in the `wait_for_completion_timeout` parameter.\n* The `keep_on_completion` parameter value is true.\n\nYou can use this ID with the `GET /_query/async/` API to get the current status and available results for the query.", - "name": "id", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "description": "Indicates whether the query is still running.\nIf the value is false, the async query has finished and the results are returned.", - "name": "is_running", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "EsqlResult", + "namespace": "_types" } - ] + } }, "name": { "name": "Response", "namespace": "esql.async_query" }, - "specLocation": "esql/async_query/AsyncQueryResponse.ts#L22-L40" + "specLocation": "esql/async_query/AsyncQueryResponse.ts#L22-L24" }, { "kind": "request", @@ -121128,38 +121064,54 @@ { "kind": "response", "body": { - "kind": "properties", - "properties": [ - { - "name": "columns", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "EsqlColumns", - "namespace": "_types" - } - } - }, - { - "description": "Indicates whether the query is still running.\nIf the value is false, the async query has finished and the results are returned.", - "name": "is_running", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "EsqlResult", + "namespace": "_types" } - ] + } }, "name": { "name": "Response", "namespace": "esql.async_query_get" }, - "specLocation": "esql/async_query_get/AsyncQueryGetResponse.ts#L22-L31" + "specLocation": "esql/async_query_get/AsyncQueryGetResponse.ts#L22-L24" + }, + { + "kind": "enum", + "members": [ + { + "name": "csv" + }, + { + "name": "json" + }, + { + "name": "tsv" + }, + { + "name": "txt" + }, + { + "name": "yaml" + }, + { + "name": "cbor" + }, + { + "name": "smile" + }, + { + "name": "arrow" + } + ], + "name": { + "name": "EsqlFormat", + "namespace": "esql.query" + }, + "specLocation": "esql/query/QueryParameters.ts#L20-L29" }, { "kind": "request", @@ -121302,7 +121254,7 @@ "kind": "instance_of", "type": { "name": "EsqlFormat", - "namespace": "esql._types" + "namespace": "esql.query" } } }, @@ -121341,7 +121293,7 @@ "value": { "kind": "instance_of", "type": { - "name": "EsqlColumns", + "name": "EsqlResult", "namespace": "_types" } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index bdb097c9b0..7765609d04 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2312,7 +2312,7 @@ export interface ErrorResponseBase { status: integer } -export type EsqlColumns = ArrayBuffer +export type EsqlResult = ArrayBuffer export type ExpandWildcard = 'all' | 'open' | 'closed' | 'hidden' | 'none' @@ -10445,8 +10445,6 @@ export type EqlSearchResponse = EqlEqlSearchResponseBase` API to get the current status and available results for the query. - */ - id?: string - /** - * Indicates whether the query is still running. - * If the value is false, the async query has finished and the results are returned. - */ - is_running: boolean - } + body: EsqlResult } diff --git a/specification/esql/async_query_get/AsyncQueryGetResponse.ts b/specification/esql/async_query_get/AsyncQueryGetResponse.ts index 47f6dc2e3b..33fc735dbe 100644 --- a/specification/esql/async_query_get/AsyncQueryGetResponse.ts +++ b/specification/esql/async_query_get/AsyncQueryGetResponse.ts @@ -17,15 +17,8 @@ * under the License. */ -import { EsqlColumns } from '@_types/Binary' +import { EsqlResult } from '@_types/Binary' export class Response { - body: { - columns?: EsqlColumns - /** - * Indicates whether the query is still running. - * If the value is false, the async query has finished and the results are returned. - */ - is_running: boolean - } + body: EsqlResult } diff --git a/specification/esql/_types/QueryParameters.ts b/specification/esql/query/QueryParameters.ts similarity index 100% rename from specification/esql/_types/QueryParameters.ts rename to specification/esql/query/QueryParameters.ts diff --git a/specification/esql/query/QueryRequest.ts b/specification/esql/query/QueryRequest.ts index 38aeffc6d5..8be31fefa0 100644 --- a/specification/esql/query/QueryRequest.ts +++ b/specification/esql/query/QueryRequest.ts @@ -17,7 +17,7 @@ * under the License. */ -import { EsqlFormat } from '@esql/_types/QueryParameters' +import { EsqlFormat } from '@esql/query/QueryParameters' import { TableValuesContainer } from '@esql/_types/TableValuesContainer' import { Dictionary } from '@spec_utils/Dictionary' import { RequestBase } from '@_types/Base' diff --git a/specification/esql/query/QueryResponse.ts b/specification/esql/query/QueryResponse.ts index 0c44745c6b..ba2058f084 100644 --- a/specification/esql/query/QueryResponse.ts +++ b/specification/esql/query/QueryResponse.ts @@ -17,9 +17,9 @@ * under the License. */ -import { EsqlColumns } from '@_types/Binary' +import { EsqlResult } from '@_types/Binary' export class Response { /** @codegen_name data */ - body: EsqlColumns + body: EsqlResult }