import { parseStringPromise } from 'xml2js'; export function parseXMLString(xmlString: string): Promise { return parseStringPromise( xmlString, { ignoreAttrs: true, mergeAttrs: true, explicitArray: false, } ); } export function redactAuthorization(headers: Record): Record { const redactedHeaders = { ...headers }; if (redactedHeaders['Authorization']) { redactedHeaders['Authorization'] = '[REDACTED]'; } return redactedHeaders; }