diff --git a/src/es/apis/bulk.ts b/src/es/apis/bulk.ts index d3869026..7201bc3b 100644 --- a/src/es/apis/bulk.ts +++ b/src/es/apis/bulk.ts @@ -4,21 +4,26 @@ */ /* - * 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. */ +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..d4d5c87b 100644 --- a/src/es/apis/msearch.ts +++ b/src/es/apis/msearch.ts @@ -4,21 +4,26 @@ */ /* - * 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. */ +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..b864aef6 100644 --- a/src/es/apis/msearch_template.ts +++ b/src/es/apis/msearch_template.ts @@ -4,21 +4,26 @@ */ /* - * 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. */ +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', + }, ]