@arcasdk/core 0.1.0 → 0.3.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/README.md +20 -0
- package/package.json +5 -4
- 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/application/dto/electronic-billing.dto.d.ts +0 -114
- package/lib/application/dto/electronic-billing.dto.js +0 -3
- package/lib/application/dto/electronic-billing.dto.js.map +0 -1
- package/lib/application/dto/index.d.ts +0 -6
- package/lib/application/dto/index.js +0 -23
- package/lib/application/dto/index.js.map +0 -1
- package/lib/application/dto/register.dto.d.ts +0 -116
- package/lib/application/dto/register.dto.js +0 -8
- package/lib/application/dto/register.dto.js.map +0 -1
- package/lib/application/index.d.ts +0 -10
- package/lib/application/index.js +0 -27
- package/lib/application/index.js.map +0 -1
- package/lib/application/ports/authentication/authentication-repository.port.d.ts +0 -29
- package/lib/application/ports/authentication/authentication-repository.port.js +0 -3
- package/lib/application/ports/authentication/authentication-repository.port.js.map +0 -1
- package/lib/application/ports/authentication/index.d.ts +0 -5
- package/lib/application/ports/authentication/index.js +0 -22
- package/lib/application/ports/authentication/index.js.map +0 -1
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.d.ts +0 -77
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.js +0 -3
- package/lib/application/ports/electronic-billing/electronic-billing-repository.port.js.map +0 -1
- package/lib/application/ports/electronic-billing/index.d.ts +0 -5
- package/lib/application/ports/electronic-billing/index.js +0 -22
- package/lib/application/ports/electronic-billing/index.js.map +0 -1
- package/lib/application/ports/index.d.ts +0 -7
- package/lib/application/ports/index.js +0 -24
- package/lib/application/ports/index.js.map +0 -1
- package/lib/application/ports/register/index.d.ts +0 -5
- package/lib/application/ports/register/index.js +0 -22
- package/lib/application/ports/register/index.js.map +0 -1
- package/lib/application/ports/register/register-repository.port.d.ts +0 -42
- package/lib/application/ports/register/register-repository.port.js +0 -12
- package/lib/application/ports/register/register-repository.port.js.map +0 -1
- package/lib/application/services/electronic-billing.service.d.ts +0 -129
- package/lib/application/services/electronic-billing.service.js +0 -217
- package/lib/application/services/electronic-billing.service.js.map +0 -1
- package/lib/application/services/index.d.ts +0 -10
- package/lib/application/services/index.js +0 -27
- package/lib/application/services/index.js.map +0 -1
- package/lib/application/services/register-inscription-proof.service.d.ts +0 -35
- package/lib/application/services/register-inscription-proof.service.js +0 -101
- package/lib/application/services/register-inscription-proof.service.js.map +0 -1
- package/lib/application/services/register-scope-five.service.d.ts +0 -35
- package/lib/application/services/register-scope-five.service.js +0 -101
- package/lib/application/services/register-scope-five.service.js.map +0 -1
- package/lib/application/services/register-scope-four.service.d.ts +0 -28
- package/lib/application/services/register-scope-four.service.js +0 -72
- package/lib/application/services/register-scope-four.service.js.map +0 -1
- package/lib/application/services/register-scope-ten.service.d.ts +0 -28
- package/lib/application/services/register-scope-ten.service.js +0 -72
- package/lib/application/services/register-scope-ten.service.js.map +0 -1
- package/lib/application/services/register-scope-thirteen.service.d.ts +0 -36
- package/lib/application/services/register-scope-thirteen.service.js +0 -96
- package/lib/application/services/register-scope-thirteen.service.js.map +0 -1
- package/lib/application/types/auth.types.d.ts +0 -19
- package/lib/application/types/auth.types.js +0 -7
- package/lib/application/types/auth.types.js.map +0 -1
- package/lib/application/types/context.types.d.ts +0 -46
- package/lib/application/types/context.types.js +0 -3
- package/lib/application/types/context.types.js.map +0 -1
- package/lib/application/types/index.d.ts +0 -8
- package/lib/application/types/index.js +0 -25
- package/lib/application/types/index.js.map +0 -1
- package/lib/application/types/result.types.d.ts +0 -10
- package/lib/application/types/result.types.js +0 -3
- package/lib/application/types/result.types.js.map +0 -1
- package/lib/application/types/use-case-inputs.types.d.ts +0 -42
- package/lib/application/types/use-case-inputs.types.js +0 -3
- package/lib/application/types/use-case-inputs.types.js.map +0 -1
- package/lib/application/use-cases/authentication/get-auth-params.use-case.d.ts +0 -16
- package/lib/application/use-cases/authentication/get-auth-params.use-case.js +0 -29
- package/lib/application/use-cases/authentication/get-auth-params.use-case.js.map +0 -1
- package/lib/application/use-cases/authentication/index.d.ts +0 -7
- package/lib/application/use-cases/authentication/index.js +0 -24
- package/lib/application/use-cases/authentication/index.js.map +0 -1
- package/lib/application/use-cases/authentication/login.use-case.d.ts +0 -17
- package/lib/application/use-cases/authentication/login.use-case.js +0 -29
- package/lib/application/use-cases/authentication/login.use-case.js.map +0 -1
- package/lib/application/use-cases/authentication/request-login.use-case.d.ts +0 -16
- package/lib/application/use-cases/authentication/request-login.use-case.js +0 -29
- package/lib/application/use-cases/authentication/request-login.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.d.ts +0 -17
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js +0 -39
- package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.d.ts +0 -17
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js +0 -33
- package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-document-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-document-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-document-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.d.ts +0 -17
- package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.js +0 -29
- package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.d.ts +0 -40
- package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.js +0 -73
- package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-server-status.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-server-status.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-server-status.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.d.ts +0 -17
- package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.js +0 -29
- package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.d.ts +0 -15
- package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.js +0 -28
- package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.js.map +0 -1
- package/lib/application/use-cases/electronic-billing/index.d.ts +0 -18
- package/lib/application/use-cases/electronic-billing/index.js +0 -36
- package/lib/application/use-cases/electronic-billing/index.js.map +0 -1
- package/lib/application/use-cases/index.d.ts +0 -7
- package/lib/application/use-cases/index.js +0 -24
- package/lib/application/use-cases/index.js.map +0 -1
- package/lib/application/use-cases/register/get-server-status.use-case.d.ts +0 -17
- package/lib/application/use-cases/register/get-server-status.use-case.js +0 -29
- package/lib/application/use-cases/register/get-server-status.use-case.js.map +0 -1
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.d.ts +0 -18
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js +0 -29
- package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js.map +0 -1
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.d.ts +0 -17
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.js +0 -29
- package/lib/application/use-cases/register/get-taxpayer-details.use-case.js.map +0 -1
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.d.ts +0 -18
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.js +0 -29
- package/lib/application/use-cases/register/get-taxpayers-details.use-case.js.map +0 -1
- package/lib/application/use-cases/register/index.d.ts +0 -8
- package/lib/application/use-cases/register/index.js +0 -25
- package/lib/application/use-cases/register/index.js.map +0 -1
- package/lib/arca.d.ts +0 -23
- package/lib/arca.js +0 -83
- package/lib/arca.js.map +0 -1
- package/lib/domain/entities/access-ticket.entity.d.ts +0 -73
- package/lib/domain/entities/access-ticket.entity.js +0 -144
- package/lib/domain/entities/access-ticket.entity.js.map +0 -1
- package/lib/domain/entities/index.d.ts +0 -6
- package/lib/domain/entities/index.js +0 -23
- package/lib/domain/entities/index.js.map +0 -1
- package/lib/domain/entities/voucher.entity.d.ts +0 -113
- package/lib/domain/entities/voucher.entity.js +0 -216
- package/lib/domain/entities/voucher.entity.js.map +0 -1
- package/lib/domain/index.d.ts +0 -6
- package/lib/domain/index.js +0 -23
- package/lib/domain/index.js.map +0 -1
- package/lib/domain/types/electronic-billing.types.d.ts +0 -120
- package/lib/domain/types/electronic-billing.types.js +0 -8
- package/lib/domain/types/electronic-billing.types.js.map +0 -1
- package/lib/domain/types/index.d.ts +0 -6
- package/lib/domain/types/index.js +0 -23
- package/lib/domain/types/index.js.map +0 -1
- package/lib/domain/types/voucher.types.d.ts +0 -65
- package/lib/domain/types/voucher.types.js +0 -3
- package/lib/domain/types/voucher.types.js.map +0 -1
- package/lib/domain/value-objects/cae.vo.d.ts +0 -47
- package/lib/domain/value-objects/cae.vo.js +0 -80
- package/lib/domain/value-objects/cae.vo.js.map +0 -1
- package/lib/domain/value-objects/cuit.vo.d.ts +0 -49
- package/lib/domain/value-objects/cuit.vo.js +0 -98
- package/lib/domain/value-objects/cuit.vo.js.map +0 -1
- package/lib/domain/value-objects/index.d.ts +0 -7
- package/lib/domain/value-objects/index.js +0 -24
- package/lib/domain/value-objects/index.js.map +0 -1
- package/lib/domain/value-objects/voucher-number.vo.d.ts +0 -66
- package/lib/domain/value-objects/voucher-number.vo.js +0 -106
- package/lib/domain/value-objects/voucher-number.vo.js.map +0 -1
- package/lib/index.d.ts +0 -8
- package/lib/index.js +0 -27
- package/lib/index.js.map +0 -1
- package/lib/infrastructure/constants/index.d.ts +0 -5
- package/lib/infrastructure/constants/index.js +0 -22
- package/lib/infrastructure/constants/index.js.map +0 -1
- package/lib/infrastructure/constants/ssl.constants.d.ts +0 -16
- package/lib/infrastructure/constants/ssl.constants.js +0 -20
- package/lib/infrastructure/constants/ssl.constants.js.map +0 -1
- package/lib/infrastructure/index.d.ts +0 -5
- package/lib/infrastructure/index.js +0 -22
- package/lib/infrastructure/index.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.d.ts +0 -59
- package/lib/infrastructure/outbound/adapters/auth/auth.repository.js +0 -134
- package/lib/infrastructure/outbound/adapters/auth/auth.repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.d.ts +0 -31
- package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js +0 -299
- 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 +0 -22
- 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/index.d.ts +0 -10
- package/lib/infrastructure/outbound/adapters/index.js +0 -27
- package/lib/infrastructure/outbound/adapters/index.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.d.ts +0 -5
- package/lib/infrastructure/outbound/adapters/register/index.js +0 -22
- package/lib/infrastructure/outbound/adapters/register/index.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/register/register-repository.d.ts +0 -32
- package/lib/infrastructure/outbound/adapters/register/register-repository.js +0 -288
- package/lib/infrastructure/outbound/adapters/register/register-repository.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.d.ts +0 -30
- package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js +0 -63
- package/lib/infrastructure/outbound/adapters/soap/base-soap-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 -54
- package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/soap/soap-client.d.ts +0 -11
- package/lib/infrastructure/outbound/adapters/soap/soap-client.js +0 -89
- package/lib/infrastructure/outbound/adapters/soap/soap-client.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.d.ts +0 -10
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js +0 -5804
- package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js.map +0 -1
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.d.ts +0 -24
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js +0 -98
- package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js.map +0 -1
- package/lib/infrastructure/outbound/index.d.ts +0 -9
- package/lib/infrastructure/outbound/index.js +0 -26
- package/lib/infrastructure/outbound/index.js.map +0 -1
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.d.ts +0 -17
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js +0 -3
- package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js.map +0 -1
- package/lib/infrastructure/outbound/ports/index.d.ts +0 -11
- package/lib/infrastructure/outbound/ports/index.js +0 -28
- package/lib/infrastructure/outbound/ports/index.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 +0 -3
- 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 +0 -3
- package/lib/infrastructure/outbound/ports/logger/logger.types.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.d.ts +0 -51
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js +0 -57
- package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/enums/index.d.ts +0 -7
- package/lib/infrastructure/outbound/ports/soap/enums/index.js +0 -24
- package/lib/infrastructure/outbound/ports/soap/enums/index.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.d.ts +0 -9
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js +0 -14
- package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.d.ts +0 -15
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js +0 -20
- package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/index.d.ts +0 -7
- package/lib/infrastructure/outbound/ports/soap/index.js +0 -24
- package/lib/infrastructure/outbound/ports/soap/index.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.d.ts +0 -42
- package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.d.ts +0 -102
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.d.ts +0 -145
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.d.ts +0 -227
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.d.ts +0 -300
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.d.ts +0 -301
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.d.ts +0 -835
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.d.ts +0 -876
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.d.ts +0 -15
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.js +0 -53
- package/lib/infrastructure/outbound/ports/soap/interfaces/index.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.d.ts +0 -28
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/soap-client.port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.d.ts +0 -37
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js +0 -3
- package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js.map +0 -1
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.d.ts +0 -24
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.js +0 -3
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.js.map +0 -1
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.d.ts +0 -9
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js +0 -3
- package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js.map +0 -1
- package/lib/infrastructure/types/index.d.ts +0 -5
- package/lib/infrastructure/types/index.js +0 -22
- package/lib/infrastructure/types/index.js.map +0 -1
- package/lib/infrastructure/types/soap.types.d.ts +0 -29
- package/lib/infrastructure/types/soap.types.js +0 -3
- package/lib/infrastructure/types/soap.types.js.map +0 -1
- package/lib/infrastructure/utils/crypt-data.d.ts +0 -6
- package/lib/infrastructure/utils/crypt-data.js +0 -46
- package/lib/infrastructure/utils/crypt-data.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/index.d.ts +0 -8
- package/lib/infrastructure/utils/index.js +0 -25
- package/lib/infrastructure/utils/index.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/parser.d.ts +0 -14
- package/lib/infrastructure/utils/parser.js +0 -36
- package/lib/infrastructure/utils/parser.js.map +0 -1
- package/lib/infrastructure/utils/soap-to-dto.mapper.d.ts +0 -104
- package/lib/infrastructure/utils/soap-to-dto.mapper.js +0 -111
- package/lib/infrastructure/utils/soap-to-dto.mapper.js.map +0 -1
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SoapServiceVersion = exports.EndpointsEnum = void 0;
|
|
4
|
-
var EndpointsEnum;
|
|
5
|
-
(function (EndpointsEnum) {
|
|
6
|
-
/**
|
|
7
|
-
* WS Autoservicio de Acceso a APIs
|
|
8
|
-
**/
|
|
9
|
-
EndpointsEnum["WSAA"] = "https://wsaa.afip.gov.ar/ws/services/LoginCms";
|
|
10
|
-
EndpointsEnum["WSAA_TEST"] = "https://wsaahomo.afip.gov.ar/ws/services/LoginCms";
|
|
11
|
-
/**
|
|
12
|
-
* WS Facturacion Electronica
|
|
13
|
-
**/
|
|
14
|
-
EndpointsEnum["WSFEV1"] = "https://servicios1.afip.gov.ar/wsfev1/service.asmx";
|
|
15
|
-
EndpointsEnum["WSFEV1_TEST"] = "https://wswhomo.afip.gov.ar/wsfev1/service.asmx";
|
|
16
|
-
/**
|
|
17
|
-
* WS Constancia inscripción
|
|
18
|
-
**/
|
|
19
|
-
EndpointsEnum["WSSR_INSCRIPTION_PROOF"] = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA5";
|
|
20
|
-
EndpointsEnum["WSSR_INSCRIPTION_PROOF_TEST"] = "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA5";
|
|
21
|
-
/**
|
|
22
|
-
* WS Padron 4
|
|
23
|
-
**/
|
|
24
|
-
EndpointsEnum["WSSR_PADRON_FOUR"] = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA4";
|
|
25
|
-
EndpointsEnum["WSSR_PADRON_FOUR_TEST"] = "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA4";
|
|
26
|
-
/**
|
|
27
|
-
* WS Padron 5
|
|
28
|
-
**/
|
|
29
|
-
EndpointsEnum["WSSR_PADRON_FIVE"] = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA5";
|
|
30
|
-
EndpointsEnum["WSSR_PADRON_FIVE_TEST"] = "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA5";
|
|
31
|
-
/**
|
|
32
|
-
* WS Padron 10
|
|
33
|
-
**/
|
|
34
|
-
EndpointsEnum["WSSR_PADRON_TEN"] = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA10";
|
|
35
|
-
EndpointsEnum["WSSR_PADRON_TEN_TEST"] = "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA10";
|
|
36
|
-
/**
|
|
37
|
-
* WS Padron 13
|
|
38
|
-
**/
|
|
39
|
-
EndpointsEnum["WSSR_PADRON_THIRTEEN"] = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA13";
|
|
40
|
-
EndpointsEnum["WSSR_PADRON_THIRTEEN_TEST"] = "https://awshomo.afip.gov.ar/sr-padron/webservices/personaServiceA13";
|
|
41
|
-
})(EndpointsEnum || (exports.EndpointsEnum = EndpointsEnum = {}));
|
|
42
|
-
var SoapServiceVersion;
|
|
43
|
-
(function (SoapServiceVersion) {
|
|
44
|
-
/** Version 1.2 */
|
|
45
|
-
SoapServiceVersion["ServiceSoap12"] = "ServiceSoap12";
|
|
46
|
-
/** Common version */
|
|
47
|
-
SoapServiceVersion["ServiceSoap"] = "ServiceSoap";
|
|
48
|
-
})(SoapServiceVersion || (exports.SoapServiceVersion = SoapServiceVersion = {}));
|
|
49
|
-
//# sourceMappingURL=enums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../../src/infrastructure/outbound/adapters/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,aA0CX;AA1CD,WAAY,aAAa;IACvB;;QAEI;IACJ,uEAAsD,CAAA;IACtD,gFAA+D,CAAA;IAE/D;;QAEI;IACJ,8EAA6D,CAAA;IAC7D,gFAA+D,CAAA;IAE/D;;QAEI;IACJ,0GAAyF,CAAA;IACzF,mHAAkG,CAAA;IAElG;;QAEI;IACJ,oGAAmF,CAAA;IACnF,6GAA4F,CAAA;IAE5F;;QAEI;IACJ,oGAAmF,CAAA;IACnF,6GAA4F,CAAA;IAE5F;;QAEI;IACJ,oGAAmF,CAAA;IACnF,6GAA4F,CAAA;IAE5F;;QAEI;IACJ,yGAAwF,CAAA;IACxF,kHAAiG,CAAA;AACnG,CAAC,EA1CW,aAAa,6BAAb,aAAa,QA0CxB;AAED,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,kBAAkB;IAClB,qDAA+B,CAAA;IAC/B,qBAAqB;IACrB,iDAA2B,CAAA;AAC7B,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Infrastructure Outbound Adapters
|
|
3
|
-
* Exports all outbound adapters
|
|
4
|
-
*/
|
|
5
|
-
export * from "./soap/soap-client";
|
|
6
|
-
export * from "./auth/auth.repository";
|
|
7
|
-
export * from "./storage/file-system-ticket-storage";
|
|
8
|
-
export * from "./logger/winston-logger";
|
|
9
|
-
export * from "./electronic-billing";
|
|
10
|
-
export * from "./register";
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
/**
|
|
18
|
-
* Infrastructure Outbound Adapters
|
|
19
|
-
* Exports all outbound adapters
|
|
20
|
-
*/
|
|
21
|
-
__exportStar(require("./soap/soap-client"), exports);
|
|
22
|
-
__exportStar(require("./auth/auth.repository"), exports);
|
|
23
|
-
__exportStar(require("./storage/file-system-ticket-storage"), exports);
|
|
24
|
-
__exportStar(require("./logger/winston-logger"), exports);
|
|
25
|
-
__exportStar(require("./electronic-billing"), exports);
|
|
26
|
-
__exportStar(require("./register"), exports);
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/infrastructure/outbound/adapters/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,qDAAmC;AACnC,yDAAuC;AACvC,uEAAqD;AACrD,0DAAwC;AACxC,uDAAqC;AACrC,6CAA2B"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Winston Logger
|
|
3
|
-
* Implements ILoggerPort using Winston
|
|
4
|
-
*/
|
|
5
|
-
import { ILoggerPort } from "@infrastructure/outbound/ports/logger/logger.port";
|
|
6
|
-
import { WinstonLoggerConfig } from "@infrastructure/outbound/ports/logger/logger.types";
|
|
7
|
-
export declare class WinstonLogger implements ILoggerPort {
|
|
8
|
-
private logger;
|
|
9
|
-
constructor(config?: WinstonLoggerConfig);
|
|
10
|
-
info(message: string, meta?: any): void;
|
|
11
|
-
error(message: string, error?: Error, meta?: any): void;
|
|
12
|
-
warn(message: string, meta?: any): void;
|
|
13
|
-
debug(message: string, meta?: any): void;
|
|
14
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WinstonLogger = void 0;
|
|
4
|
-
const logger_1 = require("@infrastructure/utils/logger");
|
|
5
|
-
class WinstonLogger {
|
|
6
|
-
constructor(config = {}) {
|
|
7
|
-
var _a;
|
|
8
|
-
this.logger = (0, logger_1.createArcaLogger)((_a = config.enableLogging) !== null && _a !== void 0 ? _a : false);
|
|
9
|
-
}
|
|
10
|
-
info(message, meta) {
|
|
11
|
-
this.logger.info(message, meta);
|
|
12
|
-
}
|
|
13
|
-
error(message, error, meta) {
|
|
14
|
-
this.logger.error(message, Object.assign({ error }, meta));
|
|
15
|
-
}
|
|
16
|
-
warn(message, meta) {
|
|
17
|
-
this.logger.warn(message, meta);
|
|
18
|
-
}
|
|
19
|
-
debug(message, meta) {
|
|
20
|
-
this.logger.debug(message, meta);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.WinstonLogger = WinstonLogger;
|
|
24
|
-
//# sourceMappingURL=winston-logger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"winston-logger.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/logger/winston-logger.ts"],"names":[],"mappings":";;;AAKA,yDAAgE;AAIhE,MAAa,aAAa;IAGxB,YAAY,SAA8B,EAAE;;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAA,yBAAgB,EAAC,MAAA,MAAM,CAAC,aAAa,mCAAI,KAAK,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAU;QAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,KAAa,EAAE,IAAU;QAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,kBAAI,KAAK,IAAK,IAAI,EAAG,CAAC;IACjD,CAAC;IAED,IAAI,CAAC,OAAe,EAAE,IAAU;QAC9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,OAAe,EAAE,IAAU;QAC/B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;CACF;AAtBD,sCAsBC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
/**
|
|
18
|
-
* Register Adapters
|
|
19
|
-
* Exports all register adapters
|
|
20
|
-
*/
|
|
21
|
-
__exportStar(require("./register-repository"), exports);
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/register/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,wDAAsC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Register Repository
|
|
3
|
-
* Implements IRegisterRepositoryPort for AFIP/ARCA Register services
|
|
4
|
-
*/
|
|
5
|
-
import { IRegisterRepositoryPort, RegisterScope } from "@application/ports/register/register-repository.port";
|
|
6
|
-
import { BaseSoapRepository } from "../soap/base-soap-repository";
|
|
7
|
-
import { BaseSoapRepositoryConstructorConfig } from "@infrastructure/outbound/ports/soap/soap-repository.types";
|
|
8
|
-
import { RegisterServerStatusDto, TaxpayerDetailsDto, TaxpayersDetailsDto, TaxIDByDocumentResultDto } from "@application/dto/register.dto";
|
|
9
|
-
export declare class RegisterRepository extends BaseSoapRepository implements IRegisterRepositoryPort {
|
|
10
|
-
private readonly clients;
|
|
11
|
-
constructor(config: BaseSoapRepositoryConstructorConfig);
|
|
12
|
-
/**
|
|
13
|
-
* Get or create SOAP client for a specific scope
|
|
14
|
-
*/
|
|
15
|
-
private getClient;
|
|
16
|
-
/**
|
|
17
|
-
* Get configuration for a specific scope
|
|
18
|
-
*/
|
|
19
|
-
private getScopeConfig;
|
|
20
|
-
getServerStatus(scope: RegisterScope): Promise<RegisterServerStatusDto>;
|
|
21
|
-
getTaxpayerDetails(scope: RegisterScope, identifier: number): Promise<TaxpayerDetailsDto | null>;
|
|
22
|
-
getTaxpayersDetails(scope: RegisterScope, identifiers: number[]): Promise<TaxpayersDetailsDto>;
|
|
23
|
-
getTaxIDByDocument(scope: RegisterScope, documentNumber: string): Promise<TaxIDByDocumentResultDto>;
|
|
24
|
-
/**
|
|
25
|
-
* Map SOAP personaReturn to DTO
|
|
26
|
-
*/
|
|
27
|
-
private mapPersonaReturnToDto;
|
|
28
|
-
/**
|
|
29
|
-
* Map SOAP persona to DTO
|
|
30
|
-
*/
|
|
31
|
-
private mapPersonaToDto;
|
|
32
|
-
}
|
|
@@ -1,288 +0,0 @@
|
|
|
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.RegisterRepository = void 0;
|
|
13
|
-
/**
|
|
14
|
-
* Register Repository
|
|
15
|
-
* Implements IRegisterRepositoryPort for AFIP/ARCA Register services
|
|
16
|
-
*/
|
|
17
|
-
const register_repository_port_1 = require("@application/ports/register/register-repository.port");
|
|
18
|
-
const base_soap_repository_1 = require("../soap/base-soap-repository");
|
|
19
|
-
const service_names_enum_1 = require("@infrastructure/outbound/ports/soap/enums/service-names.enum");
|
|
20
|
-
const wsdl_path_enum_1 = require("@infrastructure/outbound/ports/soap/enums/wsdl-path.enum");
|
|
21
|
-
const endpoints_enum_1 = require("@infrastructure/outbound/ports/soap/enums/endpoints.enum");
|
|
22
|
-
class RegisterRepository extends base_soap_repository_1.BaseSoapRepository {
|
|
23
|
-
constructor(config) {
|
|
24
|
-
super(config);
|
|
25
|
-
this.clients = new Map();
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Get or create SOAP client for a specific scope
|
|
29
|
-
*/
|
|
30
|
-
getClient(scope) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
if (this.clients.has(scope)) {
|
|
33
|
-
return this.clients.get(scope);
|
|
34
|
-
}
|
|
35
|
-
const { wsdlName, endpoint, serviceName } = this.getScopeConfig(scope);
|
|
36
|
-
// Create SOAP client based on scope
|
|
37
|
-
let client;
|
|
38
|
-
switch (scope) {
|
|
39
|
-
case register_repository_port_1.RegisterScope.FOUR:
|
|
40
|
-
client = yield this.soapClient.createClient(wsdlName, { forceSoap12Headers: false });
|
|
41
|
-
break;
|
|
42
|
-
case register_repository_port_1.RegisterScope.FIVE:
|
|
43
|
-
client = yield this.soapClient.createClient(wsdlName, { forceSoap12Headers: false });
|
|
44
|
-
break;
|
|
45
|
-
case register_repository_port_1.RegisterScope.TEN:
|
|
46
|
-
client = yield this.soapClient.createClient(wsdlName, { forceSoap12Headers: false });
|
|
47
|
-
break;
|
|
48
|
-
case register_repository_port_1.RegisterScope.THIRTEEN:
|
|
49
|
-
client = yield this.soapClient.createClient(wsdlName, { forceSoap12Headers: false });
|
|
50
|
-
break;
|
|
51
|
-
case register_repository_port_1.RegisterScope.INSCRIPTION_PROOF:
|
|
52
|
-
client =
|
|
53
|
-
yield this.soapClient.createClient(wsdlName, { forceSoap12Headers: false });
|
|
54
|
-
break;
|
|
55
|
-
default:
|
|
56
|
-
throw new Error(`Unknown register scope: ${scope}`);
|
|
57
|
-
}
|
|
58
|
-
// Set endpoint
|
|
59
|
-
this.soapClient.setEndpoint(client, endpoint);
|
|
60
|
-
// Create proxy to inject Auth automatically
|
|
61
|
-
const proxiedClient = this.createAuthenticatedProxy(client, {
|
|
62
|
-
serviceName,
|
|
63
|
-
injectAuthProperty: true,
|
|
64
|
-
soapVersion: endpoints_enum_1.SoapServiceVersion.ServiceSoap,
|
|
65
|
-
});
|
|
66
|
-
this.clients.set(scope, proxiedClient);
|
|
67
|
-
return proxiedClient;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Get configuration for a specific scope
|
|
72
|
-
*/
|
|
73
|
-
getScopeConfig(scope) {
|
|
74
|
-
switch (scope) {
|
|
75
|
-
case register_repository_port_1.RegisterScope.FOUR:
|
|
76
|
-
return {
|
|
77
|
-
wsdlName: this.production
|
|
78
|
-
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_FOUR
|
|
79
|
-
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_FOUR_TEST,
|
|
80
|
-
endpoint: this.production
|
|
81
|
-
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_FOUR
|
|
82
|
-
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_FOUR_TEST,
|
|
83
|
-
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_FOUR,
|
|
84
|
-
};
|
|
85
|
-
case register_repository_port_1.RegisterScope.FIVE:
|
|
86
|
-
return {
|
|
87
|
-
wsdlName: this.production
|
|
88
|
-
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_FIVE
|
|
89
|
-
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_FIVE_TEST,
|
|
90
|
-
endpoint: this.production
|
|
91
|
-
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_FIVE
|
|
92
|
-
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_FIVE_TEST,
|
|
93
|
-
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_FIVE,
|
|
94
|
-
};
|
|
95
|
-
case register_repository_port_1.RegisterScope.TEN:
|
|
96
|
-
return {
|
|
97
|
-
wsdlName: this.production
|
|
98
|
-
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_TEN
|
|
99
|
-
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_TEN_TEST,
|
|
100
|
-
endpoint: this.production
|
|
101
|
-
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_TEN
|
|
102
|
-
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_TEN_TEST,
|
|
103
|
-
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_TEN,
|
|
104
|
-
};
|
|
105
|
-
case register_repository_port_1.RegisterScope.THIRTEEN:
|
|
106
|
-
return {
|
|
107
|
-
wsdlName: this.production
|
|
108
|
-
? wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_THIRTEEN
|
|
109
|
-
: wsdl_path_enum_1.WsdlPathEnum.WSSR_PADRON_THIRTEEN_TEST,
|
|
110
|
-
endpoint: this.production
|
|
111
|
-
? endpoints_enum_1.EndpointsEnum.WSSR_PADRON_THIRTEEN
|
|
112
|
-
: endpoints_enum_1.EndpointsEnum.WSSR_PADRON_THIRTEEN_TEST,
|
|
113
|
-
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_PADRON_THIRTEEN,
|
|
114
|
-
};
|
|
115
|
-
case register_repository_port_1.RegisterScope.INSCRIPTION_PROOF:
|
|
116
|
-
return {
|
|
117
|
-
wsdlName: this.production
|
|
118
|
-
? wsdl_path_enum_1.WsdlPathEnum.WSSR_INSCRIPTION_PROOF
|
|
119
|
-
: wsdl_path_enum_1.WsdlPathEnum.WSSR_INSCRIPTION_PROOF_TEST,
|
|
120
|
-
endpoint: this.production
|
|
121
|
-
? endpoints_enum_1.EndpointsEnum.WSSR_INSCRIPTION_PROOF
|
|
122
|
-
: endpoints_enum_1.EndpointsEnum.WSSR_INSCRIPTION_PROOF_TEST,
|
|
123
|
-
serviceName: service_names_enum_1.ServiceNamesEnum.WSSR_INSCRIPTION_PROOF,
|
|
124
|
-
};
|
|
125
|
-
default:
|
|
126
|
-
throw new Error(`Unknown register scope: ${scope}`);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
getServerStatus(scope) {
|
|
130
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
const client = yield this.getClient(scope);
|
|
132
|
-
const [output] = yield client.dummyAsync({});
|
|
133
|
-
const result = output.return;
|
|
134
|
-
return {
|
|
135
|
-
appserver: result.appserver,
|
|
136
|
-
dbserver: result.dbserver,
|
|
137
|
-
authserver: result.authserver,
|
|
138
|
-
};
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
getTaxpayerDetails(scope, identifier) {
|
|
142
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
-
var _a;
|
|
144
|
-
const client = yield this.getClient(scope);
|
|
145
|
-
try {
|
|
146
|
-
let output;
|
|
147
|
-
switch (scope) {
|
|
148
|
-
case register_repository_port_1.RegisterScope.FOUR: {
|
|
149
|
-
// Proxy injects Auth automatically
|
|
150
|
-
const result = yield client.getPersonaAsync({
|
|
151
|
-
idPersona: identifier,
|
|
152
|
-
});
|
|
153
|
-
output = result[0];
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
case register_repository_port_1.RegisterScope.FIVE:
|
|
157
|
-
case register_repository_port_1.RegisterScope.INSCRIPTION_PROOF: {
|
|
158
|
-
// Proxy injects Auth automatically
|
|
159
|
-
const result = yield client.getPersona_v2Async({
|
|
160
|
-
idPersona: identifier,
|
|
161
|
-
});
|
|
162
|
-
output = result[0];
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
case register_repository_port_1.RegisterScope.TEN: {
|
|
166
|
-
// Proxy injects Auth automatically
|
|
167
|
-
const result = yield client.getPersonaAsync({
|
|
168
|
-
idPersona: identifier,
|
|
169
|
-
});
|
|
170
|
-
output = result[0];
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
case register_repository_port_1.RegisterScope.THIRTEEN: {
|
|
174
|
-
// Proxy injects Auth automatically
|
|
175
|
-
const result = yield client.getPersonaAsync({
|
|
176
|
-
idPersona: identifier,
|
|
177
|
-
});
|
|
178
|
-
output = result[0];
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
default:
|
|
182
|
-
throw new Error(`Unknown register scope: ${scope}`);
|
|
183
|
-
}
|
|
184
|
-
// Map SOAP response to DTO
|
|
185
|
-
const personaReturn = output.personaReturn;
|
|
186
|
-
if (!personaReturn || !personaReturn.persona) {
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
return this.mapPersonaReturnToDto(personaReturn);
|
|
190
|
-
}
|
|
191
|
-
catch (error) {
|
|
192
|
-
// If error indicates not found, return null
|
|
193
|
-
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"))) {
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
throw error;
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
getTaxpayersDetails(scope, identifiers) {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
-
var _a, _b;
|
|
203
|
-
if (scope !== register_repository_port_1.RegisterScope.FIVE &&
|
|
204
|
-
scope !== register_repository_port_1.RegisterScope.INSCRIPTION_PROOF) {
|
|
205
|
-
throw new Error(`getTaxpayersDetails is only available for FIVE and INSCRIPTION_PROOF scopes`);
|
|
206
|
-
}
|
|
207
|
-
const client = yield this.getClient(scope);
|
|
208
|
-
// Proxy injects Auth automatically
|
|
209
|
-
const [output] = yield client.getPersonaList_v2Async({
|
|
210
|
-
idPersona: identifiers,
|
|
211
|
-
});
|
|
212
|
-
const personaListReturn = output.personaListReturn;
|
|
213
|
-
return {
|
|
214
|
-
persona: ((_a = personaListReturn.persona) === null || _a === void 0 ? void 0 : _a.map((p) => this.mapPersonaToDto(p))) ||
|
|
215
|
-
[],
|
|
216
|
-
cantidadRegistros: ((_b = personaListReturn.persona) === null || _b === void 0 ? void 0 : _b.length) || 0,
|
|
217
|
-
// IpersonaListReturn doesn't have errorConstancia, it's in individual persona objects
|
|
218
|
-
errorConstancia: undefined,
|
|
219
|
-
};
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
getTaxIDByDocument(scope, documentNumber) {
|
|
223
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
-
if (scope !== register_repository_port_1.RegisterScope.THIRTEEN) {
|
|
225
|
-
throw new Error(`getTaxIDByDocument is only available for THIRTEEN scope`);
|
|
226
|
-
}
|
|
227
|
-
const client = yield this.getClient(scope);
|
|
228
|
-
// Proxy injects Auth automatically
|
|
229
|
-
const [output] = yield client.getIdPersonaListByDocumentoAsync({
|
|
230
|
-
documento: documentNumber,
|
|
231
|
-
});
|
|
232
|
-
const idPersonaListReturn = output.idPersonaListReturn;
|
|
233
|
-
// IidPersonaListReturn.idPersona can be a single number or array
|
|
234
|
-
const idPersona = Array.isArray(idPersonaListReturn.idPersona)
|
|
235
|
-
? idPersonaListReturn.idPersona
|
|
236
|
-
: typeof idPersonaListReturn.idPersona === "number"
|
|
237
|
-
? [idPersonaListReturn.idPersona]
|
|
238
|
-
: [];
|
|
239
|
-
return {
|
|
240
|
-
idPersona,
|
|
241
|
-
// IidPersonaListReturn doesn't have errorConstancia
|
|
242
|
-
errorConstancia: undefined,
|
|
243
|
-
};
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Map SOAP personaReturn to DTO
|
|
248
|
-
*/
|
|
249
|
-
mapPersonaReturnToDto(personaReturn) {
|
|
250
|
-
const persona = personaReturn.persona || personaReturn;
|
|
251
|
-
return {
|
|
252
|
-
idPersona: persona.idPersona,
|
|
253
|
-
tipoPersona: persona.tipoPersona,
|
|
254
|
-
estadoClave: persona.estadoClave,
|
|
255
|
-
datosGenerales: persona.datosGenerales || persona,
|
|
256
|
-
datosMonotributo: persona.datosMonotributo,
|
|
257
|
-
datosRegimenGeneral: persona.datosRegimenGeneral,
|
|
258
|
-
errorConstancia: persona.errorConstancia
|
|
259
|
-
? {
|
|
260
|
-
error: persona.errorConstancia.error || "",
|
|
261
|
-
codigo: persona.errorConstancia.codigo,
|
|
262
|
-
}
|
|
263
|
-
: undefined,
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Map SOAP persona to DTO
|
|
268
|
-
*/
|
|
269
|
-
mapPersonaToDto(persona) {
|
|
270
|
-
var _a, _b, _c;
|
|
271
|
-
return {
|
|
272
|
-
idPersona: (_a = persona.datosGenerales) === null || _a === void 0 ? void 0 : _a.idPersona,
|
|
273
|
-
tipoPersona: (_b = persona.datosGenerales) === null || _b === void 0 ? void 0 : _b.tipoPersona,
|
|
274
|
-
estadoClave: (_c = persona.datosGenerales) === null || _c === void 0 ? void 0 : _c.estadoClave,
|
|
275
|
-
datosGenerales: persona.datosGenerales,
|
|
276
|
-
datosMonotributo: persona.datosMonotributo,
|
|
277
|
-
datosRegimenGeneral: persona.datosRegimenGeneral,
|
|
278
|
-
errorConstancia: persona.errorConstancia
|
|
279
|
-
? {
|
|
280
|
-
error: persona.errorConstancia.error || "",
|
|
281
|
-
codigo: persona.errorConstancia.codigo,
|
|
282
|
-
}
|
|
283
|
-
: undefined,
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
exports.RegisterRepository = RegisterRepository;
|
|
288
|
-
//# sourceMappingURL=register-repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"register-repository.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/adapters/register/register-repository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;GAGG;AACH,mGAG8D;AAC9D,uEAAkE;AAQlE,qGAAgG;AAChG,6FAAwF;AACxF,6FAGkE;AAclE,MAAa,kBACX,SAAQ,yCAAkB;IAM1B,YAAY,MAA2C;QACrD,KAAK,CAAC,MAAM,CAAC,CAAC;QAJC,YAAO,GACtB,IAAI,GAAG,EAAE,CAAC;IAIZ,CAAC;IAED;;OAEG;IACW,SAAS,CAAC,KAAoB;;YAC1C,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC;YAClC,CAAC;YAED,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YAEvE,oCAAoC;YACpC,IAAI,MAA4B,CAAC;YAEjC,QAAQ,KAAK,EAAE,CAAC;gBACd,KAAK,wCAAa,CAAC,IAAI;oBACrB,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CACzC,QAAQ,EACR,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAC9B,CAAC;oBACF,M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AAS,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,SAAS;YAC5C,WAAW,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,WAAW;YAChD,WAAW,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,WAAW;YAChD,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,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;AAhUD,gDAgUC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
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;
|
|
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 = ((_d = (_c = (_b = (_a = soapServices === null || soapServices === void 0 ? void 0 : soapServices.Service) === null || _a === void 0 ? void 0 : _a[soapVersion]) === null || _b === void 0 ? void 0 : _b[func]) === null || _c === void 0 ? void 0 : _c.input) === null || _d === void 0 ? void 0 : _d["Auth"]) !==
|
|
46
|
-
undefined;
|
|
47
|
-
if (methodRequiresAuth) {
|
|
48
|
-
return (params) => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
const ticket = yield this.authRepository.login(serviceName);
|
|
50
|
-
const auth = this.authRepository.getAuthParams(ticket, this.cuit);
|
|
51
|
-
const paramsWithAuth = injectAuthProperty
|
|
52
|
-
? Object.assign(Object.assign({}, auth.Auth), params) : Object.assign(Object.assign({}, auth), params);
|
|
53
|
-
return original.call(target, paramsWithAuth);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return original;
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.BaseSoapRepository = BaseSoapRepository;
|
|
63
|
-
//# sourceMappingURL=base-soap-repository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,wBAAwB,CAChC,MAAS,EACT,OAAkC;QAElC,MAAM,EACJ,WAAW,EACX,kBAAkB,GAAG,KAAK,EAC1B,WAAW,GAAG,mCAAkB,CAAC,aAAa,GAC/C,GAAG,OAAO,CAAC;QACZ,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE;YACvB,GAAG,EAAE,CAAC,MAAS,EAAE,IAAY,EAAE,EAAE;;gBAC/B,MAAM,QAAQ,GAAI,MAAc,CAAC,IAAI,CAAC,CAAC;gBACvC,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;oBAC/B,MAAM,YAAY,GAAqB,MAAc,CAAC,QAAQ,EAAE,CAAC;oBACjE,MAAM,kBAAkB,GACtB,CAAA,MAAA,MAAA,MAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,0CAAG,WAAW,CAAC,0CAAG,IAAI,CAAC,0CAAE,KAAK,0CAAG,MAAM,CAAC;wBAC7D,SAAS,CAAC;oBAEZ,IAAI,kBAAkB,EAAE,CAAC;wBACvB,OAAO,CAAO,MAAW,EAAE,EAAE;4BAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;4BAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;4BAClE,MAAM,cAAc,GAAG,kBAAkB;gCACvC,CAAC,iCAAM,IAAI,CAAC,IAAI,GAAK,MAAM,EAC3B,CAAC,iCAAM,IAAI,GAAK,MAAM,CAAE,CAAC;4BAC3B,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;AA1DD,gDA0DC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|