@arcasdk/core 0.3.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) hide show
  1. package/lib/application/dto/electronic-billing.dto.d.ts +0 -5
  2. package/lib/application/dto/index.d.ts +0 -4
  3. package/lib/application/dto/index.js +0 -4
  4. package/lib/application/dto/index.js.map +1 -1
  5. package/lib/application/dto/register.dto.d.ts +0 -60
  6. package/lib/application/dto/register.dto.js +0 -5
  7. package/lib/application/dto/register.dto.js.map +1 -1
  8. package/lib/application/index.d.ts +0 -1
  9. package/lib/application/index.js +0 -1
  10. package/lib/application/index.js.map +1 -1
  11. package/lib/application/ports/authentication/authentication-repository.port.d.ts +0 -5
  12. package/lib/application/ports/authentication/index.d.ts +0 -4
  13. package/lib/application/ports/authentication/index.js +0 -4
  14. package/lib/application/ports/authentication/index.js.map +1 -1
  15. package/lib/application/ports/electronic-billing/electronic-billing-repository.port.d.ts +0 -6
  16. package/lib/application/ports/electronic-billing/index.d.ts +0 -4
  17. package/lib/application/ports/electronic-billing/index.js +0 -4
  18. package/lib/application/ports/electronic-billing/index.js.map +1 -1
  19. package/lib/application/ports/fecred/fecred-repository.port.d.ts +118 -0
  20. package/lib/application/ports/fecred/fecred-repository.port.js +3 -0
  21. package/lib/application/ports/fecred/fecred-repository.port.js.map +1 -0
  22. package/lib/application/ports/fecred/index.d.ts +1 -0
  23. package/lib/application/ports/fecred/index.js +18 -0
  24. package/lib/application/ports/fecred/index.js.map +1 -0
  25. package/lib/application/ports/fex/fex-repository.port.d.ts +116 -0
  26. package/lib/application/ports/fex/fex-repository.port.js +3 -0
  27. package/lib/application/ports/fex/fex-repository.port.js.map +1 -0
  28. package/lib/application/ports/fex/index.d.ts +1 -0
  29. package/lib/application/ports/fex/index.js +18 -0
  30. package/lib/application/ports/fex/index.js.map +1 -0
  31. package/lib/application/ports/generic/generic-repository.port.d.ts +3 -6
  32. package/lib/application/ports/index.d.ts +2 -4
  33. package/lib/application/ports/index.js +2 -4
  34. package/lib/application/ports/index.js.map +1 -1
  35. package/lib/application/ports/register/index.d.ts +0 -4
  36. package/lib/application/ports/register/index.js +0 -4
  37. package/lib/application/ports/register/index.js.map +1 -1
  38. package/lib/application/ports/register/register-repository.ports.d.ts +0 -4
  39. package/lib/application/services/electronic-billing.service.d.ts +0 -5
  40. package/lib/application/services/electronic-billing.service.js +0 -2
  41. package/lib/application/services/electronic-billing.service.js.map +1 -1
  42. package/lib/application/services/generic.service.d.ts +3 -6
  43. package/lib/application/services/generic.service.js +1 -1
  44. package/lib/application/services/generic.service.js.map +1 -1
  45. package/lib/application/services/index.d.ts +2 -4
  46. package/lib/application/services/index.js +2 -4
  47. package/lib/application/services/index.js.map +1 -1
  48. package/lib/application/services/register-inscription-proof.service.d.ts +0 -5
  49. package/lib/application/services/register-inscription-proof.service.js.map +1 -1
  50. package/lib/application/services/register-scope-five.service.d.ts +0 -5
  51. package/lib/application/services/register-scope-five.service.js.map +1 -1
  52. package/lib/application/services/register-scope-four.service.d.ts +0 -5
  53. package/lib/application/services/register-scope-four.service.js +0 -5
  54. package/lib/application/services/register-scope-four.service.js.map +1 -1
  55. package/lib/application/services/register-scope-ten.service.d.ts +0 -5
  56. package/lib/application/services/register-scope-ten.service.js.map +1 -1
  57. package/lib/application/services/register-scope-thirteen.service.d.ts +0 -5
  58. package/lib/application/services/register-scope-thirteen.service.js.map +1 -1
  59. package/lib/application/services/wsfecred.service.d.ts +46 -0
  60. package/lib/application/services/wsfecred.service.js +173 -0
  61. package/lib/application/services/wsfecred.service.js.map +1 -0
  62. package/lib/application/services/wsfex.service.d.ts +44 -0
  63. package/lib/application/services/wsfex.service.js +152 -0
  64. package/lib/application/services/wsfex.service.js.map +1 -0
  65. package/lib/application/types/auth.types.d.ts +0 -4
  66. package/lib/application/types/auth.types.js +0 -4
  67. package/lib/application/types/auth.types.js.map +1 -1
  68. package/lib/application/types/context.types.d.ts +13 -10
  69. package/lib/application/types/index.d.ts +0 -4
  70. package/lib/application/types/index.js +0 -4
  71. package/lib/application/types/index.js.map +1 -1
  72. package/lib/application/types/result.types.d.ts +0 -4
  73. package/lib/application/types/use-case-inputs.types.d.ts +0 -4
  74. package/lib/application/types/use-case-inputs.types.js +0 -4
  75. package/lib/application/types/use-case-inputs.types.js.map +1 -1
  76. package/lib/application/use-cases/authentication/get-auth-params.use-case.d.ts +0 -4
  77. package/lib/application/use-cases/authentication/get-auth-params.use-case.js.map +1 -1
  78. package/lib/application/use-cases/authentication/index.d.ts +0 -4
  79. package/lib/application/use-cases/authentication/index.js +0 -4
  80. package/lib/application/use-cases/authentication/index.js.map +1 -1
  81. package/lib/application/use-cases/authentication/login.use-case.d.ts +0 -5
  82. package/lib/application/use-cases/authentication/login.use-case.js.map +1 -1
  83. package/lib/application/use-cases/authentication/request-login.use-case.d.ts +0 -4
  84. package/lib/application/use-cases/authentication/request-login.use-case.js.map +1 -1
  85. package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js +0 -4
  86. package/lib/application/use-cases/electronic-billing/create-next-voucher.use-case.js.map +1 -1
  87. package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js +0 -2
  88. package/lib/application/use-cases/electronic-billing/create-voucher.use-case.js.map +1 -1
  89. package/lib/application/use-cases/index.d.ts +2 -0
  90. package/lib/application/use-cases/index.js +2 -0
  91. package/lib/application/use-cases/index.js.map +1 -1
  92. package/lib/application/use-cases/register/get-register-server-status.use-case.d.ts +0 -4
  93. package/lib/application/use-cases/register/get-register-server-status.use-case.js.map +1 -1
  94. package/lib/application/use-cases/register/get-tax-id-by-document.use-case.d.ts +0 -4
  95. package/lib/application/use-cases/register/get-tax-id-by-document.use-case.js.map +1 -1
  96. package/lib/application/use-cases/register/get-taxpayer-details.use-case.d.ts +0 -4
  97. package/lib/application/use-cases/register/get-taxpayer-details.use-case.js.map +1 -1
  98. package/lib/application/use-cases/register/get-taxpayers-details.use-case.d.ts +0 -4
  99. package/lib/application/use-cases/register/get-taxpayers-details.use-case.js.map +1 -1
  100. package/lib/application/use-cases/wsfecred/aceptar-fecred.use-case.d.ts +7 -0
  101. package/lib/application/use-cases/wsfecred/aceptar-fecred.use-case.js +24 -0
  102. package/lib/application/use-cases/wsfecred/aceptar-fecred.use-case.js.map +1 -0
  103. package/lib/application/use-cases/wsfecred/consultar-comprobantes.use-case.d.ts +7 -0
  104. package/lib/application/use-cases/wsfecred/consultar-comprobantes.use-case.js +24 -0
  105. package/lib/application/use-cases/wsfecred/consultar-comprobantes.use-case.js.map +1 -0
  106. package/lib/application/use-cases/wsfecred/consultar-cta-cte.use-case.d.ts +7 -0
  107. package/lib/application/use-cases/wsfecred/consultar-cta-cte.use-case.js +24 -0
  108. package/lib/application/use-cases/wsfecred/consultar-cta-cte.use-case.js.map +1 -0
  109. package/lib/application/use-cases/wsfecred/consultar-ctas-ctes.use-case.d.ts +7 -0
  110. package/lib/application/use-cases/wsfecred/consultar-ctas-ctes.use-case.js +24 -0
  111. package/lib/application/use-cases/wsfecred/consultar-ctas-ctes.use-case.js.map +1 -0
  112. package/lib/application/use-cases/wsfecred/consultar-cuentas-en-agt-dpto-cltv.use-case.d.ts +7 -0
  113. package/lib/application/use-cases/wsfecred/consultar-cuentas-en-agt-dpto-cltv.use-case.js +24 -0
  114. package/lib/application/use-cases/wsfecred/consultar-cuentas-en-agt-dpto-cltv.use-case.js.map +1 -0
  115. package/lib/application/use-cases/wsfecred/consultar-facturas-agt-dpto-cltv.use-case.d.ts +7 -0
  116. package/lib/application/use-cases/wsfecred/consultar-facturas-agt-dpto-cltv.use-case.js +24 -0
  117. package/lib/application/use-cases/wsfecred/consultar-facturas-agt-dpto-cltv.use-case.js.map +1 -0
  118. package/lib/application/use-cases/wsfecred/consultar-historial-estados-comprobante.use-case.d.ts +7 -0
  119. package/lib/application/use-cases/wsfecred/consultar-historial-estados-comprobante.use-case.js +24 -0
  120. package/lib/application/use-cases/wsfecred/consultar-historial-estados-comprobante.use-case.js.map +1 -0
  121. package/lib/application/use-cases/wsfecred/consultar-historial-estados-cta-cte.use-case.d.ts +7 -0
  122. package/lib/application/use-cases/wsfecred/consultar-historial-estados-cta-cte.use-case.js +24 -0
  123. package/lib/application/use-cases/wsfecred/consultar-historial-estados-cta-cte.use-case.js.map +1 -0
  124. package/lib/application/use-cases/wsfecred/consultar-monto-obligado-recepcion.use-case.d.ts +7 -0
  125. package/lib/application/use-cases/wsfecred/consultar-monto-obligado-recepcion.use-case.js +24 -0
  126. package/lib/application/use-cases/wsfecred/consultar-monto-obligado-recepcion.use-case.js.map +1 -0
  127. package/lib/application/use-cases/wsfecred/consultar-obligado-recepcion.use-case.d.ts +7 -0
  128. package/lib/application/use-cases/wsfecred/consultar-obligado-recepcion.use-case.js +24 -0
  129. package/lib/application/use-cases/wsfecred/consultar-obligado-recepcion.use-case.js.map +1 -0
  130. package/lib/application/use-cases/wsfecred/consultar-tipos-ajustes-operacion.use-case.d.ts +7 -0
  131. package/lib/application/use-cases/wsfecred/consultar-tipos-ajustes-operacion.use-case.js +24 -0
  132. package/lib/application/use-cases/wsfecred/consultar-tipos-ajustes-operacion.use-case.js.map +1 -0
  133. package/lib/application/use-cases/wsfecred/consultar-tipos-formas-cancelacion.use-case.d.ts +7 -0
  134. package/lib/application/use-cases/wsfecred/consultar-tipos-formas-cancelacion.use-case.js +24 -0
  135. package/lib/application/use-cases/wsfecred/consultar-tipos-formas-cancelacion.use-case.js.map +1 -0
  136. package/lib/application/use-cases/wsfecred/consultar-tipos-motivos-rechazo.use-case.d.ts +7 -0
  137. package/lib/application/use-cases/wsfecred/consultar-tipos-motivos-rechazo.use-case.js +24 -0
  138. package/lib/application/use-cases/wsfecred/consultar-tipos-motivos-rechazo.use-case.js.map +1 -0
  139. package/lib/application/use-cases/wsfecred/consultar-tipos-retenciones.use-case.d.ts +7 -0
  140. package/lib/application/use-cases/wsfecred/consultar-tipos-retenciones.use-case.js +24 -0
  141. package/lib/application/use-cases/wsfecred/consultar-tipos-retenciones.use-case.js.map +1 -0
  142. package/lib/application/use-cases/wsfecred/index.d.ts +20 -0
  143. package/lib/application/use-cases/wsfecred/index.js +37 -0
  144. package/lib/application/use-cases/wsfecred/index.js.map +1 -0
  145. package/lib/application/use-cases/wsfecred/informar-cancelacion-total-fecred.use-case.d.ts +7 -0
  146. package/lib/application/use-cases/wsfecred/informar-cancelacion-total-fecred.use-case.js +24 -0
  147. package/lib/application/use-cases/wsfecred/informar-cancelacion-total-fecred.use-case.js.map +1 -0
  148. package/lib/application/use-cases/wsfecred/informar-factura-agt-dpto-cltv.use-case.d.ts +7 -0
  149. package/lib/application/use-cases/wsfecred/informar-factura-agt-dpto-cltv.use-case.js +24 -0
  150. package/lib/application/use-cases/wsfecred/informar-factura-agt-dpto-cltv.use-case.js.map +1 -0
  151. package/lib/application/use-cases/wsfecred/modificar-opcion-transferencia.use-case.d.ts +7 -0
  152. package/lib/application/use-cases/wsfecred/modificar-opcion-transferencia.use-case.js +24 -0
  153. package/lib/application/use-cases/wsfecred/modificar-opcion-transferencia.use-case.js.map +1 -0
  154. package/lib/application/use-cases/wsfecred/obtener-remitos.use-case.d.ts +7 -0
  155. package/lib/application/use-cases/wsfecred/obtener-remitos.use-case.js +24 -0
  156. package/lib/application/use-cases/wsfecred/obtener-remitos.use-case.js.map +1 -0
  157. package/lib/application/use-cases/wsfecred/rechazar-fecred.use-case.d.ts +7 -0
  158. package/lib/application/use-cases/wsfecred/rechazar-fecred.use-case.js +24 -0
  159. package/lib/application/use-cases/wsfecred/rechazar-fecred.use-case.js.map +1 -0
  160. package/lib/application/use-cases/wsfecred/rechazar-nota-dc.use-case.d.ts +7 -0
  161. package/lib/application/use-cases/wsfecred/rechazar-nota-dc.use-case.js +24 -0
  162. package/lib/application/use-cases/wsfecred/rechazar-nota-dc.use-case.js.map +1 -0
  163. package/lib/application/use-cases/wsfex/authorize.use-case.d.ts +7 -0
  164. package/lib/application/use-cases/wsfex/authorize.use-case.js +24 -0
  165. package/lib/application/use-cases/wsfex/authorize.use-case.js.map +1 -0
  166. package/lib/application/use-cases/wsfex/check-permiso.use-case.d.ts +7 -0
  167. package/lib/application/use-cases/wsfex/check-permiso.use-case.js +24 -0
  168. package/lib/application/use-cases/wsfex/check-permiso.use-case.js.map +1 -0
  169. package/lib/application/use-cases/wsfex/dummy.use-case.d.ts +7 -0
  170. package/lib/application/use-cases/wsfex/dummy.use-case.js +24 -0
  171. package/lib/application/use-cases/wsfex/dummy.use-case.js.map +1 -0
  172. package/lib/application/use-cases/wsfex/get-cmp.use-case.d.ts +7 -0
  173. package/lib/application/use-cases/wsfex/get-cmp.use-case.js +24 -0
  174. package/lib/application/use-cases/wsfex/get-cmp.use-case.js.map +1 -0
  175. package/lib/application/use-cases/wsfex/get-last-cmp.use-case.d.ts +7 -0
  176. package/lib/application/use-cases/wsfex/get-last-cmp.use-case.js +24 -0
  177. package/lib/application/use-cases/wsfex/get-last-cmp.use-case.js.map +1 -0
  178. package/lib/application/use-cases/wsfex/get-last-id.use-case.d.ts +7 -0
  179. package/lib/application/use-cases/wsfex/get-last-id.use-case.js +24 -0
  180. package/lib/application/use-cases/wsfex/get-last-id.use-case.js.map +1 -0
  181. package/lib/application/use-cases/wsfex/get-param-actividades.use-case.d.ts +7 -0
  182. package/lib/application/use-cases/wsfex/get-param-actividades.use-case.js +24 -0
  183. package/lib/application/use-cases/wsfex/get-param-actividades.use-case.js.map +1 -0
  184. package/lib/application/use-cases/wsfex/get-param-cbte-tipo.use-case.d.ts +7 -0
  185. package/lib/application/use-cases/wsfex/get-param-cbte-tipo.use-case.js +24 -0
  186. package/lib/application/use-cases/wsfex/get-param-cbte-tipo.use-case.js.map +1 -0
  187. package/lib/application/use-cases/wsfex/get-param-ctz.use-case.d.ts +7 -0
  188. package/lib/application/use-cases/wsfex/get-param-ctz.use-case.js +24 -0
  189. package/lib/application/use-cases/wsfex/get-param-ctz.use-case.js.map +1 -0
  190. package/lib/application/use-cases/wsfex/get-param-dst-cuit.use-case.d.ts +7 -0
  191. package/lib/application/use-cases/wsfex/get-param-dst-cuit.use-case.js +24 -0
  192. package/lib/application/use-cases/wsfex/get-param-dst-cuit.use-case.js.map +1 -0
  193. package/lib/application/use-cases/wsfex/get-param-dst-pais.use-case.d.ts +7 -0
  194. package/lib/application/use-cases/wsfex/get-param-dst-pais.use-case.js +24 -0
  195. package/lib/application/use-cases/wsfex/get-param-dst-pais.use-case.js.map +1 -0
  196. package/lib/application/use-cases/wsfex/get-param-idiomas.use-case.d.ts +7 -0
  197. package/lib/application/use-cases/wsfex/get-param-idiomas.use-case.js +24 -0
  198. package/lib/application/use-cases/wsfex/get-param-idiomas.use-case.js.map +1 -0
  199. package/lib/application/use-cases/wsfex/get-param-incoterms.use-case.d.ts +7 -0
  200. package/lib/application/use-cases/wsfex/get-param-incoterms.use-case.js +24 -0
  201. package/lib/application/use-cases/wsfex/get-param-incoterms.use-case.js.map +1 -0
  202. package/lib/application/use-cases/wsfex/get-param-mon-con-cotizacion.use-case.d.ts +7 -0
  203. package/lib/application/use-cases/wsfex/get-param-mon-con-cotizacion.use-case.js +24 -0
  204. package/lib/application/use-cases/wsfex/get-param-mon-con-cotizacion.use-case.js.map +1 -0
  205. package/lib/application/use-cases/wsfex/get-param-mon.use-case.d.ts +7 -0
  206. package/lib/application/use-cases/wsfex/get-param-mon.use-case.js +24 -0
  207. package/lib/application/use-cases/wsfex/get-param-mon.use-case.js.map +1 -0
  208. package/lib/application/use-cases/wsfex/get-param-opcionales.use-case.d.ts +7 -0
  209. package/lib/application/use-cases/wsfex/get-param-opcionales.use-case.js +24 -0
  210. package/lib/application/use-cases/wsfex/get-param-opcionales.use-case.js.map +1 -0
  211. package/lib/application/use-cases/wsfex/get-param-pto-venta.use-case.d.ts +7 -0
  212. package/lib/application/use-cases/wsfex/get-param-pto-venta.use-case.js +24 -0
  213. package/lib/application/use-cases/wsfex/get-param-pto-venta.use-case.js.map +1 -0
  214. package/lib/application/use-cases/wsfex/get-param-tipo-expo.use-case.d.ts +7 -0
  215. package/lib/application/use-cases/wsfex/get-param-tipo-expo.use-case.js +24 -0
  216. package/lib/application/use-cases/wsfex/get-param-tipo-expo.use-case.js.map +1 -0
  217. package/lib/application/use-cases/wsfex/get-param-umed.use-case.d.ts +7 -0
  218. package/lib/application/use-cases/wsfex/get-param-umed.use-case.js +24 -0
  219. package/lib/application/use-cases/wsfex/get-param-umed.use-case.js.map +1 -0
  220. package/lib/application/use-cases/wsfex/index.d.ts +19 -0
  221. package/lib/application/use-cases/wsfex/index.js +36 -0
  222. package/lib/application/use-cases/wsfex/index.js.map +1 -0
  223. package/lib/domain/entities/access-ticket.entity.js +6 -10
  224. package/lib/domain/entities/access-ticket.entity.js.map +1 -1
  225. package/lib/domain/entities/index.d.ts +0 -4
  226. package/lib/domain/entities/index.js +0 -4
  227. package/lib/domain/entities/index.js.map +1 -1
  228. package/lib/domain/entities/voucher.entity.d.ts +23 -10
  229. package/lib/domain/entities/voucher.entity.js +52 -14
  230. package/lib/domain/entities/voucher.entity.js.map +1 -1
  231. package/lib/domain/index.d.ts +0 -4
  232. package/lib/domain/index.js +0 -4
  233. package/lib/domain/index.js.map +1 -1
  234. package/lib/domain/types/electronic-billing.types.d.ts +0 -5
  235. package/lib/domain/types/electronic-billing.types.js +0 -5
  236. package/lib/domain/types/electronic-billing.types.js.map +1 -1
  237. package/lib/domain/types/index.d.ts +0 -4
  238. package/lib/domain/types/index.js +0 -4
  239. package/lib/domain/types/index.js.map +1 -1
  240. package/lib/domain/types/voucher.types.d.ts +0 -4
  241. package/lib/domain/value-objects/cae.vo.d.ts +0 -5
  242. package/lib/domain/value-objects/cae.vo.js +0 -5
  243. package/lib/domain/value-objects/cae.vo.js.map +1 -1
  244. package/lib/domain/value-objects/cuit.vo.d.ts +0 -5
  245. package/lib/domain/value-objects/cuit.vo.js +0 -5
  246. package/lib/domain/value-objects/cuit.vo.js.map +1 -1
  247. package/lib/domain/value-objects/index.d.ts +0 -4
  248. package/lib/domain/value-objects/index.js +0 -4
  249. package/lib/domain/value-objects/index.js.map +1 -1
  250. package/lib/domain/value-objects/voucher-number.vo.d.ts +0 -5
  251. package/lib/domain/value-objects/voucher-number.vo.js +0 -5
  252. package/lib/domain/value-objects/voucher-number.vo.js.map +1 -1
  253. package/lib/index.d.ts +6 -6
  254. package/lib/index.js +13 -7
  255. package/lib/index.js.map +1 -1
  256. package/lib/infrastructure/composition/arca.d.ts +32 -0
  257. package/lib/infrastructure/composition/arca.js +107 -0
  258. package/lib/infrastructure/composition/arca.js.map +1 -0
  259. package/lib/infrastructure/constants/default-config.constants.d.ts +13 -0
  260. package/lib/infrastructure/constants/default-config.constants.js +17 -0
  261. package/lib/infrastructure/constants/default-config.constants.js.map +1 -0
  262. package/lib/infrastructure/constants/index.d.ts +3 -4
  263. package/lib/infrastructure/constants/index.js +3 -4
  264. package/lib/infrastructure/constants/index.js.map +1 -1
  265. package/lib/infrastructure/{outbound/ports/soap/enums → constants}/service-names.enum.d.ts +3 -1
  266. package/lib/infrastructure/{outbound/ports/soap/enums → constants}/service-names.enum.js +2 -0
  267. package/lib/infrastructure/constants/service-names.enum.js.map +1 -0
  268. package/lib/infrastructure/constants/ssl.constants.d.ts +0 -4
  269. package/lib/infrastructure/constants/ssl.constants.js +0 -4
  270. package/lib/infrastructure/constants/ssl.constants.js.map +1 -1
  271. package/lib/infrastructure/constants/time.constants.d.ts +7 -0
  272. package/lib/infrastructure/constants/time.constants.js +11 -0
  273. package/lib/infrastructure/constants/time.constants.js.map +1 -0
  274. package/lib/infrastructure/index.d.ts +0 -4
  275. package/lib/infrastructure/index.js +0 -4
  276. package/lib/infrastructure/index.js.map +1 -1
  277. package/lib/infrastructure/mappers/index.d.ts +1 -0
  278. package/lib/infrastructure/mappers/index.js +18 -0
  279. package/lib/infrastructure/mappers/index.js.map +1 -0
  280. package/lib/infrastructure/{utils → mappers}/soap-to-dto.mapper.d.ts +0 -6
  281. package/lib/infrastructure/mappers/soap-to-dto.mapper.js.map +1 -0
  282. package/lib/infrastructure/outbound/adapters/index.d.ts +3 -8
  283. package/lib/infrastructure/outbound/adapters/index.js +3 -8
  284. package/lib/infrastructure/outbound/adapters/index.js.map +1 -1
  285. package/lib/infrastructure/outbound/adapters/{auth → repositories/auth}/auth.repository.d.ts +5 -8
  286. package/lib/infrastructure/outbound/adapters/{auth → repositories/auth}/auth.repository.js +25 -16
  287. package/lib/infrastructure/outbound/adapters/repositories/auth/auth.repository.js.map +1 -0
  288. package/lib/infrastructure/outbound/adapters/repositories/auth/index.d.ts +1 -0
  289. package/lib/infrastructure/outbound/adapters/repositories/auth/index.js +18 -0
  290. package/lib/infrastructure/outbound/adapters/repositories/auth/index.js.map +1 -0
  291. package/lib/infrastructure/outbound/adapters/{electronic-billing → repositories/electronic-billing}/electronic-billing-repository.d.ts +21 -12
  292. package/lib/infrastructure/outbound/adapters/{electronic-billing → repositories/electronic-billing}/electronic-billing-repository.js +107 -176
  293. package/lib/infrastructure/outbound/adapters/repositories/electronic-billing/electronic-billing-repository.js.map +1 -0
  294. package/lib/infrastructure/outbound/adapters/repositories/electronic-billing/index.d.ts +1 -0
  295. package/lib/infrastructure/outbound/adapters/{electronic-billing → repositories/electronic-billing}/index.js +0 -4
  296. package/lib/infrastructure/outbound/adapters/repositories/electronic-billing/index.js.map +1 -0
  297. package/lib/infrastructure/outbound/adapters/repositories/fecred/fecred.repository.d.ts +29 -0
  298. package/lib/infrastructure/outbound/adapters/repositories/fecred/fecred.repository.js +192 -0
  299. package/lib/infrastructure/outbound/adapters/repositories/fecred/fecred.repository.js.map +1 -0
  300. package/lib/infrastructure/outbound/adapters/repositories/fex/fex.repository.d.ts +28 -0
  301. package/lib/infrastructure/outbound/adapters/repositories/fex/fex.repository.js +177 -0
  302. package/lib/infrastructure/outbound/adapters/repositories/fex/fex.repository.js.map +1 -0
  303. package/lib/infrastructure/outbound/adapters/repositories/generic/generic-repository.d.ts +10 -0
  304. package/lib/infrastructure/outbound/adapters/{generic → repositories/generic}/generic-repository.js +7 -20
  305. package/lib/infrastructure/outbound/adapters/repositories/generic/generic-repository.js.map +1 -0
  306. package/lib/infrastructure/outbound/adapters/repositories/generic/index.d.ts +1 -0
  307. package/lib/infrastructure/outbound/adapters/repositories/generic/index.js +18 -0
  308. package/lib/infrastructure/outbound/adapters/repositories/generic/index.js.map +1 -0
  309. package/lib/infrastructure/outbound/adapters/repositories/register/base-batch-register-repository.d.ts +11 -0
  310. package/lib/infrastructure/outbound/adapters/repositories/register/base-batch-register-repository.js +51 -0
  311. package/lib/infrastructure/outbound/adapters/repositories/register/base-batch-register-repository.js.map +1 -0
  312. package/lib/infrastructure/outbound/adapters/repositories/register/base-register-repository.d.ts +24 -0
  313. package/lib/infrastructure/outbound/adapters/{register/register-scope-ten.repository.js → repositories/register/base-register-repository.js} +37 -35
  314. package/lib/infrastructure/outbound/adapters/repositories/register/base-register-repository.js.map +1 -0
  315. package/lib/infrastructure/outbound/adapters/{register → repositories/register}/index.d.ts +0 -4
  316. package/lib/infrastructure/outbound/adapters/{register → repositories/register}/index.js +0 -4
  317. package/lib/infrastructure/outbound/adapters/repositories/register/index.js.map +1 -0
  318. package/lib/infrastructure/outbound/adapters/repositories/register/register-inscription-proof.repository.d.ts +15 -0
  319. package/lib/infrastructure/outbound/adapters/repositories/register/register-inscription-proof.repository.js +21 -0
  320. package/lib/infrastructure/outbound/adapters/repositories/register/register-inscription-proof.repository.js.map +1 -0
  321. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-five.repository.d.ts +15 -0
  322. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-five.repository.js +21 -0
  323. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-five.repository.js.map +1 -0
  324. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-four.repository.d.ts +14 -0
  325. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-four.repository.js +20 -0
  326. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-four.repository.js.map +1 -0
  327. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-ten.repository.d.ts +14 -0
  328. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-ten.repository.js +20 -0
  329. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-ten.repository.js.map +1 -0
  330. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-thirteen.repository.d.ts +16 -0
  331. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-thirteen.repository.js +59 -0
  332. package/lib/infrastructure/outbound/adapters/repositories/register/register-scope-thirteen.repository.js.map +1 -0
  333. package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.d.ts +9 -11
  334. package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js +27 -11
  335. package/lib/infrastructure/outbound/adapters/soap/base-soap-repository.js.map +1 -1
  336. package/lib/infrastructure/outbound/adapters/soap/engines/index.d.ts +3 -0
  337. package/lib/infrastructure/outbound/adapters/soap/engines/index.js +8 -0
  338. package/lib/infrastructure/outbound/adapters/soap/engines/index.js.map +1 -0
  339. package/lib/infrastructure/outbound/adapters/soap/engines/node-security.engine.d.ts +1 -0
  340. package/lib/infrastructure/outbound/adapters/soap/engines/node-security.engine.js +69 -0
  341. package/lib/infrastructure/outbound/adapters/soap/engines/node-security.engine.js.map +1 -0
  342. package/lib/infrastructure/outbound/adapters/soap/engines/soap-engine.factory.d.ts +3 -0
  343. package/lib/infrastructure/outbound/adapters/soap/engines/soap-engine.factory.js +67 -0
  344. package/lib/infrastructure/outbound/adapters/soap/engines/soap-engine.factory.js.map +1 -0
  345. package/lib/infrastructure/outbound/adapters/soap/engines/universal-transport.engine.d.ts +5 -0
  346. package/lib/infrastructure/outbound/adapters/soap/engines/universal-transport.engine.js +43 -0
  347. package/lib/infrastructure/outbound/adapters/soap/engines/universal-transport.engine.js.map +1 -0
  348. package/lib/infrastructure/outbound/adapters/soap/soap-client.d.ts +6 -7
  349. package/lib/infrastructure/outbound/adapters/soap/soap-client.js +44 -25
  350. package/lib/infrastructure/outbound/adapters/soap/soap-client.js.map +1 -1
  351. package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js +6264 -0
  352. package/lib/infrastructure/outbound/adapters/soap/wsdl-strings.js.map +1 -1
  353. package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.d.ts +1 -5
  354. package/lib/infrastructure/outbound/adapters/storage/file-system-ticket-storage.js.map +1 -1
  355. package/lib/infrastructure/outbound/adapters/storage/memory-ticket-storage.d.ts +15 -0
  356. package/lib/infrastructure/outbound/adapters/storage/memory-ticket-storage.js +57 -0
  357. package/lib/infrastructure/outbound/adapters/storage/memory-ticket-storage.js.map +1 -0
  358. package/lib/infrastructure/outbound/index.d.ts +1 -6
  359. package/lib/infrastructure/outbound/index.js +1 -6
  360. package/lib/infrastructure/outbound/index.js.map +1 -1
  361. package/lib/infrastructure/outbound/ports/index.d.ts +3 -9
  362. package/lib/infrastructure/outbound/ports/index.js +3 -9
  363. package/lib/infrastructure/outbound/ports/index.js.map +1 -1
  364. package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.d.ts +11 -1
  365. package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js +10 -0
  366. package/lib/infrastructure/outbound/ports/soap/enums/endpoints.enum.js.map +1 -1
  367. package/lib/infrastructure/outbound/ports/soap/enums/index.d.ts +0 -5
  368. package/lib/infrastructure/outbound/ports/soap/enums/index.js +0 -5
  369. package/lib/infrastructure/outbound/ports/soap/enums/index.js.map +1 -1
  370. package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.d.ts +5 -1
  371. package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js +4 -0
  372. package/lib/infrastructure/outbound/ports/soap/enums/wsdl-path.enum.js.map +1 -1
  373. package/lib/infrastructure/outbound/ports/soap/index.d.ts +0 -4
  374. package/lib/infrastructure/outbound/ports/soap/index.js +0 -4
  375. package/lib/infrastructure/outbound/ports/soap/index.js.map +1 -1
  376. package/lib/infrastructure/outbound/ports/soap/interfaces/FECredService/ServiceSoap.d.ts +932 -0
  377. package/lib/infrastructure/outbound/ports/{logger/logger.port.js → soap/interfaces/FECredService/ServiceSoap.js} +1 -1
  378. package/lib/infrastructure/outbound/ports/soap/interfaces/FECredService/ServiceSoap.js.map +1 -0
  379. package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap.d.ts +687 -0
  380. package/lib/infrastructure/outbound/ports/{logger/logger.types.js → soap/interfaces/FEXService/ServiceSoap.js} +1 -1
  381. package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap.js.map +1 -0
  382. package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap12.d.ts +687 -0
  383. package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap12.js +3 -0
  384. package/lib/infrastructure/outbound/ports/soap/interfaces/FEXService/ServiceSoap12.js.map +1 -0
  385. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap.d.ts +16 -8
  386. package/lib/infrastructure/outbound/ports/soap/interfaces/Service/ServiceSoap12.d.ts +16 -8
  387. package/lib/infrastructure/outbound/ports/soap/interfaces/index.d.ts +3 -0
  388. package/lib/infrastructure/outbound/ports/soap/interfaces/index.js +4 -1
  389. package/lib/infrastructure/outbound/ports/soap/interfaces/index.js.map +1 -1
  390. package/lib/infrastructure/outbound/ports/soap/soap-client.port.d.ts +4 -9
  391. package/lib/infrastructure/outbound/ports/storage/ticket-storage.port.d.ts +0 -4
  392. package/lib/infrastructure/types/auth-repository.types.d.ts +19 -0
  393. package/lib/infrastructure/types/auth-repository.types.js.map +1 -0
  394. package/lib/infrastructure/types/index.d.ts +5 -4
  395. package/lib/infrastructure/types/index.js +5 -4
  396. package/lib/infrastructure/types/index.js.map +1 -1
  397. package/lib/infrastructure/types/soap-client.types.d.ts +21 -0
  398. package/lib/infrastructure/types/soap-client.types.js +3 -0
  399. package/lib/infrastructure/types/soap-client.types.js.map +1 -0
  400. package/lib/infrastructure/types/soap-engine.types.d.ts +19 -0
  401. package/lib/infrastructure/types/soap-engine.types.js +3 -0
  402. package/lib/infrastructure/types/soap-engine.types.js.map +1 -0
  403. package/lib/infrastructure/{outbound/ports/soap → types}/soap-repository.types.d.ts +17 -11
  404. package/lib/infrastructure/types/soap-repository.types.js.map +1 -0
  405. package/lib/infrastructure/types/soap.types.d.ts +9 -27
  406. package/lib/infrastructure/{outbound/ports/storage → types}/ticket-storage.types.d.ts +0 -4
  407. package/lib/infrastructure/types/ticket-storage.types.js.map +1 -0
  408. package/lib/infrastructure/utils/afip-errors.d.ts +1 -0
  409. package/lib/infrastructure/utils/afip-errors.js +11 -0
  410. package/lib/infrastructure/utils/afip-errors.js.map +1 -0
  411. package/lib/infrastructure/utils/crypt-data.js +1 -1
  412. package/lib/infrastructure/utils/crypt-data.js.map +1 -1
  413. package/lib/infrastructure/utils/datetime-ref.d.ts +20 -0
  414. package/lib/infrastructure/utils/datetime-ref.js +41 -0
  415. package/lib/infrastructure/utils/datetime-ref.js.map +1 -0
  416. package/lib/infrastructure/utils/index.d.ts +2 -6
  417. package/lib/infrastructure/utils/index.js +2 -6
  418. package/lib/infrastructure/utils/index.js.map +1 -1
  419. package/lib/infrastructure/utils/soap-runtime.d.ts +9 -0
  420. package/lib/infrastructure/utils/soap-runtime.js +17 -0
  421. package/lib/infrastructure/utils/soap-runtime.js.map +1 -0
  422. package/package.json +16 -17
  423. package/lib/application/config/env.d.ts +0 -6
  424. package/lib/application/config/env.js +0 -14
  425. package/lib/application/config/env.js.map +0 -1
  426. package/lib/application/config/index.d.ts +0 -6
  427. package/lib/application/config/index.js +0 -15
  428. package/lib/application/config/index.js.map +0 -1
  429. package/lib/infrastructure/inbound/adapters/arca.d.ts +0 -26
  430. package/lib/infrastructure/inbound/adapters/arca.js +0 -123
  431. package/lib/infrastructure/inbound/adapters/arca.js.map +0 -1
  432. package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.d.ts +0 -68
  433. package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js +0 -128
  434. package/lib/infrastructure/outbound/adapters/auth/afip-auth.repository.js.map +0 -1
  435. package/lib/infrastructure/outbound/adapters/auth/auth.repository.js.map +0 -1
  436. package/lib/infrastructure/outbound/adapters/electronic-billing/electronic-billing-repository.js.map +0 -1
  437. package/lib/infrastructure/outbound/adapters/electronic-billing/index.d.ts +0 -5
  438. package/lib/infrastructure/outbound/adapters/electronic-billing/index.js.map +0 -1
  439. package/lib/infrastructure/outbound/adapters/enums.d.ts +0 -43
  440. package/lib/infrastructure/outbound/adapters/enums.js +0 -49
  441. package/lib/infrastructure/outbound/adapters/enums.js.map +0 -1
  442. package/lib/infrastructure/outbound/adapters/generic/generic-repository.d.ts +0 -13
  443. package/lib/infrastructure/outbound/adapters/generic/generic-repository.js.map +0 -1
  444. package/lib/infrastructure/outbound/adapters/logger/winston-logger.d.ts +0 -14
  445. package/lib/infrastructure/outbound/adapters/logger/winston-logger.js +0 -24
  446. package/lib/infrastructure/outbound/adapters/logger/winston-logger.js.map +0 -1
  447. package/lib/infrastructure/outbound/adapters/register/index.js.map +0 -1
  448. package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.d.ts +0 -18
  449. package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js +0 -143
  450. package/lib/infrastructure/outbound/adapters/register/register-inscription-proof.repository.js.map +0 -1
  451. package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.d.ts +0 -14
  452. package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js +0 -136
  453. package/lib/infrastructure/outbound/adapters/register/register-scope-five.repository.js.map +0 -1
  454. package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.d.ts +0 -12
  455. package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js +0 -103
  456. package/lib/infrastructure/outbound/adapters/register/register-scope-four.repository.js.map +0 -1
  457. package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.d.ts +0 -12
  458. package/lib/infrastructure/outbound/adapters/register/register-scope-ten.repository.js.map +0 -1
  459. package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.d.ts +0 -13
  460. package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js +0 -133
  461. package/lib/infrastructure/outbound/adapters/register/register-scope-thirteen.repository.js.map +0 -1
  462. package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.d.ts +0 -20
  463. package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js +0 -54
  464. package/lib/infrastructure/outbound/adapters/soap/soap-client-facade.js.map +0 -1
  465. package/lib/infrastructure/outbound/ports/auth/auth-repository.types.d.ts +0 -17
  466. package/lib/infrastructure/outbound/ports/auth/auth-repository.types.js.map +0 -1
  467. package/lib/infrastructure/outbound/ports/logger/logger.port.d.ts +0 -31
  468. package/lib/infrastructure/outbound/ports/logger/logger.port.js.map +0 -1
  469. package/lib/infrastructure/outbound/ports/logger/logger.types.d.ts +0 -7
  470. package/lib/infrastructure/outbound/ports/logger/logger.types.js.map +0 -1
  471. package/lib/infrastructure/outbound/ports/soap/enums/service-names.enum.js.map +0 -1
  472. package/lib/infrastructure/outbound/ports/soap/soap-repository.types.js.map +0 -1
  473. package/lib/infrastructure/outbound/ports/storage/ticket-storage.types.js.map +0 -1
  474. package/lib/infrastructure/utils/env.d.ts +0 -10
  475. package/lib/infrastructure/utils/env.js +0 -32
  476. package/lib/infrastructure/utils/env.js.map +0 -1
  477. package/lib/infrastructure/utils/logger.d.ts +0 -4
  478. package/lib/infrastructure/utils/logger.js +0 -21
  479. package/lib/infrastructure/utils/logger.js.map +0 -1
  480. package/lib/infrastructure/utils/soap-to-dto.mapper.js.map +0 -1
  481. /package/lib/infrastructure/{utils → mappers}/soap-to-dto.mapper.js +0 -0
  482. /package/lib/infrastructure/{outbound/ports/auth → types}/auth-repository.types.js +0 -0
  483. /package/lib/infrastructure/{outbound/ports/soap → types}/soap-repository.types.js +0 -0
  484. /package/lib/infrastructure/{outbound/ports/storage → types}/ticket-storage.types.js +0 -0
