@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,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Types - Electronic Billing
|
|
3
|
+
* Types representing electronic billing domain concepts
|
|
4
|
+
* These are business concepts, independent of infrastructure (SOAP, REST, etc.)
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Sales Point (Punto de Venta)
|
|
8
|
+
*/
|
|
9
|
+
export interface SalesPoint {
|
|
10
|
+
nro: number;
|
|
11
|
+
emisionTipo: string;
|
|
12
|
+
bloqueado: string;
|
|
13
|
+
fechaBaja?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Server Status
|
|
17
|
+
*/
|
|
18
|
+
export interface ServerStatus {
|
|
19
|
+
appServer: string;
|
|
20
|
+
dbServer: string;
|
|
21
|
+
authServer: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Last Voucher Information
|
|
25
|
+
*/
|
|
26
|
+
export interface LastVoucher {
|
|
27
|
+
cbteNro: number;
|
|
28
|
+
cbteTipo: number;
|
|
29
|
+
ptoVta: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Voucher Information
|
|
33
|
+
*/
|
|
34
|
+
export interface VoucherInfo {
|
|
35
|
+
codAutorizacion?: string;
|
|
36
|
+
emisionTipo?: string;
|
|
37
|
+
fchVto?: string;
|
|
38
|
+
fchProceso?: string;
|
|
39
|
+
resultado?: string;
|
|
40
|
+
observaciones?: string;
|
|
41
|
+
concepto?: number;
|
|
42
|
+
docTipo?: number;
|
|
43
|
+
docNro?: number;
|
|
44
|
+
cbteDesde?: number;
|
|
45
|
+
cbteHasta?: number;
|
|
46
|
+
cbteFch?: string;
|
|
47
|
+
impTotal?: number;
|
|
48
|
+
impTotConc?: number;
|
|
49
|
+
impNeto?: number;
|
|
50
|
+
impOpEx?: number;
|
|
51
|
+
impIVA?: number;
|
|
52
|
+
impTrib?: number;
|
|
53
|
+
monId?: string;
|
|
54
|
+
monCotiz?: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Parameter Type (base for all parameter types)
|
|
58
|
+
*/
|
|
59
|
+
export interface ParameterType {
|
|
60
|
+
id: number | string;
|
|
61
|
+
desc: string;
|
|
62
|
+
fchDesde: string;
|
|
63
|
+
fchHasta: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Voucher Type
|
|
67
|
+
*/
|
|
68
|
+
export interface VoucherType extends ParameterType {
|
|
69
|
+
id: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Concept Type
|
|
73
|
+
*/
|
|
74
|
+
export interface ConceptType extends ParameterType {
|
|
75
|
+
id: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Document Type
|
|
79
|
+
*/
|
|
80
|
+
export interface DocumentType extends ParameterType {
|
|
81
|
+
id: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Aliquot Type (IVA)
|
|
85
|
+
*/
|
|
86
|
+
export interface AliquotType extends ParameterType {
|
|
87
|
+
id: number;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Currency Type
|
|
91
|
+
*/
|
|
92
|
+
export interface CurrencyType extends ParameterType {
|
|
93
|
+
id: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Optional Type
|
|
97
|
+
*/
|
|
98
|
+
export interface OptionalType extends ParameterType {
|
|
99
|
+
id: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Tax Type
|
|
103
|
+
*/
|
|
104
|
+
export interface TaxType extends ParameterType {
|
|
105
|
+
id: number;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* IVA Receptor Type
|
|
109
|
+
*/
|
|
110
|
+
export interface IvaReceptorType {
|
|
111
|
+
id: number;
|
|
112
|
+
desc: string;
|
|
113
|
+
cmp_Clase: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Error Information
|
|
117
|
+
*/
|
|
118
|
+
export interface ErrorInfo {
|
|
119
|
+
code: number;
|
|
120
|
+
msg: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Result with optional errors
|
|
124
|
+
*/
|
|
125
|
+
export interface ResultWithErrors<T> {
|
|
126
|
+
result?: T;
|
|
127
|
+
errors?: ErrorInfo[];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* CAEA Request
|
|
131
|
+
*/
|
|
132
|
+
export interface CaeaRequest {
|
|
133
|
+
periodo: number;
|
|
134
|
+
orden: number;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* CAEA Response
|
|
138
|
+
*/
|
|
139
|
+
export interface CaeaResponse {
|
|
140
|
+
caea: string;
|
|
141
|
+
periodo: number;
|
|
142
|
+
orden: number;
|
|
143
|
+
fchVigDesde: string;
|
|
144
|
+
fchVigHasta: string;
|
|
145
|
+
fchTopeInf: string;
|
|
146
|
+
fchProceso: string;
|
|
147
|
+
observaciones?: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* CAEA Usage Response
|
|
151
|
+
*/
|
|
152
|
+
export interface CaeaUsageResponse {
|
|
153
|
+
caea: string;
|
|
154
|
+
concepto: number;
|
|
155
|
+
docTipo: number;
|
|
156
|
+
docNro: number;
|
|
157
|
+
cbteDesde: number;
|
|
158
|
+
cbteHasta: number;
|
|
159
|
+
cbteFch: string;
|
|
160
|
+
resultado: string;
|
|
161
|
+
observaciones?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* CAEA No Movement Information
|
|
165
|
+
*/
|
|
166
|
+
export interface CaeaNoMovement {
|
|
167
|
+
caea: string;
|
|
168
|
+
fchProceso: string;
|
|
169
|
+
ptoVta: number;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Country Type
|
|
173
|
+
*/
|
|
174
|
+
export interface PaisType {
|
|
175
|
+
id: number;
|
|
176
|
+
desc: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Activity Type
|
|
180
|
+
*/
|
|
181
|
+
export interface ActividadType {
|
|
182
|
+
id: number;
|
|
183
|
+
orden: number;
|
|
184
|
+
desc: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Quotation Type
|
|
188
|
+
*/
|
|
189
|
+
export interface CotizacionType {
|
|
190
|
+
monId: string;
|
|
191
|
+
monCotiz: number;
|
|
192
|
+
fchCotiz: string;
|
|
193
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Domain Types - Electronic Billing
|
|
4
|
+
* Types representing electronic billing domain concepts
|
|
5
|
+
* These are business concepts, independent of infrastructure (SOAP, REST, etc.)
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
//# sourceMappingURL=electronic-billing.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electronic-billing.types.js","sourceRoot":"","sources":["../../../src/domain/types/electronic-billing.types.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
* Domain Types
|
|
19
|
+
* Exports all domain-related types
|
|
20
|
+
*/
|
|
21
|
+
__exportStar(require("./voucher.types"), exports);
|
|
22
|
+
__exportStar(require("./electronic-billing.types"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,kDAAgC;AAChC,6DAA2C"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Types - Voucher
|
|
3
|
+
* Types related to voucher domain entity
|
|
4
|
+
*/
|
|
5
|
+
export interface IVoucher {
|
|
6
|
+
CantReg: number;
|
|
7
|
+
PtoVta: number;
|
|
8
|
+
CbteTipo: number;
|
|
9
|
+
Concepto: number;
|
|
10
|
+
DocTipo: number;
|
|
11
|
+
DocNro: number;
|
|
12
|
+
CbteDesde: number;
|
|
13
|
+
CbteHasta: number;
|
|
14
|
+
CbteFch: string;
|
|
15
|
+
ImpTotal: number;
|
|
16
|
+
ImpTotConc: number;
|
|
17
|
+
ImpNeto: number;
|
|
18
|
+
ImpOpEx: number;
|
|
19
|
+
ImpIVA: number;
|
|
20
|
+
ImpTrib: number;
|
|
21
|
+
FchServDesde?: string;
|
|
22
|
+
FchServHasta?: string;
|
|
23
|
+
FchVtoPago?: string;
|
|
24
|
+
MonId: string;
|
|
25
|
+
MonCotiz: number;
|
|
26
|
+
CanMisMonExt?: string;
|
|
27
|
+
CondicionIVAReceptorId: number;
|
|
28
|
+
CbtesAsoc?: ICbtesAsoc[];
|
|
29
|
+
Tributos?: ITributo[];
|
|
30
|
+
Iva?: IIva[];
|
|
31
|
+
Opcionales?: IOpcional[];
|
|
32
|
+
Compradores?: IComprador[];
|
|
33
|
+
}
|
|
34
|
+
export interface INextVoucher extends Omit<IVoucher, "CbteDesde" | "CbteHasta"> {
|
|
35
|
+
CbteDesde?: number;
|
|
36
|
+
CbteHasta?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface ICbtesAsoc {
|
|
39
|
+
Tipo: number;
|
|
40
|
+
PtoVta: number;
|
|
41
|
+
Nro: number;
|
|
42
|
+
Cuit: string;
|
|
43
|
+
CbteFch?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface IComprador {
|
|
46
|
+
DocTipo: number;
|
|
47
|
+
DocNro: number;
|
|
48
|
+
Porcentaje: number;
|
|
49
|
+
}
|
|
50
|
+
export interface IIva {
|
|
51
|
+
Id: number;
|
|
52
|
+
BaseImp: number;
|
|
53
|
+
Importe: number;
|
|
54
|
+
}
|
|
55
|
+
export interface IOpcional {
|
|
56
|
+
Id: string;
|
|
57
|
+
Valor: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ITributo {
|
|
60
|
+
Id: number;
|
|
61
|
+
Desc: string;
|
|
62
|
+
BaseImp: number;
|
|
63
|
+
Alic: number;
|
|
64
|
+
Importe: number;
|
|
65
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voucher.types.js","sourceRoot":"","sources":["../../../src/domain/types/voucher.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CAE Value Object
|
|
3
|
+
* Represents a CAE (Código de Autorización Electrónico)
|
|
4
|
+
* Immutable value object with validation
|
|
5
|
+
*/
|
|
6
|
+
export declare class CAE {
|
|
7
|
+
private readonly value;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Factory method to create a CAE
|
|
11
|
+
* @param value CAE as string
|
|
12
|
+
* @returns CAE instance
|
|
13
|
+
* @throws Error if CAE is invalid
|
|
14
|
+
*/
|
|
15
|
+
static create(value: string): CAE;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the CAE format
|
|
18
|
+
* @throws Error if CAE is invalid
|
|
19
|
+
*/
|
|
20
|
+
private validate;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the CAE value as string
|
|
23
|
+
*/
|
|
24
|
+
getValue(): string;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the CAE value as string (alias for getValue)
|
|
27
|
+
*/
|
|
28
|
+
toString(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Formats CAE with dashes (XXXX-XXXX-XXXX-XX)
|
|
31
|
+
*/
|
|
32
|
+
toFormattedString(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Compares two CAEs for equality
|
|
35
|
+
* @param other Other CAE to compare
|
|
36
|
+
* @returns true if equal
|
|
37
|
+
*/
|
|
38
|
+
equals(other: CAE): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a copy of this CAE
|
|
41
|
+
*/
|
|
42
|
+
clone(): CAE;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if CAE is valid (not empty and has correct format)
|
|
45
|
+
*/
|
|
46
|
+
isValid(): boolean;
|
|
47
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CAE = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* CAE Value Object
|
|
6
|
+
* Represents a CAE (Código de Autorización Electrónico)
|
|
7
|
+
* Immutable value object with validation
|
|
8
|
+
*/
|
|
9
|
+
class CAE {
|
|
10
|
+
constructor(value) {
|
|
11
|
+
this.value = value;
|
|
12
|
+
this.validate();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Factory method to create a CAE
|
|
16
|
+
* @param value CAE as string
|
|
17
|
+
* @returns CAE instance
|
|
18
|
+
* @throws Error if CAE is invalid
|
|
19
|
+
*/
|
|
20
|
+
static create(value) {
|
|
21
|
+
return new CAE(value);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates the CAE format
|
|
25
|
+
* @throws Error if CAE is invalid
|
|
26
|
+
*/
|
|
27
|
+
validate() {
|
|
28
|
+
if (!this.value || typeof this.value !== "string") {
|
|
29
|
+
throw new Error("CAE debe ser una cadena de texto");
|
|
30
|
+
}
|
|
31
|
+
// CAE debe tener exactamente 14 dígitos
|
|
32
|
+
if (!/^\d{14}$/.test(this.value)) {
|
|
33
|
+
throw new Error(`CAE inválido: debe tener 14 dígitos, tiene "${this.value}"`);
|
|
34
|
+
}
|
|
35
|
+
// Validar que no sea todo ceros
|
|
36
|
+
if (this.value === "00000000000000") {
|
|
37
|
+
throw new Error("CAE inválido: no puede ser todo ceros");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Gets the CAE value as string
|
|
42
|
+
*/
|
|
43
|
+
getValue() {
|
|
44
|
+
return this.value;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Gets the CAE value as string (alias for getValue)
|
|
48
|
+
*/
|
|
49
|
+
toString() {
|
|
50
|
+
return this.value;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Formats CAE with dashes (XXXX-XXXX-XXXX-XX)
|
|
54
|
+
*/
|
|
55
|
+
toFormattedString() {
|
|
56
|
+
return `${this.value.substring(0, 4)}-${this.value.substring(4, 8)}-${this.value.substring(8, 12)}-${this.value.substring(12)}`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Compares two CAEs for equality
|
|
60
|
+
* @param other Other CAE to compare
|
|
61
|
+
* @returns true if equal
|
|
62
|
+
*/
|
|
63
|
+
equals(other) {
|
|
64
|
+
return this.value === other.value;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Creates a copy of this CAE
|
|
68
|
+
*/
|
|
69
|
+
clone() {
|
|
70
|
+
return new CAE(this.value);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Checks if CAE is valid (not empty and has correct format)
|
|
74
|
+
*/
|
|
75
|
+
isValid() {
|
|
76
|
+
return this.value.length === 14 && /^\d{14}$/.test(this.value);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.CAE = CAE;
|
|
80
|
+
//# sourceMappingURL=cae.vo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cae.vo.js","sourceRoot":"","sources":["../../../src/domain/value-objects/cae.vo.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,GAAG;IACd,YAAqC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,KAAa;QACzB,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED;;;OAGG;IACK,QAAQ;QACd,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;QAED,wCAAwC;QACxC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CACb,+CAA+C,IAAI,CAAC,KAAK,GAAG,CAC7D,CAAC;QACJ,CAAC;QAED,gCAAgC;QAChC,IAAI,IAAI,CAAC,KAAK,KAAK,gBAAgB,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAC1D,CAAC,EACD,CAAC,CACF,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAU;QACf,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;CACF;AAnFD,kBAmFC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CUIT Value Object
|
|
3
|
+
* Represents a valid CUIT (Clave Única de Identificación Tributaria)
|
|
4
|
+
* Immutable value object with validation
|
|
5
|
+
*/
|
|
6
|
+
export declare class CUIT {
|
|
7
|
+
private readonly value;
|
|
8
|
+
private constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Factory method to create a CUIT
|
|
11
|
+
* @param value CUIT as number or string
|
|
12
|
+
* @returns CUIT instance
|
|
13
|
+
* @throws Error if CUIT is invalid
|
|
14
|
+
*/
|
|
15
|
+
static create(value: number | string): CUIT;
|
|
16
|
+
/**
|
|
17
|
+
* Validates the CUIT format
|
|
18
|
+
* @throws Error if CUIT is invalid
|
|
19
|
+
*/
|
|
20
|
+
private validate;
|
|
21
|
+
/**
|
|
22
|
+
* Validates CUIT checksum (dígito verificador)
|
|
23
|
+
* @param cuitStr CUIT as string
|
|
24
|
+
* @returns true if checksum is valid
|
|
25
|
+
*/
|
|
26
|
+
private isValidChecksum;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the CUIT value as number
|
|
29
|
+
*/
|
|
30
|
+
getValue(): number;
|
|
31
|
+
/**
|
|
32
|
+
* Gets the CUIT value as string
|
|
33
|
+
*/
|
|
34
|
+
toString(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Formats CUIT with dashes (XX-XXXXXXXX-X)
|
|
37
|
+
*/
|
|
38
|
+
toFormattedString(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Compares two CUITs for equality
|
|
41
|
+
* @param other Other CUIT to compare
|
|
42
|
+
* @returns true if equal
|
|
43
|
+
*/
|
|
44
|
+
equals(other: CUIT): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a copy of this CUIT
|
|
47
|
+
*/
|
|
48
|
+
clone(): CUIT;
|
|
49
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CUIT = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* CUIT Value Object
|
|
6
|
+
* Represents a valid CUIT (Clave Única de Identificación Tributaria)
|
|
7
|
+
* Immutable value object with validation
|
|
8
|
+
*/
|
|
9
|
+
class CUIT {
|
|
10
|
+
constructor(value) {
|
|
11
|
+
this.value = value;
|
|
12
|
+
this.validate();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Factory method to create a CUIT
|
|
16
|
+
* @param value CUIT as number or string
|
|
17
|
+
* @returns CUIT instance
|
|
18
|
+
* @throws Error if CUIT is invalid
|
|
19
|
+
*/
|
|
20
|
+
static create(value) {
|
|
21
|
+
const numValue = typeof value === "string" ? parseInt(value, 10) : value;
|
|
22
|
+
return new CUIT(numValue);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Validates the CUIT format
|
|
26
|
+
* @throws Error if CUIT is invalid
|
|
27
|
+
*/
|
|
28
|
+
validate() {
|
|
29
|
+
if (!Number.isInteger(this.value)) {
|
|
30
|
+
throw new Error("CUIT debe ser un número entero");
|
|
31
|
+
}
|
|
32
|
+
const cuitStr = this.value.toString();
|
|
33
|
+
// CUIT debe tener 11 dígitos
|
|
34
|
+
if (cuitStr.length !== 11) {
|
|
35
|
+
throw new Error(`CUIT inválido: debe tener 11 dígitos, tiene ${cuitStr.length}`);
|
|
36
|
+
}
|
|
37
|
+
// Validar que no sea todo ceros
|
|
38
|
+
if (this.value === 0) {
|
|
39
|
+
throw new Error("CUIT inválido: no puede ser 0");
|
|
40
|
+
}
|
|
41
|
+
// Validar dígito verificador (opcional, pero recomendado)
|
|
42
|
+
if (!this.isValidChecksum(cuitStr)) {
|
|
43
|
+
// No lanzamos error aquí, solo validamos formato básico
|
|
44
|
+
// El checksum puede fallar en algunos casos válidos
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Validates CUIT checksum (dígito verificador)
|
|
49
|
+
* @param cuitStr CUIT as string
|
|
50
|
+
* @returns true if checksum is valid
|
|
51
|
+
*/
|
|
52
|
+
isValidChecksum(cuitStr) {
|
|
53
|
+
const multipliers = [5, 4, 3, 2, 7, 6, 5, 4, 3, 2];
|
|
54
|
+
let sum = 0;
|
|
55
|
+
for (let i = 0; i < 10; i++) {
|
|
56
|
+
sum += parseInt(cuitStr[i], 10) * multipliers[i];
|
|
57
|
+
}
|
|
58
|
+
const remainder = sum % 11;
|
|
59
|
+
const checkDigit = remainder < 2 ? remainder : 11 - remainder;
|
|
60
|
+
const lastDigit = parseInt(cuitStr[10], 10);
|
|
61
|
+
return checkDigit === lastDigit;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Gets the CUIT value as number
|
|
65
|
+
*/
|
|
66
|
+
getValue() {
|
|
67
|
+
return this.value;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Gets the CUIT value as string
|
|
71
|
+
*/
|
|
72
|
+
toString() {
|
|
73
|
+
return this.value.toString();
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Formats CUIT with dashes (XX-XXXXXXXX-X)
|
|
77
|
+
*/
|
|
78
|
+
toFormattedString() {
|
|
79
|
+
const cuitStr = this.value.toString();
|
|
80
|
+
return `${cuitStr.substring(0, 2)}-${cuitStr.substring(2, 10)}-${cuitStr.substring(10)}`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Compares two CUITs for equality
|
|
84
|
+
* @param other Other CUIT to compare
|
|
85
|
+
* @returns true if equal
|
|
86
|
+
*/
|
|
87
|
+
equals(other) {
|
|
88
|
+
return this.value === other.value;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Creates a copy of this CUIT
|
|
92
|
+
*/
|
|
93
|
+
clone() {
|
|
94
|
+
return new CUIT(this.value);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.CUIT = CUIT;
|
|
98
|
+
//# sourceMappingURL=cuit.vo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cuit.vo.js","sourceRoot":"","sources":["../../../src/domain/value-objects/cuit.vo.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,IAAI;IACf,YAAqC,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;QAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,KAAsB;QAClC,MAAM,QAAQ,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACzE,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACK,QAAQ;QACd,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEtC,6BAA6B;QAC7B,IAAI,OAAO,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CACb,+CAA+C,OAAO,CAAC,MAAM,EAAE,CAChE,CAAC;QACJ,CAAC;QAED,gCAAgC;QAChC,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACnD,CAAC;QAED,0DAA0D;QAC1D,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;YACnC,wDAAwD;YACxD,oDAAoD;QACtD,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,eAAe,CAAC,OAAe;QACrC,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACnD,IAAI,GAAG,GAAG,CAAC,CAAC;QAEZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5B,GAAG,IAAI,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QACnD,CAAC;QAED,MAAM,SAAS,GAAG,GAAG,GAAG,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC;QAC9D,MAAM,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAE5C,OAAO,UAAU,KAAK,SAAS,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACtC,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,SAAS,CACpD,CAAC,EACD,EAAE,CACH,IAAI,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAW;QAChB,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF;AA1GD,oBA0GC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Value Objects
|
|
19
|
+
* Exports all domain value objects
|
|
20
|
+
*/
|
|
21
|
+
__exportStar(require("./cuit.vo"), exports);
|
|
22
|
+
__exportStar(require("./cae.vo"), exports);
|
|
23
|
+
__exportStar(require("./voucher-number.vo"), exports);
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/value-objects/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,4CAA0B;AAC1B,2CAAyB;AACzB,sDAAoC"}
|