From 8fa781c2d57dbd38a3f98bad29da09e8a4cb2287 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 14 Jan 2025 14:18:46 -0600 Subject: [PATCH 1/5] Adding new reindex data stream apis --- output/schema/schema.json | 443 ++++++++++++++++++ output/typescript/types.ts | 35 ++ specification/_doc_ids/table.csv | 1 + .../_json_spec/migrate.cancel_reindex.json | 28 ++ .../_json_spec/migrate.create_from.json | 36 ++ .../migrate.get_reindex_status.json | 28 ++ specification/_json_spec/migrate.reindex.json | 26 + specification/migrate/_types/CreateFrom.ts | 32 ++ .../migrate/_types/MigrateReindex.ts | 35 ++ .../MigrateCancelReindexRequest.ts | 37 ++ .../MigrateCancelReindexResponse.ts | 24 + .../create_from/MigrateCreateFromRequest.ts | 42 ++ .../create_from/MigrateCreateFromResponse.ts | 24 + .../MigrateGetReindexStatusRequest.ts | 37 ++ .../MigrateGetReindexStatusResponse.ts | 24 + .../migrate/reindex/MigrateReindexRequest.ts | 35 ++ .../migrate/reindex/MigrateReindexResponse.ts | 24 + 17 files changed, 911 insertions(+) create mode 100644 specification/_json_spec/migrate.cancel_reindex.json create mode 100644 specification/_json_spec/migrate.create_from.json create mode 100644 specification/_json_spec/migrate.get_reindex_status.json create mode 100644 specification/_json_spec/migrate.reindex.json create mode 100644 specification/migrate/_types/CreateFrom.ts create mode 100644 specification/migrate/_types/MigrateReindex.ts create mode 100644 specification/migrate/cancel_reindex/MigrateCancelReindexRequest.ts create mode 100644 specification/migrate/cancel_reindex/MigrateCancelReindexResponse.ts create mode 100644 specification/migrate/create_from/MigrateCreateFromRequest.ts create mode 100644 specification/migrate/create_from/MigrateCreateFromResponse.ts create mode 100644 specification/migrate/get_reindex_status/MigrateGetReindexStatusRequest.ts create mode 100644 specification/migrate/get_reindex_status/MigrateGetReindexStatusResponse.ts create mode 100644 specification/migrate/reindex/MigrateReindexRequest.ts create mode 100644 specification/migrate/reindex/MigrateReindexResponse.ts diff --git a/output/schema/schema.json b/output/schema/schema.json index 8fa956c181..46721052dd 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -9898,6 +9898,163 @@ } ] }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "private" + }, + "stack": { + "since": "8.18.0", + "stability": "experimental" + } + }, + "description": "This API cancels a migration reindex attempt for a data stream or index", + "docId": "migrate", + "docTag": "cancel_reindex", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-data-stream.html", + "name": "migrate.cancel_reindex", + "request": { + "name": "Request", + "namespace": "migrate.cancel_reindex" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "migrate.cancel_reindex" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_migration/reindex/{index}/_cancel" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "private" + }, + "stack": { + "since": "8.18.0", + "stability": "experimental" + } + }, + "description": "This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values.", + "docId": "migrate", + "docTag": "create_from", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-data-stream.html", + "name": "migrate.create_from", + "request": { + "name": "Request", + "namespace": "migrate.create_from" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "migrate.create_from" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT", + "POST" + ], + "path": "/_create_from/{source}/{dest}" + } + ] + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "private" + }, + "stack": { + "since": "8.18.0", + "stability": "experimental" + } + }, + "description": "This API returns the status of a migration reindex attempt for a data stream or index", + "docId": "migrate", + "docTag": "get_reindex_status", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-data-stream.html", + "name": "migrate.get_reindex_status", + "request": { + "name": "Request", + "namespace": "migrate.get_reindex_status" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "migrate.get_reindex_status" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_migration/reindex/{index}/_status" + } + ] + }, + { + "availability": { + "stack": { + "since": "8.18.0", + "stability": "experimental" + } + }, + "description": "\"This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task", + "docId": "migrate", + "docTag": "reindex", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-data-stream.html", + "name": "migrate.reindex", + "request": { + "name": "Request", + "namespace": "migrate.reindex" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "migrate.reindex" + }, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_migration/reindex" + } + ] + }, { "availability": { "stack": { @@ -152776,6 +152933,292 @@ }, "specLocation": "logstash/put_pipeline/LogstashPutPipelineResponse.ts#L22-L24" }, + { + "kind": "interface", + "name": { + "name": "Index", + "namespace": "migrate._types" + }, + "properties": [ + { + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + } + ], + "specLocation": "migrate/_types/MigrateReindex.ts#L33-L35" + }, + { + "kind": "interface", + "name": { + "name": "MigrateReindex", + "namespace": "migrate._types" + }, + "properties": [ + { + "description": "Reindex mode. Currently only 'upgrade' is supported.", + "name": "mode", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The source index or data stream (only data streams are currently supported).", + "name": "source", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Index", + "namespace": "migrate._types" + } + } + } + ], + "specLocation": "migrate/_types/MigrateReindex.ts#L22-L31" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "This API cancels a migration reindex attempt for a data stream or index", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "migrate.cancel_reindex" + }, + "path": [ + { + "description": "The index or data stream name", + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "migrate/cancel_reindex/MigrateCancelReindexRequest.ts#L23-L37" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "migrate.cancel_reindex" + }, + "specLocation": "migrate/cancel_reindex/MigrateCancelReindexResponse.ts#L22-L24" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "create_from", + "value": { + "kind": "instance_of", + "type": { + "name": "MigrateReindex", + "namespace": "migrate._types" + } + } + }, + "description": "This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "migrate.create_from" + }, + "path": [ + { + "description": "The source index or data stream name", + "name": "source", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The destination index or data stream name", + "name": "dest", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "migrate/create_from/MigrateCreateFromRequest.ts#L24-L42" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "migrate.create_from" + }, + "specLocation": "migrate/create_from/MigrateCreateFromResponse.ts#L22-L24" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "This API returns the status of a migration reindex attempt for a data stream or index", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "migrate.get_reindex_status" + }, + "path": [ + { + "description": "The index or data stream name", + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Indices", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "migrate/get_reindex_status/MigrateGetReindexStatusRequest.ts#L23-L37" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "migrate.get_reindex_status" + }, + "specLocation": "migrate/get_reindex_status/MigrateGetReindexStatusResponse.ts#L22-L24" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "value", + "codegenName": "reindex", + "value": { + "kind": "instance_of", + "type": { + "name": "MigrateReindex", + "namespace": "migrate._types" + } + } + }, + "description": "\"This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "migrate.reindex" + }, + "path": [], + "query": [], + "specLocation": "migrate/reindex/MigrateReindexRequest.ts#L24-L35" + }, + { + "kind": "response", + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "name": { + "name": "Response", + "namespace": "migrate.reindex" + }, + "specLocation": "migrate/reindex/MigrateReindexResponse.ts#L22-L24" + }, { "kind": "interface", "name": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index f8b9a2684d..d951a35b1a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13826,6 +13826,41 @@ export interface LogstashPutPipelineRequest extends RequestBase { export type LogstashPutPipelineResponse = boolean +export interface MigrateIndex { + index: Indices +} + +export interface MigrateMigrateReindex { + mode: string + source: MigrateIndex +} + +export interface MigrateCancelReindexRequest extends RequestBase { + index: Indices +} + +export type MigrateCancelReindexResponse = AcknowledgedResponseBase + +export interface MigrateCreateFromRequest extends RequestBase { + source: string + dest: string + body?: MigrateMigrateReindex +} + +export type MigrateCreateFromResponse = AcknowledgedResponseBase + +export interface MigrateGetReindexStatusRequest extends RequestBase { + index: Indices +} + +export type MigrateGetReindexStatusResponse = AcknowledgedResponseBase + +export interface MigrateReindexRequest extends RequestBase { + body?: MigrateMigrateReindex +} + +export type MigrateReindexResponse = AcknowledgedResponseBase + export interface MigrationDeprecationsDeprecation { details?: string level: MigrationDeprecationsDeprecationLevel diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 7b06d87c01..88d9aa5f28 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -302,6 +302,7 @@ mapping-source-field,https://www.elastic.co/guide/en/elasticsearch/reference/{br mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping.html mapping,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping.html mean-reciprocal,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-rank-eval.html#_mean_reciprocal_rank +migrate,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-data-stream.html migrate-index-allocation-filters,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migrate-index-allocation-filters.html migration-api-deprecation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/migration-api-deprecation.html migration-api-feature-upgrade,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/feature-migration-api.html diff --git a/specification/_json_spec/migrate.cancel_reindex.json b/specification/_json_spec/migrate.cancel_reindex.json new file mode 100644 index 0000000000..6ab0ee44eb --- /dev/null +++ b/specification/_json_spec/migrate.cancel_reindex.json @@ -0,0 +1,28 @@ +{ + "migrate.cancel_reindex": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API cancels migration reindex attempt for a data stream or index" + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_migration/reindex/{index}/_cancel", + "methods": ["POST"], + "parts": { + "index": { + "type": "string", + "description": "The index or data stream name" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/migrate.create_from.json b/specification/_json_spec/migrate.create_from.json new file mode 100644 index 0000000000..edb5037f66 --- /dev/null +++ b/specification/_json_spec/migrate.create_from.json @@ -0,0 +1,36 @@ +{ + "migrate.create_from": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values." + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_create_from/{source}/{dest}", + "methods": ["PUT", "POST"], + "parts": { + "source": { + "type": "string", + "description": "The source index name" + }, + "dest": { + "type": "string", + "description": "The destination index name" + } + } + } + ] + }, + "body": { + "description": "The body contains the fields `mappings_override` and `settings_override`.", + "required": false + } + } +} diff --git a/specification/_json_spec/migrate.get_reindex_status.json b/specification/_json_spec/migrate.get_reindex_status.json new file mode 100644 index 0000000000..d5361ff1bb --- /dev/null +++ b/specification/_json_spec/migrate.get_reindex_status.json @@ -0,0 +1,28 @@ +{ + "migrate.get_reindex_status": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API returns the status of a migration reindex attempt for a data stream or index" + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_migration/reindex/{index}/_status", + "methods": ["GET"], + "parts": { + "index": { + "type": "string", + "description": "The index or data stream name" + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/migrate.reindex.json b/specification/_json_spec/migrate.reindex.json new file mode 100644 index 0000000000..2736f7ecd7 --- /dev/null +++ b/specification/_json_spec/migrate.reindex.json @@ -0,0 +1,26 @@ +{ + "migrate.reindex": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/data-stream-reindex.html", + "description": "This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task" + }, + "stability": "experimental", + "visibility": "private", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_migration/reindex", + "methods": ["POST"] + } + ] + }, + "body": { + "description": "The body contains the fields `mode` and `source.index`, where the only mode currently supported is `upgrade`, and the `source.index` must be a data stream name", + "required": true + } + } +} diff --git a/specification/migrate/_types/CreateFrom.ts b/specification/migrate/_types/CreateFrom.ts new file mode 100644 index 0000000000..43eafabb50 --- /dev/null +++ b/specification/migrate/_types/CreateFrom.ts @@ -0,0 +1,32 @@ +/* + * 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 { Indices } from '@_types/common' + +export class CreateFrom { + /** + * Reindex mode. Currently only 'upgrade' is supported. + */ + mappings_override: string + /** + * The source index or data stream (only data streams are currently supported). + */ + settings_ovveride: string +} + diff --git a/specification/migrate/_types/MigrateReindex.ts b/specification/migrate/_types/MigrateReindex.ts new file mode 100644 index 0000000000..15863d9b02 --- /dev/null +++ b/specification/migrate/_types/MigrateReindex.ts @@ -0,0 +1,35 @@ +/* + * 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 { Indices } from '@_types/common' + +export class MigrateReindex { + /** + * Reindex mode. Currently only 'upgrade' is supported. + */ + mode: string + /** + * The source index or data stream (only data streams are currently supported). + */ + source: Index +} + +export class Index { + index: Indices +} diff --git a/specification/migrate/cancel_reindex/MigrateCancelReindexRequest.ts b/specification/migrate/cancel_reindex/MigrateCancelReindexRequest.ts new file mode 100644 index 0000000000..2d75a195fa --- /dev/null +++ b/specification/migrate/cancel_reindex/MigrateCancelReindexRequest.ts @@ -0,0 +1,37 @@ +/* + * 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 { RequestBase } from '@_types/Base' +import { Indices } from '@_types/common' + +/** + * This API cancels a migration reindex attempt for a data stream or index + * + * @rest_spec_name migrate.cancel_reindex + * @availability stack since=8.18.0 stability=experimental + * @availability serverless stability=experimental visibility=private + * @doc_id migrate + * @doc_tag cancel_reindex + */ +export interface Request extends RequestBase { + path_parts: { + /** The index or data stream name */ + index: Indices + } +} diff --git a/specification/migrate/cancel_reindex/MigrateCancelReindexResponse.ts b/specification/migrate/cancel_reindex/MigrateCancelReindexResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/migrate/cancel_reindex/MigrateCancelReindexResponse.ts @@ -0,0 +1,24 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +} diff --git a/specification/migrate/create_from/MigrateCreateFromRequest.ts b/specification/migrate/create_from/MigrateCreateFromRequest.ts new file mode 100644 index 0000000000..ff2c31dd3b --- /dev/null +++ b/specification/migrate/create_from/MigrateCreateFromRequest.ts @@ -0,0 +1,42 @@ +/* + * 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 { MigrateReindex } from '../_types/MigrateReindex' +import { RequestBase } from '@_types/Base' +import { Indices } from '@_types/common' + +/** + * This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values. + * + * @rest_spec_name migrate.create_from + * @availability stack since=8.18.0 stability=experimental + * @availability serverless stability=experimental visibility=private + * @doc_id migrate + * @doc_tag create_from + */ +export interface Request extends RequestBase { + path_parts: { + /** The source index or data stream name */ + source: string, + /** The destination index or data stream name */ + dest: string + }, + /** @codegen_name create_from */ + body: MigrateReindex +} diff --git a/specification/migrate/create_from/MigrateCreateFromResponse.ts b/specification/migrate/create_from/MigrateCreateFromResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/migrate/create_from/MigrateCreateFromResponse.ts @@ -0,0 +1,24 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +} diff --git a/specification/migrate/get_reindex_status/MigrateGetReindexStatusRequest.ts b/specification/migrate/get_reindex_status/MigrateGetReindexStatusRequest.ts new file mode 100644 index 0000000000..c490e71a36 --- /dev/null +++ b/specification/migrate/get_reindex_status/MigrateGetReindexStatusRequest.ts @@ -0,0 +1,37 @@ +/* + * 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 { RequestBase } from '@_types/Base' +import { Indices } from '@_types/common' + +/** + * This API returns the status of a migration reindex attempt for a data stream or index + * + * @rest_spec_name migrate.get_reindex_status + * @availability stack since=8.18.0 stability=experimental + * @availability serverless stability=experimental visibility=private + * @doc_id migrate + * @doc_tag get_reindex_status + */ +export interface Request extends RequestBase { + path_parts: { + /** The index or data stream name */ + index: Indices + } +} diff --git a/specification/migrate/get_reindex_status/MigrateGetReindexStatusResponse.ts b/specification/migrate/get_reindex_status/MigrateGetReindexStatusResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/migrate/get_reindex_status/MigrateGetReindexStatusResponse.ts @@ -0,0 +1,24 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +} diff --git a/specification/migrate/reindex/MigrateReindexRequest.ts b/specification/migrate/reindex/MigrateReindexRequest.ts new file mode 100644 index 0000000000..5b34bcc55c --- /dev/null +++ b/specification/migrate/reindex/MigrateReindexRequest.ts @@ -0,0 +1,35 @@ +/* + * 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 { MigrateReindex } from '../_types/MigrateReindex' +import { RequestBase } from '@_types/Base' +import { Indices } from '@_types/common' + +/** + * "This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task + * + * @rest_spec_name migrate.reindex + * @availability stack since=8.18.0 stability=experimental + * @doc_id migrate + * @doc_tag reindex + */ +export interface Request extends RequestBase { + /** @codegen_name reindex */ + body: MigrateReindex +} diff --git a/specification/migrate/reindex/MigrateReindexResponse.ts b/specification/migrate/reindex/MigrateReindexResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/migrate/reindex/MigrateReindexResponse.ts @@ -0,0 +1,24 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +} From d05ce006c6b6270b28291ed1240ecd8b95279183 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 14 Jan 2025 14:30:49 -0600 Subject: [PATCH 2/5] fixing a typo, and correcting docs --- specification/migrate/_types/CreateFrom.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/migrate/_types/CreateFrom.ts b/specification/migrate/_types/CreateFrom.ts index 43eafabb50..f8dee44269 100644 --- a/specification/migrate/_types/CreateFrom.ts +++ b/specification/migrate/_types/CreateFrom.ts @@ -21,12 +21,12 @@ import { Indices } from '@_types/common' export class CreateFrom { /** - * Reindex mode. Currently only 'upgrade' is supported. + * Mappings overrides to be applied to the destination index (optional) */ mappings_override: string /** - * The source index or data stream (only data streams are currently supported). + * Settings overrides to be applied to the destination index (optional) */ - settings_ovveride: string + settings_override: string } From 64dd485215a9ac0478fef04f75a0d6b87dad1eb5 Mon Sep 17 00:00:00 2001 From: Keith Massey Date: Tue, 14 Jan 2025 15:04:06 -0600 Subject: [PATCH 3/5] adding more specific types for create_from --- specification/migrate/_types/CreateFrom.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/migrate/_types/CreateFrom.ts b/specification/migrate/_types/CreateFrom.ts index f8dee44269..9d68fd5627 100644 --- a/specification/migrate/_types/CreateFrom.ts +++ b/specification/migrate/_types/CreateFrom.ts @@ -18,15 +18,17 @@ */ import { Indices } from '@_types/common' +import { IndexSettings } from '@indices/_types/IndexSettings' +import { TypeMapping } from '@_types/mapping/TypeMapping' export class CreateFrom { /** * Mappings overrides to be applied to the destination index (optional) */ - mappings_override: string + mappings_override?: TypeMapping /** * Settings overrides to be applied to the destination index (optional) */ - settings_override: string + settings_override?: IndexSettings } From 4c81332c0b38dd9761f5fabc8dd8f5763ca9b1f0 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 15 Jan 2025 09:51:53 +0400 Subject: [PATCH 4/5] Run make contrib --- output/openapi/elasticsearch-openapi.json | 224 ++++++++++++++++++ output/schema/schema.json | 4 +- specification/migrate/_types/CreateFrom.ts | 2 - .../create_from/MigrateCreateFromRequest.ts | 7 +- .../migrate/reindex/MigrateReindexRequest.ts | 3 +- 5 files changed, 230 insertions(+), 10 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 619db3f0ee..a20747010f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -17565,6 +17565,161 @@ "x-state": "Added in 1.3.0" } }, + "/_migration/reindex/{index}/_cancel": { + "post": { + "tags": [ + "cancel_reindex" + ], + "summary": "This API cancels a migration reindex attempt for a data stream or index", + "operationId": "migrate-cancel-reindex", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Indices" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Technical preview" + } + }, + "/_create_from/{source}/{dest}": { + "put": { + "tags": [ + "create_from" + ], + "summary": "This API creates a destination from a source index", + "description": "It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values.", + "operationId": "migrate-create-from", + "parameters": [ + { + "$ref": "#/components/parameters/migrate.create_from#source" + }, + { + "$ref": "#/components/parameters/migrate.create_from#dest" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/migrate.create_from" + }, + "responses": { + "200": { + "$ref": "#/components/responses/migrate.create_from#200" + } + }, + "x-state": "Technical preview" + }, + "post": { + "tags": [ + "create_from" + ], + "summary": "This API creates a destination from a source index", + "description": "It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values.", + "operationId": "migrate-create-from-1", + "parameters": [ + { + "$ref": "#/components/parameters/migrate.create_from#source" + }, + { + "$ref": "#/components/parameters/migrate.create_from#dest" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/migrate.create_from" + }, + "responses": { + "200": { + "$ref": "#/components/responses/migrate.create_from#200" + } + }, + "x-state": "Technical preview" + } + }, + "/_migration/reindex/{index}/_status": { + "get": { + "tags": [ + "get_reindex_status" + ], + "summary": "This API returns the status of a migration reindex attempt for a data stream or index", + "operationId": "migrate-get-reindex-status", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "The index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Indices" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Technical preview" + } + }, + "/_migration/reindex": { + "post": { + "tags": [ + "reindex" + ], + "summary": "\"This API reindexes all legacy backing indices for a data stream", + "description": "It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task", + "operationId": "migrate-reindex", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/migrate._types:MigrateReindex" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + } + }, + "x-state": "Technical preview" + } + }, "/_migration/deprecations": { "get": { "tags": [ @@ -75382,6 +75537,33 @@ "_index" ] }, + "migrate._types:MigrateReindex": { + "type": "object", + "properties": { + "mode": { + "description": "Reindex mode. Currently only 'upgrade' is supported.", + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/migrate._types:Index" + } + }, + "required": [ + "mode", + "source" + ] + }, + "migrate._types:Index": { + "type": "object", + "properties": { + "index": { + "$ref": "#/components/schemas/_types:Indices" + } + }, + "required": [ + "index" + ] + }, "migration.deprecations:Deprecation": { "type": "object", "properties": { @@ -94366,6 +94548,16 @@ } } }, + "migrate.create_from#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } + }, "migration.deprecations#200": { "description": "", "content": { @@ -101906,6 +102098,28 @@ }, "style": "form" }, + "migrate.create_from#source": { + "in": "path", + "name": "source", + "description": "The source index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "simple" + }, + "migrate.create_from#dest": { + "in": "path", + "name": "dest", + "description": "The destination index or data stream name", + "required": true, + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "simple" + }, "migration.deprecations#index": { "in": "path", "name": "index", @@ -107361,6 +107575,16 @@ }, "required": true }, + "migrate.create_from": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/migrate._types:MigrateReindex" + } + } + }, + "required": true + }, "ml.delete_expired_data": { "content": { "application/json": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 46721052dd..8d6bd37e5e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -153096,7 +153096,7 @@ } ], "query": [], - "specLocation": "migrate/create_from/MigrateCreateFromRequest.ts#L24-L42" + "specLocation": "migrate/create_from/MigrateCreateFromRequest.ts#L23-L41" }, { "kind": "response", @@ -153199,7 +153199,7 @@ }, "path": [], "query": [], - "specLocation": "migrate/reindex/MigrateReindexRequest.ts#L24-L35" + "specLocation": "migrate/reindex/MigrateReindexRequest.ts#L23-L34" }, { "kind": "response", diff --git a/specification/migrate/_types/CreateFrom.ts b/specification/migrate/_types/CreateFrom.ts index 9d68fd5627..00f1e3c920 100644 --- a/specification/migrate/_types/CreateFrom.ts +++ b/specification/migrate/_types/CreateFrom.ts @@ -17,7 +17,6 @@ * under the License. */ -import { Indices } from '@_types/common' import { IndexSettings } from '@indices/_types/IndexSettings' import { TypeMapping } from '@_types/mapping/TypeMapping' @@ -31,4 +30,3 @@ export class CreateFrom { */ settings_override?: IndexSettings } - diff --git a/specification/migrate/create_from/MigrateCreateFromRequest.ts b/specification/migrate/create_from/MigrateCreateFromRequest.ts index ff2c31dd3b..2608de88a0 100644 --- a/specification/migrate/create_from/MigrateCreateFromRequest.ts +++ b/specification/migrate/create_from/MigrateCreateFromRequest.ts @@ -17,9 +17,8 @@ * under the License. */ -import { MigrateReindex } from '../_types/MigrateReindex' import { RequestBase } from '@_types/Base' -import { Indices } from '@_types/common' +import { MigrateReindex } from '../_types/MigrateReindex' /** * This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values. @@ -33,10 +32,10 @@ import { Indices } from '@_types/common' export interface Request extends RequestBase { path_parts: { /** The source index or data stream name */ - source: string, + source: string /** The destination index or data stream name */ dest: string - }, + } /** @codegen_name create_from */ body: MigrateReindex } diff --git a/specification/migrate/reindex/MigrateReindexRequest.ts b/specification/migrate/reindex/MigrateReindexRequest.ts index 5b34bcc55c..425e88c60d 100644 --- a/specification/migrate/reindex/MigrateReindexRequest.ts +++ b/specification/migrate/reindex/MigrateReindexRequest.ts @@ -17,9 +17,8 @@ * under the License. */ -import { MigrateReindex } from '../_types/MigrateReindex' import { RequestBase } from '@_types/Base' -import { Indices } from '@_types/common' +import { MigrateReindex } from '../_types/MigrateReindex' /** * "This API reindexes all legacy backing indices for a data stream. It does this in a persistent task. The persistent task id is returned immediately, and the reindexing work is completed in that task From b2f3bbd4255df1274ca8b75ca434cdd615bb2241 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 15 Jan 2025 12:58:22 +0400 Subject: [PATCH 5/5] Fix migrate.create_from YAML tests --- output/openapi/elasticsearch-openapi.json | 31 ++++++- output/schema/schema.json | 80 ++++++++++++++++--- output/typescript/types.ts | 13 ++- .../create_from/MigrateCreateFromRequest.ts | 4 +- .../create_from/MigrateCreateFromResponse.ts | 8 +- 5 files changed, 119 insertions(+), 17 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index a20747010f..d11a8eb980 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -75537,6 +75537,17 @@ "_index" ] }, + "migrate._types:CreateFrom": { + "type": "object", + "properties": { + "mappings_override": { + "$ref": "#/components/schemas/_types.mapping:TypeMapping" + }, + "settings_override": { + "$ref": "#/components/schemas/indices._types:IndexSettings" + } + } + }, "migrate._types:MigrateReindex": { "type": "object", "properties": { @@ -94553,7 +94564,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean" + }, + "index": { + "$ref": "#/components/schemas/_types:IndexName" + }, + "shards_acknowledged": { + "type": "boolean" + } + }, + "required": [ + "acknowledged", + "index", + "shards_acknowledged" + ] } } } @@ -107579,7 +107606,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/migrate._types:MigrateReindex" + "$ref": "#/components/schemas/migrate._types:CreateFrom" } } }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 8d6bd37e5e..1851429ad2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -152933,6 +152933,40 @@ }, "specLocation": "logstash/put_pipeline/LogstashPutPipelineResponse.ts#L22-L24" }, + { + "kind": "interface", + "name": { + "name": "CreateFrom", + "namespace": "migrate._types" + }, + "properties": [ + { + "description": "Mappings overrides to be applied to the destination index (optional)", + "name": "mappings_override", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "TypeMapping", + "namespace": "_types.mapping" + } + } + }, + { + "description": "Settings overrides to be applied to the destination index (optional)", + "name": "settings_override", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexSettings", + "namespace": "indices._types" + } + } + } + ], + "specLocation": "migrate/_types/CreateFrom.ts#L23-L32" + }, { "kind": "interface", "name": { @@ -153053,7 +153087,7 @@ "value": { "kind": "instance_of", "type": { - "name": "MigrateReindex", + "name": "CreateFrom", "namespace": "migrate._types" } } @@ -153101,20 +153135,48 @@ { "kind": "response", "body": { - "kind": "value", - "value": { - "kind": "instance_of", - "type": { - "name": "AcknowledgedResponseBase", - "namespace": "_types" + "kind": "properties", + "properties": [ + { + "name": "acknowledged", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "index", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + } + }, + { + "name": "shards_acknowledged", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } - } + ] }, "name": { "name": "Response", "namespace": "migrate.create_from" }, - "specLocation": "migrate/create_from/MigrateCreateFromResponse.ts#L22-L24" + "specLocation": "migrate/create_from/MigrateCreateFromResponse.ts#L22-L28" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index d951a35b1a..8043ed27bf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13826,6 +13826,11 @@ export interface LogstashPutPipelineRequest extends RequestBase { export type LogstashPutPipelineResponse = boolean +export interface MigrateCreateFrom { + mappings_override?: MappingTypeMapping + settings_override?: IndicesIndexSettings +} + export interface MigrateIndex { index: Indices } @@ -13844,10 +13849,14 @@ export type MigrateCancelReindexResponse = AcknowledgedResponseBase export interface MigrateCreateFromRequest extends RequestBase { source: string dest: string - body?: MigrateMigrateReindex + body?: MigrateCreateFrom } -export type MigrateCreateFromResponse = AcknowledgedResponseBase +export interface MigrateCreateFromResponse { + acknowledged: boolean + index: IndexName + shards_acknowledged: boolean +} export interface MigrateGetReindexStatusRequest extends RequestBase { index: Indices diff --git a/specification/migrate/create_from/MigrateCreateFromRequest.ts b/specification/migrate/create_from/MigrateCreateFromRequest.ts index 2608de88a0..691f086a31 100644 --- a/specification/migrate/create_from/MigrateCreateFromRequest.ts +++ b/specification/migrate/create_from/MigrateCreateFromRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' -import { MigrateReindex } from '../_types/MigrateReindex' +import { CreateFrom } from '../_types/CreateFrom' /** * This API creates a destination from a source index. It copies the mappings and settings from the source index while allowing request settings and mappings to override the source values. @@ -37,5 +37,5 @@ export interface Request extends RequestBase { dest: string } /** @codegen_name create_from */ - body: MigrateReindex + body: CreateFrom } diff --git a/specification/migrate/create_from/MigrateCreateFromResponse.ts b/specification/migrate/create_from/MigrateCreateFromResponse.ts index 7374da4a4c..209a7ccdb4 100644 --- a/specification/migrate/create_from/MigrateCreateFromResponse.ts +++ b/specification/migrate/create_from/MigrateCreateFromResponse.ts @@ -17,8 +17,12 @@ * under the License. */ -import { AcknowledgedResponseBase } from '@_types/Base' +import { IndexName } from '@_types/common' export class Response { - body: AcknowledgedResponseBase + body: { + acknowledged: boolean + index: IndexName + shards_acknowledged: boolean + } }