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 class DanglingIndices { transport : Transport ; constructor ( transport ) { this . transport = transport ; } async deleteDanglingIndex ( this , params , options ? ) ; async deleteDanglingIndex ( this , params , options ? ) ; async deleteDanglingIndex ( this , params , options ? ) ; async deleteDanglingIndex ( this , params , options ? ) { const acceptedPath = [ 'index_uuid' ] ; 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 = 'DELETE' ; const path = `/_dangling/${ encodeURIComponent ( params . index_uuid . toString ( ) ) }` ; return await this . transport . request ( { path , method , querystring , body } , options ) ; } async importDanglingIndex ( this , params , options ? ) ; async importDanglingIndex ( this , params , options ? ) ; async importDanglingIndex ( this , params , options ? ) ; async importDanglingIndex ( this , params , options ? ) { const acceptedPath = [ 'index_uuid' ] ; 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 = 'POST' ; const path = `/_dangling/${ encodeURIComponent ( params . index_uuid . toString ( ) ) }` ; return await this . transport . request ( { path , method , querystring , body } , options ) ; } async listDanglingIndices ( this , params ? , options ? ) ; async listDanglingIndices ( this , params ? , options ? ) ; async listDanglingIndices ( this , params ? , options ? ) ; async listDanglingIndices ( this , params ? , options ? ) { const acceptedPath = [ ] ; const querystring = { } ; const body = undefined ; params = params ?? { } ; for ( const key in params ) { if ( acceptedPath . includes ( key ) ) { continue ; } else if ( key !== 'body' ) { querystring [ key ] = params [ key ] ; } } const method = 'GET' ; const path = '/_dangling' ; return await this . transport . request ( { path , method , querystring , body } , options ) ; } }