import { v4 as uuidv4 } from 'uuid' ; import { SavedObject } from '../types' ; param objects export const regenerateIds = ( objects ) => { const importIdMap = objects . reduce ( ( acc , object ) => { return acc . set ( `${ object . type }:${ object . id }` , { id : uuidv4 ( ) , omitOriginId : true } ) ; } , new Map < string , { id : string ; omitOriginId ? : boolean ; } > ( ) ) ; return importIdMap ; } ;