facturacionelectronicapy-setapi
Version:
Módulo NodeJs para enviar el Archivo XML Firmado para la Facturación Electrónica en Paraguay a la SET
69 lines (68 loc) • 2.4 kB
TypeScript
import { SetApiConfig } from "./type.interface.";
declare class SET {
private cert;
private key;
/**
* Crea los certificados para authenticarse a la SET.
* @param certificado
* @param passphase
* /
/*auth(env: "test" | "prod", certificado: any, passphase: string) {
pkcs12.openFile(certificado, passphase);
this.env = env;
this.cert = pkcs12.getCertificate();
this.key = pkcs12.getPrivateKey();
}
*/
abrir(certificado: any, passphase: string): void;
/**
* Consulta un Documento Electronico por CDC
*
* @param cdc
* @returns
*/
consulta(id: number, cdc: string, env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
/**
* Consulta un lote en la SET
* @param id
* @param numeroProtocolo
* @returns
*/
consultaLote2222(id: number, numeroProtocolo: number, env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
/**
* Consulta un lote en la SET
* @param id
* @param numeroProtocolo
* @returns
*/
consultaLote(id: number, numeroProtocolo: number, env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
/**
*
* @param xml
* @returns
*/
consultaRUC(id: number, ruc: string, env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
/**
* Envia el Documento electronico a la SET
* https://sifen.set.gov.py/de/ws/sync/recibe.wsdl
* @param xml
* @returns
*/
recibe(id: number, xml: string, env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
/**
* Envia el Documento electronico por lote a la SET
* https://sifen.set.gov.py/de/ws/async/recibe-lote.wsdl
* @param xmls
* @returns
*/
recibeLote(id: number, xmls: string[], env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
/**
*
* @param xml
* @returns
*/
evento(id: number, xml: string, env: "test" | "prod", certificado: any, passphase: any, config?: SetApiConfig): Promise<any>;
private normalizeXML;
}
declare const _default: SET;
export default _default;