@arcasdk/core 0.3.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/application/dto/electronic-billing.dto.d.ts +0 -5
- package/lib/application/dto/index.d.ts +0 -4
- package/lib/application/dto/index.js +0 -4
- package/lib/application/dto/index.js.map +1 -1
- package/lib/application/dto/register.dto.d.ts +0 -60
- package/lib/application/dto/register.dto.js +0 -5
- package/lib/application/dto/register.dto.js.map +1 -1
- package/lib/application/index.d.ts +0 -1
- package/lib/application/index.js +0 -1
- package/lib/application/index.js.map +1 -1
- package/lib/application/ports/authentication/authentication-repository.port.d.ts +0 -5
- package/lib/application/ports/authentication/index.d.ts +0 -4
- package/lib/application/ports/authentication/index.js +0 -4
- package/lib/application/ports/authentication/index.js.map +1 -1
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.d.ts +0 -6
- package/lib/application/ports/electronic-billing/index.d.ts +0 -4
- package/lib/application/ports/electronic-billing/index.js +0 -4
- package/lib/application/ports/electronic-billing/index.js.map +1 -1
- package/lib/application/ports/fecred/fecred-repository.port.d.ts +118 -0
- package/lib/application/ports/fecred/fecred-repository.port.js +3 -0
- package/lib/application/ports/fecred/fecred-repository.port.js.map +1 -0
- package/lib/application/ports/fecred/index.d.ts +1 -0
- package/lib/application/ports/fecred/index.js +18 -0
- package/lib/application/ports/fecred/index.js.map +1 -0
- package/lib/application/ports/fex/fex-repository.port.d.ts +116 -0
- package/lib/application/ports/fex/fex-repository.port.js +3 -0
- package/lib/application/ports/fex/fex-repository.port.js.map +1 -0
- package/lib/application/ports/fex/index.d.ts +1 -0
- package/lib/application/ports/fex/index.js +18 -0
- package/lib/application/ports/fex/index.js.map +1 -0
- package/lib/application/ports/generic/generic-repository.port.d.ts +3 -6
- package/lib/application/ports/index.d.ts +2 -4
- package/lib/application/ports/index.js +2 -4
- package/lib/application/ports/index.js.map +1 -1
- package/lib/application/ports/register/index.d.ts +0 -4
- package/lib/application/ports/register/index.js +0 -4
- package/lib/application/ports/register/index.js.map +1 -1
- package/lib/application/ports/register/register-repository.ports.d.ts +0 -4
- package/lib/application/services/electronic-billing.service.d.ts +0 -5
- package/lib/application/services/electronic-billing.service.js +0 -2
- package/lib/application/services/electronic-billing.service.js.map +1 -1
- package/lib/application/services/generic.service.d.ts +3 -6
- package/lib/application/services/generic.service.js +1 -1
- package/lib/application/services/generic.service.js.map +1 -1
- package/lib/application/services/index.d.ts +2 -4
- package/lib/application/services/index.js +2 -4
- package/lib/application/services/index.js.map +1 -1
- package/lib/application/services/register-inscription-proof.service.d.ts +0 -5
- package/lib/application/services/register-inscription-proof.service.js.map +1 -1
- package/lib/application/services/register-scope-five.service.d.ts +0 -5
- package/lib/application/services/register-scope-five.service.js.map +1 -1
- package/lib/application/services/register-scope-four.service.d.ts +0 -5
- package/lib/application/services/register-scope-four.service.js +0 -5
- package/lib/application/services/register-scope-four.service.js.map +1 -1
- package/lib/application/services/register-scope-ten.service.d.ts +0 -5
- package/lib/application/services/register-scope-ten.service.js.map +1 -1
- package/lib/application/services/register-scope-thirteen.service.d.ts +0 -5
- package/lib/application/services/register-scope-thirteen.service.js.map +1 -1
- package/lib/application/services/wsfecred.service.d.ts +46 -0
- package/lib/application/services/wsfecred.service.js +173 -0
- package/lib/application/services/wsfecred.service.js.map +1 -0
- package/lib/application/services/wsfex.service.d.ts +44 -0
- package/lib/application/services/wsfex.service.js +152 -0
- package/lib/application/services/wsfex.service.js.map +1 -0
- package/lib/application/types/auth.types.d.ts +0 -4
- package/lib/application/types/auth.types.js +0 -4
- package/lib/application/types/auth.types.js.map +1 -1
- package/lib/application/types/context.types.d.ts +6 -10
- package/lib/application/types/index.d.ts +0 -4
- package/lib/application/types/index.js +0 -4
- package/lib/application/types/index.js.map +1 -1
- package/lib/application/types/result.types.d.ts +0 -4
- package/lib/application/types/use-case-inputs.types.d.ts +0 -4
- package/lib/application/types/use-case-inputs.types.js +0 -4
- package/lib/application/types/use-case-inputs.types.js.map +1 -1
- package/lib/application/use-cases/authentication/get-auth-params.use-case.d.ts +0 -4
- package/lib/application/use-cases/authentication/get-auth-params.use-case.js.map +1 -1
- package/lib/application/use-cases/authentication/index.d.ts +0 -4
- package/lib/application/use-cases/authentication/index.js +0 -4
- package/lib/application/use-cases/authentication/index.js.map +1 -1
- package/lib/application/use-cases/authentication/login.use-case.d.ts +0 -5
- package/lib/application/use-cases/authentication/login.use-case.js.map +1 -1
- package/lib/application/use-cases/authentication/request-login.use-case.d.ts +0 -4
- package/lib/application/use-cases/authentication/request-login.use-case.js.map +1 -1
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js +0 -4
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js.map +1 -1
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js +0 -2
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js.map +1 -1
- package/lib/application/use-cases/index.d.ts +2 -0
- package/lib/application/use-cases/index.js +2 -0
- package/lib/application/use-cases/index.js.map +1 -1
- package/lib/application/use-cases/register/get-register-server-status.use-case.d.ts +0 -4
- package/lib/application/use-cases/register/get-register-server-status.use-case.js.map +1 -1
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.d.ts +0 -4
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js.map +1 -1
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.d.ts +0 -4
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.js.map +1 -1
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.d.ts +0 -4
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.js.map +1 -1
- package/lib/application/use-cases/wsfecred/aceptar-fecred.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/aceptar-fecred.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/aceptar-fecred.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-comprobantes.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-comprobantes.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-comprobantes.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-cta-cte.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-cta-cte.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-cta-cte.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-ctas-ctes.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-ctas-ctes.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-ctas-ctes.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-cuentas-en-agt-dpto-cltv.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-cuentas-en-agt-dpto-cltv.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-cuentas-en-agt-dpto-cltv.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-facturas-agt-dpto-cltv.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-facturas-agt-dpto-cltv.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-facturas-agt-dpto-cltv.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-historial-estados-comprobante.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-historial-estados-comprobante.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-historial-estados-comprobante.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-historial-estados-cta-cte.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-historial-estados-cta-cte.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-historial-estados-cta-cte.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-monto-obligado-recepcion.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-monto-obligado-recepcion.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-monto-obligado-recepcion.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-obligado-recepcion.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-obligado-recepcion.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-obligado-recepcion.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-ajustes-operacion.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-ajustes-operacion.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-ajustes-operacion.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-formas-cancelacion.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-formas-cancelacion.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-formas-cancelacion.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-motivos-rechazo.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-motivos-rechazo.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-motivos-rechazo.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-retenciones.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-retenciones.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/consultar-tipos-retenciones.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/index.d.ts +20 -0
- package/lib/application/use-cases/wsfecred/index.js +37 -0
- package/lib/application/use-cases/wsfecred/index.js.map +1 -0
- package/lib/application/use-cases/wsfecred/informar-cancelacion-total-fecred.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/informar-cancelacion-total-fecred.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/informar-cancelacion-total-fecred.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/informar-factura-agt-dpto-cltv.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/informar-factura-agt-dpto-cltv.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/informar-factura-agt-dpto-cltv.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/modificar-opcion-transferencia.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/modificar-opcion-transferencia.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/modificar-opcion-transferencia.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/obtener-remitos.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/obtener-remitos.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/obtener-remitos.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/rechazar-fecred.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/rechazar-fecred.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/rechazar-fecred.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfecred/rechazar-nota-dc.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfecred/rechazar-nota-dc.use-case.js +24 -0
- package/lib/application/use-cases/wsfecred/rechazar-nota-dc.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/authorize.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/authorize.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/authorize.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/check-permiso.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/check-permiso.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/check-permiso.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/dummy.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/dummy.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/dummy.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-cmp.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-cmp.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-cmp.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-last-cmp.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-last-cmp.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-last-cmp.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-last-id.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-last-id.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-last-id.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-actividades.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-actividades.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-actividades.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-cbte-tipo.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-cbte-tipo.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-cbte-tipo.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-ctz.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-ctz.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-ctz.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-dst-cuit.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-dst-cuit.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-dst-cuit.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-dst-pais.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-dst-pais.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-dst-pais.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-idiomas.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-idiomas.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-idiomas.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-incoterms.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-incoterms.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-incoterms.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-mon-con-cotizacion.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-mon-con-cotizacion.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-mon-con-cotizacion.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-mon.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-mon.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-mon.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-opcionales.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-opcionales.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-opcionales.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-pto-venta.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-pto-venta.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-pto-venta.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-tipo-expo.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-tipo-expo.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-tipo-expo.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/get-param-umed.use-case.d.ts +7 -0
- package/lib/application/use-cases/wsfex/get-param-umed.use-case.js +24 -0
- package/lib/application/use-cases/wsfex/get-param-umed.use-case.js.map +1 -0
- package/lib/application/use-cases/wsfex/index.d.ts +19 -0
- package/lib/application/use-cases/wsfex/index.js +36 -0
- package/lib/application/use-cases/wsfex/index.js.map +1 -0
- package/lib/domain/entities/access-ticket.entity.js +6 -10
- package/lib/domain/entities/access-ticket.entity.js.map +1 -1
- package/lib/domain/entities/index.d.ts +0 -4
- package/lib/domain/entities/index.js +0 -4
- package/lib/domain/entities/index.js.map +1 -1
- package/lib/domain/entities/voucher.entity.d.ts +23 -10
- package/lib/domain/entities/voucher.entity.js +52 -14
- package/lib/domain/entities/voucher.entity.js.map +1 -1
- package/lib/domain/index.d.ts +0 -4
- package/lib/domain/index.js +0 -4
- package/lib/domain/index.js.map +1 -1
- package/lib/domain/types/electronic-billing.types.d.ts +0 -5
- package/lib/domain/types/electronic-billing.types.js +0 -5
- package/lib/domain/types/electronic-billing.types.js.map +1 -1
- package/lib/domain/types/index.d.ts +0 -4
- package/lib/domain/types/index.js +0 -4
- package/lib/domain/types/index.js.map +1 -1
- package/lib/domain/types/voucher.types.d.ts +0 -4
- package/lib/domain/value-objects/cae.vo.d.ts +0 -5
- package/lib/domain/value-objects/cae.vo.js +0 -5
- package/lib/domain/value-objects/cae.vo.js.map +1 -1
- package/lib/domain/value-objects/cuit.vo.d.ts +0 -5
- package/lib/domain/value-objects/cuit.vo.js +0 -5
- package/lib/domain/value-objects/cuit.vo.js.map +1 -1
- package/lib/domain/value-objects/index.d.ts +0 -4
- package/lib/domain/value-objects/index.js +0 -4
- package/lib/domain/value-objects/index.js.map +1 -1
- package/lib/domain/value-objects/voucher-number.vo.d.ts +0 -5
- package/lib/domain/value-objects/voucher-number.vo.js +0 -5
- package/lib/domain/value-objects/voucher-number.vo.js.map +1 -1
- package/lib/index.d.ts +6 -6
- package/lib/index.js +13 -7
- package/lib/index.js.map +1 -1
- package/lib/infrastructure/composition/arca.d.ts +32 -0
- package/lib/infrastructure/composition/arca.js +107 -0
- package/lib/infrastructure/composition/arca.js.map +1 -0
- package/lib/infrastructure/constants/default-config.constants.d.ts +0 -4
- package/lib/infrastructure/constants/default-config.constants.js +0 -4
- package/lib/infrastructure/constants/default-config.constants.js.map +1 -1
- package/lib/infrastructure/constants/index.d.ts +2 -4
- package/lib/infrastructure/constants/index.js +2 -4
- package/lib/infrastructure/constants/index.js.map +1 -1
- package/lib/infrastructure/{outbound/ports/soap/enums → constants}/service-names.enum.d.ts +3 -1
- package/lib/infrastructure/{outbound/ports/soap/enums → constants}/service-names.enum.js +2 -0
- package/lib/infrastructure/constants/service-names.enum.js.map +1 -0
- package/lib/infrastructure/constants/ssl.constants.d.ts +0 -4
- package/lib/infrastructure/constants/ssl.constants.js +0 -4
- package/lib/infrastructure/constants/ssl.constants.js.map +1 -1
- package/lib/infrastructure/constants/time.constants.d.ts +7 -0
- package/lib/infrastructure/constants/time.constants.js +11 -0
- package/lib/infrastructure/constants/time.constants.js.map +1 -0
- package/lib/infrastructure/index.d.ts +0 -4
- package/lib/infrastructure/index.js +0 -4
- package/lib/infrastructure/index.js.map +1 -1
- package/lib/infrastructure/mappers/index.d.ts +1 -0
- package/lib/infrastructure/mappers/index.js +18 -0
- package/lib/infrastructure/mappers/index.js.map +1 -0
- package/lib/infrastructure/{utils → mappers}/soap-to-dto.mapper.d.ts +0 -6
- package/lib/infrastructure/mappers/soap-to-dto.mapper.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/index.d.ts +3 -8
- package/lib/infrastructure/outbound/adapters/index.js +3 -8
- package/lib/infrastructure/outbound/adapters/index.js.map +1 -1
- package/lib/infrastructure/outbound/adapters/{auth → repositories/auth}/auth.repository.d.ts +5 -8
- package/lib/infrastructure/outbound/adapters/{auth → repositories/auth}/auth.repository.js +20 -13
- package/lib/infrastructure/outbound/adapters/repositories/auth/auth.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/auth/index.d.ts +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/auth/index.js +18 -0
- package/lib/infrastructure/outbound/adapters/repositories/auth/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/{electronic-billing → repositories/electronic-billing}/electronic-billing-repository.d.ts +21 -12
- package/lib/infrastructure/outbound/adapters/{electronic-billing → repositories/electronic-billing}/electronic-billing-repository.js +107 -176
- package/lib/infrastructure/outbound/adapters/repositories/electronic-billing/electronic-billing-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/electronic-billing/index.d.ts +1 -0
- package/lib/infrastructure/outbound/adapters/{electronic-billing → repositories/electronic-billing}/index.js +0 -4
- package/lib/infrastructure/outbound/adapters/repositories/electronic-billing/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/fecred/fecred.repository.d.ts +29 -0
- package/lib/infrastructure/outbound/adapters/repositories/fecred/fecred.repository.js +192 -0
- package/lib/infrastructure/outbound/adapters/repositories/fecred/fecred.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/fex/fex.repository.d.ts +28 -0
- package/lib/infrastructure/outbound/adapters/repositories/fex/fex.repository.js +177 -0
- package/lib/infrastructure/outbound/adapters/repositories/fex/fex.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/generic/generic-repository.d.ts +10 -0
- package/lib/infrastructure/outbound/adapters/{generic → repositories/generic}/generic-repository.js +7 -20
- package/lib/infrastructure/outbound/adapters/repositories/generic/generic-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/generic/index.d.ts +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/generic/index.js +18 -0
- package/lib/infrastructure/outbound/adapters/repositories/generic/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/base-batch-register-repository.d.ts +11 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/base-batch-register-repository.js +51 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/base-batch-register-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/base-register-repository.d.ts +24 -0
- package/lib/infrastructure/outbound/adapters/{register/register-scope-ten.repository.js → repositories/register/base-register-repository.js} +37 -35
- package/lib/infrastructure/outbound/adapters/repositories/register/base-register-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/{register → repositories/register}/index.d.ts +0 -4
- package/lib/infrastructure/outbound/adapters/{register → repositories/register}/index.js +0 -4
- package/lib/infrastructure/outbound/adapters/repositories/register/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-inscription-proof.repository.d.ts +15 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-inscription-proof.repository.js +21 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-inscription-proof.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-five.repository.d.ts +15 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-five.repository.js +21 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-five.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-four.repository.d.ts +14 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-four.repository.js +20 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-four.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-ten.repository.d.ts +14 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-ten.repository.js +20 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-ten.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-thirteen.repository.d.ts +16 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-thirteen.repository.js +59 -0
- package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-thirteen.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.d.ts +9 -11
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js +21 -7
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js.map +1 -1
- package/lib/infrastructure/outbound/adapters/soap/engines/index.d.ts +3 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/index.js +8 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/node-security.engine.d.ts +1 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/node-security.engine.js +69 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/node-security.engine.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/soap-engine.factory.d.ts +3 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/soap-engine.factory.js +67 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/soap-engine.factory.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/universal-transport.engine.d.ts +5 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/universal-transport.engine.js +43 -0
- package/lib/infrastructure/outbound/adapters/soap/engines/universal-transport.engine.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client.d.ts +5 -8
- package/lib/infrastructure/outbound/adapters/soap/soap-client.js +38 -33
- package/lib/infrastructure/outbound/adapters/soap/soap-client.js.map +1 -1
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js +6264 -0
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js.map +1 -1
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.d.ts +1 -5
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js.map +1 -1
- package/lib/infrastructure/outbound/adapters/storage/memory-ticket-storage.d.ts +15 -0
- package/lib/infrastructure/outbound/adapters/storage/memory-ticket-storage.js +57 -0
- package/lib/infrastructure/outbound/adapters/storage/memory-ticket-storage.js.map +1 -0
- package/lib/infrastructure/outbound/index.d.ts +1 -6
- package/lib/infrastructure/outbound/index.js +1 -6
- package/lib/infrastructure/outbound/index.js.map +1 -1
- package/lib/infrastructure/outbound/ports/index.d.ts +3 -9
- package/lib/infrastructure/outbound/ports/index.js +3 -9
- package/lib/infrastructure/outbound/ports/index.js.map +1 -1
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.d.ts +11 -1
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js +10 -0
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js.map +1 -1
- package/lib/infrastructure/outbound/ports/soap/enums/index.d.ts +0 -5
- package/lib/infrastructure/outbound/ports/soap/enums/index.js +0 -5
- package/lib/infrastructure/outbound/ports/soap/enums/index.js.map +1 -1
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.d.ts +5 -1
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js +4 -0
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js.map +1 -1
- package/lib/infrastructure/outbound/ports/soap/index.d.ts +0 -4
- package/lib/infrastructure/outbound/ports/soap/index.js +0 -4
- package/lib/infrastructure/outbound/ports/soap/index.js.map +1 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/FECredService/ServiceSoap.d.ts +932 -0
- package/lib/infrastructure/outbound/ports/{logger/logger.port.js → soap/interfaces/FECredService/ServiceSoap.js} +1 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/FECredService/ServiceSoap.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap.d.ts +687 -0
- package/lib/infrastructure/outbound/ports/{logger/logger.types.js → soap/interfaces/FEXService/ServiceSoap.js} +1 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap12.d.ts +687 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap12.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap12.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.d.ts +16 -8
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.d.ts +16 -8
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.d.ts +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.js +4 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.js.map +1 -1
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.d.ts +4 -9
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.d.ts +0 -4
- package/lib/infrastructure/{outbound/ports/auth → types}/auth-repository.types.d.ts +3 -7
- package/lib/infrastructure/types/auth-repository.types.js.map +1 -0
- package/lib/infrastructure/types/index.d.ts +5 -4
- package/lib/infrastructure/types/index.js +5 -4
- package/lib/infrastructure/types/index.js.map +1 -1
- package/lib/infrastructure/types/soap-client.types.d.ts +21 -0
- package/lib/infrastructure/types/soap-client.types.js +3 -0
- package/lib/infrastructure/types/soap-client.types.js.map +1 -0
- package/lib/infrastructure/types/soap-engine.types.d.ts +19 -0
- package/lib/infrastructure/types/soap-engine.types.js +3 -0
- package/lib/infrastructure/types/soap-engine.types.js.map +1 -0
- package/lib/infrastructure/{outbound/ports/soap → types}/soap-repository.types.d.ts +11 -11
- package/lib/infrastructure/types/soap-repository.types.js.map +1 -0
- package/lib/infrastructure/types/soap.types.d.ts +9 -27
- package/lib/infrastructure/{outbound/ports/storage → types}/ticket-storage.types.d.ts +0 -4
- package/lib/infrastructure/types/ticket-storage.types.js.map +1 -0
- package/lib/infrastructure/utils/afip-errors.d.ts +1 -0
- package/lib/infrastructure/utils/afip-errors.js +11 -0
- package/lib/infrastructure/utils/afip-errors.js.map +1 -0
- package/lib/infrastructure/utils/crypt-data.js +1 -1
- package/lib/infrastructure/utils/crypt-data.js.map +1 -1
- package/lib/infrastructure/utils/datetime-ref.d.ts +20 -0
- package/lib/infrastructure/utils/datetime-ref.js +41 -0
- package/lib/infrastructure/utils/datetime-ref.js.map +1 -0
- package/lib/infrastructure/utils/index.d.ts +2 -6
- package/lib/infrastructure/utils/index.js +2 -6
- package/lib/infrastructure/utils/index.js.map +1 -1
- package/lib/infrastructure/utils/soap-runtime.d.ts +9 -0
- package/lib/infrastructure/utils/soap-runtime.js +17 -0
- package/lib/infrastructure/utils/soap-runtime.js.map +1 -0
- package/package.json +15 -17
- package/lib/application/config/env.d.ts +0 -6
- package/lib/application/config/env.js +0 -14
- package/lib/application/config/env.js.map +0 -1
- package/lib/application/config/index.d.ts +0 -6
- package/lib/application/config/index.js +0 -15
- package/lib/application/config/index.js.map +0 -1
- package/lib/infrastructure/inbound/adapters/arca.d.ts +0 -26
- package/lib/infrastructure/inbound/adapters/arca.js +0 -97
- package/lib/infrastructure/inbound/adapters/arca.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.d.ts +0 -68
- package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js +0 -128
- package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/auth/auth.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/electronic-billing/index.d.ts +0 -5
- package/lib/infrastructure/outbound/adapters/electronic-billing/index.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/enums.d.ts +0 -43
- package/lib/infrastructure/outbound/adapters/enums.js +0 -49
- package/lib/infrastructure/outbound/adapters/enums.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/generic/generic-repository.d.ts +0 -13
- package/lib/infrastructure/outbound/adapters/generic/generic-repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/logger/winston-logger.d.ts +0 -14
- package/lib/infrastructure/outbound/adapters/logger/winston-logger.js +0 -24
- package/lib/infrastructure/outbound/adapters/logger/winston-logger.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/index.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.d.ts +0 -18
- package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js +0 -143
- package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.d.ts +0 -14
- package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js +0 -136
- package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.d.ts +0 -12
- package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js +0 -103
- package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.d.ts +0 -12
- package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.d.ts +0 -13
- package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js +0 -133
- package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.d.ts +0 -20
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js +0 -55
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js.map +0 -1
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js.map +0 -1
- package/lib/infrastructure/outbound/ports/logger/logger.port.d.ts +0 -31
- package/lib/infrastructure/outbound/ports/logger/logger.port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/logger/logger.types.d.ts +0 -7
- package/lib/infrastructure/outbound/ports/logger/logger.types.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js.map +0 -1
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js.map +0 -1
- package/lib/infrastructure/utils/env.d.ts +0 -10
- package/lib/infrastructure/utils/env.js +0 -32
- package/lib/infrastructure/utils/env.js.map +0 -1
- package/lib/infrastructure/utils/logger.d.ts +0 -4
- package/lib/infrastructure/utils/logger.js +0 -21
- package/lib/infrastructure/utils/logger.js.map +0 -1
- package/lib/infrastructure/utils/soap-to-dto.mapper.js.map +0 -1
- /package/lib/infrastructure/{utils → mappers}/soap-to-dto.mapper.js +0 -0
- /package/lib/infrastructure/{outbound/ports/auth → types}/auth-repository.types.js +0 -0
- /package/lib/infrastructure/{outbound/ports/soap → types}/soap-repository.types.js +0 -0
- /package/lib/infrastructure/{outbound/ports/storage → types}/ticket-storage.types.js +0 -0
|
@@ -10,13 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AuthRepository = void 0;
|
|
13
|
-
const access_ticket_entity_1 = require("
|
|
14
|
-
const parser_1 = require("
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
13
|
+
const access_ticket_entity_1 = require("../../../../../domain/entities/access-ticket.entity");
|
|
14
|
+
const parser_1 = require("../../../../utils/parser");
|
|
15
|
+
const datetime_ref_1 = require("../../../../utils/datetime-ref");
|
|
16
|
+
const crypt_data_1 = require("../../../../utils/crypt-data");
|
|
17
|
+
const wsdl_path_enum_1 = require("../../../../outbound/ports/soap/enums/wsdl-path.enum");
|
|
18
|
+
const endpoints_enum_1 = require("../../../../outbound/ports/soap/enums/endpoints.enum");
|
|
19
|
+
const soap_client_1 = require("../../soap/soap-client");
|
|
20
|
+
const constants_1 = require("../../../../constants");
|
|
20
21
|
class AuthRepository {
|
|
21
22
|
constructor(config) {
|
|
22
23
|
var _a, _b, _c, _d;
|
|
@@ -84,8 +85,8 @@ class AuthRepository {
|
|
|
84
85
|
const signedTRA = this.signTRA(yield parser_1.Parser.jsonToXml(this.getTRA(serviceName)));
|
|
85
86
|
const client = yield this.createAuthClient();
|
|
86
87
|
const [{ loginCmsReturn }] = yield this.soapClient.call(client, "loginCmsAsync", { in0: signedTRA });
|
|
87
|
-
const
|
|
88
|
-
|
|
88
|
+
const loginPayload = yield this.parseLoginTicketResponse(loginCmsReturn);
|
|
89
|
+
const ticket = access_ticket_entity_1.AccessTicket.create(loginPayload);
|
|
89
90
|
if (!this.handleTicket && this.ticketStorage) {
|
|
90
91
|
yield this.ticketStorage.save(ticket, serviceName);
|
|
91
92
|
}
|
|
@@ -107,21 +108,27 @@ class AuthRepository {
|
|
|
107
108
|
* @returns TRA JSON
|
|
108
109
|
*/
|
|
109
110
|
getTRA(serviceName) {
|
|
110
|
-
const
|
|
111
|
+
const traTimes = datetime_ref_1.DateTimeRef.now();
|
|
111
112
|
return {
|
|
112
113
|
loginTicketRequest: {
|
|
113
114
|
$: { version: "1.0" },
|
|
114
115
|
header: [
|
|
115
116
|
{
|
|
116
|
-
uniqueId: [
|
|
117
|
-
generationTime: [
|
|
118
|
-
expirationTime: [
|
|
117
|
+
uniqueId: [traTimes.wsaaTraUniqueIdSeconds()],
|
|
118
|
+
generationTime: [traTimes.wsaaTraGenerationTimeIso()],
|
|
119
|
+
expirationTime: [traTimes.wsaaTraExpirationTimeIso()],
|
|
119
120
|
},
|
|
120
121
|
],
|
|
121
122
|
service: [serviceName],
|
|
122
123
|
},
|
|
123
124
|
};
|
|
124
125
|
}
|
|
126
|
+
parseLoginTicketResponse(loginCmsReturnXml) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
const parsed = yield parser_1.Parser.xmlToJson(loginCmsReturnXml);
|
|
129
|
+
return parsed.loginticketresponse;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
125
132
|
/**
|
|
126
133
|
* Sign TRA (Token Request Authorization) XML
|
|
127
134
|
* @param traXml TRA XML to sign
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.repository.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/outbound/adapters/repositories/auth/auth.repository.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./auth.repository";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./auth.repository"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/outbound/adapters/repositories/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
|
@@ -1,21 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { BaseSoapRepositoryConstructorConfig } from "../../../outbound/ports/soap/soap-repository.types";
|
|
8
|
-
import { Voucher } from "../../../../domain/entities/voucher.entity";
|
|
9
|
-
import { ICreateVoucherResult } from "../../../../application/types/result.types";
|
|
10
|
-
import { ServerStatusDto, SalesPointsResultDto, LastVoucherResultDto, VoucherInfoResultDto, VoucherTypesResultDto, ConceptTypesResultDto, DocumentTypesResultDto, AliquotTypesResultDto, CurrencyTypesResultDto, OptionalTypesResultDto, TaxTypesResultDto, IvaReceptorTypesResultDto, CaeaResultDto, CaeaUsageResultDto, CaeaNoMovementResultDto, CountriesResultDto, ActivitiesResultDto, QuotationResultDto, MaxRecordsResultDto } from "../../../../application/dto/electronic-billing.dto";
|
|
1
|
+
import { IElectronicBillingRepositoryPort } from "../../../../../application/ports/electronic-billing/electronic-billing-repository.port";
|
|
2
|
+
import { BaseSoapRepository } from "../../soap/base-soap-repository";
|
|
3
|
+
import { BaseSoapRepositoryConstructorConfig } from "../../../../types/soap-repository.types";
|
|
4
|
+
import { Voucher } from "../../../../../domain/entities/voucher.entity";
|
|
5
|
+
import { ICreateVoucherResult } from "../../../../../application/types/result.types";
|
|
6
|
+
import { ServerStatusDto, SalesPointsResultDto, LastVoucherResultDto, VoucherInfoResultDto, VoucherTypesResultDto, ConceptTypesResultDto, DocumentTypesResultDto, AliquotTypesResultDto, CurrencyTypesResultDto, OptionalTypesResultDto, TaxTypesResultDto, IvaReceptorTypesResultDto, CaeaResultDto, CaeaUsageResultDto, CaeaNoMovementResultDto, CountriesResultDto, ActivitiesResultDto, QuotationResultDto, MaxRecordsResultDto } from "../../../../../application/dto/electronic-billing.dto";
|
|
11
7
|
export declare class ElectronicBillingRepository extends BaseSoapRepository implements IElectronicBillingRepositoryPort {
|
|
12
8
|
private serviceClient?;
|
|
13
9
|
constructor(config: BaseSoapRepositoryConstructorConfig);
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
11
|
+
* Invalidate the cached SOAP client, forcing re-creation on next call.
|
|
12
|
+
* Call this when the auth token is refreshed.
|
|
13
|
+
*/
|
|
14
|
+
invalidateClient(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Get or create SOAP client with authentication proxy.
|
|
17
|
+
* Creates SOAP 1.1 or 1.2 client based on useSoap12 configuration.
|
|
17
18
|
*/
|
|
18
19
|
private getClient;
|
|
20
|
+
/**
|
|
21
|
+
* Map SOAP Errors to the DTO format. Calls mapSoapErrors only once.
|
|
22
|
+
*/
|
|
23
|
+
private mapErrors;
|
|
24
|
+
/**
|
|
25
|
+
* Build the common det request object shared by createVoucher and informCaeaUsage.
|
|
26
|
+
*/
|
|
27
|
+
private buildVoucherDetRequest;
|
|
19
28
|
getServerStatus(): Promise<ServerStatusDto>;
|
|
20
29
|
getSalesPoints(): Promise<SalesPointsResultDto>;
|
|
21
30
|
getLastVoucher(salesPoint: number, voucherType: number): Promise<LastVoucherResultDto>;
|
|
@@ -10,18 +10,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ElectronicBillingRepository = void 0;
|
|
13
|
-
const base_soap_repository_1 = require("
|
|
14
|
-
const service_names_enum_1 = require("
|
|
15
|
-
const wsdl_path_enum_1 = require("
|
|
16
|
-
const endpoints_enum_1 = require("
|
|
17
|
-
const
|
|
13
|
+
const base_soap_repository_1 = require("../../soap/base-soap-repository");
|
|
14
|
+
const service_names_enum_1 = require("../../../../constants/service-names.enum");
|
|
15
|
+
const wsdl_path_enum_1 = require("../../../../outbound/ports/soap/enums/wsdl-path.enum");
|
|
16
|
+
const endpoints_enum_1 = require("../../../../outbound/ports/soap/enums/endpoints.enum");
|
|
17
|
+
const mappers_1 = require("../../../../mappers");
|
|
18
|
+
const afip_errors_1 = require("../../../../utils/afip-errors");
|
|
18
19
|
class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapRepository {
|
|
19
20
|
constructor(config) {
|
|
20
21
|
super(config);
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
24
|
+
* Invalidate the cached SOAP client, forcing re-creation on next call.
|
|
25
|
+
* Call this when the auth token is refreshed.
|
|
26
|
+
*/
|
|
27
|
+
invalidateClient() {
|
|
28
|
+
this.serviceClient = undefined;
|
|
29
|
+
}
|
|
30
|
+
// ── Private helpers ────────────────────────────────────────────────────────
|
|
31
|
+
/**
|
|
32
|
+
* Get or create SOAP client with authentication proxy.
|
|
33
|
+
* Creates SOAP 1.1 or 1.2 client based on useSoap12 configuration.
|
|
25
34
|
*/
|
|
26
35
|
getClient() {
|
|
27
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -34,20 +43,7 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
34
43
|
const endpoint = this.production
|
|
35
44
|
? endpoints_enum_1.EndpointsEnum.WSFEV1
|
|
36
45
|
: endpoints_enum_1.EndpointsEnum.WSFEV1_TEST;
|
|
37
|
-
|
|
38
|
-
let soapVersion;
|
|
39
|
-
if (this.useSoap12) {
|
|
40
|
-
client = yield this.soapClient.createClient(wsdlName, {
|
|
41
|
-
forceSoap12Headers: true,
|
|
42
|
-
});
|
|
43
|
-
soapVersion = endpoints_enum_1.SoapServiceVersion.ServiceSoap12;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
client = yield this.soapClient.createClient(wsdlName, {
|
|
47
|
-
forceSoap12Headers: false,
|
|
48
|
-
});
|
|
49
|
-
soapVersion = endpoints_enum_1.SoapServiceVersion.ServiceSoap;
|
|
50
|
-
}
|
|
46
|
+
const { client, soapVersion } = yield this.createSoapClient(wsdlName);
|
|
51
47
|
this.soapClient.setEndpoint(client, endpoint);
|
|
52
48
|
this.serviceClient = this.createAuthenticatedProxy(client, {
|
|
53
49
|
serviceName: service_names_enum_1.ServiceNamesEnum.WSFE,
|
|
@@ -57,11 +53,58 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
57
53
|
return this.serviceClient;
|
|
58
54
|
});
|
|
59
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Map SOAP Errors to the DTO format. Calls mapSoapErrors only once.
|
|
58
|
+
*/
|
|
59
|
+
mapErrors(errors) {
|
|
60
|
+
const mapped = (0, mappers_1.mapSoapErrors)(errors);
|
|
61
|
+
return mapped ? { err: mapped } : undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Build the common det request object shared by createVoucher and informCaeaUsage.
|
|
65
|
+
*/
|
|
66
|
+
buildVoucherDetRequest(voucherData) {
|
|
67
|
+
return {
|
|
68
|
+
Concepto: voucherData.Concepto,
|
|
69
|
+
DocTipo: voucherData.DocTipo,
|
|
70
|
+
DocNro: voucherData.DocNro,
|
|
71
|
+
CbteDesde: voucherData.CbteDesde,
|
|
72
|
+
CbteHasta: voucherData.CbteHasta,
|
|
73
|
+
CbteFch: voucherData.CbteFch,
|
|
74
|
+
ImpTotal: voucherData.ImpTotal,
|
|
75
|
+
ImpTotConc: voucherData.ImpTotConc,
|
|
76
|
+
ImpNeto: voucherData.ImpNeto,
|
|
77
|
+
ImpOpEx: voucherData.ImpOpEx,
|
|
78
|
+
ImpIVA: voucherData.ImpIVA,
|
|
79
|
+
ImpTrib: voucherData.ImpTrib,
|
|
80
|
+
FchServDesde: voucherData.FchServDesde,
|
|
81
|
+
FchServHasta: voucherData.FchServHasta,
|
|
82
|
+
FchVtoPago: voucherData.FchVtoPago,
|
|
83
|
+
MonId: voucherData.MonId,
|
|
84
|
+
MonCotiz: voucherData.MonCotiz,
|
|
85
|
+
CanMisMonExt: voucherData.CanMisMonExt,
|
|
86
|
+
CondicionIVAReceptorId: voucherData.CondicionIVAReceptorId,
|
|
87
|
+
Tributos: voucherData.Tributos
|
|
88
|
+
? { Tributo: voucherData.Tributos }
|
|
89
|
+
: undefined,
|
|
90
|
+
Iva: voucherData.Iva ? { AlicIva: voucherData.Iva } : undefined,
|
|
91
|
+
CbtesAsoc: voucherData.CbtesAsoc
|
|
92
|
+
? { CbteAsoc: voucherData.CbtesAsoc }
|
|
93
|
+
: undefined,
|
|
94
|
+
Compradores: voucherData.Compradores
|
|
95
|
+
? { Comprador: voucherData.Compradores }
|
|
96
|
+
: undefined,
|
|
97
|
+
Opcionales: voucherData.Opcionales
|
|
98
|
+
? { Opcional: voucherData.Opcionales }
|
|
99
|
+
: undefined,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
// ── Public repository methods ──────────────────────────────────────────────
|
|
60
103
|
getServerStatus() {
|
|
61
104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
105
|
const client = yield this.getClient();
|
|
63
106
|
const [output] = yield client.FEDummyAsync({});
|
|
64
|
-
return (0,
|
|
107
|
+
return (0, mappers_1.mapServerStatus)(output.FEDummyResult);
|
|
65
108
|
});
|
|
66
109
|
}
|
|
67
110
|
getSalesPoints() {
|
|
@@ -71,11 +114,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
71
114
|
const result = output.FEParamGetPtosVentaResult;
|
|
72
115
|
return {
|
|
73
116
|
resultGet: {
|
|
74
|
-
ptoVenta: (0,
|
|
117
|
+
ptoVenta: (0, mappers_1.mapSalesPoints)(result),
|
|
75
118
|
},
|
|
76
|
-
errors:
|
|
77
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
78
|
-
: undefined,
|
|
119
|
+
errors: this.mapErrors(result.Errors),
|
|
79
120
|
};
|
|
80
121
|
});
|
|
81
122
|
}
|
|
@@ -87,49 +128,15 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
87
128
|
CbteTipo: voucherType,
|
|
88
129
|
});
|
|
89
130
|
const result = output.FECompUltimoAutorizadoResult;
|
|
90
|
-
return Object.assign(Object.assign({}, (0,
|
|
91
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
92
|
-
: undefined });
|
|
131
|
+
return Object.assign(Object.assign({}, (0, mappers_1.mapLastVoucher)(result)), { errors: this.mapErrors(result.Errors) });
|
|
93
132
|
});
|
|
94
133
|
}
|
|
95
134
|
createVoucher(voucher) {
|
|
96
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
-
var _a, _b
|
|
136
|
+
var _a, _b;
|
|
98
137
|
const client = yield this.getClient();
|
|
99
138
|
const voucherData = voucher.toDTO();
|
|
100
|
-
const detRequest =
|
|
101
|
-
Concepto: voucherData.Concepto,
|
|
102
|
-
DocTipo: voucherData.DocTipo,
|
|
103
|
-
DocNro: voucherData.DocNro,
|
|
104
|
-
CbteDesde: voucherData.CbteDesde,
|
|
105
|
-
CbteHasta: voucherData.CbteHasta,
|
|
106
|
-
CbteFch: voucherData.CbteFch,
|
|
107
|
-
ImpTotal: voucherData.ImpTotal,
|
|
108
|
-
ImpTotConc: voucherData.ImpTotConc,
|
|
109
|
-
ImpNeto: voucherData.ImpNeto,
|
|
110
|
-
ImpOpEx: voucherData.ImpOpEx,
|
|
111
|
-
ImpIVA: voucherData.ImpIVA,
|
|
112
|
-
ImpTrib: voucherData.ImpTrib,
|
|
113
|
-
FchServDesde: voucherData.FchServDesde,
|
|
114
|
-
FchServHasta: voucherData.FchServHasta,
|
|
115
|
-
FchVtoPago: voucherData.FchVtoPago,
|
|
116
|
-
MonId: voucherData.MonId,
|
|
117
|
-
MonCotiz: voucherData.MonCotiz,
|
|
118
|
-
CondicionIVAReceptorId: voucherData.CondicionIVAReceptorId,
|
|
119
|
-
Tributos: voucherData.Tributos
|
|
120
|
-
? { Tributo: voucherData.Tributos }
|
|
121
|
-
: undefined,
|
|
122
|
-
Iva: voucherData.Iva ? { AlicIva: voucherData.Iva } : undefined,
|
|
123
|
-
CbtesAsoc: voucherData.CbtesAsoc
|
|
124
|
-
? { CbteAsoc: voucherData.CbtesAsoc }
|
|
125
|
-
: undefined,
|
|
126
|
-
Compradores: voucherData.Compradores
|
|
127
|
-
? { Comprador: voucherData.Compradores }
|
|
128
|
-
: undefined,
|
|
129
|
-
Opcionales: voucherData.Opcionales
|
|
130
|
-
? { Opcional: voucherData.Opcionales }
|
|
131
|
-
: undefined,
|
|
132
|
-
};
|
|
139
|
+
const detRequest = this.buildVoucherDetRequest(voucherData);
|
|
133
140
|
const typedDetRequest = this.useSoap12
|
|
134
141
|
? detRequest
|
|
135
142
|
: detRequest;
|
|
@@ -147,10 +154,6 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
147
154
|
});
|
|
148
155
|
const { FECAESolicitarResult } = output;
|
|
149
156
|
const detResponse = (_b = (_a = FECAESolicitarResult.FeDetResp) === null || _a === void 0 ? void 0 : _a.FECAEDetResponse) === null || _b === void 0 ? void 0 : _b[0];
|
|
150
|
-
if (((_d = (_c = FECAESolicitarResult.Errors) === null || _c === void 0 ? void 0 : _c.Err) === null || _d === void 0 ? void 0 : _d.length) && this.logger) {
|
|
151
|
-
const errorMessages = FECAESolicitarResult.Errors.Err.map((e) => `${e.Code}: ${e.Msg}`).join(", ");
|
|
152
|
-
this.logger.error(`Error creating voucher: ${errorMessages}`);
|
|
153
|
-
}
|
|
154
157
|
const cae = (detResponse === null || detResponse === void 0 ? void 0 : detResponse.Resultado) === "A" ? detResponse.CAE || "" : "";
|
|
155
158
|
const caeFchVto = (detResponse === null || detResponse === void 0 ? void 0 : detResponse.Resultado) === "A" ? detResponse.CAEFchVto || "" : "";
|
|
156
159
|
return {
|
|
@@ -172,17 +175,14 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
172
175
|
},
|
|
173
176
|
});
|
|
174
177
|
const result = output.FECompConsultarResult;
|
|
175
|
-
const voucherInfo = (0,
|
|
178
|
+
const voucherInfo = (0, mappers_1.mapVoucherInfo)(result);
|
|
176
179
|
if (!voucherInfo) {
|
|
177
180
|
return null;
|
|
178
181
|
}
|
|
179
|
-
return Object.assign(Object.assign({}, voucherInfo), { errors:
|
|
180
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
181
|
-
: undefined });
|
|
182
|
+
return Object.assign(Object.assign({}, voucherInfo), { errors: this.mapErrors(result.Errors) });
|
|
182
183
|
}
|
|
183
184
|
catch (error) {
|
|
184
|
-
|
|
185
|
-
if ((error === null || error === void 0 ? void 0 : error.code) === 602) {
|
|
185
|
+
if ((0, afip_errors_1.isAfipNotFoundError)(error)) {
|
|
186
186
|
return null;
|
|
187
187
|
}
|
|
188
188
|
throw error;
|
|
@@ -196,11 +196,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
196
196
|
const result = output.FEParamGetTiposCbteResult;
|
|
197
197
|
return {
|
|
198
198
|
resultGet: {
|
|
199
|
-
cbteTipo: (0,
|
|
199
|
+
cbteTipo: (0, mappers_1.mapParameterTypes)(result, "CbteTipo"),
|
|
200
200
|
},
|
|
201
|
-
errors:
|
|
202
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
203
|
-
: undefined,
|
|
201
|
+
errors: this.mapErrors(result.Errors),
|
|
204
202
|
};
|
|
205
203
|
});
|
|
206
204
|
}
|
|
@@ -211,11 +209,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
211
209
|
const result = output.FEParamGetTiposConceptoResult;
|
|
212
210
|
return {
|
|
213
211
|
resultGet: {
|
|
214
|
-
conceptoTipo: (0,
|
|
212
|
+
conceptoTipo: (0, mappers_1.mapParameterTypes)(result, "ConceptoTipo"),
|
|
215
213
|
},
|
|
216
|
-
errors:
|
|
217
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
218
|
-
: undefined,
|
|
214
|
+
errors: this.mapErrors(result.Errors),
|
|
219
215
|
};
|
|
220
216
|
});
|
|
221
217
|
}
|
|
@@ -226,11 +222,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
226
222
|
const result = output.FEParamGetTiposDocResult;
|
|
227
223
|
return {
|
|
228
224
|
resultGet: {
|
|
229
|
-
docTipo: (0,
|
|
225
|
+
docTipo: (0, mappers_1.mapParameterTypes)(result, "DocTipo"),
|
|
230
226
|
},
|
|
231
|
-
errors:
|
|
232
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
233
|
-
: undefined,
|
|
227
|
+
errors: this.mapErrors(result.Errors),
|
|
234
228
|
};
|
|
235
229
|
});
|
|
236
230
|
}
|
|
@@ -241,11 +235,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
241
235
|
const result = output.FEParamGetTiposIvaResult;
|
|
242
236
|
return {
|
|
243
237
|
resultGet: {
|
|
244
|
-
ivaTipo: (0,
|
|
238
|
+
ivaTipo: (0, mappers_1.mapAliquotTypes)(result),
|
|
245
239
|
},
|
|
246
|
-
errors:
|
|
247
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
248
|
-
: undefined,
|
|
240
|
+
errors: this.mapErrors(result.Errors),
|
|
249
241
|
};
|
|
250
242
|
});
|
|
251
243
|
}
|
|
@@ -256,11 +248,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
256
248
|
const result = output.FEParamGetTiposMonedasResult;
|
|
257
249
|
return {
|
|
258
250
|
resultGet: {
|
|
259
|
-
moneda: (0,
|
|
251
|
+
moneda: (0, mappers_1.mapParameterTypes)(result, "Moneda"),
|
|
260
252
|
},
|
|
261
|
-
errors:
|
|
262
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
263
|
-
: undefined,
|
|
253
|
+
errors: this.mapErrors(result.Errors),
|
|
264
254
|
};
|
|
265
255
|
});
|
|
266
256
|
}
|
|
@@ -271,11 +261,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
271
261
|
const result = output.FEParamGetTiposOpcionalResult;
|
|
272
262
|
return {
|
|
273
263
|
resultGet: {
|
|
274
|
-
opcionalTipo: (0,
|
|
264
|
+
opcionalTipo: (0, mappers_1.mapParameterTypes)(result, "OpcionalTipo"),
|
|
275
265
|
},
|
|
276
|
-
errors:
|
|
277
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
278
|
-
: undefined,
|
|
266
|
+
errors: this.mapErrors(result.Errors),
|
|
279
267
|
};
|
|
280
268
|
});
|
|
281
269
|
}
|
|
@@ -286,11 +274,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
286
274
|
const result = output.FEParamGetTiposTributosResult;
|
|
287
275
|
return {
|
|
288
276
|
resultGet: {
|
|
289
|
-
tributoTipo: (0,
|
|
277
|
+
tributoTipo: (0, mappers_1.mapParameterTypes)(result, "TributoTipo"),
|
|
290
278
|
},
|
|
291
|
-
errors:
|
|
292
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
293
|
-
: undefined,
|
|
279
|
+
errors: this.mapErrors(result.Errors),
|
|
294
280
|
};
|
|
295
281
|
});
|
|
296
282
|
}
|
|
@@ -303,11 +289,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
303
289
|
const result = output.FEParamGetCondicionIvaReceptorResult;
|
|
304
290
|
return {
|
|
305
291
|
resultGet: {
|
|
306
|
-
condicionIvaReceptor: (0,
|
|
292
|
+
condicionIvaReceptor: (0, mappers_1.mapIvaReceptorTypes)(result),
|
|
307
293
|
},
|
|
308
|
-
errors:
|
|
309
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
310
|
-
: undefined,
|
|
294
|
+
errors: this.mapErrors(result.Errors),
|
|
311
295
|
};
|
|
312
296
|
});
|
|
313
297
|
}
|
|
@@ -320,10 +304,8 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
320
304
|
});
|
|
321
305
|
const result = output.FECAEASolicitarResult;
|
|
322
306
|
return {
|
|
323
|
-
resultGet: result.ResultGet ? (0,
|
|
324
|
-
errors:
|
|
325
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
326
|
-
: undefined,
|
|
307
|
+
resultGet: result.ResultGet ? (0, mappers_1.mapCaea)(result.ResultGet) : undefined,
|
|
308
|
+
errors: this.mapErrors(result.Errors),
|
|
327
309
|
};
|
|
328
310
|
});
|
|
329
311
|
}
|
|
@@ -336,10 +318,8 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
336
318
|
});
|
|
337
319
|
const result = output.FECAEAConsultarResult;
|
|
338
320
|
return {
|
|
339
|
-
resultGet: result.ResultGet ? (0,
|
|
340
|
-
errors:
|
|
341
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
342
|
-
: undefined,
|
|
321
|
+
resultGet: result.ResultGet ? (0, mappers_1.mapCaea)(result.ResultGet) : undefined,
|
|
322
|
+
errors: this.mapErrors(result.Errors),
|
|
343
323
|
};
|
|
344
324
|
});
|
|
345
325
|
}
|
|
@@ -361,9 +341,7 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
361
341
|
},
|
|
362
342
|
]
|
|
363
343
|
: undefined,
|
|
364
|
-
errors:
|
|
365
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
366
|
-
: undefined,
|
|
344
|
+
errors: this.mapErrors(result.Errors),
|
|
367
345
|
};
|
|
368
346
|
});
|
|
369
347
|
}
|
|
@@ -376,10 +354,8 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
376
354
|
});
|
|
377
355
|
const result = output.FECAEASinMovimientoConsultarResult;
|
|
378
356
|
return {
|
|
379
|
-
resultGet: (0,
|
|
380
|
-
errors:
|
|
381
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
382
|
-
: undefined,
|
|
357
|
+
resultGet: (0, mappers_1.mapCaeaNoMovement)(result),
|
|
358
|
+
errors: this.mapErrors(result.Errors),
|
|
383
359
|
};
|
|
384
360
|
});
|
|
385
361
|
}
|
|
@@ -388,42 +364,7 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
388
364
|
var _a, _b;
|
|
389
365
|
const client = yield this.getClient();
|
|
390
366
|
const voucherData = voucher.toDTO();
|
|
391
|
-
const detRequest = {
|
|
392
|
-
Concepto: voucherData.Concepto,
|
|
393
|
-
DocTipo: voucherData.DocTipo,
|
|
394
|
-
DocNro: voucherData.DocNro,
|
|
395
|
-
CbteDesde: voucherData.CbteDesde,
|
|
396
|
-
CbteHasta: voucherData.CbteHasta,
|
|
397
|
-
CbteFch: voucherData.CbteFch,
|
|
398
|
-
ImpTotal: voucherData.ImpTotal,
|
|
399
|
-
ImpTotConc: voucherData.ImpTotConc,
|
|
400
|
-
ImpNeto: voucherData.ImpNeto,
|
|
401
|
-
ImpOpEx: voucherData.ImpOpEx,
|
|
402
|
-
ImpIVA: voucherData.ImpIVA,
|
|
403
|
-
ImpTrib: voucherData.ImpTrib,
|
|
404
|
-
FchServDesde: voucherData.FchServDesde,
|
|
405
|
-
FchServHasta: voucherData.FchServHasta,
|
|
406
|
-
FchVtoPago: voucherData.FchVtoPago,
|
|
407
|
-
MonId: voucherData.MonId,
|
|
408
|
-
MonCotiz: voucherData.MonCotiz,
|
|
409
|
-
CondicionIVAReceptorId: voucherData.CondicionIVAReceptorId,
|
|
410
|
-
Tributos: voucherData.Tributos
|
|
411
|
-
? { Tributo: voucherData.Tributos }
|
|
412
|
-
: undefined,
|
|
413
|
-
Iva: voucherData.Iva ? { AlicIva: voucherData.Iva } : undefined,
|
|
414
|
-
CbtesAsoc: voucherData.CbtesAsoc
|
|
415
|
-
? { CbteAsoc: voucherData.CbtesAsoc }
|
|
416
|
-
: undefined,
|
|
417
|
-
Compradores: voucherData.Compradores
|
|
418
|
-
? { Comprador: voucherData.Compradores }
|
|
419
|
-
: undefined,
|
|
420
|
-
Opcionales: voucherData.Opcionales
|
|
421
|
-
? { Opcional: voucherData.Opcionales }
|
|
422
|
-
: undefined,
|
|
423
|
-
CAEA: caea,
|
|
424
|
-
PeriodoAsoc: undefined,
|
|
425
|
-
CbteFchHsGen: undefined,
|
|
426
|
-
};
|
|
367
|
+
const detRequest = Object.assign(Object.assign({}, this.buildVoucherDetRequest(voucherData)), { CAEA: caea });
|
|
427
368
|
const typedDetRequest = this.useSoap12
|
|
428
369
|
? detRequest
|
|
429
370
|
: detRequest;
|
|
@@ -442,11 +383,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
442
383
|
const result = output.FECAEARegInformativoResult;
|
|
443
384
|
return {
|
|
444
385
|
resultGet: ((_b = (_a = result.FeDetResp) === null || _a === void 0 ? void 0 : _a.FECAEADetResponse) === null || _b === void 0 ? void 0 : _b[0])
|
|
445
|
-
? (0,
|
|
446
|
-
: undefined,
|
|
447
|
-
errors: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors)
|
|
448
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
386
|
+
? (0, mappers_1.mapCaeaUsage)(result.FeDetResp.FECAEADetResponse[0])
|
|
449
387
|
: undefined,
|
|
388
|
+
errors: this.mapErrors(result.Errors),
|
|
450
389
|
};
|
|
451
390
|
});
|
|
452
391
|
}
|
|
@@ -458,10 +397,8 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
458
397
|
});
|
|
459
398
|
const result = output.FEParamGetCotizacionResult;
|
|
460
399
|
return {
|
|
461
|
-
resultGet: (0,
|
|
462
|
-
errors:
|
|
463
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
464
|
-
: undefined,
|
|
400
|
+
resultGet: (0, mappers_1.mapQuotation)(result),
|
|
401
|
+
errors: this.mapErrors(result.Errors),
|
|
465
402
|
};
|
|
466
403
|
});
|
|
467
404
|
}
|
|
@@ -472,11 +409,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
472
409
|
const result = output.FEParamGetTiposPaisesResult;
|
|
473
410
|
return {
|
|
474
411
|
resultGet: {
|
|
475
|
-
paisTipo: (0,
|
|
412
|
+
paisTipo: (0, mappers_1.mapCountries)(result),
|
|
476
413
|
},
|
|
477
|
-
errors:
|
|
478
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
479
|
-
: undefined,
|
|
414
|
+
errors: this.mapErrors(result.Errors),
|
|
480
415
|
};
|
|
481
416
|
});
|
|
482
417
|
}
|
|
@@ -487,11 +422,9 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
487
422
|
const result = output.FEParamGetActividadesResult;
|
|
488
423
|
return {
|
|
489
424
|
resultGet: {
|
|
490
|
-
actividadesTipo: (0,
|
|
425
|
+
actividadesTipo: (0, mappers_1.mapActivities)(result),
|
|
491
426
|
},
|
|
492
|
-
errors:
|
|
493
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
494
|
-
: undefined,
|
|
427
|
+
errors: this.mapErrors(result.Errors),
|
|
495
428
|
};
|
|
496
429
|
});
|
|
497
430
|
}
|
|
@@ -501,10 +434,8 @@ class ElectronicBillingRepository extends base_soap_repository_1.BaseSoapReposit
|
|
|
501
434
|
const [output] = yield client.FECompTotXRequestAsync({});
|
|
502
435
|
const result = output.FECompTotXRequestResult;
|
|
503
436
|
return {
|
|
504
|
-
resultGet: (0,
|
|
505
|
-
errors:
|
|
506
|
-
? { err: (0, soap_to_dto_mapper_1.mapSoapErrors)(result.Errors) }
|
|
507
|
-
: undefined,
|
|
437
|
+
resultGet: (0, mappers_1.mapMaxRecords)(result),
|
|
438
|
+
errors: this.mapErrors(result.Errors),
|
|
508
439
|
};
|
|
509
440
|
});
|
|
510
441
|
}
|