import { Transport , TransportRequestOptions , TransportRequestOptionsWithMeta , TransportRequestOptionsWithOutMeta , TransportResult } from '@elastic/transport' ; import * as T from '../types' ; import * as TB from '../typesWithBodyKey' ; interface That { transport : Transport ; } export default async function ExistsSourceApi ( this , params , options ? ) ; export default async function ExistsSourceApi ( this , params , options ? ) ; export default async function ExistsSourceApi ( this , params , options ? ) ; export default async function ExistsSourceApi ( this , params , options ? ) { const acceptedPath = [ 'id' , 'index' ] ; const querystring = { } ; const body = undefined ; for ( const key in params ) { if ( acceptedPath . includes ( key ) ) { continue ; } else if ( key !== 'body' ) { querystring [ key ] = params [ key ] ; } } const method = 'HEAD' ; const path = `/${ encodeURIComponent ( params . index . toString ( ) ) }/_source/${ encodeURIComponent ( params . id . toString ( ) ) }` ; return await this . transport . request ( { path , method , querystring , body } , options ) ; }