UNPKG

@cumulus/cmrjs

Version:
26 lines 1.28 kB
/** * Updates an ECHO10 metadata XML object with a new GranuleUR and ProducerGranuleId. * * This function: * - Validates that the input is a minimally valid ECHO10 metadata object. * - Performs a deep clone to avoid mutating the original input. * - Sets the new `GranuleUR` and `ProducerGranuleId` values accordingly. * * @param params * @param params.xml - The parsed XML object (e.g., from xml2js) representing ECHO10 metadata. * @param params.granuleUr - The new GranuleUR value to apply to the metadata. * @param params.producerGranuleId - The original identifier value to be set as ProducerGranuleId. * @param params.excludeDataGranule - Whether to add or update the DataGranule node in the metadata * @returns A deep-cloned and updated copy of the original ECHO10 metadata object. * @throws If the input object does not conform to the expected ECHO10 structure. */ export declare function updateEcho10XMLGranuleUrAndGranuleIdentifier({ xml, // The parsed XML object (e.g., from xml2js) granuleUr, // The new GranuleUR value producerGranuleId, // The original identifier to store excludeDataGranule, }: { xml: unknown; granuleUr: string; producerGranuleId: string; excludeDataGranule?: boolean; }): any; //# sourceMappingURL=echo10Modifiers.d.ts.map