import { SavedObjectUnsanitizedDoc , SavedObjectSanitizedDoc } from 'opensearch-dashboards/server' ; export const migrations = { '7.9.0' : ( doc ) : SavedObjectSanitizedDoc < any > => ( { ... doc , ... ( doc . attributes && { attributes : Object . keys ( doc . attributes ) . reduce ( ( acc , key ) => key . startsWith ( 'siem:' ) ? { ... acc , [ key . replace ( 'siem' , 'securitySolution' ) ] : doc . attributes [ key ] , } : { ... acc , [ key ] : doc . attributes [ key ] , } , { } ) , } ) , references : doc . references || [ ] , } ) , } ;