@@ -37,12 +37,12 @@ import * as T from '../types'
37
37
import * as TB from '../typesWithBodyKey'
38
38
interface That { transport : Transport }
39
39
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 > {
44
44
const acceptedPath : string [ ] = [ 'index' ]
45
- const acceptedBody : string [ ] = [ 'index_filter' , 'runtime_mappings' ]
45
+ const acceptedBody : string [ ] = [ 'fields' , ' index_filter', 'runtime_mappings' ]
46
46
const querystring : Record < string , any > = { }
47
47
// @ts -expect-error
48
48
const userBody : any = params ?. body
@@ -53,6 +53,7 @@ export default async function FieldCapsApi (this: That, params: T.FieldCapsReque
53
53
body = userBody != null ? { ...userBody } : undefined
54
54
}
55
55
56
+ params = params ?? { }
56
57
for ( const key in params ) {
57
58
if ( acceptedBody . includes ( key ) ) {
58
59
body = body ?? { }
0 commit comments