@arcasdk/core 0.3.1 → 0.3.3
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/config/env.d.ts +6 -0
- package/lib/application/config/env.js +14 -0
- package/lib/application/config/env.js.map +1 -0
- package/lib/application/config/index.d.ts +6 -0
- package/lib/application/config/index.js +15 -0
- package/lib/application/config/index.js.map +1 -0
- package/lib/application/dto/electronic-billing.dto.d.ts +192 -0
- package/lib/application/dto/electronic-billing.dto.js +3 -0
- package/lib/application/dto/electronic-billing.dto.js.map +1 -0
- package/lib/application/dto/index.d.ts +6 -0
- package/lib/application/dto/index.js +23 -0
- package/lib/application/dto/index.js.map +1 -0
- package/lib/application/dto/register.dto.d.ts +116 -0
- package/lib/application/dto/register.dto.js +8 -0
- package/lib/application/dto/register.dto.js.map +1 -0
- package/lib/application/index.d.ts +10 -0
- package/lib/application/index.js +27 -0
- package/lib/application/index.js.map +1 -0
- package/lib/application/ports/authentication/authentication-repository.port.d.ts +29 -0
- package/lib/application/ports/authentication/authentication-repository.port.js +3 -0
- package/lib/application/ports/authentication/authentication-repository.port.js.map +1 -0
- package/lib/application/ports/authentication/index.d.ts +5 -0
- package/lib/application/ports/authentication/index.js +22 -0
- package/lib/application/ports/authentication/index.js.map +1 -0
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.d.ts +139 -0
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.js +3 -0
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.js.map +1 -0
- package/lib/application/ports/electronic-billing/index.d.ts +5 -0
- package/lib/application/ports/electronic-billing/index.js +22 -0
- package/lib/application/ports/electronic-billing/index.js.map +1 -0
- package/lib/application/ports/generic/generic-repository.port.d.ts +16 -0
- package/lib/application/ports/generic/generic-repository.port.js +3 -0
- package/lib/application/ports/generic/generic-repository.port.js.map +1 -0
- package/lib/application/ports/index.d.ts +7 -0
- package/lib/application/ports/index.js +24 -0
- package/lib/application/ports/index.js.map +1 -0
- package/lib/application/ports/register/index.d.ts +5 -0
- package/lib/application/ports/register/index.js +22 -0
- package/lib/application/ports/register/index.js.map +1 -0
- package/lib/application/ports/register/register-repository.ports.d.ts +23 -0
- package/lib/application/ports/register/register-repository.ports.js +3 -0
- package/lib/application/ports/register/register-repository.ports.js.map +1 -0
- package/lib/application/services/electronic-billing.service.d.ts +202 -0
- package/lib/application/services/electronic-billing.service.js +340 -0
- package/lib/application/services/electronic-billing.service.js.map +1 -0
- package/lib/application/services/generic.service.d.ts +19 -0
- package/lib/application/services/generic.service.js +31 -0
- package/lib/application/services/generic.service.js.map +1 -0
- package/lib/application/services/index.d.ts +10 -0
- package/lib/application/services/index.js +27 -0
- package/lib/application/services/index.js.map +1 -0
- package/lib/application/services/register-inscription-proof.service.d.ts +26 -0
- package/lib/application/services/register-inscription-proof.service.js +49 -0
- package/lib/application/services/register-inscription-proof.service.js.map +1 -0
- package/lib/application/services/register-scope-five.service.d.ts +26 -0
- package/lib/application/services/register-scope-five.service.js +49 -0
- package/lib/application/services/register-scope-five.service.js.map +1 -0
- package/lib/application/services/register-scope-four.service.d.ts +28 -0
- package/lib/application/services/register-scope-four.service.js +51 -0
- package/lib/application/services/register-scope-four.service.js.map +1 -0
- package/lib/application/services/register-scope-ten.service.d.ts +21 -0
- package/lib/application/services/register-scope-ten.service.js +39 -0
- package/lib/application/services/register-scope-ten.service.js.map +1 -0
- package/lib/application/services/register-scope-thirteen.service.d.ts +26 -0
- package/lib/application/services/register-scope-thirteen.service.js +49 -0
- package/lib/application/services/register-scope-thirteen.service.js.map +1 -0
- package/lib/application/types/auth.types.d.ts +19 -0
- package/lib/application/types/auth.types.js +7 -0
- package/lib/application/types/auth.types.js.map +1 -0
- package/lib/application/types/context.types.d.ts +46 -0
- package/lib/application/types/context.types.js +3 -0
- package/lib/application/types/context.types.js.map +1 -0
- package/lib/application/types/index.d.ts +8 -0
- package/lib/application/types/index.js +25 -0
- package/lib/application/types/index.js.map +1 -0
- package/lib/application/types/result.types.d.ts +10 -0
- package/lib/application/types/result.types.js +3 -0
- package/lib/application/types/result.types.js.map +1 -0
- package/lib/application/types/use-case-inputs.types.d.ts +23 -0
- package/lib/application/types/use-case-inputs.types.js +7 -0
- package/lib/application/types/use-case-inputs.types.js.map +1 -0
- package/lib/application/use-cases/authentication/get-auth-params.use-case.d.ts +16 -0
- package/lib/application/use-cases/authentication/get-auth-params.use-case.js +29 -0
- package/lib/application/use-cases/authentication/get-auth-params.use-case.js.map +1 -0
- package/lib/application/use-cases/authentication/index.d.ts +7 -0
- package/lib/application/use-cases/authentication/index.js +24 -0
- package/lib/application/use-cases/authentication/index.js.map +1 -0
- package/lib/application/use-cases/authentication/login.use-case.d.ts +17 -0
- package/lib/application/use-cases/authentication/login.use-case.js +29 -0
- package/lib/application/use-cases/authentication/login.use-case.js.map +1 -0
- package/lib/application/use-cases/authentication/request-login.use-case.d.ts +16 -0
- package/lib/application/use-cases/authentication/request-login.use-case.js +29 -0
- package/lib/application/use-cases/authentication/request-login.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/consult-caea-no-movement.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/consult-caea-no-movement.use-case.js +30 -0
- package/lib/application/use-cases/electronic-billing/consult-caea-no-movement.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/consult-caea.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/consult-caea.use-case.js +30 -0
- package/lib/application/use-cases/electronic-billing/consult-caea.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js +39 -0
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js +33 -0
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-activities.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-activities.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-activities.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-caea.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/get-caea.use-case.js +30 -0
- package/lib/application/use-cases/electronic-billing/get-caea.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-countries.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-countries.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-countries.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-document-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-document-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-document-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-iva-receptor-types.use-case.d.ts +16 -0
- package/lib/application/use-cases/electronic-billing/get-iva-receptor-types.use-case.js +29 -0
- package/lib/application/use-cases/electronic-billing/get-iva-receptor-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.js +29 -0
- package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-max-records.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-max-records.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-max-records.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.d.ts +40 -0
- package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.js +73 -0
- package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-quotation.use-case.d.ts +16 -0
- package/lib/application/use-cases/electronic-billing/get-quotation.use-case.js +29 -0
- package/lib/application/use-cases/electronic-billing/get-quotation.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-server-status.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-server-status.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-server-status.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.js +29 -0
- package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.d.ts +15 -0
- package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.js +28 -0
- package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/index.d.ts +18 -0
- package/lib/application/use-cases/electronic-billing/index.js +36 -0
- package/lib/application/use-cases/electronic-billing/index.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/inform-caea-no-movement.use-case.d.ts +17 -0
- package/lib/application/use-cases/electronic-billing/inform-caea-no-movement.use-case.js +30 -0
- package/lib/application/use-cases/electronic-billing/inform-caea-no-movement.use-case.js.map +1 -0
- package/lib/application/use-cases/electronic-billing/inform-caea-usage.use-case.d.ts +14 -0
- package/lib/application/use-cases/electronic-billing/inform-caea-usage.use-case.js +32 -0
- package/lib/application/use-cases/electronic-billing/inform-caea-usage.use-case.js.map +1 -0
- package/lib/application/use-cases/index.d.ts +7 -0
- package/lib/application/use-cases/index.js +24 -0
- package/lib/application/use-cases/index.js.map +1 -0
- package/lib/application/use-cases/register/get-register-server-status.use-case.d.ts +15 -0
- package/lib/application/use-cases/register/get-register-server-status.use-case.js +28 -0
- package/lib/application/use-cases/register/get-register-server-status.use-case.js.map +1 -0
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.d.ts +16 -0
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js +29 -0
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js.map +1 -0
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.d.ts +16 -0
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.js +29 -0
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.js.map +1 -0
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.d.ts +16 -0
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.js +29 -0
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.js.map +1 -0
- package/lib/application/use-cases/register/index.d.ts +4 -0
- package/lib/application/use-cases/register/index.js +21 -0
- package/lib/application/use-cases/register/index.js.map +1 -0
- package/lib/arca.d.ts +26 -0
- package/lib/arca.js +124 -0
- package/lib/arca.js.map +1 -0
- package/lib/domain/entities/access-ticket.entity.d.ts +73 -0
- package/lib/domain/entities/access-ticket.entity.js +144 -0
- package/lib/domain/entities/access-ticket.entity.js.map +1 -0
- package/lib/domain/entities/index.d.ts +6 -0
- package/lib/domain/entities/index.js +23 -0
- package/lib/domain/entities/index.js.map +1 -0
- package/lib/domain/entities/voucher.entity.d.ts +113 -0
- package/lib/domain/entities/voucher.entity.js +216 -0
- package/lib/domain/entities/voucher.entity.js.map +1 -0
- package/lib/domain/index.d.ts +6 -0
- package/lib/domain/index.js +23 -0
- package/lib/domain/index.js.map +1 -0
- package/lib/domain/types/electronic-billing.types.d.ts +193 -0
- package/lib/domain/types/electronic-billing.types.js +8 -0
- package/lib/domain/types/electronic-billing.types.js.map +1 -0
- package/lib/domain/types/index.d.ts +6 -0
- package/lib/domain/types/index.js +23 -0
- package/lib/domain/types/index.js.map +1 -0
- package/lib/domain/types/voucher.types.d.ts +65 -0
- package/lib/domain/types/voucher.types.js +3 -0
- package/lib/domain/types/voucher.types.js.map +1 -0
- package/lib/domain/value-objects/cae.vo.d.ts +47 -0
- package/lib/domain/value-objects/cae.vo.js +80 -0
- package/lib/domain/value-objects/cae.vo.js.map +1 -0
- package/lib/domain/value-objects/cuit.vo.d.ts +49 -0
- package/lib/domain/value-objects/cuit.vo.js +98 -0
- package/lib/domain/value-objects/cuit.vo.js.map +1 -0
- package/lib/domain/value-objects/index.d.ts +7 -0
- package/lib/domain/value-objects/index.js +24 -0
- package/lib/domain/value-objects/index.js.map +1 -0
- package/lib/domain/value-objects/voucher-number.vo.d.ts +66 -0
- package/lib/domain/value-objects/voucher-number.vo.js +106 -0
- package/lib/domain/value-objects/voucher-number.vo.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +27 -0
- package/lib/index.js.map +1 -0
- package/lib/infrastructure/constants/index.d.ts +5 -0
- package/lib/infrastructure/constants/index.js +22 -0
- package/lib/infrastructure/constants/index.js.map +1 -0
- package/lib/infrastructure/constants/ssl.constants.d.ts +16 -0
- package/lib/infrastructure/constants/ssl.constants.js +20 -0
- package/lib/infrastructure/constants/ssl.constants.js.map +1 -0
- package/lib/infrastructure/index.d.ts +5 -0
- package/lib/infrastructure/index.js +22 -0
- package/lib/infrastructure/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.d.ts +68 -0
- package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js +128 -0
- package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/auth/auth.repository.d.ts +59 -0
- package/lib/infrastructure/outbound/adapters/auth/auth.repository.js +134 -0
- package/lib/infrastructure/outbound/adapters/auth/auth.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.d.ts +41 -0
- package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js +513 -0
- package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/electronic-billing/index.d.ts +5 -0
- package/lib/infrastructure/outbound/adapters/electronic-billing/index.js +22 -0
- package/lib/infrastructure/outbound/adapters/electronic-billing/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/enums.d.ts +43 -0
- package/lib/infrastructure/outbound/adapters/enums.js +49 -0
- package/lib/infrastructure/outbound/adapters/enums.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/generic/generic-repository.d.ts +13 -0
- package/lib/infrastructure/outbound/adapters/generic/generic-repository.js +53 -0
- package/lib/infrastructure/outbound/adapters/generic/generic-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/index.d.ts +10 -0
- package/lib/infrastructure/outbound/adapters/index.js +27 -0
- package/lib/infrastructure/outbound/adapters/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/logger/winston-logger.d.ts +14 -0
- package/lib/infrastructure/outbound/adapters/logger/winston-logger.js +24 -0
- package/lib/infrastructure/outbound/adapters/logger/winston-logger.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/register/index.d.ts +9 -0
- package/lib/infrastructure/outbound/adapters/register/index.js +26 -0
- package/lib/infrastructure/outbound/adapters/register/index.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.d.ts +18 -0
- package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js +143 -0
- package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.d.ts +14 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js +136 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.d.ts +12 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js +103 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.d.ts +12 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.js +112 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.d.ts +13 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js +133 -0
- package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.d.ts +30 -0
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js +68 -0
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.d.ts +20 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js +54 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client.d.ts +11 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client.js +95 -0
- package/lib/infrastructure/outbound/adapters/soap/soap-client.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.d.ts +10 -0
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js +6144 -0
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js.map +1 -0
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.d.ts +24 -0
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js +98 -0
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js.map +1 -0
- package/lib/infrastructure/outbound/index.d.ts +9 -0
- package/lib/infrastructure/outbound/index.js +26 -0
- package/lib/infrastructure/outbound/index.js.map +1 -0
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.d.ts +17 -0
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js +3 -0
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js.map +1 -0
- package/lib/infrastructure/outbound/ports/index.d.ts +11 -0
- package/lib/infrastructure/outbound/ports/index.js +28 -0
- package/lib/infrastructure/outbound/ports/index.js.map +1 -0
- package/lib/infrastructure/outbound/ports/logger/logger.port.d.ts +31 -0
- package/lib/infrastructure/outbound/ports/logger/logger.port.js +3 -0
- package/lib/infrastructure/outbound/ports/logger/logger.port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/logger/logger.types.d.ts +7 -0
- package/lib/infrastructure/outbound/ports/logger/logger.types.js +3 -0
- package/lib/infrastructure/outbound/ports/logger/logger.types.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.d.ts +51 -0
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js +57 -0
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/enums/index.d.ts +7 -0
- package/lib/infrastructure/outbound/ports/soap/enums/index.js +24 -0
- package/lib/infrastructure/outbound/ports/soap/enums/index.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.d.ts +9 -0
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js +14 -0
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.d.ts +15 -0
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js +20 -0
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/index.d.ts +7 -0
- package/lib/infrastructure/outbound/ports/soap/index.js +24 -0
- package/lib/infrastructure/outbound/ports/soap/index.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.d.ts +42 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.d.ts +102 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.d.ts +145 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.d.ts +227 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.d.ts +300 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.d.ts +301 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.d.ts +835 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.d.ts +876 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.d.ts +15 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.js +53 -0
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.d.ts +30 -0
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.d.ts +45 -0
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js +3 -0
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js.map +1 -0
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.d.ts +24 -0
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.js +3 -0
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.js.map +1 -0
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.d.ts +9 -0
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js +3 -0
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js.map +1 -0
- package/lib/infrastructure/types/index.d.ts +5 -0
- package/lib/infrastructure/types/index.js +22 -0
- package/lib/infrastructure/types/index.js.map +1 -0
- package/lib/infrastructure/types/soap.types.d.ts +29 -0
- package/lib/infrastructure/types/soap.types.js +3 -0
- package/lib/infrastructure/types/soap.types.js.map +1 -0
- package/lib/infrastructure/utils/crypt-data.d.ts +6 -0
- package/lib/infrastructure/utils/crypt-data.js +46 -0
- package/lib/infrastructure/utils/crypt-data.js.map +1 -0
- package/lib/infrastructure/utils/env.d.ts +10 -0
- package/lib/infrastructure/utils/env.js +32 -0
- package/lib/infrastructure/utils/env.js.map +1 -0
- package/lib/infrastructure/utils/index.d.ts +8 -0
- package/lib/infrastructure/utils/index.js +25 -0
- package/lib/infrastructure/utils/index.js.map +1 -0
- package/lib/infrastructure/utils/logger.d.ts +4 -0
- package/lib/infrastructure/utils/logger.js +21 -0
- package/lib/infrastructure/utils/logger.js.map +1 -0
- package/lib/infrastructure/utils/parser.d.ts +14 -0
- package/lib/infrastructure/utils/parser.js +36 -0
- package/lib/infrastructure/utils/parser.js.map +1 -0
- package/lib/infrastructure/utils/soap-to-dto.mapper.d.ts +200 -0
- package/lib/infrastructure/utils/soap-to-dto.mapper.js +213 -0
- package/lib/infrastructure/utils/soap-to-dto.mapper.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RegisterScopeFourRepository = void 0;
|
|
13
|
+
const base_soap_repository_1 = require("../soap/base-soap-repository");
|
|
14
|
+
const service_names_enum_1 = require("@infrastructure/outbound/ports/soap/enums/service-names.enum");
|
|
15
|
+
const wsdl_path_enum_1 = require("@infrastructure/outbound/ports/soap/enums/wsdl-path.enum");
|
|
16
|
+
const endpoints_enum_1 = require("@infrastructure/outbound/ports/soap/enums/endpoints.enum");
|
|
17
|
+
class RegisterScopeFourRepository extends base_soap_repository_1.BaseSoapRepository {
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super(config);
|
|
20
|
+
}
|
|
21
|
+
getClient() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
if (this.client) {
|
|
24
|
+
return this.client;
|
|
25
|
+
}
|
|
26
|
+
const wsdlName = this.production
|
|
27
|
+
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_FOUR
|
|
28
|
+
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_FOUR_TEST;
|
|
29
|
+
const endpoint = this.production
|
|
30
|
+
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_FOUR
|
|
31
|
+
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_FOUR_TEST;
|
|
32
|
+
const client = yield this.soapClient.createClient(wsdlName, {
|
|
33
|
+
forceSoap12Headers: false,
|
|
34
|
+
});
|
|
35
|
+
this.soapClient.setEndpoint(client, endpoint);
|
|
36
|
+
this.client = this.createAuthenticatedProxy(client, {
|
|
37
|
+
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_FOUR,
|
|
38
|
+
injectAuthProperty: true,
|
|
39
|
+
soapVersion: endpoints_enum_1.SoapServiceVersion.ServiceSoap,
|
|
40
|
+
authMapper: (auth) => ({
|
|
41
|
+
token: auth.Auth.Token,
|
|
42
|
+
sign: auth.Auth.Sign,
|
|
43
|
+
cuitRepresentada: auth.Auth.Cuit,
|
|
44
|
+
}),
|
|
45
|
+
excludeMethods: ["dummy"],
|
|
46
|
+
});
|
|
47
|
+
return this.client;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
getServerStatus() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const client = yield this.getClient();
|
|
53
|
+
const [output] = yield client.dummyAsync({});
|
|
54
|
+
const result = output.return;
|
|
55
|
+
return {
|
|
56
|
+
appserver: result.appserver,
|
|
57
|
+
dbserver: result.dbserver,
|
|
58
|
+
authserver: result.authserver,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
getTaxpayerDetails(identifier) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
var _a;
|
|
65
|
+
const client = yield this.getClient();
|
|
66
|
+
try {
|
|
67
|
+
const [output] = yield client.getPersonaAsync({
|
|
68
|
+
idPersona: identifier,
|
|
69
|
+
});
|
|
70
|
+
const personaReturn = output.personaReturn;
|
|
71
|
+
if (!personaReturn || !personaReturn.persona) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return this.mapPersonaReturnToDto(personaReturn);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 602 || ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes("no existe"))) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
mapPersonaReturnToDto(personaReturn) {
|
|
85
|
+
const persona = personaReturn.persona || personaReturn;
|
|
86
|
+
return {
|
|
87
|
+
idPersona: persona.idPersona,
|
|
88
|
+
tipoPersona: persona.tipoPersona,
|
|
89
|
+
estadoClave: persona.estadoClave,
|
|
90
|
+
datosGenerales: persona.datosGenerales || persona,
|
|
91
|
+
datosMonotributo: persona.datosMonotributo,
|
|
92
|
+
datosRegimenGeneral: persona.datosRegimenGeneral,
|
|
93
|
+
errorConstancia: persona.errorConstancia
|
|
94
|
+
? {
|
|
95
|
+
error: persona.errorConstancia.error || "",
|
|
96
|
+
codigo: persona.errorConstancia.codigo,
|
|
97
|
+
}
|
|
98
|
+
: undefined,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.RegisterScopeFourRepository = RegisterScopeFourRepository;
|
|
103
|
+
//# sourceMappingURL=register-scope-four.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-scope-four.repository.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/register/register-scope-four.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,uEAAkE;AAMlE,qGAAgG;AAChG,6FAAwF;AACxF,6FAGkE;AAGlE,MAAa,2BACX,SAAQ,yCAAkB;IAK1B,YAAY,MAA2C;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEa,SAAS;;YACrB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,MAAM,CAAC;YACrB,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU;gBAC9B,CAAC,CAAC,6BAAY,CAAC,gBAAgB;gB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,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,MAAM;iBACvC;gBACH,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;CACF;AAlGD,kEAkGC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IRegisterScopeTenRepositoryPort } from "@application/ports/register/register-repository.ports";
|
|
2
|
+
import { BaseSoapRepository } from "../soap/base-soap-repository";
|
|
3
|
+
import { BaseSoapRepositoryConstructorConfig } from "@infrastructure/outbound/ports/soap/soap-repository.types";
|
|
4
|
+
import { RegisterServerStatusDto, TaxpayerDetailsDto } from "@application/dto/register.dto";
|
|
5
|
+
export declare class RegisterScopeTenRepository extends BaseSoapRepository implements IRegisterScopeTenRepositoryPort {
|
|
6
|
+
private client?;
|
|
7
|
+
constructor(config: BaseSoapRepositoryConstructorConfig);
|
|
8
|
+
private getClient;
|
|
9
|
+
getServerStatus(): Promise<RegisterServerStatusDto>;
|
|
10
|
+
getTaxpayerDetails(identifier: number): Promise<TaxpayerDetailsDto | null>;
|
|
11
|
+
private mapPersonaReturnToDto;
|
|
12
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RegisterScopeTenRepository = void 0;
|
|
13
|
+
const base_soap_repository_1 = require("../soap/base-soap-repository");
|
|
14
|
+
const service_names_enum_1 = require("@infrastructure/outbound/ports/soap/enums/service-names.enum");
|
|
15
|
+
const wsdl_path_enum_1 = require("@infrastructure/outbound/ports/soap/enums/wsdl-path.enum");
|
|
16
|
+
const endpoints_enum_1 = require("@infrastructure/outbound/ports/soap/enums/endpoints.enum");
|
|
17
|
+
class RegisterScopeTenRepository extends base_soap_repository_1.BaseSoapRepository {
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super(config);
|
|
20
|
+
}
|
|
21
|
+
getClient() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
if (this.client) {
|
|
24
|
+
return this.client;
|
|
25
|
+
}
|
|
26
|
+
const wsdlName = this.production
|
|
27
|
+
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_TEN
|
|
28
|
+
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_TEN_TEST;
|
|
29
|
+
const endpoint = this.production
|
|
30
|
+
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_TEN
|
|
31
|
+
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_TEN_TEST;
|
|
32
|
+
const client = yield this.soapClient.createClient(wsdlName, {
|
|
33
|
+
forceSoap12Headers: false,
|
|
34
|
+
});
|
|
35
|
+
this.soapClient.setEndpoint(client, endpoint);
|
|
36
|
+
this.client = this.createAuthenticatedProxy(client, {
|
|
37
|
+
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_TEN,
|
|
38
|
+
injectAuthProperty: true,
|
|
39
|
+
soapVersion: endpoints_enum_1.SoapServiceVersion.ServiceSoap,
|
|
40
|
+
authMapper: (auth) => ({
|
|
41
|
+
token: auth.Auth.Token,
|
|
42
|
+
sign: auth.Auth.Sign,
|
|
43
|
+
cuitRepresentada: auth.Auth.Cuit,
|
|
44
|
+
}),
|
|
45
|
+
excludeMethods: ["dummy"],
|
|
46
|
+
});
|
|
47
|
+
return this.client;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
getServerStatus() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const client = yield this.getClient();
|
|
53
|
+
const [output] = yield client.dummyAsync({});
|
|
54
|
+
const result = output.return;
|
|
55
|
+
return {
|
|
56
|
+
appserver: result.appserver,
|
|
57
|
+
dbserver: result.dbserver,
|
|
58
|
+
authserver: result.authserver,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
getTaxpayerDetails(identifier) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
var _a;
|
|
65
|
+
const client = yield this.getClient();
|
|
66
|
+
try {
|
|
67
|
+
const [output] = yield client.getPersonaAsync({
|
|
68
|
+
idPersona: identifier,
|
|
69
|
+
});
|
|
70
|
+
const personaReturn = output.personaReturn;
|
|
71
|
+
if (!personaReturn || !personaReturn.persona) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return this.mapPersonaReturnToDto(personaReturn);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 602 || ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes("no existe"))) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
// Create a new error with only serializable properties to avoid circular structure issues
|
|
81
|
+
const sanitizedError = new Error((error === null || error === void 0 ? void 0 : error.message) || "Unknown error");
|
|
82
|
+
sanitizedError.name = (error === null || error === void 0 ? void 0 : error.name) || "Error";
|
|
83
|
+
if (error === null || error === void 0 ? void 0 : error.code) {
|
|
84
|
+
sanitizedError.code = error.code;
|
|
85
|
+
}
|
|
86
|
+
if (error === null || error === void 0 ? void 0 : error.stack) {
|
|
87
|
+
sanitizedError.stack = error.stack;
|
|
88
|
+
}
|
|
89
|
+
throw sanitizedError;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
mapPersonaReturnToDto(personaReturn) {
|
|
94
|
+
const persona = personaReturn.persona || personaReturn;
|
|
95
|
+
return {
|
|
96
|
+
idPersona: persona.idPersona,
|
|
97
|
+
tipoPersona: persona.tipoPersona,
|
|
98
|
+
estadoClave: persona.estadoClave,
|
|
99
|
+
datosGenerales: persona.datosGenerales || persona,
|
|
100
|
+
datosMonotributo: persona.datosMonotributo,
|
|
101
|
+
datosRegimenGeneral: persona.datosRegimenGeneral,
|
|
102
|
+
errorConstancia: persona.errorConstancia
|
|
103
|
+
? {
|
|
104
|
+
error: persona.errorConstancia.error || "",
|
|
105
|
+
codigo: persona.errorConstancia.codigo,
|
|
106
|
+
}
|
|
107
|
+
: undefined,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.RegisterScopeTenRepository = RegisterScopeTenRepository;
|
|
112
|
+
//# sourceMappingURL=register-scope-ten.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-scope-ten.repository.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/register/register-scope-ten.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,uEAAkE;AAMlE,qGAAgG;AAChG,6FAAwF;AACxF,6FAGkE;AAGlE,MAAa,0BACX,SAAQ,yCAAkB;IAK1B,YAAY,MAA2C;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEa,SAAS;;YACrB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,MAAM,CAAC;YACrB,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU;gBAC9B,CAAC,CAAC,6BAAY,CAAC,eAAe;gBAC9B,CAAC,CAAC,6BAAY,CAAC,oBAAoB,CAAC;YACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU;gBAC9B,CAAC,CAAC,8BAAa,CAAC,eAAe;gBAC/B,CAAC,CAAC,8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AS,EAAE,OAAO,CAAC,SAAS;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,OAAO;YACjD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,eAAe,EAAE,OAAO,CAAC,eAAe;gBACtC,CAAC,CAAC;oBACE,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE;oBAC1C,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,MAAM;iBACvC;gBACH,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;CACF;AA3GD,gEA2GC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IRegisterScopeThirteenRepositoryPort } from "@application/ports/register/register-repository.ports";
|
|
2
|
+
import { BaseSoapRepository } from "../soap/base-soap-repository";
|
|
3
|
+
import { BaseSoapRepositoryConstructorConfig } from "@infrastructure/outbound/ports/soap/soap-repository.types";
|
|
4
|
+
import { RegisterServerStatusDto, TaxpayerDetailsDto, TaxIDByDocumentResultDto } from "@application/dto/register.dto";
|
|
5
|
+
export declare class RegisterScopeThirteenRepository extends BaseSoapRepository implements IRegisterScopeThirteenRepositoryPort {
|
|
6
|
+
private client?;
|
|
7
|
+
constructor(config: BaseSoapRepositoryConstructorConfig);
|
|
8
|
+
private getClient;
|
|
9
|
+
getServerStatus(): Promise<RegisterServerStatusDto>;
|
|
10
|
+
getTaxpayerDetails(identifier: number): Promise<TaxpayerDetailsDto | null>;
|
|
11
|
+
getTaxIDByDocument(documentNumber: string): Promise<TaxIDByDocumentResultDto>;
|
|
12
|
+
private mapPersonaReturnToDto;
|
|
13
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RegisterScopeThirteenRepository = void 0;
|
|
13
|
+
const base_soap_repository_1 = require("../soap/base-soap-repository");
|
|
14
|
+
const service_names_enum_1 = require("@infrastructure/outbound/ports/soap/enums/service-names.enum");
|
|
15
|
+
const wsdl_path_enum_1 = require("@infrastructure/outbound/ports/soap/enums/wsdl-path.enum");
|
|
16
|
+
const endpoints_enum_1 = require("@infrastructure/outbound/ports/soap/enums/endpoints.enum");
|
|
17
|
+
class RegisterScopeThirteenRepository extends base_soap_repository_1.BaseSoapRepository {
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super(config);
|
|
20
|
+
}
|
|
21
|
+
getClient() {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
if (this.client) {
|
|
24
|
+
return this.client;
|
|
25
|
+
}
|
|
26
|
+
const wsdlName = this.production
|
|
27
|
+
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_THIRTEEN
|
|
28
|
+
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_THIRTEEN_TEST;
|
|
29
|
+
const endpoint = this.production
|
|
30
|
+
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_THIRTEEN
|
|
31
|
+
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_THIRTEEN_TEST;
|
|
32
|
+
const client = yield this.soapClient.createClient(wsdlName, {
|
|
33
|
+
forceSoap12Headers: false,
|
|
34
|
+
});
|
|
35
|
+
this.soapClient.setEndpoint(client, endpoint);
|
|
36
|
+
this.client = this.createAuthenticatedProxy(client, {
|
|
37
|
+
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_THIRTEEN,
|
|
38
|
+
injectAuthProperty: true,
|
|
39
|
+
soapVersion: endpoints_enum_1.SoapServiceVersion.ServiceSoap,
|
|
40
|
+
authMapper: (auth) => ({
|
|
41
|
+
token: auth.Auth.Token,
|
|
42
|
+
sign: auth.Auth.Sign,
|
|
43
|
+
cuitRepresentada: auth.Auth.Cuit,
|
|
44
|
+
}),
|
|
45
|
+
excludeMethods: ["dummy"],
|
|
46
|
+
});
|
|
47
|
+
return this.client;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
getServerStatus() {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const client = yield this.getClient();
|
|
53
|
+
const [output] = yield client.dummyAsync({});
|
|
54
|
+
const result = output.return;
|
|
55
|
+
return {
|
|
56
|
+
appserver: result.appserver,
|
|
57
|
+
dbserver: result.dbserver,
|
|
58
|
+
authserver: result.authserver,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
getTaxpayerDetails(identifier) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
var _a;
|
|
65
|
+
const client = yield this.getClient();
|
|
66
|
+
try {
|
|
67
|
+
const [output] = yield client.getPersonaAsync({
|
|
68
|
+
idPersona: identifier,
|
|
69
|
+
});
|
|
70
|
+
const personaReturn = output.personaReturn;
|
|
71
|
+
if (!personaReturn || !personaReturn.persona) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return this.mapPersonaReturnToDto(personaReturn);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 602 || ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes("no existe"))) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
getTaxIDByDocument(documentNumber) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
var _a;
|
|
87
|
+
const client = yield this.getClient();
|
|
88
|
+
try {
|
|
89
|
+
const [output] = yield client.getIdPersonaListByDocumentoAsync({
|
|
90
|
+
documento: documentNumber,
|
|
91
|
+
});
|
|
92
|
+
const idPersonaListReturn = output.idPersonaListReturn;
|
|
93
|
+
const idPersona = Array.isArray(idPersonaListReturn.idPersona)
|
|
94
|
+
? idPersonaListReturn.idPersona
|
|
95
|
+
: typeof idPersonaListReturn.idPersona === "number"
|
|
96
|
+
? [idPersonaListReturn.idPersona]
|
|
97
|
+
: [];
|
|
98
|
+
return {
|
|
99
|
+
idPersona,
|
|
100
|
+
errorConstancia: undefined,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === 602 || ((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.includes("no existe"))) {
|
|
105
|
+
return {
|
|
106
|
+
idPersona: [],
|
|
107
|
+
errorConstancia: undefined,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
mapPersonaReturnToDto(personaReturn) {
|
|
115
|
+
const persona = personaReturn.persona || personaReturn;
|
|
116
|
+
return {
|
|
117
|
+
idPersona: persona.idPersona,
|
|
118
|
+
tipoPersona: persona.tipoPersona,
|
|
119
|
+
estadoClave: persona.estadoClave,
|
|
120
|
+
datosGenerales: persona.datosGenerales || persona,
|
|
121
|
+
datosMonotributo: persona.datosMonotributo,
|
|
122
|
+
datosRegimenGeneral: persona.datosRegimenGeneral,
|
|
123
|
+
errorConstancia: persona.errorConstancia
|
|
124
|
+
? {
|
|
125
|
+
error: persona.errorConstancia.error || "",
|
|
126
|
+
codigo: persona.errorConstancia.codigo,
|
|
127
|
+
}
|
|
128
|
+
: undefined,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.RegisterScopeThirteenRepository = RegisterScopeThirteenRepository;
|
|
133
|
+
//# sourceMappingURL=register-scope-thirteen.repository.js.map
|
package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-scope-thirteen.repository.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,uEAAkE;AAOlE,qGAAgG;AAChG,6FAAwF;AACxF,6FAGkE;AAGlE,MAAa,+BACX,SAAQ,yCAAkB;IAK1B,YAAY,MAA2C;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAEa,SAAS;;YACrB,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChB,OAAO,IAAI,CAAC,MAAM,CAAC;YACrB,CAAC;YAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU;gBAC9B,CAAC,CAAC,6BAAY,CAAC,oBAAoB;gBACnC,CAAC,CAAC,6BAAY,CAAC,yBAAyB,CAAC;YAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU;gBAC9B,CAAC,CAAC,8BAAa,CAAC,oBAAoB;gBACpC,CAAC,CAAC,8BAAa,CAAC,yBAAyB,CAAC;YAE5C,MAAM,MAAM,GACV,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAA6B,QAAQ,EAAE;gBACvE,kBAAkB,EAAE,KAAK;aAC1B,CAAC,CAAC;YAEL,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;Y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,SAAS,EAAE,EAAE;wBACb,eAAe,EAAE,SAAS;qBAC3B,CAAC;gBACJ,CAAC;gBACD,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;KAAA;IAEO,qBAAqB,CAAC,aAAkB;QAC9C,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC;QAEvD,OAAO;YACL,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,OAAO;YACjD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,eAAe,EAAE,OAAO,CAAC,eAAe;gBACtC,CAAC,CAAC;oBACE,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE;oBAC1C,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,MAAM;iBACvC;gBACH,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;CACF;AAnID,0EAmIC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base SOAP Repository
|
|
3
|
+
* Abstract base class for SOAP repositories with common authentication proxy logic
|
|
4
|
+
*/
|
|
5
|
+
import { Client } from "soap";
|
|
6
|
+
import { ISoapClientPort } from "@infrastructure/outbound/ports/soap/soap-client.port";
|
|
7
|
+
import { IAuthenticationRepositoryPort } from "@application/ports/authentication/authentication-repository.port";
|
|
8
|
+
import { ILoggerPort } from "@infrastructure/outbound/ports/logger/logger.port";
|
|
9
|
+
import { BaseSoapRepositoryConstructorConfig, AuthenticatedProxyOptions } from "@infrastructure/outbound/ports/soap/soap-repository.types";
|
|
10
|
+
/**
|
|
11
|
+
* Base class for SOAP repositories
|
|
12
|
+
* Provides common functionality for authentication proxy
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class BaseSoapRepository {
|
|
15
|
+
protected readonly cuit: number;
|
|
16
|
+
protected readonly production: boolean;
|
|
17
|
+
protected readonly soapClient: ISoapClientPort;
|
|
18
|
+
protected readonly authRepository: IAuthenticationRepositoryPort;
|
|
19
|
+
protected readonly logger: ILoggerPort;
|
|
20
|
+
protected readonly useSoap12: boolean;
|
|
21
|
+
constructor(config: BaseSoapRepositoryConstructorConfig);
|
|
22
|
+
/**
|
|
23
|
+
* Create a proxy that automatically injects Auth into SOAP method calls
|
|
24
|
+
* Only intercepts methods that actually require Auth (checked via client.describe())
|
|
25
|
+
* @param client SOAP client to proxy
|
|
26
|
+
* @param options Configuration options for the proxy
|
|
27
|
+
* @returns Proxied client with automatic authentication injection
|
|
28
|
+
*/
|
|
29
|
+
protected createAuthenticatedProxy<T extends Client>(client: T, options: AuthenticatedProxyOptions): T;
|
|
30
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseSoapRepository = void 0;
|
|
13
|
+
const soap_client_1 = require("./soap-client");
|
|
14
|
+
const endpoints_enum_1 = require("@infrastructure/outbound/ports/soap/enums/endpoints.enum");
|
|
15
|
+
/**
|
|
16
|
+
* Base class for SOAP repositories
|
|
17
|
+
* Provides common functionality for authentication proxy
|
|
18
|
+
*/
|
|
19
|
+
class BaseSoapRepository {
|
|
20
|
+
constructor(config) {
|
|
21
|
+
var _a, _b, _c;
|
|
22
|
+
this.soapClient = (_a = config.soapClient) !== null && _a !== void 0 ? _a : new soap_client_1.SoapClient();
|
|
23
|
+
this.authRepository = config.authRepository;
|
|
24
|
+
this.logger = config.logger;
|
|
25
|
+
this.cuit = config.cuit;
|
|
26
|
+
this.production = (_b = config.production) !== null && _b !== void 0 ? _b : false;
|
|
27
|
+
this.useSoap12 = (_c = config.useSoap12) !== null && _c !== void 0 ? _c : true; // Default to SOAP 1.2
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create a proxy that automatically injects Auth into SOAP method calls
|
|
31
|
+
* Only intercepts methods that actually require Auth (checked via client.describe())
|
|
32
|
+
* @param client SOAP client to proxy
|
|
33
|
+
* @param options Configuration options for the proxy
|
|
34
|
+
* @returns Proxied client with automatic authentication injection
|
|
35
|
+
*/
|
|
36
|
+
createAuthenticatedProxy(client, options) {
|
|
37
|
+
const { serviceName, injectAuthProperty = false, soapVersion = endpoints_enum_1.SoapServiceVersion.ServiceSoap12, } = options;
|
|
38
|
+
return new Proxy(client, {
|
|
39
|
+
get: (target, prop) => {
|
|
40
|
+
var _a, _b, _c, _d, _e;
|
|
41
|
+
const original = target[prop];
|
|
42
|
+
if (typeof original === "function" && prop.endsWith("Async")) {
|
|
43
|
+
const func = prop.slice(0, -5);
|
|
44
|
+
const soapServices = client.describe();
|
|
45
|
+
const methodRequiresAuth = !((_a = options.excludeMethods) === null || _a === void 0 ? void 0 : _a.includes(func)) &&
|
|
46
|
+
(!!options.authMapper ||
|
|
47
|
+
((_e = (_d = (_c = (_b = soapServices === null || soapServices === void 0 ? void 0 : soapServices.Service) === null || _b === void 0 ? void 0 : _b[soapVersion]) === null || _c === void 0 ? void 0 : _c[func]) === null || _d === void 0 ? void 0 : _d.input) === null || _e === void 0 ? void 0 : _e["Auth"]) !==
|
|
48
|
+
undefined);
|
|
49
|
+
if (methodRequiresAuth) {
|
|
50
|
+
return (params) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const ticket = yield this.authRepository.login(serviceName);
|
|
52
|
+
const auth = this.authRepository.getAuthParams(ticket, this.cuit);
|
|
53
|
+
let authParams = injectAuthProperty ? auth.Auth : auth;
|
|
54
|
+
if (options.authMapper) {
|
|
55
|
+
authParams = options.authMapper(auth);
|
|
56
|
+
}
|
|
57
|
+
const paramsWithAuth = Object.assign(Object.assign({}, authParams), params);
|
|
58
|
+
return original.call(target, paramsWithAuth);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return original;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.BaseSoapRepository = BaseSoapRepository;
|
|
68
|
+
//# sourceMappingURL=base-soap-repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-soap-repository.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/soap/base-soap-repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,+CAA2C;AAI3C,6FAA8F;AAM9F;;;GAGG;AACH,MAAsB,kBAAkB;IAQtC,YAAY,MAA2C;;QACrD,IAAI,CAAC,UAAU,GAAG,MAAA,MAAM,CAAC,UAAU,mCAAI,IAAI,wBAAU,EAAE,CAAC;QACxD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,MAAA,MAAM,CAAC,UAAU,mCAAI,KAAK,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,MAAA,MAAM,CAAC,SAAS,mCAAI,IAAI,CAAC,CAAC,sBAAsB;IACnE,CAAC;IAED;;;;;;OAMG;IACO,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BAEvD,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gCACvB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;4BACxC,CAAC;4BAED,MAAM,cAAc,mCAAQ,UAAU,GAAK,MAAM,CAAE,CAAC;4BACpD,OAAQ,QAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;wBACxD,CAAC,CAAA,CAAC;oBACJ,CAAC;gBACH,CAAC;gBACD,OAAO,QAAQ,CAAC;YAClB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAjED,gDAiEC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOAP Client Facade
|
|
3
|
+
* Internal utility for creating SOAP clients
|
|
4
|
+
*/
|
|
5
|
+
import { Client } from "soap";
|
|
6
|
+
export interface SoapClientParams {
|
|
7
|
+
wsdl: string;
|
|
8
|
+
options?: any;
|
|
9
|
+
}
|
|
10
|
+
export declare class SoapClientFacade {
|
|
11
|
+
private constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Create HTTP client with custom HTTPS agent for legacy servers
|
|
14
|
+
*/
|
|
15
|
+
private static createHttpClientWithAgent;
|
|
16
|
+
/**
|
|
17
|
+
* Create a SOAP client
|
|
18
|
+
*/
|
|
19
|
+
static create<T extends Client>({ wsdl, options, }: SoapClientParams): Promise<T>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SoapClientFacade = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* SOAP Client Facade
|
|
15
|
+
* Internal utility for creating SOAP clients
|
|
16
|
+
*/
|
|
17
|
+
const soap_1 = require("soap");
|
|
18
|
+
class SoapClientFacade {
|
|
19
|
+
constructor() { }
|
|
20
|
+
/**
|
|
21
|
+
* Create HTTP client with custom HTTPS agent for legacy servers
|
|
22
|
+
*/
|
|
23
|
+
static createHttpClientWithAgent(httpsAgent) {
|
|
24
|
+
const originalHttpClient = new soap_1.HttpClient();
|
|
25
|
+
return {
|
|
26
|
+
request: function (rurl, data, callback, exheaders, exoptions) {
|
|
27
|
+
if (!exoptions) {
|
|
28
|
+
exoptions = {};
|
|
29
|
+
}
|
|
30
|
+
if (!exoptions.httpsAgent) {
|
|
31
|
+
exoptions.httpsAgent = httpsAgent;
|
|
32
|
+
}
|
|
33
|
+
return originalHttpClient.request(rurl, data, callback, exheaders, exoptions);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Create a SOAP client
|
|
39
|
+
*/
|
|
40
|
+
static create(_a) {
|
|
41
|
+
return __awaiter(this, arguments, void 0, function* ({ wsdl, options, }) {
|
|
42
|
+
const requestOptions = options === null || options === void 0 ? void 0 : options.request;
|
|
43
|
+
let finalOptions = Object.assign({}, options);
|
|
44
|
+
if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.httpsAgent) {
|
|
45
|
+
const httpsAgent = requestOptions.httpsAgent;
|
|
46
|
+
finalOptions = Object.assign(Object.assign({}, options), { httpClient: SoapClientFacade.createHttpClientWithAgent(httpsAgent) });
|
|
47
|
+
}
|
|
48
|
+
const client = (yield (0, soap_1.createClientAsync)(wsdl, finalOptions));
|
|
49
|
+
return client;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.SoapClientFacade = SoapClientFacade;
|
|
54
|
+
//# sourceMappingURL=soap-client-facade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soap-client-facade.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/soap/soap-client-facade.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;GAGG;AACH,+BAA0E;AAQ1E,MAAa,gBAAgB;IAC3B,gBAAuB,CAAC;IAExB;;OAEG;IACK,MAAM,CAAC,yBAAyB,CACtC,UAAuB;QAEvB,MAAM,kBAAkB,GAAG,IAAI,iBAAU,EAAE,CAAC;QAE5C,OAAO;YACL,OAAO,EAAE,UACP,IAAY,EACZ,IAAS,EACT,QAAoD,EACpD,SAAe,EACf,SAAe;gBAEf,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,SAAS,GAAG,EAAE,CAAC;gBACjB,CAAC;gBACD,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;oBAC1B,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC;gBACpC,CAAC;gBACD,OAAO,kBAAkB,CAAC,OAAO,CAC/B,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,SAAS,CACV,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAO,MAAM;6DAAmB,EAC3C,IAAI,EACJ,OAAO,GACU;YACjB,MAAM,cAAc,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAc,CAAC;YAC/C,IAAI,YAAY,qBAAQ,OAAO,CAAE,CAAC;YAElC,IAAI,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,UAAU,EAAE,CAAC;gBAC/B,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;gBAC7C,YAAY,mCACP,OAAO,KACV,UAAU,EAAE,gBAAgB,CAAC,yBAAyB,CAAC,UAAU,CAAC,GACnE,CAAC;YACJ,CAAC;YAED,MAAM,MAAM,GAAG,CAAC,MAAM,IAAA,wBAAiB,EAAC,IAAI,EAAE,YAAY,CAAC,CAAM,CAAC;YAElE,OAAO,MAAM,CAAC;QAChB,CAAC;KAAA;CACF;AA1DD,4CA0DC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SOAP Client
|
|
3
|
+
* Implements ISoapClientPort using the soap library
|
|
4
|
+
*/
|
|
5
|
+
import { ISoapClientPort } from "@infrastructure/outbound/ports/soap/soap-client.port";
|
|
6
|
+
import { Client } from "soap";
|
|
7
|
+
export declare class SoapClient implements ISoapClientPort {
|
|
8
|
+
createClient<T extends Client>(wsdlName: string, options?: any): Promise<T>;
|
|
9
|
+
setEndpoint(client: any, endpoint: string): void;
|
|
10
|
+
call<T extends [any, string, any, string]>(client: any, methodName: string, params: any): Promise<T>;
|
|
11
|
+
}
|