@@ -37,12 +37,12 @@ import * as T from '../types'
3737import * as TB from '../typesWithBodyKey'
3838interface That { transport : Transport }
3939
40- export default async function FieldCapsApi ( this : That , params : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . FieldCapsResponse >
41- export default async function FieldCapsApi ( this : That , params : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . FieldCapsResponse , unknown > >
42- export default async function FieldCapsApi ( this : That , params : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptions ) : Promise < T . FieldCapsResponse >
43- export default async function FieldCapsApi ( this : That , params : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptions ) : Promise < any > {
40+ export default async function FieldCapsApi ( this : That , params ? : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . FieldCapsResponse >
41+ export default async function FieldCapsApi ( this : That , params ? : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . FieldCapsResponse , unknown > >
42+ export default async function FieldCapsApi ( this : That , params ? : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptions ) : Promise < T . FieldCapsResponse >
43+ export default async function FieldCapsApi ( this : That , params ? : T . FieldCapsRequest | TB . FieldCapsRequest , options ?: TransportRequestOptions ) : Promise < any > {
4444 const acceptedPath : string [ ] = [ 'index' ]
45- const acceptedBody : string [ ] = [ 'index_filter' , 'runtime_mappings' ]
45+ const acceptedBody : string [ ] = [ 'fields' , ' index_filter', 'runtime_mappings' ]
4646 const querystring : Record < string , any > = { }
4747 // @ts -expect-error
4848 const userBody : any = params ?. body
@@ -53,6 +53,7 @@ export default async function FieldCapsApi (this: That, params: T.FieldCapsReque
5353 body = userBody != null ? { ...userBody } : undefined
5454 }
5555
56+ params = params ?? { }
5657 for ( const key in params ) {
5758 if ( acceptedBody . includes ( key ) ) {
5859 body = body ?? { }
0 commit comments