@@ -1,11 +1,7 @@
1
- /**
2
- * Authentication Repository
3
- * Implements IAuthenticationRepositoryPort for WSAA authentication
4
- */
5
- import { IAuthenticationRepositoryPort } from "../../../../application/ports/authentication/authentication-repository.port";
6
- import { AccessTicket } from "../../../../domain/entities/access-ticket.entity";
7
- import { WSAuthParam } from "../../../../application/types";
8
- import { AuthRepositoryConfig } from "../../../outbound/ports/auth/auth-repository.types";
1
+ import { IAuthenticationRepositoryPort } from "../../../../../application/ports/authentication/authentication-repository.port";
2
+ import { AccessTicket } from "../../../../../domain/entities/access-ticket.entity";
3
+ import { WSAuthParam } from "../../../../../application/types";
4
+ import { AuthRepositoryConfig } from "../../../../types/auth-repository.types";
9
5
  export declare class AuthRepository implements IAuthenticationRepositoryPort {
10
6
  private cert;
11
7
  private key;
@@ -50,6 +46,7 @@ export declare class AuthRepository implements IAuthenticationRepositoryPort {
50
46
  * @returns TRA JSON
51
47
  */
52
48
  private getTRA;
49
+ private parseLoginTicketResponse;
53
50
  /**
54
51
  * Sign TRA (Token Request Authorization) XML
55
52
  * @param traXml TRA XML to sign
@@ -10,20 +10,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.AuthRepository = void 0;
13
- const access_ticket_entity_1 = require("../../../../domain/entities/access-ticket.entity");
14
- const parser_1 = require("../../../utils/parser");
15
- const crypt_data_1 = require("../../../utils/crypt-data");
16
- const wsdl_path_enum_1 = require("../../../outbound/ports/soap/enums/wsdl-path.enum");
17
- const endpoints_enum_1 = require("../../../outbound/ports/soap/enums/endpoints.enum");
18
- const soap_client_1 = require("../soap/soap-client");
13
+ const access_ticket_entity_1 = require("../../../../../domain/entities/access-ticket.entity");
14
+ const parser_1 = require("../../../../utils/parser");
15
+ const datetime_ref_1 = require("../../../../utils/datetime-ref");
16
+ const crypt_data_1 = require("../../../../utils/crypt-data");
17
+ const wsdl_path_enum_1 = require("../../../../outbound/ports/soap/enums/wsdl-path.enum");
18
+ const endpoints_enum_1 = require("../../../../outbound/ports/soap/enums/endpoints.enum");
19
+ const soap_client_1 = require("../../soap/soap-client");
20
+ const constants_1 = require("../../../../constants");
19
21
  class AuthRepository {
20
22
  constructor(config) {
21
- var _a, _b, _c;
22
- this.soapClient = (_a = config.soapClient) !== null && _a !== void 0 ? _a : new soap_client_1.SoapClient();
23
+ var _a, _b, _c, _d;
24
+ this.soapClient =
25
+ (_a = config.soapClient) !== null && _a !== void 0 ? _a : new soap_client_1.SoapClient((_b = config.useHttpsAgent) !== null && _b !== void 0 ? _b : constants_1.DEFAULT_USE_HTTPS_AGENT);
23
26
  this.cert = config.cert;
24
27
  this.key = config.key;
25
- this.production = (_b = config.production) !== null && _b !== void 0 ? _b : false;
26
- this.handleTicket = (_c = config.handleTicket) !== null && _c !== void 0 ? _c : false;
28
+ this.production = (_c = config.production) !== null && _c !== void 0 ? _c : false;
29
+ this.handleTicket = (_d = config.handleTicket) !== null && _d !== void 0 ? _d : false;
27
30
  this.ticketStorage = config.ticketStorage;
28
31
  this.manualCredentials = config.credentials;
29
32
  }
@@ -82,8 +85,8 @@ class AuthRepository {
82
85
  const signedTRA = this.signTRA(yield parser_1.Parser.jsonToXml(this.getTRA(serviceName)));
83
86
  const client = yield this.createAuthClient();
84
87
  const [{ loginCmsReturn }] = yield this.soapClient.call(client, "loginCmsAsync", { in0: signedTRA });
85
- const ticket = access_ticket_entity_1.AccessTicket.create((yield parser_1.Parser.xmlToJson(loginCmsReturn))
86
- .loginticketresponse);
88
+ const loginPayload = yield this.parseLoginTicketResponse(loginCmsReturn);
89
+ const ticket = access_ticket_entity_1.AccessTicket.create(loginPayload);
87
90
  if (!this.handleTicket && this.ticketStorage) {
88
91
  yield this.ticketStorage.save(ticket, serviceName);
89
92
  }
@@ -105,21 +108,27 @@ class AuthRepository {
105
108
  * @returns TRA JSON
106
109
  */
107
110
  getTRA(serviceName) {
108
- const date = new Date();
111
+ const traTimes = datetime_ref_1.DateTimeRef.now();
109
112
  return {
110
113
  loginTicketRequest: {
111
114
  $: { version: "1.0" },
112
115
  header: [
113
116
  {
114
- uniqueId: [Math.floor(date.getTime() / 1000)],
115
- generationTime: [new Date(date.getTime() - 600000).toISOString()],
116
- expirationTime: [new Date(date.getTime() + 600000).toISOString()],
117
+ uniqueId: [traTimes.wsaaTraUniqueIdSeconds()],
118
+ generationTime: [traTimes.wsaaTraGenerationTimeIso()],
119
+ expirationTime: [traTimes.wsaaTraExpirationTimeIso()],
117
120
  },
118
121
  ],
119
122
  service: [serviceName],
120
123
  },
121
124
  };
122
125
  }
126
+ parseLoginTicketResponse(loginCmsReturnXml) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ const parsed = yield parser_1.Parser.xmlToJson(loginCmsReturnXml);
129
+ return parsed.loginticketresponse;
130
+ });
131
+ }
123
132
  /**
124
133
  * Sign TRA (Token Request Authorization) XML
125
134
  * @param traXml TRA XML to sign
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.repository.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/outbound/adapters/repositories/auth/auth.repository.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1 @@
1
+ export * from "./auth.repository";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./auth.repository"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/infrastructure/outbound/adapters/repositories/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
@@ -1,21 +1,30 @@
1
- /**
2
- * Electronic Billing Repository
3
- * Implements IElectronicBillingRepositoryPort for AFIP/ARCA Electronic Billing
4
- */
5
- import { IElectronicBillingRepositoryPort } from "../../../../application/ports/electronic-billing/electronic-billing-repository.port";
6
- import { BaseSoapRepository } from "../soap/base-soap-repository";
7
- import { BaseSoapRepositoryConstructorConfig } from "../../../outbound/ports/soap/soap-repository.types";
8
- import { Voucher } from "../../../../domain/entities/voucher.entity";
9
- import { ICreateVoucherResult } from "../../../../application/types/result.types";
10
- import { ServerStatusDto, SalesPointsResultDto, LastVoucherResultDto, VoucherInfoResultDto, VoucherTypesResultDto, ConceptTypesResultDto, DocumentTypesResultDto, AliquotTypesResultDto, CurrencyTypesResultDto, OptionalTypesResultDto, TaxTypesResultDto, IvaReceptorTypesResultDto, CaeaResultDto, CaeaUsageResultDto, CaeaNoMovementResultDto, CountriesResultDto, ActivitiesResultDto, QuotationResultDto, MaxRecordsResultDto } from "../../../../application/dto/electronic-billing.dto";
1
+ import { IElectronicBillingRepositoryPort } from "../../../../../application/ports/electronic-billing/electronic-billing-repository.port";
2
+ import { BaseSoapRepository } from "../../soap/base-soap-repository";
3
+ import { BaseSoapRepositoryConstructorConfig } from "../../../../types/soap-repository.types";
4
+ import { Voucher } from "../../../../../domain/entities/voucher.entity";
5
+ import { ICreateVoucherResult } from "../../../../../application/types/result.types";
6
+ import { ServerStatusDto, SalesPointsResultDto, LastVoucherResultDto, VoucherInfoResultDto, VoucherTypesResultDto, ConceptTypesResultDto, DocumentTypesResultDto, AliquotTypesResultDto, CurrencyTypesResultDto, OptionalTypesResultDto, TaxTypesResultDto, IvaReceptorTypesResultDto, CaeaResultDto, CaeaUsageResultDto, CaeaNoMovementResultDto, CountriesResultDto, ActivitiesResultDto, QuotationResultDto, MaxRecordsResultDto } from "../../../../../application/dto/electronic-billing.dto";
11
7
  export declare class ElectronicBillingRepository extends BaseSoapRepository implements IElectronicBillingRepositoryPort {
12
8
  private serviceClient?;
13
9
  constructor(config: BaseSoapRepositoryConstructorConfig);
14
10
  /**
15
- * Get or create SOAP client with authentication proxy
16
- * Creates SOAP 1.1 or 1.2 client based on useSoap12 configuration
11
+ * Invalidate the cached SOAP client, forcing re-creation on next call.
12
+ * Call this when the auth token is refreshed.
13
+ */
14
+ invalidateClient(): void;
15
+ /**
16
+ * Get or create SOAP client with authentication proxy.
17
+ * Creates SOAP 1.1 or 1.2 client based on useSoap12 configuration.
17
18
  */
18
19
  private getClient;
20
+ /**
21
+ * Map SOAP Errors to the DTO format. Calls mapSoapErrors only once.
22
+ */
23
+ private mapErrors;
24
+ /**
25
+ * Build the common det request object shared by createVoucher and informCaeaUsage.
26
+ */
27
+ private buildVoucherDetRequest;
19
28
  getServerStatus(): Promise<ServerStatusDto>;
20
29
  getSalesPoints(): Promise<SalesPointsResultDto>;
21
30
  getLastVoucher(salesPoint: number, voucherType: number): Promise<LastVoucherResultDto>;