From 53c20107abad1717d03e409256e1b266d865f816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Saint-F=C3=A9lix?= Date: Thu, 6 Feb 2025 16:12:40 +0100 Subject: [PATCH] add failure_store enum to bulk responses (#3732) (cherry picked from commit 3bdce168acaeb5633ad6165e731ab2fa3508ad00) --- output/schema/schema.json | 53 +++++++++++++++++++++++------ output/typescript/types.ts | 3 ++ specification/_global/bulk/types.ts | 8 +++++ 3 files changed, 54 insertions(+), 10 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 91f64a8a0d..ccdd869c58 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -22548,7 +22548,7 @@ "namespace": "_global.bulk" }, "properties": [], - "specLocation": "_global/bulk/types.ts#L132-L132" + "specLocation": "_global/bulk/types.ts#L140-L140" }, { "kind": "interface", @@ -22563,7 +22563,29 @@ "namespace": "_global.bulk" }, "properties": [], - "specLocation": "_global/bulk/types.ts#L136-L136" + "specLocation": "_global/bulk/types.ts#L144-L144" + }, + { + "kind": "enum", + "members": [ + { + "name": "not_applicable_or_unknown" + }, + { + "name": "used" + }, + { + "name": "not_enabled" + }, + { + "name": "failed" + } + ], + "name": { + "name": "FailureStoreStatus", + "namespace": "_global.bulk" + }, + "specLocation": "_global/bulk/types.ts#L86-L91" }, { "kind": "interface", @@ -22578,7 +22600,7 @@ "namespace": "_global.bulk" }, "properties": [], - "specLocation": "_global/bulk/types.ts#L134-L134" + "specLocation": "_global/bulk/types.ts#L142-L142" }, { "kind": "interface", @@ -22668,7 +22690,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L92-L109" + "specLocation": "_global/bulk/types.ts#L100-L117" }, { "kind": "interface", @@ -22726,7 +22748,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L150-L172", + "specLocation": "_global/bulk/types.ts#L158-L180", "variants": { "kind": "container" } @@ -22751,7 +22773,7 @@ "name": "OperationType", "namespace": "_global.bulk" }, - "specLocation": "_global/bulk/types.ts#L85-L90" + "specLocation": "_global/bulk/types.ts#L93-L98" }, { "kind": "request", @@ -23126,6 +23148,17 @@ } } }, + { + "name": "failure_store", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FailureStoreStatus", + "namespace": "_global.bulk" + } + } + }, { "description": "Additional information about the failed operation.\nThe property is returned only for failed operations.", "name": "error", @@ -23237,7 +23270,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L37-L83" + "specLocation": "_global/bulk/types.ts#L37-L84" }, { "kind": "interface", @@ -23345,7 +23378,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L174-L209" + "specLocation": "_global/bulk/types.ts#L182-L217" }, { "kind": "interface", @@ -23386,7 +23419,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L138-L148" + "specLocation": "_global/bulk/types.ts#L146-L156" }, { "kind": "interface", @@ -23450,7 +23483,7 @@ } } ], - "specLocation": "_global/bulk/types.ts#L111-L130" + "specLocation": "_global/bulk/types.ts#L119-L138" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 888baee8f6..fd2a2c0f2b 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -23,6 +23,8 @@ export interface BulkCreateOperation extends BulkWriteOperation { export interface BulkDeleteOperation extends BulkOperationBase { } +export type BulkFailureStoreStatus = 'not_applicable_or_unknown' | 'used' | 'not_enabled' | 'failed' + export interface BulkIndexOperation extends BulkWriteOperation { } @@ -73,6 +75,7 @@ export interface BulkResponseItem { _id?: string | null _index: string status: integer + failure_store?: BulkFailureStoreStatus error?: ErrorCause _primary_term?: long result?: string diff --git a/specification/_global/bulk/types.ts b/specification/_global/bulk/types.ts index 4310bf8ff5..e7ca211906 100644 --- a/specification/_global/bulk/types.ts +++ b/specification/_global/bulk/types.ts @@ -48,6 +48,7 @@ export class ResponseItem { * The HTTP status code returned for the operation. */ status: integer + failure_store?: FailureStoreStatus /** * Additional information about the failed operation. * The property is returned only for failed operations. @@ -82,6 +83,13 @@ export class ResponseItem { get?: InlineGet> } +export enum FailureStoreStatus { + not_applicable_or_unknown, + used, + not_enabled, + failed +} + export enum OperationType { index, create,