From 05e37643a623f32ea2af0eb77cc7c268532fecf6 Mon Sep 17 00:00:00 2001 From: Sylvain Wallez Date: Wed, 9 Apr 2025 13:52:07 +0200 Subject: [PATCH] Add ESQL result type definitions (#4189) (cherry picked from commit e9322d61a98b9204b6a186b2e37444561b0191ad) --- output/openapi/elasticsearch-openapi.json | 205 ++++++- .../elasticsearch-serverless-openapi.json | 178 +++++- output/schema/schema.json | 511 +++++++++++++++++- output/typescript/types.ts | 64 ++- specification/_types/Binary.ts | 3 - specification/esql/_types/EsqlResult.ts | 93 ++++ .../esql/async_query/AsyncQueryResponse.ts | 2 +- .../async_query_get/AsyncQueryGetResponse.ts | 4 +- .../AsyncQueryStopResponse.ts | 2 +- specification/esql/query/QueryResponse.ts | 2 +- 10 files changed, 1020 insertions(+), 44 deletions(-) create mode 100644 specification/esql/_types/EsqlResult.ts diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index a607eeec87..f95f46453b 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -9682,7 +9682,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlResult" + "$ref": "#/components/schemas/esql._types:EsqlResult" } } } @@ -9751,7 +9751,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlResult" + "$ref": "#/components/schemas/esql._types:AsyncEsqlResult" } } } @@ -9837,7 +9837,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlResult" + "$ref": "#/components/schemas/esql._types:EsqlResult" } } } @@ -9955,7 +9955,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlResult" + "$ref": "#/components/schemas/esql._types:EsqlResult" } } } @@ -73989,8 +73989,201 @@ } ] }, - "_types:EsqlResult": { - "type": "object" + "esql._types:EsqlResult": { + "type": "object", + "properties": { + "took": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + }, + "is_partial": { + "type": "boolean" + }, + "all_columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:ColumnInfo" + } + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:ColumnInfo" + } + }, + "values": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:FieldValue" + } + } + }, + "_clusters": { + "$ref": "#/components/schemas/esql._types:ClusterInfo" + }, + "profile": { + "description": "Profiling information. Present if `profile` was `true` in the request.\nThe contents of this field are currently unstable.", + "type": "object" + } + }, + "required": [ + "columns", + "values" + ] + }, + "esql._types:ColumnInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + }, + "esql._types:ClusterInfo": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "successful": { + "type": "number" + }, + "running": { + "type": "number" + }, + "skipped": { + "type": "number" + }, + "partial": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types:EsqlClusterDetails" + } + } + }, + "required": [ + "total", + "successful", + "running", + "skipped", + "partial", + "failed", + "details" + ] + }, + "esql._types:EsqlClusterDetails": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/esql._types:EsqlClusterStatus" + }, + "indices": { + "type": "string" + }, + "took": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + }, + "_shards": { + "$ref": "#/components/schemas/esql._types:EsqlShardInfo" + } + }, + "required": [ + "status", + "indices" + ] + }, + "esql._types:EsqlClusterStatus": { + "type": "string", + "enum": [ + "running", + "successful", + "partial", + "skipped", + "failed" + ] + }, + "esql._types:EsqlShardInfo": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "successful": { + "type": "number" + }, + "skipped": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:EsqlShardFailure" + } + } + }, + "required": [ + "total" + ] + }, + "esql._types:EsqlShardFailure": { + "type": "object", + "properties": { + "shard": { + "$ref": "#/components/schemas/_types:Id" + }, + "index": { + "$ref": "#/components/schemas/_types:IndexName" + }, + "node": { + "$ref": "#/components/schemas/_types:NodeId" + }, + "reason": { + "$ref": "#/components/schemas/_types:ErrorCause" + } + }, + "required": [ + "shard", + "index", + "reason" + ] + }, + "esql._types:AsyncEsqlResult": { + "allOf": [ + { + "$ref": "#/components/schemas/esql._types:EsqlResult" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "is_running": { + "type": "boolean" + } + }, + "required": [ + "is_running" + ] + } + ] }, "_types:InlineGet": { "type": "object", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index e73120e40e..93331877dc 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -5582,7 +5582,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:EsqlResult" + "$ref": "#/components/schemas/esql._types:EsqlResult" } } } @@ -48316,8 +48316,180 @@ } ] }, - "_types:EsqlResult": { - "type": "object" + "esql._types:EsqlResult": { + "type": "object", + "properties": { + "took": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + }, + "is_partial": { + "type": "boolean" + }, + "all_columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:ColumnInfo" + } + }, + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:ColumnInfo" + } + }, + "values": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:FieldValue" + } + } + }, + "_clusters": { + "$ref": "#/components/schemas/esql._types:ClusterInfo" + }, + "profile": { + "description": "Profiling information. Present if `profile` was `true` in the request.\nThe contents of this field are currently unstable.", + "type": "object" + } + }, + "required": [ + "columns", + "values" + ] + }, + "esql._types:ColumnInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type" + ] + }, + "esql._types:ClusterInfo": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "successful": { + "type": "number" + }, + "running": { + "type": "number" + }, + "skipped": { + "type": "number" + }, + "partial": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "details": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types:EsqlClusterDetails" + } + } + }, + "required": [ + "total", + "successful", + "running", + "skipped", + "partial", + "failed", + "details" + ] + }, + "esql._types:EsqlClusterDetails": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/esql._types:EsqlClusterStatus" + }, + "indices": { + "type": "string" + }, + "took": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + }, + "_shards": { + "$ref": "#/components/schemas/esql._types:EsqlShardInfo" + } + }, + "required": [ + "status", + "indices" + ] + }, + "esql._types:EsqlClusterStatus": { + "type": "string", + "enum": [ + "running", + "successful", + "partial", + "skipped", + "failed" + ] + }, + "esql._types:EsqlShardInfo": { + "type": "object", + "properties": { + "total": { + "type": "number" + }, + "successful": { + "type": "number" + }, + "skipped": { + "type": "number" + }, + "failed": { + "type": "number" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:EsqlShardFailure" + } + } + }, + "required": [ + "total" + ] + }, + "esql._types:EsqlShardFailure": { + "type": "object", + "properties": { + "shard": { + "$ref": "#/components/schemas/_types:Id" + }, + "index": { + "$ref": "#/components/schemas/_types:IndexName" + }, + "node": { + "$ref": "#/components/schemas/_types:NodeId" + }, + "reason": { + "$ref": "#/components/schemas/_types:ErrorCause" + } + }, + "required": [ + "shard", + "index", + "reason" + ] }, "_types:InlineGet": { "type": "object", diff --git a/output/schema/schema.json b/output/schema/schema.json index 97039a96d4..d9c7dc3704 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -48141,21 +48141,6 @@ ], "specLocation": "_types/Base.ts#L127-L136" }, - { - "kind": "type_alias", - "name": { - "name": "EsqlResult", - "namespace": "_types" - }, - "specLocation": "_types/Binary.ts#L24-L24", - "type": { - "kind": "instance_of", - "type": { - "name": "binary", - "namespace": "_builtins" - } - } - }, { "kind": "enum", "members": [ @@ -54129,7 +54114,7 @@ "name": "StreamResult", "namespace": "_types" }, - "specLocation": "_types/Binary.ts#L27-L27", + "specLocation": "_types/Binary.ts#L24-L24", "type": { "kind": "instance_of", "type": { @@ -125081,6 +125066,262 @@ }, "specLocation": "eql/search/types.ts#L20-L32" }, + { + "kind": "interface", + "inherits": { + "type": { + "name": "EsqlResult", + "namespace": "esql._types" + } + }, + "name": { + "name": "AsyncEsqlResult", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "is_running", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L45-L48" + }, + { + "kind": "interface", + "name": { + "name": "ClusterInfo", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "successful", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "running", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "skipped", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "partial", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "failed", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "details", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "EsqlClusterDetails", + "namespace": "esql._types" + } + } + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L55-L63" + }, + { + "kind": "interface", + "name": { + "name": "ColumnInfo", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L50-L53" + }, + { + "kind": "interface", + "name": { + "name": "EsqlClusterDetails", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "EsqlClusterStatus", + "namespace": "esql._types" + } + } + }, + { + "name": "indices", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "took", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + }, + { + "name": "_shards", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "EsqlShardInfo", + "namespace": "esql._types" + } + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L65-L70" + }, + { + "kind": "enum", + "members": [ + { + "name": "running" + }, + { + "name": "successful" + }, + { + "name": "partial" + }, + { + "name": "skipped" + }, + { + "name": "failed" + } + ], + "name": { + "name": "EsqlClusterStatus", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/EsqlResult.ts#L72-L78" + }, { "kind": "enum", "members": [ @@ -125115,6 +125356,234 @@ }, "specLocation": "esql/_types/QueryParameters.ts#L20-L29" }, + { + "kind": "interface", + "name": { + "name": "EsqlResult", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "took", + "required": false, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + }, + { + "name": "is_partial", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "all_columns", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ColumnInfo", + "namespace": "esql._types" + } + } + } + }, + { + "name": "columns", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ColumnInfo", + "namespace": "esql._types" + } + } + } + }, + { + "name": "values", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FieldValue", + "namespace": "_types" + } + } + } + } + }, + { + "description": "Cross-cluster search information. Present if `include_ccs_metadata` was `true` in the request\nand a cross-cluster search was performed.", + "name": "_clusters", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "ClusterInfo", + "namespace": "esql._types" + } + } + }, + { + "description": "Profiling information. Present if `profile` was `true` in the request.\nThe contents of this field are currently unstable.", + "name": "profile", + "required": false, + "type": { + "kind": "user_defined_value" + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L27-L43" + }, + { + "kind": "interface", + "name": { + "name": "EsqlShardFailure", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "shard", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "name": "node", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "NodeId", + "namespace": "_types" + } + } + }, + { + "name": "reason", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ErrorCause", + "namespace": "_types" + } + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L88-L93" + }, + { + "kind": "interface", + "name": { + "name": "EsqlShardInfo", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "successful", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "skipped", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "failed", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "name": "failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "EsqlShardFailure", + "namespace": "esql._types" + } + } + } + } + ], + "specLocation": "esql/_types/EsqlResult.ts#L80-L86" + }, { "kind": "interface", "name": { @@ -125556,7 +126025,7 @@ "kind": "instance_of", "type": { "name": "EsqlResult", - "namespace": "_types" + "namespace": "esql._types" } } }, @@ -125703,8 +126172,8 @@ "value": { "kind": "instance_of", "type": { - "name": "EsqlResult", - "namespace": "_types" + "name": "AsyncEsqlResult", + "namespace": "esql._types" } } }, @@ -125773,7 +126242,7 @@ "kind": "instance_of", "type": { "name": "EsqlResult", - "namespace": "_types" + "namespace": "esql._types" } } }, @@ -125984,7 +126453,7 @@ "kind": "instance_of", "type": { "name": "EsqlResult", - "namespace": "_types" + "namespace": "esql._types" } } }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index c0efc83d60..90c7f388ed 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2348,8 +2348,6 @@ export interface ErrorResponseBase { status: integer } -export type EsqlResult = ArrayBuffer - export type ExpandWildcard = 'all' | 'open' | 'closed' | 'hidden' | 'none' export type ExpandWildcards = ExpandWildcard | ExpandWildcard[] @@ -10604,8 +10602,62 @@ export type EqlSearchResponse = EqlEqlSearchResponseBase +} + +export interface EsqlColumnInfo { + name: string + type: string +} + +export interface EsqlEsqlClusterDetails { + status: EsqlEsqlClusterStatus + indices: string + took?: DurationValue + _shards?: EsqlEsqlShardInfo +} + +export type EsqlEsqlClusterStatus = 'running' | 'successful' | 'partial' | 'skipped' | 'failed' + export type EsqlEsqlFormat = 'csv' | 'json' | 'tsv' | 'txt' | 'yaml' | 'cbor' | 'smile' | 'arrow' +export interface EsqlEsqlResult { + took?: DurationValue + is_partial?: boolean + all_columns?: EsqlColumnInfo[] + columns: EsqlColumnInfo[] + values: FieldValue[][] + _clusters?: EsqlClusterInfo + profile?: any +} + +export interface EsqlEsqlShardFailure { + shard: Id + index: IndexName + node?: NodeId + reason: ErrorCause +} + +export interface EsqlEsqlShardInfo { + total: integer + successful?: integer + skipped?: integer + failed?: integer + failures?: EsqlEsqlShardFailure[] +} + export interface EsqlTableValuesContainer { integer?: EsqlTableValuesIntegerValue[] keyword?: EsqlTableValuesKeywordValue[] @@ -10641,7 +10693,7 @@ export interface EsqlAsyncQueryRequest extends RequestBase { } } -export type EsqlAsyncQueryResponse = EsqlResult +export type EsqlAsyncQueryResponse = EsqlEsqlResult export interface EsqlAsyncQueryDeleteRequest extends RequestBase { id: Id @@ -10656,14 +10708,14 @@ export interface EsqlAsyncQueryGetRequest extends RequestBase { wait_for_completion_timeout?: Duration } -export type EsqlAsyncQueryGetResponse = EsqlResult +export type EsqlAsyncQueryGetResponse = EsqlAsyncEsqlResult export interface EsqlAsyncQueryStopRequest extends RequestBase { id: Id drop_null_columns?: boolean } -export type EsqlAsyncQueryStopResponse = EsqlResult +export type EsqlAsyncQueryStopResponse = EsqlEsqlResult export interface EsqlQueryRequest extends RequestBase { format?: EsqlEsqlFormat @@ -10681,7 +10733,7 @@ export interface EsqlQueryRequest extends RequestBase { } } -export type EsqlQueryResponse = EsqlResult +export type EsqlQueryResponse = EsqlEsqlResult export interface FeaturesFeature { name: string diff --git a/specification/_types/Binary.ts b/specification/_types/Binary.ts index ee7a540c2f..3b7c8326b2 100644 --- a/specification/_types/Binary.ts +++ b/specification/_types/Binary.ts @@ -20,8 +20,5 @@ // Vector tile response export type MapboxVectorTiles = ArrayBuffer -// ES|QL generic response -export type EsqlResult = ArrayBuffer - // Streaming endpoints response export type StreamResult = ArrayBuffer diff --git a/specification/esql/_types/EsqlResult.ts b/specification/esql/_types/EsqlResult.ts new file mode 100644 index 0000000000..0ed3b22744 --- /dev/null +++ b/specification/esql/_types/EsqlResult.ts @@ -0,0 +1,93 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Dictionary } from '@spec_utils/Dictionary' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { FieldValue, Id, IndexName, NodeId } from '@_types/common' +import { ErrorCause } from '@_types/Errors' +import { integer } from '@_types/Numeric' +import { DurationValue, UnitMillis } from '@_types/Time' + +export class EsqlResult { + took?: DurationValue + is_partial?: boolean + all_columns?: ColumnInfo[] + columns: ColumnInfo[] + values: Array> + /** + * Cross-cluster search information. Present if `include_ccs_metadata` was `true` in the request + * and a cross-cluster search was performed. + */ + _clusters?: ClusterInfo + /** + * Profiling information. Present if `profile` was `true` in the request. + * The contents of this field are currently unstable. + */ + profile?: UserDefinedValue +} + +export class AsyncEsqlResult extends EsqlResult { + id?: string + is_running: boolean +} + +export class ColumnInfo { + name: string + type: string +} + +export class ClusterInfo { + total: integer + successful: integer + running: integer + skipped: integer + partial: integer + failed: integer + details: Dictionary +} + +export class EsqlClusterDetails { + status: EsqlClusterStatus + indices: string + took?: DurationValue + _shards?: EsqlShardInfo +} + +export enum EsqlClusterStatus { + running, + successful, + partial, + skipped, + failed +} + +export class EsqlShardInfo { + total: integer + successful?: integer + skipped?: integer + failed?: integer + failures?: EsqlShardFailure[] +} + +export class EsqlShardFailure { + shard: Id + index: IndexName + node?: NodeId + reason: ErrorCause +} diff --git a/specification/esql/async_query/AsyncQueryResponse.ts b/specification/esql/async_query/AsyncQueryResponse.ts index ba2058f084..1ee2c24f33 100644 --- a/specification/esql/async_query/AsyncQueryResponse.ts +++ b/specification/esql/async_query/AsyncQueryResponse.ts @@ -17,7 +17,7 @@ * under the License. */ -import { EsqlResult } from '@_types/Binary' +import { EsqlResult } from '@esql/_types/EsqlResult' export class Response { /** @codegen_name data */ diff --git a/specification/esql/async_query_get/AsyncQueryGetResponse.ts b/specification/esql/async_query_get/AsyncQueryGetResponse.ts index ba2058f084..34f601ce10 100644 --- a/specification/esql/async_query_get/AsyncQueryGetResponse.ts +++ b/specification/esql/async_query_get/AsyncQueryGetResponse.ts @@ -17,9 +17,9 @@ * under the License. */ -import { EsqlResult } from '@_types/Binary' +import { AsyncEsqlResult } from '@esql/_types/EsqlResult' export class Response { /** @codegen_name data */ - body: EsqlResult + body: AsyncEsqlResult } diff --git a/specification/esql/async_query_stop/AsyncQueryStopResponse.ts b/specification/esql/async_query_stop/AsyncQueryStopResponse.ts index ba2058f084..1ee2c24f33 100644 --- a/specification/esql/async_query_stop/AsyncQueryStopResponse.ts +++ b/specification/esql/async_query_stop/AsyncQueryStopResponse.ts @@ -17,7 +17,7 @@ * under the License. */ -import { EsqlResult } from '@_types/Binary' +import { EsqlResult } from '@esql/_types/EsqlResult' export class Response { /** @codegen_name data */ diff --git a/specification/esql/query/QueryResponse.ts b/specification/esql/query/QueryResponse.ts index ba2058f084..1ee2c24f33 100644 --- a/specification/esql/query/QueryResponse.ts +++ b/specification/esql/query/QueryResponse.ts @@ -17,7 +17,7 @@ * under the License. */ -import { EsqlResult } from '@_types/Binary' +import { EsqlResult } from '@esql/_types/EsqlResult' export class Response { /** @codegen_name data */