From 87b9bc1c5bcbc49f253c92d5432514c8a319d3f0 Mon Sep 17 00:00:00 2001 From: margaretjgu Date: Wed, 15 Apr 2026 13:46:39 -0400 Subject: [PATCH 1/2] autogen --- src/es/apis/bulk.ts | 27 +++++++++++++++------------ src/es/apis/msearch.ts | 27 +++++++++++++++------------ src/es/apis/msearch_template.ts | 27 +++++++++++++++------------ 3 files changed, 45 insertions(+), 36 deletions(-) diff --git a/src/es/apis/bulk.ts b/src/es/apis/bulk.ts index d3869026..2f131bbb 100644 --- a/src/es/apis/bulk.ts +++ b/src/es/apis/bulk.ts @@ -1,24 +1,27 @@ -/* +/** * Copyright Elasticsearch B.V. and contributors * SPDX-License-Identifier: Apache-2.0 - */ - -/* + * * This file was auto generated by elastic/elastic-client-generator-js. * DO NOT MODIFY IT BY HAND. Instead, modify the source open API file, * and elastic/elastic-client-generator-js to regenerate this file again. */ +import { z } from 'zod' import { BulkRequest } from './schemas/_global.ts' import type { EsApiDefinition } from '../types.ts' +const BulkRequestPassthrough = BulkRequest.extend({ + operations: z.array(z.any()).optional().meta({ found_in: 'body' }) +}) + export const bulkApis: EsApiDefinition[] = [ - { - name: 'bulk', - description: 'Bulk index or delete documents.', - method: 'POST', - path: '/{index}/_bulk', - input: BulkRequest, - bodyFormat: 'ndjson' - } + { + name: "bulk", + description: "Bulk index or delete documents.", + method: "POST", + path: "/{index}/_bulk", + input: BulkRequestPassthrough, + bodyFormat: 'ndjson', + }, ] diff --git a/src/es/apis/msearch.ts b/src/es/apis/msearch.ts index 356a6508..9106a0c2 100644 --- a/src/es/apis/msearch.ts +++ b/src/es/apis/msearch.ts @@ -1,24 +1,27 @@ -/* +/** * Copyright Elasticsearch B.V. and contributors * SPDX-License-Identifier: Apache-2.0 - */ - -/* + * * This file was auto generated by elastic/elastic-client-generator-js. * DO NOT MODIFY IT BY HAND. Instead, modify the source open API file, * and elastic/elastic-client-generator-js to regenerate this file again. */ +import { z } from 'zod' import { MsearchRequest } from './schemas/_global.ts' import type { EsApiDefinition } from '../types.ts' +const MsearchRequestPassthrough = MsearchRequest.extend({ + searches: z.array(z.any()).optional().meta({ found_in: 'body' }) +}) + export const msearchApis: EsApiDefinition[] = [ - { - name: 'msearch', - description: 'Run multiple searches.', - method: 'GET', - path: '/{index}/_msearch', - input: MsearchRequest, - bodyFormat: 'ndjson' - } + { + name: "msearch", + description: "Run multiple searches.", + method: "GET", + path: "/{index}/_msearch", + input: MsearchRequestPassthrough, + bodyFormat: 'ndjson', + }, ] diff --git a/src/es/apis/msearch_template.ts b/src/es/apis/msearch_template.ts index fcf2dada..8b6025e8 100644 --- a/src/es/apis/msearch_template.ts +++ b/src/es/apis/msearch_template.ts @@ -1,24 +1,27 @@ -/* +/** * Copyright Elasticsearch B.V. and contributors * SPDX-License-Identifier: Apache-2.0 - */ - -/* + * * This file was auto generated by elastic/elastic-client-generator-js. * DO NOT MODIFY IT BY HAND. Instead, modify the source open API file, * and elastic/elastic-client-generator-js to regenerate this file again. */ +import { z } from 'zod' import { MsearchTemplateRequest } from './schemas/_global.ts' import type { EsApiDefinition } from '../types.ts' +const MsearchTemplateRequestPassthrough = MsearchTemplateRequest.extend({ + search_templates: z.array(z.any()).optional().meta({ found_in: 'body' }) +}) + export const msearchTemplateApis: EsApiDefinition[] = [ - { - name: 'msearch-template', - description: 'Run multiple templated searches.', - method: 'GET', - path: '/{index}/_msearch/template', - input: MsearchTemplateRequest, - bodyFormat: 'ndjson' - } + { + name: "msearch-template", + description: "Run multiple templated searches.", + method: "GET", + path: "/{index}/_msearch/template", + input: MsearchTemplateRequestPassthrough, + bodyFormat: 'ndjson', + }, ] From 1b952bc158bf7e1ed3178f14ea9e89474e6552a0 Mon Sep 17 00:00:00 2001 From: margaretjgu Date: Wed, 15 Apr 2026 13:52:32 -0400 Subject: [PATCH 2/2] fix license header --- src/es/apis/bulk.ts | 10 ++++++---- src/es/apis/msearch.ts | 10 ++++++---- src/es/apis/msearch_template.ts | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/es/apis/bulk.ts b/src/es/apis/bulk.ts index 2f131bbb..7201bc3b 100644 --- a/src/es/apis/bulk.ts +++ b/src/es/apis/bulk.ts @@ -1,9 +1,11 @@ -/** +/* * Copyright Elasticsearch B.V. and contributors * SPDX-License-Identifier: Apache-2.0 - * - * This file was auto generated by elastic/elastic-client-generator-js. - * DO NOT MODIFY IT BY HAND. Instead, modify the source open API file, + */ + +/* + * This file was automatically generated by elastic/elastic-client-generator-js. + * DO NOT MODIFY IT BY HAND. Instead, modify the source open api file, * and elastic/elastic-client-generator-js to regenerate this file again. */ diff --git a/src/es/apis/msearch.ts b/src/es/apis/msearch.ts index 9106a0c2..d4d5c87b 100644 --- a/src/es/apis/msearch.ts +++ b/src/es/apis/msearch.ts @@ -1,9 +1,11 @@ -/** +/* * Copyright Elasticsearch B.V. and contributors * SPDX-License-Identifier: Apache-2.0 - * - * This file was auto generated by elastic/elastic-client-generator-js. - * DO NOT MODIFY IT BY HAND. Instead, modify the source open API file, + */ + +/* + * This file was automatically generated by elastic/elastic-client-generator-js. + * DO NOT MODIFY IT BY HAND. Instead, modify the source open api file, * and elastic/elastic-client-generator-js to regenerate this file again. */ diff --git a/src/es/apis/msearch_template.ts b/src/es/apis/msearch_template.ts index 8b6025e8..b864aef6 100644 --- a/src/es/apis/msearch_template.ts +++ b/src/es/apis/msearch_template.ts @@ -1,9 +1,11 @@ -/** +/* * Copyright Elasticsearch B.V. and contributors * SPDX-License-Identifier: Apache-2.0 - * - * This file was auto generated by elastic/elastic-client-generator-js. - * DO NOT MODIFY IT BY HAND. Instead, modify the source open API file, + */ + +/* + * This file was automatically generated by elastic/elastic-client-generator-js. + * DO NOT MODIFY IT BY HAND. Instead, modify the source open api file, * and elastic/elastic-client-generator-js to regenerate this file again. */