export declare enum NoReceivedCode { 'Error de especificación' = "1", 'Error de Firma Digital' = "2", 'Envío duplicado' = "3", 'RNC Comprador no corresponde' = "4" } export declare enum ReceivedStatus { 'e-CF Recibido' = "0", 'e-CF No Recibido' = "1" } /** * We should not receive documents Encf */ export declare const excludedEncfType: string[]; export declare const validEncfType: string[]; /** * Mathod to transform, validate and respond for the sender-receiver communication */ export declare class SenderReceiver { /** * @deprecated This method is deprecated and will be removed in future versions. * Use `parseMultipart` and `newParseBody` instead. * @param xmlString * @returns */ parseBody: (xmlString: string) => Document; /** * Parse multipart/form-data to get the XML content * When a new file is uploaded, the file's content is available as multipart * @param body * @param contentType * @returns */ parseMultipart: (body: string, contentType: string, isBased64Encoded?: boolean) => Promise<{ filename: string; xmlContent: string; }>; /** * Pase XML Response to XML DOM * @param xmlString * @returns */ simpleXMLParseBody: (xmlString: string) => Document; /** * Create an XML response for the receiver endpont * @param xml * @param receptorRNC * @param status * @param code * @returns NOT Signed Received format XML */ getECFDataFromXML: (xml: string | Document, receptorRNC: string, status: ReceivedStatus, code?: NoReceivedCode) => string; }