@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.
Files changed (385) hide show
  1. package/lib/application/config/env.d.ts +6 -0
  2. package/lib/application/config/env.js +14 -0
  3. package/lib/application/config/env.js.map +1 -0
  4. package/lib/application/config/index.d.ts +6 -0
  5. package/lib/application/config/index.js +15 -0
  6. package/lib/application/config/index.js.map +1 -0
  7. package/lib/application/dto/electronic-billing.dto.d.ts +192 -0
  8. package/lib/application/dto/electronic-billing.dto.js +3 -0
  9. package/lib/application/dto/electronic-billing.dto.js.map +1 -0
  10. package/lib/application/dto/index.d.ts +6 -0
  11. package/lib/application/dto/index.js +23 -0
  12. package/lib/application/dto/index.js.map +1 -0
  13. package/lib/application/dto/register.dto.d.ts +116 -0
  14. package/lib/application/dto/register.dto.js +8 -0
  15. package/lib/application/dto/register.dto.js.map +1 -0
  16. package/lib/application/index.d.ts +10 -0
  17. package/lib/application/index.js +27 -0
  18. package/lib/application/index.js.map +1 -0
  19. package/lib/application/ports/authentication/authentication-repository.port.d.ts +29 -0
  20. package/lib/application/ports/authentication/authentication-repository.port.js +3 -0
  21. package/lib/application/ports/authentication/authentication-repository.port.js.map +1 -0
  22. package/lib/application/ports/authentication/index.d.ts +5 -0
  23. package/lib/application/ports/authentication/index.js +22 -0
  24. package/lib/application/ports/authentication/index.js.map +1 -0
  25. package/lib/application/ports/electronic-billing/electronic-billing-repository.port.d.ts +139 -0
  26. package/lib/application/ports/electronic-billing/electronic-billing-repository.port.js +3 -0
  27. package/lib/application/ports/electronic-billing/electronic-billing-repository.port.js.map +1 -0
  28. package/lib/application/ports/electronic-billing/index.d.ts +5 -0
  29. package/lib/application/ports/electronic-billing/index.js +22 -0
  30. package/lib/application/ports/electronic-billing/index.js.map +1 -0
  31. package/lib/application/ports/generic/generic-repository.port.d.ts +16 -0
  32. package/lib/application/ports/generic/generic-repository.port.js +3 -0
  33. package/lib/application/ports/generic/generic-repository.port.js.map +1 -0
  34. package/lib/application/ports/index.d.ts +7 -0
  35. package/lib/application/ports/index.js +24 -0
  36. package/lib/application/ports/index.js.map +1 -0
  37. package/lib/application/ports/register/index.d.ts +5 -0
  38. package/lib/application/ports/register/index.js +22 -0
  39. package/lib/application/ports/register/index.js.map +1 -0
  40. package/lib/application/ports/register/register-repository.ports.d.ts +23 -0
  41. package/lib/application/ports/register/register-repository.ports.js +3 -0
  42. package/lib/application/ports/register/register-repository.ports.js.map +1 -0
  43. package/lib/application/services/electronic-billing.service.d.ts +202 -0
  44. package/lib/application/services/electronic-billing.service.js +340 -0
  45. package/lib/application/services/electronic-billing.service.js.map +1 -0
  46. package/lib/application/services/generic.service.d.ts +19 -0
  47. package/lib/application/services/generic.service.js +31 -0
  48. package/lib/application/services/generic.service.js.map +1 -0
  49. package/lib/application/services/index.d.ts +10 -0
  50. package/lib/application/services/index.js +27 -0
  51. package/lib/application/services/index.js.map +1 -0
  52. package/lib/application/services/register-inscription-proof.service.d.ts +26 -0
  53. package/lib/application/services/register-inscription-proof.service.js +49 -0
  54. package/lib/application/services/register-inscription-proof.service.js.map +1 -0
  55. package/lib/application/services/register-scope-five.service.d.ts +26 -0
  56. package/lib/application/services/register-scope-five.service.js +49 -0
  57. package/lib/application/services/register-scope-five.service.js.map +1 -0
  58. package/lib/application/services/register-scope-four.service.d.ts +28 -0
  59. package/lib/application/services/register-scope-four.service.js +51 -0
  60. package/lib/application/services/register-scope-four.service.js.map +1 -0
  61. package/lib/application/services/register-scope-ten.service.d.ts +21 -0
  62. package/lib/application/services/register-scope-ten.service.js +39 -0
  63. package/lib/application/services/register-scope-ten.service.js.map +1 -0
  64. package/lib/application/services/register-scope-thirteen.service.d.ts +26 -0
  65. package/lib/application/services/register-scope-thirteen.service.js +49 -0
  66. package/lib/application/services/register-scope-thirteen.service.js.map +1 -0
  67. package/lib/application/types/auth.types.d.ts +19 -0
  68. package/lib/application/types/auth.types.js +7 -0
  69. package/lib/application/types/auth.types.js.map +1 -0
  70. package/lib/application/types/context.types.d.ts +46 -0
  71. package/lib/application/types/context.types.js +3 -0
  72. package/lib/application/types/context.types.js.map +1 -0
  73. package/lib/application/types/index.d.ts +8 -0
  74. package/lib/application/types/index.js +25 -0
  75. package/lib/application/types/index.js.map +1 -0
  76. package/lib/application/types/result.types.d.ts +10 -0
  77. package/lib/application/types/result.types.js +3 -0
  78. package/lib/application/types/result.types.js.map +1 -0
  79. package/lib/application/types/use-case-inputs.types.d.ts +23 -0
  80. package/lib/application/types/use-case-inputs.types.js +7 -0
  81. package/lib/application/types/use-case-inputs.types.js.map +1 -0
  82. package/lib/application/use-cases/authentication/get-auth-params.use-case.d.ts +16 -0
  83. package/lib/application/use-cases/authentication/get-auth-params.use-case.js +29 -0
  84. package/lib/application/use-cases/authentication/get-auth-params.use-case.js.map +1 -0
  85. package/lib/application/use-cases/authentication/index.d.ts +7 -0
  86. package/lib/application/use-cases/authentication/index.js +24 -0
  87. package/lib/application/use-cases/authentication/index.js.map +1 -0
  88. package/lib/application/use-cases/authentication/login.use-case.d.ts +17 -0
  89. package/lib/application/use-cases/authentication/login.use-case.js +29 -0
  90. package/lib/application/use-cases/authentication/login.use-case.js.map +1 -0
  91. package/lib/application/use-cases/authentication/request-login.use-case.d.ts +16 -0
  92. package/lib/application/use-cases/authentication/request-login.use-case.js +29 -0
  93. package/lib/application/use-cases/authentication/request-login.use-case.js.map +1 -0
  94. package/lib/application/use-cases/electronic-billing/consult-caea-no-movement.use-case.d.ts +17 -0
  95. package/lib/application/use-cases/electronic-billing/consult-caea-no-movement.use-case.js +30 -0
  96. package/lib/application/use-cases/electronic-billing/consult-caea-no-movement.use-case.js.map +1 -0
  97. package/lib/application/use-cases/electronic-billing/consult-caea.use-case.d.ts +17 -0
  98. package/lib/application/use-cases/electronic-billing/consult-caea.use-case.js +30 -0
  99. package/lib/application/use-cases/electronic-billing/consult-caea.use-case.js.map +1 -0
  100. package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.d.ts +17 -0
  101. package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js +39 -0
  102. package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js.map +1 -0
  103. package/lib/application/use-cases/electronic-billing/create-voucher.use-case.d.ts +17 -0
  104. package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js +33 -0
  105. package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js.map +1 -0
  106. package/lib/application/use-cases/electronic-billing/get-activities.use-case.d.ts +15 -0
  107. package/lib/application/use-cases/electronic-billing/get-activities.use-case.js +28 -0
  108. package/lib/application/use-cases/electronic-billing/get-activities.use-case.js.map +1 -0
  109. package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.d.ts +15 -0
  110. package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.js +28 -0
  111. package/lib/application/use-cases/electronic-billing/get-aliquot-types.use-case.js.map +1 -0
  112. package/lib/application/use-cases/electronic-billing/get-caea.use-case.d.ts +17 -0
  113. package/lib/application/use-cases/electronic-billing/get-caea.use-case.js +30 -0
  114. package/lib/application/use-cases/electronic-billing/get-caea.use-case.js.map +1 -0
  115. package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.d.ts +15 -0
  116. package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.js +28 -0
  117. package/lib/application/use-cases/electronic-billing/get-concept-types.use-case.js.map +1 -0
  118. package/lib/application/use-cases/electronic-billing/get-countries.use-case.d.ts +15 -0
  119. package/lib/application/use-cases/electronic-billing/get-countries.use-case.js +28 -0
  120. package/lib/application/use-cases/electronic-billing/get-countries.use-case.js.map +1 -0
  121. package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.d.ts +15 -0
  122. package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.js +28 -0
  123. package/lib/application/use-cases/electronic-billing/get-currency-types.use-case.js.map +1 -0
  124. package/lib/application/use-cases/electronic-billing/get-document-types.use-case.d.ts +15 -0
  125. package/lib/application/use-cases/electronic-billing/get-document-types.use-case.js +28 -0
  126. package/lib/application/use-cases/electronic-billing/get-document-types.use-case.js.map +1 -0
  127. package/lib/application/use-cases/electronic-billing/get-iva-receptor-types.use-case.d.ts +16 -0
  128. package/lib/application/use-cases/electronic-billing/get-iva-receptor-types.use-case.js +29 -0
  129. package/lib/application/use-cases/electronic-billing/get-iva-receptor-types.use-case.js.map +1 -0
  130. package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.d.ts +17 -0
  131. package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.js +29 -0
  132. package/lib/application/use-cases/electronic-billing/get-last-voucher.use-case.js.map +1 -0
  133. package/lib/application/use-cases/electronic-billing/get-max-records.use-case.d.ts +15 -0
  134. package/lib/application/use-cases/electronic-billing/get-max-records.use-case.js +28 -0
  135. package/lib/application/use-cases/electronic-billing/get-max-records.use-case.js.map +1 -0
  136. package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.d.ts +15 -0
  137. package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.js +28 -0
  138. package/lib/application/use-cases/electronic-billing/get-optional-types.use-case.js.map +1 -0
  139. package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.d.ts +40 -0
  140. package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.js +73 -0
  141. package/lib/application/use-cases/electronic-billing/get-parameter-types.use-case.js.map +1 -0
  142. package/lib/application/use-cases/electronic-billing/get-quotation.use-case.d.ts +16 -0
  143. package/lib/application/use-cases/electronic-billing/get-quotation.use-case.js +29 -0
  144. package/lib/application/use-cases/electronic-billing/get-quotation.use-case.js.map +1 -0
  145. package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.d.ts +15 -0
  146. package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.js +28 -0
  147. package/lib/application/use-cases/electronic-billing/get-sales-points.use-case.js.map +1 -0
  148. package/lib/application/use-cases/electronic-billing/get-server-status.use-case.d.ts +15 -0
  149. package/lib/application/use-cases/electronic-billing/get-server-status.use-case.js +28 -0
  150. package/lib/application/use-cases/electronic-billing/get-server-status.use-case.js.map +1 -0
  151. package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.d.ts +15 -0
  152. package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.js +28 -0
  153. package/lib/application/use-cases/electronic-billing/get-tax-types.use-case.js.map +1 -0
  154. package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.d.ts +17 -0
  155. package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.js +29 -0
  156. package/lib/application/use-cases/electronic-billing/get-voucher-info.use-case.js.map +1 -0
  157. package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.d.ts +15 -0
  158. package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.js +28 -0
  159. package/lib/application/use-cases/electronic-billing/get-voucher-types.use-case.js.map +1 -0
  160. package/lib/application/use-cases/electronic-billing/index.d.ts +18 -0
  161. package/lib/application/use-cases/electronic-billing/index.js +36 -0
  162. package/lib/application/use-cases/electronic-billing/index.js.map +1 -0
  163. package/lib/application/use-cases/electronic-billing/inform-caea-no-movement.use-case.d.ts +17 -0
  164. package/lib/application/use-cases/electronic-billing/inform-caea-no-movement.use-case.js +30 -0
  165. package/lib/application/use-cases/electronic-billing/inform-caea-no-movement.use-case.js.map +1 -0
  166. package/lib/application/use-cases/electronic-billing/inform-caea-usage.use-case.d.ts +14 -0
  167. package/lib/application/use-cases/electronic-billing/inform-caea-usage.use-case.js +32 -0
  168. package/lib/application/use-cases/electronic-billing/inform-caea-usage.use-case.js.map +1 -0
  169. package/lib/application/use-cases/index.d.ts +7 -0
  170. package/lib/application/use-cases/index.js +24 -0
  171. package/lib/application/use-cases/index.js.map +1 -0
  172. package/lib/application/use-cases/register/get-register-server-status.use-case.d.ts +15 -0
  173. package/lib/application/use-cases/register/get-register-server-status.use-case.js +28 -0
  174. package/lib/application/use-cases/register/get-register-server-status.use-case.js.map +1 -0
  175. package/lib/application/use-cases/register/get-tax-id-by-document.use-case.d.ts +16 -0
  176. package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js +29 -0
  177. package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js.map +1 -0
  178. package/lib/application/use-cases/register/get-taxpayer-details.use-case.d.ts +16 -0
  179. package/lib/application/use-cases/register/get-taxpayer-details.use-case.js +29 -0
  180. package/lib/application/use-cases/register/get-taxpayer-details.use-case.js.map +1 -0
  181. package/lib/application/use-cases/register/get-taxpayers-details.use-case.d.ts +16 -0
  182. package/lib/application/use-cases/register/get-taxpayers-details.use-case.js +29 -0
  183. package/lib/application/use-cases/register/get-taxpayers-details.use-case.js.map +1 -0
  184. package/lib/application/use-cases/register/index.d.ts +4 -0
  185. package/lib/application/use-cases/register/index.js +21 -0
  186. package/lib/application/use-cases/register/index.js.map +1 -0
  187. package/lib/arca.d.ts +26 -0
  188. package/lib/arca.js +124 -0
  189. package/lib/arca.js.map +1 -0
  190. package/lib/domain/entities/access-ticket.entity.d.ts +73 -0
  191. package/lib/domain/entities/access-ticket.entity.js +144 -0
  192. package/lib/domain/entities/access-ticket.entity.js.map +1 -0
  193. package/lib/domain/entities/index.d.ts +6 -0
  194. package/lib/domain/entities/index.js +23 -0
  195. package/lib/domain/entities/index.js.map +1 -0
  196. package/lib/domain/entities/voucher.entity.d.ts +113 -0
  197. package/lib/domain/entities/voucher.entity.js +216 -0
  198. package/lib/domain/entities/voucher.entity.js.map +1 -0
  199. package/lib/domain/index.d.ts +6 -0
  200. package/lib/domain/index.js +23 -0
  201. package/lib/domain/index.js.map +1 -0
  202. package/lib/domain/types/electronic-billing.types.d.ts +193 -0
  203. package/lib/domain/types/electronic-billing.types.js +8 -0
  204. package/lib/domain/types/electronic-billing.types.js.map +1 -0
  205. package/lib/domain/types/index.d.ts +6 -0
  206. package/lib/domain/types/index.js +23 -0
  207. package/lib/domain/types/index.js.map +1 -0
  208. package/lib/domain/types/voucher.types.d.ts +65 -0
  209. package/lib/domain/types/voucher.types.js +3 -0
  210. package/lib/domain/types/voucher.types.js.map +1 -0
  211. package/lib/domain/value-objects/cae.vo.d.ts +47 -0
  212. package/lib/domain/value-objects/cae.vo.js +80 -0
  213. package/lib/domain/value-objects/cae.vo.js.map +1 -0
  214. package/lib/domain/value-objects/cuit.vo.d.ts +49 -0
  215. package/lib/domain/value-objects/cuit.vo.js +98 -0
  216. package/lib/domain/value-objects/cuit.vo.js.map +1 -0
  217. package/lib/domain/value-objects/index.d.ts +7 -0
  218. package/lib/domain/value-objects/index.js +24 -0
  219. package/lib/domain/value-objects/index.js.map +1 -0
  220. package/lib/domain/value-objects/voucher-number.vo.d.ts +66 -0
  221. package/lib/domain/value-objects/voucher-number.vo.js +106 -0
  222. package/lib/domain/value-objects/voucher-number.vo.js.map +1 -0
  223. package/lib/index.d.ts +8 -0
  224. package/lib/index.js +27 -0
  225. package/lib/index.js.map +1 -0
  226. package/lib/infrastructure/constants/index.d.ts +5 -0
  227. package/lib/infrastructure/constants/index.js +22 -0
  228. package/lib/infrastructure/constants/index.js.map +1 -0
  229. package/lib/infrastructure/constants/ssl.constants.d.ts +16 -0
  230. package/lib/infrastructure/constants/ssl.constants.js +20 -0
  231. package/lib/infrastructure/constants/ssl.constants.js.map +1 -0
  232. package/lib/infrastructure/index.d.ts +5 -0
  233. package/lib/infrastructure/index.js +22 -0
  234. package/lib/infrastructure/index.js.map +1 -0
  235. package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.d.ts +68 -0
  236. package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js +128 -0
  237. package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js.map +1 -0
  238. package/lib/infrastructure/outbound/adapters/auth/auth.repository.d.ts +59 -0
  239. package/lib/infrastructure/outbound/adapters/auth/auth.repository.js +134 -0
  240. package/lib/infrastructure/outbound/adapters/auth/auth.repository.js.map +1 -0
  241. package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.d.ts +41 -0
  242. package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js +513 -0
  243. package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js.map +1 -0
  244. package/lib/infrastructure/outbound/adapters/electronic-billing/index.d.ts +5 -0
  245. package/lib/infrastructure/outbound/adapters/electronic-billing/index.js +22 -0
  246. package/lib/infrastructure/outbound/adapters/electronic-billing/index.js.map +1 -0
  247. package/lib/infrastructure/outbound/adapters/enums.d.ts +43 -0
  248. package/lib/infrastructure/outbound/adapters/enums.js +49 -0
  249. package/lib/infrastructure/outbound/adapters/enums.js.map +1 -0
  250. package/lib/infrastructure/outbound/adapters/generic/generic-repository.d.ts +13 -0
  251. package/lib/infrastructure/outbound/adapters/generic/generic-repository.js +53 -0
  252. package/lib/infrastructure/outbound/adapters/generic/generic-repository.js.map +1 -0
  253. package/lib/infrastructure/outbound/adapters/index.d.ts +10 -0
  254. package/lib/infrastructure/outbound/adapters/index.js +27 -0
  255. package/lib/infrastructure/outbound/adapters/index.js.map +1 -0
  256. package/lib/infrastructure/outbound/adapters/logger/winston-logger.d.ts +14 -0
  257. package/lib/infrastructure/outbound/adapters/logger/winston-logger.js +24 -0
  258. package/lib/infrastructure/outbound/adapters/logger/winston-logger.js.map +1 -0
  259. package/lib/infrastructure/outbound/adapters/register/index.d.ts +9 -0
  260. package/lib/infrastructure/outbound/adapters/register/index.js +26 -0
  261. package/lib/infrastructure/outbound/adapters/register/index.js.map +1 -0
  262. package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.d.ts +18 -0
  263. package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js +143 -0
  264. package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js.map +1 -0
  265. package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.d.ts +14 -0
  266. package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js +136 -0
  267. package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js.map +1 -0
  268. package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.d.ts +12 -0
  269. package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js +103 -0
  270. package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js.map +1 -0
  271. package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.d.ts +12 -0
  272. package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.js +112 -0
  273. package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.js.map +1 -0
  274. package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.d.ts +13 -0
  275. package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js +133 -0
  276. package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js.map +1 -0
  277. package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.d.ts +30 -0
  278. package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js +68 -0
  279. package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js.map +1 -0
  280. package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.d.ts +20 -0
  281. package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js +54 -0
  282. package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js.map +1 -0
  283. package/lib/infrastructure/outbound/adapters/soap/soap-client.d.ts +11 -0
  284. package/lib/infrastructure/outbound/adapters/soap/soap-client.js +95 -0
  285. package/lib/infrastructure/outbound/adapters/soap/soap-client.js.map +1 -0
  286. package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.d.ts +10 -0
  287. package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js +6144 -0
  288. package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js.map +1 -0
  289. package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.d.ts +24 -0
  290. package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js +98 -0
  291. package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js.map +1 -0
  292. package/lib/infrastructure/outbound/index.d.ts +9 -0
  293. package/lib/infrastructure/outbound/index.js +26 -0
  294. package/lib/infrastructure/outbound/index.js.map +1 -0
  295. package/lib/infrastructure/outbound/ports/auth/auth-repository.types.d.ts +17 -0
  296. package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js +3 -0
  297. package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js.map +1 -0
  298. package/lib/infrastructure/outbound/ports/index.d.ts +11 -0
  299. package/lib/infrastructure/outbound/ports/index.js +28 -0
  300. package/lib/infrastructure/outbound/ports/index.js.map +1 -0
  301. package/lib/infrastructure/outbound/ports/logger/logger.port.d.ts +31 -0
  302. package/lib/infrastructure/outbound/ports/logger/logger.port.js +3 -0
  303. package/lib/infrastructure/outbound/ports/logger/logger.port.js.map +1 -0
  304. package/lib/infrastructure/outbound/ports/logger/logger.types.d.ts +7 -0
  305. package/lib/infrastructure/outbound/ports/logger/logger.types.js +3 -0
  306. package/lib/infrastructure/outbound/ports/logger/logger.types.js.map +1 -0
  307. package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.d.ts +51 -0
  308. package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js +57 -0
  309. package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js.map +1 -0
  310. package/lib/infrastructure/outbound/ports/soap/enums/index.d.ts +7 -0
  311. package/lib/infrastructure/outbound/ports/soap/enums/index.js +24 -0
  312. package/lib/infrastructure/outbound/ports/soap/enums/index.js.map +1 -0
  313. package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.d.ts +9 -0
  314. package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js +14 -0
  315. package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js.map +1 -0
  316. package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.d.ts +15 -0
  317. package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js +20 -0
  318. package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js.map +1 -0
  319. package/lib/infrastructure/outbound/ports/soap/index.d.ts +7 -0
  320. package/lib/infrastructure/outbound/ports/soap/index.js +24 -0
  321. package/lib/infrastructure/outbound/ports/soap/index.js.map +1 -0
  322. package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.d.ts +42 -0
  323. package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.js +3 -0
  324. package/lib/infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms.js.map +1 -0
  325. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.d.ts +102 -0
  326. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.js +3 -0
  327. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA10/PersonaServiceA10Port.js.map +1 -0
  328. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.d.ts +145 -0
  329. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.js +3 -0
  330. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA13/PersonaServiceA13Port.js.map +1 -0
  331. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.d.ts +227 -0
  332. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.js +3 -0
  333. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA4/PersonaServiceA4Port.js.map +1 -0
  334. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.d.ts +300 -0
  335. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.js +3 -0
  336. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceA5/PersonaServiceA5Port.js.map +1 -0
  337. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.d.ts +301 -0
  338. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.js +3 -0
  339. package/lib/infrastructure/outbound/ports/soap/interfaces/PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort.js.map +1 -0
  340. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.d.ts +835 -0
  341. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.js +3 -0
  342. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.js.map +1 -0
  343. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.d.ts +876 -0
  344. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.js +3 -0
  345. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.js.map +1 -0
  346. package/lib/infrastructure/outbound/ports/soap/interfaces/index.d.ts +15 -0
  347. package/lib/infrastructure/outbound/ports/soap/interfaces/index.js +53 -0
  348. package/lib/infrastructure/outbound/ports/soap/interfaces/index.js.map +1 -0
  349. package/lib/infrastructure/outbound/ports/soap/soap-client.port.d.ts +30 -0
  350. package/lib/infrastructure/outbound/ports/soap/soap-client.port.js +3 -0
  351. package/lib/infrastructure/outbound/ports/soap/soap-client.port.js.map +1 -0
  352. package/lib/infrastructure/outbound/ports/soap/soap-repository.types.d.ts +45 -0
  353. package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js +3 -0
  354. package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js.map +1 -0
  355. package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.d.ts +24 -0
  356. package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.js +3 -0
  357. package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.js.map +1 -0
  358. package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.d.ts +9 -0
  359. package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js +3 -0
  360. package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js.map +1 -0
  361. package/lib/infrastructure/types/index.d.ts +5 -0
  362. package/lib/infrastructure/types/index.js +22 -0
  363. package/lib/infrastructure/types/index.js.map +1 -0
  364. package/lib/infrastructure/types/soap.types.d.ts +29 -0
  365. package/lib/infrastructure/types/soap.types.js +3 -0
  366. package/lib/infrastructure/types/soap.types.js.map +1 -0
  367. package/lib/infrastructure/utils/crypt-data.d.ts +6 -0
  368. package/lib/infrastructure/utils/crypt-data.js +46 -0
  369. package/lib/infrastructure/utils/crypt-data.js.map +1 -0
  370. package/lib/infrastructure/utils/env.d.ts +10 -0
  371. package/lib/infrastructure/utils/env.js +32 -0
  372. package/lib/infrastructure/utils/env.js.map +1 -0
  373. package/lib/infrastructure/utils/index.d.ts +8 -0
  374. package/lib/infrastructure/utils/index.js +25 -0
  375. package/lib/infrastructure/utils/index.js.map +1 -0
  376. package/lib/infrastructure/utils/logger.d.ts +4 -0
  377. package/lib/infrastructure/utils/logger.js +21 -0
  378. package/lib/infrastructure/utils/logger.js.map +1 -0
  379. package/lib/infrastructure/utils/parser.d.ts +14 -0
  380. package/lib/infrastructure/utils/parser.js +36 -0
  381. package/lib/infrastructure/utils/parser.js.map +1 -0
  382. package/lib/infrastructure/utils/soap-to-dto.mapper.d.ts +200 -0
  383. package/lib/infrastructure/utils/soap-to-dto.mapper.js +213 -0
  384. package/lib/infrastructure/utils/soap-to-dto.mapper.js.map +1 -0
  385. package/package.json +3 -2
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ServiceSoap12.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServiceSoap12.js","sourceRoot":"","sources":["../../../../../../../src/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * SOAP Interfaces
3
+ * Re-export interfaces with namespaces to avoid naming conflicts
4
+ *
5
+ * Note: Direct imports from specific files are recommended to avoid conflicts
6
+ * Example: import { ILoginCmsSoap } from "@infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms"
7
+ */
8
+ export * as LoginCMSService from "./LoginCMSService/LoginCms";
9
+ export * as PersonaServiceA10 from "./PersonaServiceA10/PersonaServiceA10Port";
10
+ export * as PersonaServiceA13 from "./PersonaServiceA13/PersonaServiceA13Port";
11
+ export * as PersonaServiceA4 from "./PersonaServiceA4/PersonaServiceA4Port";
12
+ export * as PersonaServiceA5 from "./PersonaServiceA5/PersonaServiceA5Port";
13
+ export * as PersonaServiceInscriptionProof from "./PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort";
14
+ export * as ServiceSoapTypes from "./Service/ServiceSoap";
15
+ export * as ServiceSoap12Types from "./Service/ServiceSoap12";
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * SOAP Interfaces
4
+ * Re-export interfaces with namespaces to avoid naming conflicts
5
+ *
6
+ * Note: Direct imports from specific files are recommended to avoid conflicts
7
+ * Example: import { ILoginCmsSoap } from "@infrastructure/outbound/ports/soap/interfaces/LoginCMSService/LoginCms"
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ exports.ServiceSoap12Types = exports.ServiceSoapTypes = exports.PersonaServiceInscriptionProof = exports.PersonaServiceA5 = exports.PersonaServiceA4 = exports.PersonaServiceA13 = exports.PersonaServiceA10 = exports.LoginCMSService = void 0;
44
+ // Export as namespaces to avoid conflicts
45
+ exports.LoginCMSService = __importStar(require("./LoginCMSService/LoginCms"));
46
+ exports.PersonaServiceA10 = __importStar(require("./PersonaServiceA10/PersonaServiceA10Port"));
47
+ exports.PersonaServiceA13 = __importStar(require("./PersonaServiceA13/PersonaServiceA13Port"));
48
+ exports.PersonaServiceA4 = __importStar(require("./PersonaServiceA4/PersonaServiceA4Port"));
49
+ exports.PersonaServiceA5 = __importStar(require("./PersonaServiceA5/PersonaServiceA5Port"));
50
+ exports.PersonaServiceInscriptionProof = __importStar(require("./PersonaServiceInscriptionProof/PersonaServiceInscriptionProofPort"));
51
+ exports.ServiceSoapTypes = __importStar(require("./Service/ServiceSoap"));
52
+ exports.ServiceSoap12Types = __importStar(require("./Service/ServiceSoap12"));
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/outbound/ports/soap/interfaces/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0CAA0C;AAC1C,8EAA8D;AAC9D,+FAA+E;AAC/E,+FAA+E;AAC/E,4FAA4E;AAC5E,4FAA4E;AAC5E,sIAAsH;AACtH,0EAA0D;AAC1D,8EAA8D"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * SOAP Client Port
3
+ * Outbound port for SOAP client operations
4
+ */
5
+ import { Client } from "soap";
6
+ export interface ISoapClientPort {
7
+ /**
8
+ * Create a SOAP client from a WSDL
9
+ * @param wsdlPath Path to the WSDL file
10
+ * @param options SOAP client options
11
+ * @returns The SOAP client
12
+ */
13
+ createClient<T extends Client>(wsdlName: string, options?: any & {
14
+ wsdlContent?: string;
15
+ }): Promise<T>;
16
+ /**
17
+ * Set the endpoint URL for the client
18
+ * @param client The SOAP client
19
+ * @param endpoint The endpoint URL
20
+ */
21
+ setEndpoint(client: any, endpoint: string): void;
22
+ /**
23
+ * Execute a SOAP method
24
+ * @param client The SOAP client
25
+ * @param methodName The name of the method to call
26
+ * @param params The parameters for the method
27
+ * @returns The response from the SOAP call (tuple: [result, rawResponse, soapHeader, rawRequest])
28
+ */
29
+ call<T extends [any, string, any, string]>(client: any, methodName: string, params: any): Promise<T>;
30
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=soap-client.port.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"soap-client.port.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/ports/soap/soap-client.port.ts"],"names":[],"mappings":""}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * SOAP Repository Types
3
+ * Configuration types for SOAP repositories
4
+ */
5
+ import { ISoapClientPort } from "./soap-client.port";
6
+ import { IAuthenticationRepositoryPort } from "@application/ports/authentication/authentication-repository.port";
7
+ import { ILoggerPort } from "../logger/logger.port";
8
+ import { ServiceNamesEnum } from "./enums/service-names.enum";
9
+ import { SoapServiceVersion } from "./enums/endpoints.enum";
10
+ export interface BaseSoapRepositoryConstructorConfig {
11
+ soapClient?: ISoapClientPort;
12
+ authRepository: IAuthenticationRepositoryPort;
13
+ logger: ILoggerPort;
14
+ cuit: number;
15
+ production?: boolean;
16
+ /**
17
+ * Use SOAP 1.2 instead of SOAP 1.1 for Electronic Billing service
18
+ * @default true (uses SOAP 1.2 by default)
19
+ */
20
+ useSoap12?: boolean;
21
+ }
22
+ export interface AuthenticatedProxyOptions {
23
+ /**
24
+ * Service name to use for authentication
25
+ */
26
+ serviceName: ServiceNamesEnum;
27
+ /**
28
+ * Whether to inject auth.Auth instead of auth directly
29
+ * @default false
30
+ */
31
+ injectAuthProperty?: boolean;
32
+ /**
33
+ * SOAP service version to use when checking if method requires Auth
34
+ * @default ServiceSoap12
35
+ */
36
+ soapVersion?: SoapServiceVersion;
37
+ /**
38
+ * Optional function to map auth parameters before injection
39
+ */
40
+ authMapper?: (auth: any) => any;
41
+ /**
42
+ * List of methods to exclude from authentication injection
43
+ */
44
+ excludeMethods?: string[];
45
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=soap-repository.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"soap-repository.types.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/ports/soap/soap-repository.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Ticket Storage Port
3
+ * Outbound port for ticket storage operations
4
+ */
5
+ import { AccessTicket } from "@domain/entities/access-ticket.entity";
6
+ export interface ITicketStoragePort {
7
+ /**
8
+ * Save an access ticket
9
+ * @param ticket Access ticket to save
10
+ * @param serviceName Service name identifier
11
+ */
12
+ save(ticket: AccessTicket, serviceName: string): Promise<void>;
13
+ /**
14
+ * Get an access ticket
15
+ * @param serviceName Service name identifier
16
+ * @returns AccessTicket or null if not found
17
+ */
18
+ get(serviceName: string): Promise<AccessTicket | null>;
19
+ /**
20
+ * Delete an access ticket
21
+ * @param serviceName Service name identifier
22
+ */
23
+ delete(serviceName: string): Promise<void>;
24
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ticket-storage.port.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticket-storage.port.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/ports/storage/ticket-storage.port.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Ticket Storage Types
3
+ * Configuration types for ticket storage implementations
4
+ */
5
+ export interface FileSystemTicketStorageConfig {
6
+ ticketPath: string;
7
+ cuit: number;
8
+ production?: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ticket-storage.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ticket-storage.types.js","sourceRoot":"","sources":["../../../../../src/infrastructure/outbound/ports/storage/ticket-storage.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Infrastructure Types
3
+ * Exports all infrastructure-related types
4
+ */
5
+ export * from "./soap.types";
@@ -0,0 +1,22 @@
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 Types
19
+ * Exports all infrastructure-related types
20
+ */
21
+ __exportStar(require("./soap.types"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,+CAA6B"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Infrastructure Types - SOAP
3
+ * Types related to SOAP infrastructure
4
+ */
5
+ import { IOptions } from "soap";
6
+ import { WsdlPathEnum } from "@infrastructure/outbound/ports/soap/enums/wsdl-path.enum";
7
+ import { EndpointsEnum, SoapServiceVersion } from "@infrastructure/outbound/ports/soap/enums/endpoints.enum";
8
+ import { ServiceNamesEnum } from "@infrastructure/outbound/ports/soap/enums/service-names.enum";
9
+ export type SoapAsyncFunc<I, O> = (input: I, options?: any, extraHeaders?: any) => Promise<[O, string, {
10
+ [k: string]: any;
11
+ }, string]>;
12
+ export type WSAuthTokens = {
13
+ token: string;
14
+ sign: string;
15
+ expirationDate: string;
16
+ };
17
+ export type SoapClientParams = {
18
+ wsdl: WsdlPathEnum;
19
+ options?: IOptions;
20
+ };
21
+ export type ArcaServiceSoapParam = SoapClientParams & {
22
+ v12?: boolean;
23
+ url: EndpointsEnum;
24
+ url_test?: EndpointsEnum;
25
+ wsdl_test?: WsdlPathEnum;
26
+ } & {
27
+ serviceName: ServiceNamesEnum;
28
+ };
29
+ export type SoapServices<T> = Record<"Service", Record<SoapServiceVersion, Record<keyof T, Record<"input" | "output", Record<string, any>>>>>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=soap.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"soap.types.js","sourceRoot":"","sources":["../../../src/infrastructure/types/soap.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export declare class Cryptography {
2
+ private readonly cert;
3
+ private readonly key;
4
+ constructor(cert: string, key: string);
5
+ sign(data: string): string;
6
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Cryptography = void 0;
7
+ const node_forge_1 = __importDefault(require("node-forge"));
8
+ class Cryptography {
9
+ constructor(cert, key) {
10
+ this.cert = cert;
11
+ this.key = key;
12
+ }
13
+ sign(data) {
14
+ const p7 = node_forge_1.default.pkcs7.createSignedData();
15
+ p7.content = node_forge_1.default.util.createBuffer(data, "utf8");
16
+ try {
17
+ p7.addCertificate(this.cert);
18
+ }
19
+ catch (error) {
20
+ throw new Error("Invalid PEM formatted message. Check your cert.");
21
+ }
22
+ p7.addSigner({
23
+ authenticatedAttributes: [
24
+ {
25
+ type: node_forge_1.default.pki.oids.contentType,
26
+ value: node_forge_1.default.pki.oids.data,
27
+ },
28
+ {
29
+ type: node_forge_1.default.pki.oids.messageDigest,
30
+ },
31
+ {
32
+ type: node_forge_1.default.pki.oids.signingTime,
33
+ value: new Date(),
34
+ },
35
+ ],
36
+ certificate: this.cert,
37
+ digestAlgorithm: node_forge_1.default.pki.oids.sha256,
38
+ key: this.key,
39
+ });
40
+ p7.sign();
41
+ const bytes = node_forge_1.default.asn1.toDer(p7.toAsn1()).getBytes();
42
+ return Buffer.from(bytes, "binary").toString("base64");
43
+ }
44
+ }
45
+ exports.Cryptography = Cryptography;
46
+ //# sourceMappingURL=crypt-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypt-data.js","sourceRoot":"","sources":["../../../src/infrastructure/utils/crypt-data.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AAE/B,MAAa,YAAY;IACvB,YAA6B,IAAY,EAAmB,GAAW;QAA1C,SAAI,GAAJ,IAAI,CAAQ;QAAmB,QAAG,GAAH,GAAG,CAAQ;IAAG,CAAC;IAC3E,IAAI,CAAC,IAAY;QACf,MAAM,EAAE,GAAG,oBAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC1C,EAAE,CAAC,OAAO,GAAG,oBAAK,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC;YACH,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QACD,EAAE,CAAC,SAAS,CAAC;YACX,uBAAuB,EAAE;gBACvB;oBACE,IAAI,EAAE,oBAAK,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW;oBAChC,KAAK,EAAE,oBAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI;iBAC3B;gBACD;oBACE,IAAI,EAAE,oBAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa;iBACnC;gBACD;oBACE,IAAI,EAAE,oBAAK,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW;oBAChC,KAAK,EAAE,IAAI,IAAI,EAAS;iBACzB;aACF;YACD,WAAW,EAAE,IAAI,CAAC,IAAI;YACtB,eAAe,EAAE,oBAAK,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM;YACtC,GAAG,EAAE,IAAI,CAAC,GAAG;SACd,CAAC,CAAC;QACH,EAAE,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,KAAK,GAAG,oBAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;QACvD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzD,CAAC;CACF;AAhCD,oCAgCC"}
@@ -0,0 +1,10 @@
1
+ export declare class Environment {
2
+ readonly testCredentialsFolder: string;
3
+ readonly testPrivateKeyFileName: string;
4
+ readonly testCertFileName: string;
5
+ readonly nodeEnv: string;
6
+ constructor();
7
+ checkEnv(): void;
8
+ }
9
+ declare const Env: Environment;
10
+ export default Env;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Environment = void 0;
4
+ const dotenv_1 = require("dotenv");
5
+ class Environment {
6
+ constructor() {
7
+ (0, dotenv_1.config)();
8
+ this.testCredentialsFolder = process.env.TEST_CREDENTIALS_FOLDER;
9
+ this.testPrivateKeyFileName = process.env
10
+ .TEST_PRIVATE_KEY_FILE_NAME;
11
+ this.testCertFileName = process.env.TEST_CERT_FILE_NAME;
12
+ this.nodeEnv = (process.env.NODE_ENV || "local");
13
+ }
14
+ checkEnv() {
15
+ try {
16
+ if (!this.testCredentialsFolder)
17
+ throw new Error("TEST_CREDENTIALS_FOLDER");
18
+ if (!this.testPrivateKeyFileName)
19
+ throw new Error("TEST_PRIVATE_KEY_FILE_NAME");
20
+ if (!this.testCertFileName)
21
+ throw new Error("TEST_CERT_FILE_NAME");
22
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
+ }
24
+ catch (error) {
25
+ throw new Error(`Env parameter not defined on .env file: ${error.message}`);
26
+ }
27
+ }
28
+ }
29
+ exports.Environment = Environment;
30
+ const Env = new Environment();
31
+ exports.default = Env;
32
+ //# sourceMappingURL=env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sourceRoot":"","sources":["../../../src/infrastructure/utils/env.ts"],"names":[],"mappings":";;;AAAA,mCAAgC;AAEhC,MAAa,WAAW;IAMtB;QACE,IAAA,eAAM,GAAE,CAAC;QACT,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAiC,CAAC;QAC3E,IAAI,CAAC,sBAAsB,GAAG,OAAO,CAAC,GAAG;aACtC,0BAAoC,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,GAAG,CAAC,mBAA6B,CAAC;QAClE,IAAI,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAW,CAAC;IAC7D,CAAC;IAED,QAAQ;QACN,IAAI,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,qBAAqB;gBAC7B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7C,IAAI,CAAC,IAAI,CAAC,sBAAsB;gBAC9B,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;YAChD,IAAI,CAAC,IAAI,CAAC,gBAAgB;gBAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACnE,8DAA8D;QAChE,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CACb,2CAA2C,KAAK,CAAC,OAAO,EAAE,CAC3D,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA7BD,kCA6BC;AAED,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;AAE9B,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Infrastructure Utils
3
+ * Exports all infrastructure utilities
4
+ */
5
+ export * from "./parser";
6
+ export * from "./crypt-data";
7
+ export * from "./logger";
8
+ export * from "./soap-to-dto.mapper";
@@ -0,0 +1,25 @@
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 Utils
19
+ * Exports all infrastructure utilities
20
+ */
21
+ __exportStar(require("./parser"), exports);
22
+ __exportStar(require("./crypt-data"), exports);
23
+ __exportStar(require("./logger"), exports);
24
+ __exportStar(require("./soap-to-dto.mapper"), exports);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,2CAAyB;AACzB,+CAA6B;AAC7B,2CAAyB;AACzB,uDAAqC"}
@@ -0,0 +1,4 @@
1
+ import { Logger } from "winston";
2
+ export declare function createArcaLogger(enableLogging?: boolean): Logger;
3
+ declare const defaultLogger: Logger;
4
+ export { defaultLogger as logger };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.logger = void 0;
4
+ exports.createArcaLogger = createArcaLogger;
5
+ const winston_1 = require("winston");
6
+ function createArcaLogger(enableLogging = false) {
7
+ const logger = (0, winston_1.createLogger)({
8
+ format: winston_1.format.json(),
9
+ exitOnError: true,
10
+ silent: !enableLogging,
11
+ });
12
+ if (enableLogging) {
13
+ logger.add(new winston_1.transports.Console({
14
+ format: winston_1.format.combine(winston_1.format.colorize(), winston_1.format.simple()),
15
+ }));
16
+ }
17
+ return logger;
18
+ }
19
+ const defaultLogger = createArcaLogger(false);
20
+ exports.logger = defaultLogger;
21
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/infrastructure/utils/logger.ts"],"names":[],"mappings":";;;AAEA,4CAgBC;AAlBD,qCAAmE;AAEnE,SAAgB,gBAAgB,CAAC,gBAAyB,KAAK;IAC7D,MAAM,MAAM,GAAG,IAAA,sBAAY,EAAC;QAC1B,MAAM,EAAE,gBAAM,CAAC,IAAI,EAAE;QACrB,WAAW,EAAE,IAAI;QACjB,MAAM,EAAE,CAAC,aAAa;KACvB,CAAC,CAAC;IAEH,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,CAAC,GAAG,CACR,IAAI,oBAAU,CAAC,OAAO,CAAC;YACrB,MAAM,EAAE,gBAAM,CAAC,OAAO,CAAC,gBAAM,CAAC,QAAQ,EAAE,EAAE,gBAAM,CAAC,MAAM,EAAE,CAAC;SAC3D,CAAC,CACH,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AACD,MAAM,aAAa,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAEpB,+BAAM"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Parser based on node-xml2js package (https://github.com/Leonidas-from-XIV/node-xml2js).
3
+ */
4
+ export declare class Parser {
5
+ static options: {
6
+ normalizeTags: boolean;
7
+ normalize: boolean;
8
+ explicitArray: boolean;
9
+ attrkey: string;
10
+ tagNameProcessors: ((key: string) => string)[];
11
+ };
12
+ static xmlToJson<T = Record<string, any>>(xml: string): Promise<T>;
13
+ static jsonToXml(obj: Record<string, any>): string;
14
+ }
@@ -0,0 +1,36 @@
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.Parser = void 0;
13
+ const xml2js_1 = require("xml2js");
14
+ /**
15
+ * Parser based on node-xml2js package (https://github.com/Leonidas-from-XIV/node-xml2js).
16
+ */
17
+ class Parser {
18
+ static xmlToJson(xml) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const parser = new xml2js_1.Parser(Parser.options);
21
+ return parser.parseStringPromise(xml);
22
+ });
23
+ }
24
+ static jsonToXml(obj) {
25
+ return new xml2js_1.Builder().buildObject(obj);
26
+ }
27
+ }
28
+ exports.Parser = Parser;
29
+ Parser.options = {
30
+ normalizeTags: true,
31
+ normalize: true,
32
+ explicitArray: false,
33
+ attrkey: "header",
34
+ tagNameProcessors: [(key) => key.replace("soapenv:", "")],
35
+ };
36
+ //# sourceMappingURL=parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../src/infrastructure/utils/parser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAsD;AAEtD;;GAEG;AACH,MAAa,MAAM;IASV,MAAM,CAAO,SAAS,CAC3B,GAAW;;YAEX,MAAM,MAAM,GAAG,IAAI,eAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC7C,OAAO,MAAM,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;QACxC,CAAC;KAAA;IAEM,MAAM,CAAC,SAAS,CAAC,GAAwB;QAC9C,OAAO,IAAI,gBAAO,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;;AAlBH,wBAmBC;AAlBQ,cAAO,GAAG;IACf,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,IAAI;IACf,aAAa,EAAE,KAAK;IACpB,OAAO,EAAE,QAAQ;IACjB,iBAAiB,EAAE,CAAC,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;CAClE,CAAC"}