import type { ElasticsearchClient } from 'src/core/server' ; export const getManagedRepositoryName = async ( client ) : Promise < string | undefined > => { try { const { body : { persistent , transient , defaults } , } = await client . cluster . getSettings ( { filter_path : '*.*managed_repository' , flat_settings : true , include_defaults : true , } ) ; const { 'cluster.metadata.managed_repository' : managedRepositoryName = undefined } = { ... defaults , ... persistent , ... transient , } ; return managedRepositoryName ; } catch ( e ) { return ; } } ;