import { Client } from 'elasticsearch' ; import { ToolingLog , OsdClient } from '@osd/dev-utils' ; import { migrateOpenSearchDashboardsIndex , deleteOpenSearchDashboardsIndices , createStats , } from '../lib' ; export async function emptyOpenSearchDashboardsIndexAction ( { client , log , osdClient , } ) { const stats = createStats ( 'emptyOpenSearchDashboardsIndex' , log ) ; await deleteOpenSearchDashboardsIndices ( { client , stats , log } ) ; await migrateOpenSearchDashboardsIndex ( { client , osdClient } ) ; return stats ; }