/** * XML building and parsing utilities for the Spok SmartSuite TCP API. * Uses regex-based parsing to avoid external XML dependencies. */ import { SpokResponse } from "./types"; /** XML namespace for Amcom request elements. */ export declare const REQUEST_NS = "http://xml.amcomsoft.com/api/request"; /** * Escape special XML characters. */ export declare function escapeXml(str: string): string; /** * Unescape XML entities. */ export declare function unescapeXml(str: string): string; /** * Build an Amcom XML request body. * @param method - Amcom API method name (e.g. "GetListingInfo"). * @param params - Optional parameter name-value pairs. * @returns XML request string. */ export declare function buildRequestXml(method: string, params?: Record): string; /** * Parse child elements of an XML fragment into an object. */ export declare function parseChildrenToObject(xml: string): Record; /** * Parse an XML string into a plain JS object. * Handles nested elements, repeating elements (converted to arrays), and text content. */ export declare function parseXmlToObject(xml: string): Record | string | null; /** * Parse an Amcom procedureResult XML response. * Handles success/failure branches, embedded xml_result, and self-closing null parameters. */ export declare function parseResponseXml(xmlText: string): SpokResponse;