diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 16bf30345b..f7d235f9d4 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -95049,6 +95049,12 @@ }, "_shards": { "$ref": "#/components/schemas/esql._types.EsqlShardInfo" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.EsqlShardFailure" + } } }, "required": [ @@ -95080,12 +95086,6 @@ }, "failed": { "type": "number" - }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.EsqlShardFailure" - } } }, "required": [ @@ -95096,10 +95096,18 @@ "type": "object", "properties": { "shard": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, "index": { - "$ref": "#/components/schemas/_types.IndexName" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, "node": { "$ref": "#/components/schemas/_types.NodeId" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 514af04ba8..2dd2f84321 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -59396,6 +59396,12 @@ }, "_shards": { "$ref": "#/components/schemas/esql._types.EsqlShardInfo" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.EsqlShardFailure" + } } }, "required": [ @@ -59427,12 +59433,6 @@ }, "failed": { "type": "number" - }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.EsqlShardFailure" - } } }, "required": [ @@ -59443,10 +59443,18 @@ "type": "object", "properties": { "shard": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, "index": { - "$ref": "#/components/schemas/_types.IndexName" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, "node": { "$ref": "#/components/schemas/_types.NodeId" diff --git a/output/schema/schema.json b/output/schema/schema.json index 3b0df78f80..891deb3c4f 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -132190,9 +132190,23 @@ "namespace": "esql._types" } } + }, + { + "name": "failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "EsqlShardFailure", + "namespace": "esql._types" + } + } + } } ], - "specLocation": "esql/_types/EsqlResult.ts#L65-L70" + "specLocation": "esql/_types/EsqlResult.ts#L65-L71" }, { "kind": "interface", @@ -132315,7 +132329,7 @@ "name": "EsqlClusterStatus", "namespace": "esql._types" }, - "specLocation": "esql/_types/EsqlResult.ts#L72-L78" + "specLocation": "esql/_types/EsqlResult.ts#L73-L79" }, { "kind": "interface", @@ -132502,7 +132516,7 @@ "type": { "kind": "instance_of", "type": { - "name": "Id", + "name": "integer", "namespace": "_types" } } @@ -132511,11 +132525,23 @@ "name": "index", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] } }, { @@ -132593,23 +132619,9 @@ "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" + "specLocation": "esql/_types/EsqlResult.ts#L81-L86" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 53a82d35d3..b26dab0af2 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10757,6 +10757,7 @@ export interface EsqlEsqlClusterDetails { indices: string took?: DurationValue _shards?: EsqlEsqlShardInfo + failures?: EsqlEsqlShardFailure[] } export interface EsqlEsqlClusterInfo { @@ -10789,8 +10790,8 @@ export interface EsqlEsqlResult { } export interface EsqlEsqlShardFailure { - shard: Id - index: IndexName + shard: integer + index: IndexName | null node?: NodeId reason: ErrorCause } @@ -10800,7 +10801,6 @@ export interface EsqlEsqlShardInfo { successful?: integer skipped?: integer failed?: integer - failures?: EsqlEsqlShardFailure[] } export interface EsqlTableValuesContainer { diff --git a/specification/esql/_types/EsqlResult.ts b/specification/esql/_types/EsqlResult.ts index 6a7cefa8bd..649e323d2b 100644 --- a/specification/esql/_types/EsqlResult.ts +++ b/specification/esql/_types/EsqlResult.ts @@ -17,7 +17,7 @@ * under the License. */ -import { FieldValue, Id, IndexName, NodeId } from '@_types/common' +import { FieldValue, IndexName, NodeId } from '@_types/common' import { ErrorCause } from '@_types/Errors' import { integer } from '@_types/Numeric' import { DurationValue, UnitMillis } from '@_types/Time' @@ -67,6 +67,7 @@ export class EsqlClusterDetails { indices: string took?: DurationValue _shards?: EsqlShardInfo + failures?: EsqlShardFailure[] } export enum EsqlClusterStatus { @@ -82,12 +83,11 @@ export class EsqlShardInfo { successful?: integer skipped?: integer failed?: integer - failures?: EsqlShardFailure[] } export class EsqlShardFailure { - shard: Id - index: IndexName + shard: integer + index: IndexName | null node?: NodeId reason: ErrorCause }