@spreeloop/orange_money 1.0.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 (333) hide show
  1. package/.eslintrc.js +47 -0
  2. package/.prettierrc +6 -0
  3. package/README.md +192 -0
  4. package/babel.config.js +3 -0
  5. package/dist/logging/index.d.ts +2 -0
  6. package/dist/logging/index.d.ts.map +1 -0
  7. package/dist/logging/index.js +18 -0
  8. package/dist/logging/index.js.map +1 -0
  9. package/dist/logging/src/log_level.d.ts +24 -0
  10. package/dist/logging/src/log_level.d.ts.map +1 -0
  11. package/dist/logging/src/log_level.js +34 -0
  12. package/dist/logging/src/log_level.js.map +1 -0
  13. package/dist/logging/src/logging.d.ts +50 -0
  14. package/dist/logging/src/logging.d.ts.map +1 -0
  15. package/dist/logging/src/logging.js +87 -0
  16. package/dist/logging/src/logging.js.map +1 -0
  17. package/dist/logging/src/printer.d.ts +10 -0
  18. package/dist/logging/src/printer.d.ts.map +1 -0
  19. package/dist/logging/src/printer.js +3 -0
  20. package/dist/logging/src/printer.js.map +1 -0
  21. package/dist/main.js +3 -0
  22. package/dist/main.js.LICENSE.txt +1 -0
  23. package/dist/main.js.map +1 -0
  24. package/dist/orange_money/index.d.ts +2 -0
  25. package/dist/orange_money/index.d.ts.map +1 -0
  26. package/dist/orange_money/index.js +18 -0
  27. package/dist/orange_money/index.js.map +1 -0
  28. package/dist/orange_money/src/common/utils/https.d.ts +77 -0
  29. package/dist/orange_money/src/common/utils/https.d.ts.map +1 -0
  30. package/dist/orange_money/src/common/utils/https.js +240 -0
  31. package/dist/orange_money/src/common/utils/https.js.map +1 -0
  32. package/dist/orange_money/src/common/utils/https.spec.d.ts +2 -0
  33. package/dist/orange_money/src/common/utils/https.spec.d.ts.map +1 -0
  34. package/dist/orange_money/src/common/utils/https.spec.js +77 -0
  35. package/dist/orange_money/src/common/utils/https.spec.js.map +1 -0
  36. package/dist/orange_money/src/common/utils/logging_interface.d.ts +23 -0
  37. package/dist/orange_money/src/common/utils/logging_interface.d.ts.map +1 -0
  38. package/dist/orange_money/src/common/utils/logging_interface.js +3 -0
  39. package/dist/orange_money/src/common/utils/logging_interface.js.map +1 -0
  40. package/dist/orange_money/src/common/utils/operation_response.d.ts +16 -0
  41. package/dist/orange_money/src/common/utils/operation_response.d.ts.map +1 -0
  42. package/dist/orange_money/src/common/utils/operation_response.js +3 -0
  43. package/dist/orange_money/src/common/utils/operation_response.js.map +1 -0
  44. package/dist/orange_money/src/common/utils/utils.d.ts +6 -0
  45. package/dist/orange_money/src/common/utils/utils.d.ts.map +1 -0
  46. package/dist/orange_money/src/common/utils/utils.js +10 -0
  47. package/dist/orange_money/src/common/utils/utils.js.map +1 -0
  48. package/dist/orange_money/src/constants.d.ts +95 -0
  49. package/dist/orange_money/src/constants.d.ts.map +1 -0
  50. package/dist/orange_money/src/constants.js +111 -0
  51. package/dist/orange_money/src/constants.js.map +1 -0
  52. package/dist/orange_money/src/disbursements/implementations/disbursement_service.d.ts +63 -0
  53. package/dist/orange_money/src/disbursements/implementations/disbursement_service.d.ts.map +1 -0
  54. package/dist/orange_money/src/disbursements/implementations/disbursement_service.js +84 -0
  55. package/dist/orange_money/src/disbursements/implementations/disbursement_service.js.map +1 -0
  56. package/dist/orange_money/src/disbursements/implementations/src/live.d.ts +40 -0
  57. package/dist/orange_money/src/disbursements/implementations/src/live.d.ts.map +1 -0
  58. package/dist/orange_money/src/disbursements/implementations/src/live.js +61 -0
  59. package/dist/orange_money/src/disbursements/implementations/src/live.js.map +1 -0
  60. package/dist/orange_money/src/disbursements/implementations/src/sandbox.d.ts +40 -0
  61. package/dist/orange_money/src/disbursements/implementations/src/sandbox.d.ts.map +1 -0
  62. package/dist/orange_money/src/disbursements/implementations/src/sandbox.js +110 -0
  63. package/dist/orange_money/src/disbursements/implementations/src/sandbox.js.map +1 -0
  64. package/dist/orange_money/src/disbursements/operations/create_access_token.d.ts +28 -0
  65. package/dist/orange_money/src/disbursements/operations/create_access_token.d.ts.map +1 -0
  66. package/dist/orange_money/src/disbursements/operations/create_access_token.js +45 -0
  67. package/dist/orange_money/src/disbursements/operations/create_access_token.js.map +1 -0
  68. package/dist/orange_money/src/disbursements/operations/create_access_token.spec.d.ts +2 -0
  69. package/dist/orange_money/src/disbursements/operations/create_access_token.spec.d.ts.map +1 -0
  70. package/dist/orange_money/src/disbursements/operations/create_access_token.spec.js +106 -0
  71. package/dist/orange_money/src/disbursements/operations/create_access_token.spec.js.map +1 -0
  72. package/dist/orange_money/src/disbursements/operations/get_transfer_status.d.ts +114 -0
  73. package/dist/orange_money/src/disbursements/operations/get_transfer_status.d.ts.map +1 -0
  74. package/dist/orange_money/src/disbursements/operations/get_transfer_status.js +128 -0
  75. package/dist/orange_money/src/disbursements/operations/get_transfer_status.js.map +1 -0
  76. package/dist/orange_money/src/disbursements/operations/get_transfer_status.spec.d.ts +2 -0
  77. package/dist/orange_money/src/disbursements/operations/get_transfer_status.spec.d.ts.map +1 -0
  78. package/dist/orange_money/src/disbursements/operations/get_transfer_status.spec.js +148 -0
  79. package/dist/orange_money/src/disbursements/operations/get_transfer_status.spec.js.map +1 -0
  80. package/dist/orange_money/src/disbursements/operations/transfer.d.ts +45 -0
  81. package/dist/orange_money/src/disbursements/operations/transfer.d.ts.map +1 -0
  82. package/dist/orange_money/src/disbursements/operations/transfer.js +74 -0
  83. package/dist/orange_money/src/disbursements/operations/transfer.js.map +1 -0
  84. package/dist/orange_money/src/disbursements/operations/transfer.spec.d.ts +2 -0
  85. package/dist/orange_money/src/disbursements/operations/transfer.spec.d.ts.map +1 -0
  86. package/dist/orange_money/src/disbursements/operations/transfer.spec.js +178 -0
  87. package/dist/orange_money/src/disbursements/operations/transfer.spec.js.map +1 -0
  88. package/dist/orange_money/src/disbursements/routes/routes.d.ts +38 -0
  89. package/dist/orange_money/src/disbursements/routes/routes.d.ts.map +1 -0
  90. package/dist/orange_money/src/disbursements/routes/routes.js +53 -0
  91. package/dist/orange_money/src/disbursements/routes/routes.js.map +1 -0
  92. package/dist/orange_money/src/disbursements/utils/constants.d.ts +5 -0
  93. package/dist/orange_money/src/disbursements/utils/constants.d.ts.map +1 -0
  94. package/dist/orange_money/src/disbursements/utils/constants.js +9 -0
  95. package/dist/orange_money/src/disbursements/utils/constants.js.map +1 -0
  96. package/dist/orange_money/src/disbursements/utils/https.d.ts +74 -0
  97. package/dist/orange_money/src/disbursements/utils/https.d.ts.map +1 -0
  98. package/dist/orange_money/src/disbursements/utils/https.js +206 -0
  99. package/dist/orange_money/src/disbursements/utils/https.js.map +1 -0
  100. package/dist/orange_money/src/disbursements/utils/https.spec.d.ts +2 -0
  101. package/dist/orange_money/src/disbursements/utils/https.spec.d.ts.map +1 -0
  102. package/dist/orange_money/src/disbursements/utils/https.spec.js +77 -0
  103. package/dist/orange_money/src/disbursements/utils/https.spec.js.map +1 -0
  104. package/dist/orange_money/src/disbursements/utils/regex.d.ts +9 -0
  105. package/dist/orange_money/src/disbursements/utils/regex.d.ts.map +1 -0
  106. package/dist/orange_money/src/disbursements/utils/regex.js +12 -0
  107. package/dist/orange_money/src/disbursements/utils/regex.js.map +1 -0
  108. package/dist/orange_money/src/disbursements/utils/regex.spec.d.ts +2 -0
  109. package/dist/orange_money/src/disbursements/utils/regex.spec.d.ts.map +1 -0
  110. package/dist/orange_money/src/disbursements/utils/regex.spec.js +32 -0
  111. package/dist/orange_money/src/disbursements/utils/regex.spec.js.map +1 -0
  112. package/dist/orange_money/src/disbursements/utils/status.d.ts +53 -0
  113. package/dist/orange_money/src/disbursements/utils/status.d.ts.map +1 -0
  114. package/dist/orange_money/src/disbursements/utils/status.js +58 -0
  115. package/dist/orange_money/src/disbursements/utils/status.js.map +1 -0
  116. package/dist/orange_money/src/disbursements/utils/utils.d.ts +9 -0
  117. package/dist/orange_money/src/disbursements/utils/utils.d.ts.map +1 -0
  118. package/dist/orange_money/src/disbursements/utils/utils.js +26 -0
  119. package/dist/orange_money/src/disbursements/utils/utils.js.map +1 -0
  120. package/dist/orange_money/src/disbursements/utils/utils.spec.d.ts +2 -0
  121. package/dist/orange_money/src/disbursements/utils/utils.spec.d.ts.map +1 -0
  122. package/dist/orange_money/src/disbursements/utils/utils.spec.js +43 -0
  123. package/dist/orange_money/src/disbursements/utils/utils.spec.js.map +1 -0
  124. package/dist/orange_money/src/index.d.ts +8 -0
  125. package/dist/orange_money/src/index.d.ts.map +1 -0
  126. package/dist/orange_money/src/index.js +21 -0
  127. package/dist/orange_money/src/index.js.map +1 -0
  128. package/dist/orange_money/src/orange_money/orange_money.d.ts +58 -0
  129. package/dist/orange_money/src/orange_money/orange_money.d.ts.map +1 -0
  130. package/dist/orange_money/src/orange_money/orange_money.js +33 -0
  131. package/dist/orange_money/src/orange_money/orange_money.js.map +1 -0
  132. package/dist/orange_money/src/orange_money/orange_money_fake/fake_result.d.ts +7 -0
  133. package/dist/orange_money/src/orange_money/orange_money_fake/fake_result.d.ts.map +1 -0
  134. package/dist/orange_money/src/orange_money/orange_money_fake/fake_result.js +16 -0
  135. package/dist/orange_money/src/orange_money/orange_money_fake/fake_result.js.map +1 -0
  136. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.d.ts +29 -0
  137. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.d.ts.map +1 -0
  138. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.js +67 -0
  139. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.js.map +1 -0
  140. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.spec.d.ts +2 -0
  141. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.spec.d.ts.map +1 -0
  142. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.spec.js +51 -0
  143. package/dist/orange_money/src/orange_money/orange_money_fake/orange_money_fake_payment.spec.js.map +1 -0
  144. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.d.ts +105 -0
  145. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.d.ts.map +1 -0
  146. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.js +459 -0
  147. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.js.map +1 -0
  148. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.spec.d.ts +2 -0
  149. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.spec.d.ts.map +1 -0
  150. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.spec.js +497 -0
  151. package/dist/orange_money/src/orange_money/orange_money_live/mobile_platfom/mobile_platform.spec.js.map +1 -0
  152. package/dist/orange_money/src/orange_money/orange_money_live/orange_money_live_payment.d.ts +26 -0
  153. package/dist/orange_money/src/orange_money/orange_money_live/orange_money_live_payment.d.ts.map +1 -0
  154. package/dist/orange_money/src/orange_money/orange_money_live/orange_money_live_payment.js +26 -0
  155. package/dist/orange_money/src/orange_money/orange_money_live/orange_money_live_payment.js.map +1 -0
  156. package/dist/orange_money/src/payments/implementations/fake.d.ts +33 -0
  157. package/dist/orange_money/src/payments/implementations/fake.d.ts.map +1 -0
  158. package/dist/orange_money/src/payments/implementations/fake.js +110 -0
  159. package/dist/orange_money/src/payments/implementations/fake.js.map +1 -0
  160. package/dist/orange_money/src/payments/implementations/live.d.ts +45 -0
  161. package/dist/orange_money/src/payments/implementations/live.d.ts.map +1 -0
  162. package/dist/orange_money/src/payments/implementations/live.js +69 -0
  163. package/dist/orange_money/src/payments/implementations/live.js.map +1 -0
  164. package/dist/orange_money/src/payments/implementations/payment_service.d.ts +44 -0
  165. package/dist/orange_money/src/payments/implementations/payment_service.d.ts.map +1 -0
  166. package/dist/orange_money/src/payments/implementations/payment_service.js +44 -0
  167. package/dist/orange_money/src/payments/implementations/payment_service.js.map +1 -0
  168. package/dist/orange_money/src/payments/implementations/src/fake.d.ts +31 -0
  169. package/dist/orange_money/src/payments/implementations/src/fake.d.ts.map +1 -0
  170. package/dist/orange_money/src/payments/implementations/src/fake.js +62 -0
  171. package/dist/orange_money/src/payments/implementations/src/fake.js.map +1 -0
  172. package/dist/orange_money/src/payments/implementations/src/live.d.ts +29 -0
  173. package/dist/orange_money/src/payments/implementations/src/live.d.ts.map +1 -0
  174. package/dist/orange_money/src/payments/implementations/src/live.js +44 -0
  175. package/dist/orange_money/src/payments/implementations/src/live.js.map +1 -0
  176. package/dist/orange_money/src/payments/operations/create_access_token.d.ts +19 -0
  177. package/dist/orange_money/src/payments/operations/create_access_token.d.ts.map +1 -0
  178. package/dist/orange_money/src/payments/operations/create_access_token.js +51 -0
  179. package/dist/orange_money/src/payments/operations/create_access_token.js.map +1 -0
  180. package/dist/orange_money/src/payments/operations/create_access_token.spec.d.ts +2 -0
  181. package/dist/orange_money/src/payments/operations/create_access_token.spec.d.ts.map +1 -0
  182. package/dist/orange_money/src/payments/operations/create_access_token.spec.js +70 -0
  183. package/dist/orange_money/src/payments/operations/create_access_token.spec.js.map +1 -0
  184. package/dist/orange_money/src/payments/operations/create_pay_token.d.ts +12 -0
  185. package/dist/orange_money/src/payments/operations/create_pay_token.d.ts.map +1 -0
  186. package/dist/orange_money/src/payments/operations/create_pay_token.js +62 -0
  187. package/dist/orange_money/src/payments/operations/create_pay_token.js.map +1 -0
  188. package/dist/orange_money/src/payments/operations/create_pay_token.spec.d.ts +2 -0
  189. package/dist/orange_money/src/payments/operations/create_pay_token.spec.d.ts.map +1 -0
  190. package/dist/orange_money/src/payments/operations/create_pay_token.spec.js +91 -0
  191. package/dist/orange_money/src/payments/operations/create_pay_token.spec.js.map +1 -0
  192. package/dist/orange_money/src/payments/operations/get_access_token.d.ts +11 -0
  193. package/dist/orange_money/src/payments/operations/get_access_token.d.ts.map +1 -0
  194. package/dist/orange_money/src/payments/operations/get_access_token.js +47 -0
  195. package/dist/orange_money/src/payments/operations/get_access_token.js.map +1 -0
  196. package/dist/orange_money/src/payments/operations/get_access_token.spec.d.ts +2 -0
  197. package/dist/orange_money/src/payments/operations/get_access_token.spec.d.ts.map +1 -0
  198. package/dist/orange_money/src/payments/operations/get_access_token.spec.js +75 -0
  199. package/dist/orange_money/src/payments/operations/get_access_token.spec.js.map +1 -0
  200. package/dist/orange_money/src/payments/operations/get_pay_token.d.ts +12 -0
  201. package/dist/orange_money/src/payments/operations/get_pay_token.d.ts.map +1 -0
  202. package/dist/orange_money/src/payments/operations/get_pay_token.js +43 -0
  203. package/dist/orange_money/src/payments/operations/get_pay_token.js.map +1 -0
  204. package/dist/orange_money/src/payments/operations/get_pay_token.spec.d.ts +2 -0
  205. package/dist/orange_money/src/payments/operations/get_pay_token.spec.d.ts.map +1 -0
  206. package/dist/orange_money/src/payments/operations/get_pay_token.spec.js +75 -0
  207. package/dist/orange_money/src/payments/operations/get_pay_token.spec.js.map +1 -0
  208. package/dist/orange_money/src/payments/operations/get_payment_status.d.ts +23 -0
  209. package/dist/orange_money/src/payments/operations/get_payment_status.d.ts.map +1 -0
  210. package/dist/orange_money/src/payments/operations/get_payment_status.js +51 -0
  211. package/dist/orange_money/src/payments/operations/get_payment_status.js.map +1 -0
  212. package/dist/orange_money/src/payments/operations/get_payment_status.spec.d.ts +2 -0
  213. package/dist/orange_money/src/payments/operations/get_payment_status.spec.d.ts.map +1 -0
  214. package/dist/orange_money/src/payments/operations/get_payment_status.spec.js +102 -0
  215. package/dist/orange_money/src/payments/operations/get_payment_status.spec.js.map +1 -0
  216. package/dist/orange_money/src/payments/operations/initialize_om_payment.d.ts +22 -0
  217. package/dist/orange_money/src/payments/operations/initialize_om_payment.d.ts.map +1 -0
  218. package/dist/orange_money/src/payments/operations/initialize_om_payment.js +124 -0
  219. package/dist/orange_money/src/payments/operations/initialize_om_payment.js.map +1 -0
  220. package/dist/orange_money/src/payments/operations/initialize_om_payment.spec.d.ts +2 -0
  221. package/dist/orange_money/src/payments/operations/initialize_om_payment.spec.d.ts.map +1 -0
  222. package/dist/orange_money/src/payments/operations/initialize_om_payment.spec.js +246 -0
  223. package/dist/orange_money/src/payments/operations/initialize_om_payment.spec.js.map +1 -0
  224. package/dist/orange_money/src/payments/operations/payment.d.ts +21 -0
  225. package/dist/orange_money/src/payments/operations/payment.d.ts.map +1 -0
  226. package/dist/orange_money/src/payments/operations/payment.js +204 -0
  227. package/dist/orange_money/src/payments/operations/payment.js.map +1 -0
  228. package/dist/orange_money/src/payments/operations/payment.spec.d.ts +2 -0
  229. package/dist/orange_money/src/payments/operations/payment.spec.d.ts.map +1 -0
  230. package/dist/orange_money/src/payments/operations/payment.spec.js +282 -0
  231. package/dist/orange_money/src/payments/operations/payment.spec.js.map +1 -0
  232. package/dist/orange_money/src/payments/payments.d.ts +57 -0
  233. package/dist/orange_money/src/payments/payments.d.ts.map +1 -0
  234. package/dist/orange_money/src/payments/payments.js +36 -0
  235. package/dist/orange_money/src/payments/payments.js.map +1 -0
  236. package/dist/orange_money/src/payments/routes/routes.d.ts +48 -0
  237. package/dist/orange_money/src/payments/routes/routes.d.ts.map +1 -0
  238. package/dist/orange_money/src/payments/routes/routes.js +61 -0
  239. package/dist/orange_money/src/payments/routes/routes.js.map +1 -0
  240. package/dist/orange_money/src/payments/utils/constants.d.ts +100 -0
  241. package/dist/orange_money/src/payments/utils/constants.d.ts.map +1 -0
  242. package/dist/orange_money/src/payments/utils/constants.js +117 -0
  243. package/dist/orange_money/src/payments/utils/constants.js.map +1 -0
  244. package/dist/orange_money/src/payments/utils/https.d.ts +43 -0
  245. package/dist/orange_money/src/payments/utils/https.d.ts.map +1 -0
  246. package/dist/orange_money/src/payments/utils/https.js +137 -0
  247. package/dist/orange_money/src/payments/utils/https.js.map +1 -0
  248. package/dist/orange_money/src/payments/utils/joi_schema.d.ts +71 -0
  249. package/dist/orange_money/src/payments/utils/joi_schema.d.ts.map +1 -0
  250. package/dist/orange_money/src/payments/utils/joi_schema.js +44 -0
  251. package/dist/orange_money/src/payments/utils/joi_schema.js.map +1 -0
  252. package/dist/orange_money/src/payments/utils/logging_interface.d.ts +23 -0
  253. package/dist/orange_money/src/payments/utils/logging_interface.d.ts.map +1 -0
  254. package/dist/orange_money/src/payments/utils/logging_interface.js +3 -0
  255. package/dist/orange_money/src/payments/utils/logging_interface.js.map +1 -0
  256. package/dist/orange_money/src/payments/utils/request_model.d.ts +75 -0
  257. package/dist/orange_money/src/payments/utils/request_model.d.ts.map +1 -0
  258. package/dist/orange_money/src/payments/utils/request_model.js +3 -0
  259. package/dist/orange_money/src/payments/utils/request_model.js.map +1 -0
  260. package/dist/orange_money/src/payments/utils/utils.d.ts +15 -0
  261. package/dist/orange_money/src/payments/utils/utils.d.ts.map +1 -0
  262. package/dist/orange_money/src/payments/utils/utils.js +27 -0
  263. package/dist/orange_money/src/payments/utils/utils.js.map +1 -0
  264. package/dist/orange_money/src/payments/utils/utils.spec.d.ts +2 -0
  265. package/dist/orange_money/src/payments/utils/utils.spec.d.ts.map +1 -0
  266. package/dist/orange_money/src/payments/utils/utils.spec.js +17 -0
  267. package/dist/orange_money/src/payments/utils/utils.spec.js.map +1 -0
  268. package/dist/orange_money/src/utils/logging_interface.d.ts +23 -0
  269. package/dist/orange_money/src/utils/logging_interface.d.ts.map +1 -0
  270. package/dist/orange_money/src/utils/logging_interface.js +3 -0
  271. package/dist/orange_money/src/utils/logging_interface.js.map +1 -0
  272. package/dist/orange_money/src/utils/requests_responses.d.ts +118 -0
  273. package/dist/orange_money/src/utils/requests_responses.d.ts.map +1 -0
  274. package/dist/orange_money/src/utils/requests_responses.js +31 -0
  275. package/dist/orange_money/src/utils/requests_responses.js.map +1 -0
  276. package/dist/orange_money/src/utils/resquest_params.d.ts +222 -0
  277. package/dist/orange_money/src/utils/resquest_params.d.ts.map +1 -0
  278. package/dist/orange_money/src/utils/resquest_params.js +57 -0
  279. package/dist/orange_money/src/utils/resquest_params.js.map +1 -0
  280. package/dist/orange_money/src/utils/utils.d.ts +65 -0
  281. package/dist/orange_money/src/utils/utils.d.ts.map +1 -0
  282. package/dist/orange_money/src/utils/utils.js +199 -0
  283. package/dist/orange_money/src/utils/utils.js.map +1 -0
  284. package/dist/orange_money/src/utils/utils.spec.d.ts +2 -0
  285. package/dist/orange_money/src/utils/utils.spec.d.ts.map +1 -0
  286. package/dist/orange_money/src/utils/utils.spec.js +17 -0
  287. package/dist/orange_money/src/utils/utils.spec.js.map +1 -0
  288. package/index.spec.ts +9 -0
  289. package/index.ts +1 -0
  290. package/jest.before-test.ts +3 -0
  291. package/jest.config.ts +54 -0
  292. package/package.json +52 -0
  293. package/src/disbursements/implementations/disbursement_service.ts +133 -0
  294. package/src/disbursements/implementations/src/live.ts +79 -0
  295. package/src/disbursements/implementations/src/sandbox.ts +124 -0
  296. package/src/disbursements/operations/create_access_token.spec.ts +87 -0
  297. package/src/disbursements/operations/create_access_token.ts +83 -0
  298. package/src/disbursements/operations/get_transfer_status.spec.ts +132 -0
  299. package/src/disbursements/operations/get_transfer_status.ts +265 -0
  300. package/src/disbursements/operations/transfer.spec.ts +158 -0
  301. package/src/disbursements/operations/transfer.ts +125 -0
  302. package/src/disbursements/routes/routes.ts +54 -0
  303. package/src/disbursements/utils/constants.ts +4 -0
  304. package/src/disbursements/utils/regex.spec.ts +39 -0
  305. package/src/disbursements/utils/regex.ts +10 -0
  306. package/src/disbursements/utils/status.ts +62 -0
  307. package/src/disbursements/utils/utils.spec.ts +42 -0
  308. package/src/disbursements/utils/utils.ts +24 -0
  309. package/src/index.ts +9 -0
  310. package/src/payments/implementations/fake.ts +133 -0
  311. package/src/payments/implementations/live.ts +87 -0
  312. package/src/payments/operations/get_access_token.spec.ts +60 -0
  313. package/src/payments/operations/get_access_token.ts +77 -0
  314. package/src/payments/operations/get_pay_token.spec.ts +65 -0
  315. package/src/payments/operations/get_pay_token.ts +66 -0
  316. package/src/payments/operations/get_payment_status.spec.ts +82 -0
  317. package/src/payments/operations/get_payment_status.ts +78 -0
  318. package/src/payments/operations/initialize_om_payment.spec.ts +234 -0
  319. package/src/payments/operations/initialize_om_payment.ts +191 -0
  320. package/src/payments/payments.ts +86 -0
  321. package/src/payments/routes/routes.ts +61 -0
  322. package/src/payments/utils/constants.ts +120 -0
  323. package/src/payments/utils/joi_schema.ts +117 -0
  324. package/src/payments/utils/request_model.ts +103 -0
  325. package/src/payments/utils/utils.ts +31 -0
  326. package/src/utils/https.spec.ts +101 -0
  327. package/src/utils/https.ts +266 -0
  328. package/src/utils/logging_interface.ts +25 -0
  329. package/src/utils/operation_response.ts +17 -0
  330. package/src/utils/utils.ts +5 -0
  331. package/tsconfig.build.json +4 -0
  332. package/tsconfig.dev.json +4 -0
  333. package/tsconfig.json +27 -0
@@ -0,0 +1,178 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const logging_1 = require("../../../../logging/src/logging");
27
+ const requests = __importStar(require("../../common/utils/https"));
28
+ const constants_1 = require("../utils/constants");
29
+ const transfer_1 = require("./transfer");
30
+ describe('transfer', () => {
31
+ it('should fail on invalid parameter provided', async () => {
32
+ const { error, data, raw } = await (0, transfer_1.transfer)({
33
+ configs: {
34
+ channelUserMsisdn: '',
35
+ clientId: '',
36
+ clientSecret: '',
37
+ customerKey: '',
38
+ customerSecret: '',
39
+ pin: '',
40
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
41
+ logger: new logging_1.Logger(),
42
+ },
43
+ params: {
44
+ webhook: '',
45
+ amount: 0,
46
+ customerPhone: '',
47
+ customerName: '',
48
+ token: '',
49
+ },
50
+ endPoint: '',
51
+ });
52
+ expect(data).not.toBeDefined();
53
+ expect(raw).not.toBeDefined();
54
+ expect(error).toBeDefined();
55
+ });
56
+ it('should fail on invalid phone number provided provided', async () => {
57
+ const { error, data, raw } = await (0, transfer_1.transfer)({
58
+ configs: {
59
+ channelUserMsisdn: '237699947943',
60
+ clientId: 'clientId',
61
+ clientSecret: 'clientSecret',
62
+ customerKey: 'customerKey',
63
+ customerSecret: 'customerSecret',
64
+ pin: 'pin',
65
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
66
+ logger: new logging_1.Logger(),
67
+ },
68
+ params: {
69
+ webhook: 'https://example.com',
70
+ amount: 100,
71
+ customerPhone: '69532652',
72
+ customerName: 'itachi uchiwa',
73
+ token: 'token',
74
+ },
75
+ endPoint: 'https://example.com',
76
+ });
77
+ expect(data).not.toBeDefined();
78
+ expect(raw).not.toBeDefined();
79
+ expect(error).toBeDefined();
80
+ });
81
+ it('should fail on request failure', async () => {
82
+ const postSpy = jest
83
+ .spyOn(requests, 'postRequest')
84
+ .mockImplementation()
85
+ .mockResolvedValue({
86
+ error: {},
87
+ });
88
+ const { error, data, raw } = await (0, transfer_1.transfer)({
89
+ configs: {
90
+ channelUserMsisdn: '237699947943',
91
+ clientId: 'clientId',
92
+ clientSecret: 'clientSecret',
93
+ customerKey: 'customerKey',
94
+ customerSecret: 'customerSecret',
95
+ pin: 'pin',
96
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
97
+ logger: new logging_1.Logger(),
98
+ },
99
+ params: {
100
+ webhook: 'https://example.com',
101
+ amount: 100,
102
+ customerPhone: '695326522',
103
+ customerName: 'itachi uchiwa',
104
+ token: 'token',
105
+ },
106
+ endPoint: 'https://example.com',
107
+ });
108
+ expect(data).not.toBeDefined();
109
+ expect(raw).not.toBeDefined();
110
+ expect(postSpy).toHaveBeenCalledTimes(1);
111
+ expect(error).toBeDefined();
112
+ });
113
+ it('should succeed on request succeed', async () => {
114
+ const postSpy = jest
115
+ .spyOn(requests, 'postRequest')
116
+ .mockImplementation()
117
+ .mockResolvedValue({
118
+ response: {
119
+ data: {
120
+ MD5OfMessageBody: 'MD5OfMessageBody',
121
+ MD5OfMessageAttributes: 'MD5OfMessageAttributes',
122
+ MessageId: 'MessageId',
123
+ ResponseMetadata: {
124
+ RequestId: 'RequestId',
125
+ HTTPStatusCode: 200,
126
+ HTTPHeaders: {
127
+ 'x-amzn-requestid': 'x-amzn-requestid',
128
+ 'x-amzn-trace-id': 'x-amzn-trace-id',
129
+ 'content-type': 'content-type',
130
+ 'content-length': 'content-length',
131
+ },
132
+ RetryAttempts: 2,
133
+ },
134
+ },
135
+ },
136
+ });
137
+ const { error, data, raw } = await (0, transfer_1.transfer)({
138
+ configs: {
139
+ channelUserMsisdn: '237699947943',
140
+ clientId: 'clientId',
141
+ clientSecret: 'clientSecret',
142
+ customerKey: 'customerKey',
143
+ customerSecret: 'customerSecret',
144
+ pin: 'pin',
145
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
146
+ logger: new logging_1.Logger(),
147
+ },
148
+ params: {
149
+ webhook: 'https://example.com',
150
+ amount: 100,
151
+ customerPhone: '695326522',
152
+ customerName: 'itachi uchiwa',
153
+ token: 'token',
154
+ },
155
+ endPoint: 'https://example.com',
156
+ });
157
+ expect(error).not.toBeDefined();
158
+ expect(postSpy).toHaveBeenCalledTimes(1);
159
+ expect(raw).toEqual({
160
+ MD5OfMessageBody: 'MD5OfMessageBody',
161
+ MD5OfMessageAttributes: 'MD5OfMessageAttributes',
162
+ MessageId: 'MessageId',
163
+ ResponseMetadata: {
164
+ RequestId: 'RequestId',
165
+ HTTPStatusCode: 200,
166
+ HTTPHeaders: {
167
+ 'x-amzn-requestid': 'x-amzn-requestid',
168
+ 'x-amzn-trace-id': 'x-amzn-trace-id',
169
+ 'content-type': 'content-type',
170
+ 'content-length': 'content-length',
171
+ },
172
+ RetryAttempts: 2,
173
+ },
174
+ });
175
+ expect(data).toBe('MessageId');
176
+ });
177
+ });
178
+ //# sourceMappingURL=transfer.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transfer.spec.js","sourceRoot":"","sources":["../../../../../src/disbursements/operations/transfer.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,6DAAyD;AACzD,mEAAqD;AACrD,kDAAwE;AACxE,yCAAsC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,2CAA2C,EAAE,KAAK,IAAI,EAAE;QACzD,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,IAAA,mBAAQ,EAAC;YAC1C,OAAO,EAAE;gBACP,iBAAiB,EAAE,EAAE;gBACrB,QAAQ,EAAE,EAAE;gBACZ,YAAY,EAAE,EAAE;gBAChB,WAAW,EAAE,EAAE;gBACf,cAAc,EAAE,EAAE;gBAClB,GAAG,EAAE,EAAE;gBACP,WAAW,EAAE,8CAAkC,CAAC,OAAO;gBACvD,MAAM,EAAE,IAAI,gBAAM,EAAE;aACrB;YACD,MAAM,EAAE;gBACN,OAAO,EAAE,EAAE;gBACX,MAAM,EAAE,CAAC;gBACT,aAAa,EAAE,EAAE;gBACjB,YAAY,EAAE,EAAE;gBAChB,KAAK,EAAE,EAAE;aACV;YACD,QAAQ,EAAE,EAAE;SACb,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAC/B,MAAM,CAA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AC,CAAC,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Orange Money API routes builder.
3
+ * @class
4
+ */
5
+ export declare class Routes {
6
+ /**
7
+ * Constructs a new {CommonRoutes}.
8
+ * @constructor
9
+ * @param {RoutesParams} config - The required global route configuration.
10
+ */
11
+ /**
12
+ * Returns the base route for the API.
13
+ * e.g: https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1
14
+ * @return {string} The base route.
15
+ */
16
+ private baseRoute;
17
+ /**
18
+ * This route is used to create an access token which can then be used to authorize and authenticate towards the other end-points of the API.
19
+ * e.g : https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1 page 2
20
+ * @return {string}
21
+ */
22
+ createAccessToken(): string;
23
+ /**
24
+ * This route is used to transfer an amount from the owner’s account to a payee account (customer).
25
+ * e.g : https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1 page 4
26
+ * @return {string} - The transfer route.
27
+ */
28
+ transfer(): string;
29
+ /**
30
+ * This route is used to get the status of a transfer.
31
+ *
32
+ * @param {string} Id - The reference of the transfer.
33
+ * e.g : https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1 page 9
34
+ * @return {string} - The transfer status route.
35
+ */
36
+ transferStatus(Id: string): string;
37
+ }
38
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/routes/routes.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,qBAAa,MAAM;IACjB;;;;OAIG;IAEH;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAIjB;;;;OAIG;IACH,iBAAiB,IAAI,MAAM;IAI3B;;;;OAIG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;CAGnC"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Routes = void 0;
4
+ const constants_1 = require("../utils/constants");
5
+ const apiHost = 'https://omapi.ynote.africa';
6
+ const apiTokenHost = 'https://omapi-token.ynote.africa/oauth2/token';
7
+ /**
8
+ * Orange Money API routes builder.
9
+ * @class
10
+ */
11
+ class Routes {
12
+ /**
13
+ * Constructs a new {CommonRoutes}.
14
+ * @constructor
15
+ * @param {RoutesParams} config - The required global route configuration.
16
+ */
17
+ /**
18
+ * Returns the base route for the API.
19
+ * e.g: https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1
20
+ * @return {string} The base route.
21
+ */
22
+ baseRoute() {
23
+ return `${apiHost}/${constants_1.DisbursementXTargetEnvironmentType.prod}`;
24
+ }
25
+ /**
26
+ * This route is used to create an access token which can then be used to authorize and authenticate towards the other end-points of the API.
27
+ * e.g : https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1 page 2
28
+ * @return {string}
29
+ */
30
+ createAccessToken() {
31
+ return apiTokenHost;
32
+ }
33
+ /**
34
+ * This route is used to transfer an amount from the owner’s account to a payee account (customer).
35
+ * e.g : https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1 page 4
36
+ * @return {string} - The transfer route.
37
+ */
38
+ transfer() {
39
+ return `${this.baseRoute()}/refund`;
40
+ }
41
+ /**
42
+ * This route is used to get the status of a transfer.
43
+ *
44
+ * @param {string} Id - The reference of the transfer.
45
+ * e.g : https://docs.google.com/document/d/1h-gMj7PSGAALxRSofOvLa2g5vF3IpDkUufNrU1hX6Yk/edit?pli=1 page 9
46
+ * @return {string} - The transfer status route.
47
+ */
48
+ transferStatus(Id) {
49
+ return `${this.baseRoute()}/refund/status/${Id}`;
50
+ }
51
+ }
52
+ exports.Routes = Routes;
53
+ //# sourceMappingURL=routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../../../../src/disbursements/routes/routes.ts"],"names":[],"mappings":";;;AAAA,kDAAwE;AAExE,MAAM,OAAO,GAAG,4BAA4B,CAAC;AAC7C,MAAM,YAAY,GAAG,+CAA+C,CAAC;AAErE;;;GAGG;AACH,MAAa,MAAM;IACjB;;;;OAIG;IAEH;;;;OAIG;IACK,SAAS;QACf,OAAO,GAAG,OAAO,IAAI,8CAAkC,CAAC,IAAI,EAAE,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,iBAAiB;QACf,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACN,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;IACtC,CAAC;IAED;;;;;;OAMG;IACH,cAAc,CAAC,EAAU;QACvB,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,kBAAkB,EAAE,EAAE,CAAC;IACnD,CAAC;CACF;AA5CD,wBA4CC"}
@@ -0,0 +1,5 @@
1
+ export declare enum DisbursementXTargetEnvironmentType {
2
+ sandbox = "dev",
3
+ prod = "prod"
4
+ }
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/utils/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,kCAAkC;IAC5C,OAAO,QAAQ;IACf,IAAI,SAAS;CACd"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DisbursementXTargetEnvironmentType = void 0;
4
+ var DisbursementXTargetEnvironmentType;
5
+ (function (DisbursementXTargetEnvironmentType) {
6
+ DisbursementXTargetEnvironmentType["sandbox"] = "dev";
7
+ DisbursementXTargetEnvironmentType["prod"] = "prod";
8
+ })(DisbursementXTargetEnvironmentType = exports.DisbursementXTargetEnvironmentType || (exports.DisbursementXTargetEnvironmentType = {}));
9
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/disbursements/utils/constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,kCAGX;AAHD,WAAY,kCAAkC;IAC5C,qDAAe,CAAA;IACf,mDAAa,CAAA;AACf,CAAC,EAHW,kCAAkC,GAAlC,0CAAkC,KAAlC,0CAAkC,QAG7C"}
@@ -0,0 +1,74 @@
1
+ import { AxiosResponse } from 'axios';
2
+ import { LoggerInterface } from '../../payments/utils/logging_interface';
3
+ export declare type RequestResponse<T> = {
4
+ response?: AxiosResponse<T>;
5
+ error?: unknown;
6
+ };
7
+ /**
8
+ * Posts an http request to the given route.
9
+ * @param {Record<string, string | undefined> | string} data The data to be posted.
10
+ * @param {string} route The end point url.
11
+ * @param {Record<string, string>} headers The type content of request.
12
+ * @param {LoggerInterface} logger The logger to use when posting data.
13
+ * @return {Promise<unknown | undefined>} The server response.
14
+ */
15
+ export declare function postRequest<T>({ data, route, headers, logger, rejectUnauthorized, }: {
16
+ data?: Record<string, unknown> | string | null;
17
+ route: string;
18
+ logger: LoggerInterface;
19
+ headers?: Record<string, string>;
20
+ rejectUnauthorized?: boolean;
21
+ }): Promise<RequestResponse<T>>;
22
+ /**
23
+ * Gets an http request to the given route.
24
+ * @param {Record<string, string | undefined> | string} data The data to be posted.
25
+ * @param {string} route The end point url.
26
+ * @param {Record<string, string>} headers The type content of request.
27
+ * @param {LoggerInterface} logger The logger to use when getting data.
28
+ * @return {Promise<unknown | undefined>} The server response.
29
+ */
30
+ export declare function getRequest<T>({ data, route, headers, logger, rejectUnauthorized, }: {
31
+ data?: Record<string, string | undefined> | string;
32
+ route: string;
33
+ headers?: Record<string, string>;
34
+ logger: LoggerInterface;
35
+ rejectUnauthorized?: boolean;
36
+ }): Promise<RequestResponse<T>>;
37
+ /**
38
+ * Parses an Axios error and returns a modified error object.
39
+ *
40
+ * @param {unknown} error - The error object to be parsed.
41
+ * @return {unknown} The modified error object.
42
+ */
43
+ export declare function parseAxiosError(error: unknown): unknown;
44
+ /**
45
+ * Generates a hash using the given key and secret.
46
+ *
47
+ * @param {string} key - The key to be hashed.
48
+ * @param {string} secret - The secret to be hashed.
49
+ * @return {string} - The generated hash.
50
+ */
51
+ export declare function hash(key: string, secret: string): string;
52
+ /**
53
+ * Encode the body of the request.
54
+ * @param {Record<string, string>} bodyRequest the body request.
55
+ * @return {string} the encoded body request result.
56
+ */
57
+ export declare function encodeTheBodyOfRequest(bodyRequest: Record<string, string>): string;
58
+ export declare const encodeToBase64: (apiUsername: string, apiPassword: string) => string;
59
+ export declare type OperationResponse<T, T2 = unknown> = Promise<{
60
+ data: T;
61
+ raw: T2;
62
+ error?: undefined;
63
+ } | {
64
+ data?: undefined;
65
+ raw?: undefined;
66
+ error: unknown;
67
+ }>;
68
+ /**
69
+ * Encode the data to w3 x form encoded url.
70
+ * @param {Record<string, string>} data the data to encode.
71
+ * @return {string} the encoded value.
72
+ */
73
+ export declare function encodeDataToXFormUrl(data: Record<string, string>): string;
74
+ //# sourceMappingURL=https.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"https.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/utils/https.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAEzE,oBAAY,eAAe,CAAC,CAAC,IAAI;IAC/B,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,CAAC,EAAE,EACnC,IAAI,EACJ,KAAK,EACL,OAAO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;IACE,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,EAAE,CAAC;IACR,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,GACD;IACE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;CAChB,CACJ,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAUzE"}
@@ -0,0 +1,206 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.encodeDataToXFormUrl = exports.encodeToBase64 = exports.encodeTheBodyOfRequest = exports.hash = exports.parseAxiosError = exports.getRequest = exports.postRequest = void 0;
30
+ const axios = __importStar(require("axios"));
31
+ const axios_1 = require("axios");
32
+ const base64url_1 = __importDefault(require("base64url"));
33
+ const https = __importStar(require("https"));
34
+ /**
35
+ * Posts an http request to the given route.
36
+ * @param {Record<string, string | undefined> | string} data The data to be posted.
37
+ * @param {string} route The end point url.
38
+ * @param {Record<string, string>} headers The type content of request.
39
+ * @param {LoggerInterface} logger The logger to use when posting data.
40
+ * @return {Promise<unknown | undefined>} The server response.
41
+ */
42
+ async function postRequest({ data, route, headers, logger, rejectUnauthorized = true, }) {
43
+ try {
44
+ logger.info(`Request on the route ${route} is running with data : ${JSON.stringify({
45
+ headers,
46
+ data,
47
+ route,
48
+ })}`);
49
+ const agent = new https.Agent({
50
+ rejectUnauthorized: rejectUnauthorized,
51
+ });
52
+ const response = await axios.default({
53
+ method: 'post',
54
+ url: route,
55
+ headers: headers,
56
+ data: data,
57
+ httpsAgent: agent,
58
+ });
59
+ logger.info(`Request on the route ${route} completed successfully with data : ${JSON.stringify({
60
+ response: response.data,
61
+ status: response.status,
62
+ statusText: response.statusText,
63
+ })}`);
64
+ return { response: response };
65
+ }
66
+ catch (error) {
67
+ logger.warn(`[Axios] failed to post request on the route: ${route} with data : ${JSON.stringify({ headers, data, route })}`);
68
+ const parsedError = parseAxiosError(error);
69
+ logger.error(JSON.stringify(parsedError));
70
+ return { error: parsedError };
71
+ }
72
+ }
73
+ exports.postRequest = postRequest;
74
+ /**
75
+ * Gets an http request to the given route.
76
+ * @param {Record<string, string | undefined> | string} data The data to be posted.
77
+ * @param {string} route The end point url.
78
+ * @param {Record<string, string>} headers The type content of request.
79
+ * @param {LoggerInterface} logger The logger to use when getting data.
80
+ * @return {Promise<unknown | undefined>} The server response.
81
+ */
82
+ async function getRequest({ data, route, headers, logger, rejectUnauthorized = true, }) {
83
+ try {
84
+ logger.info(`Request on the route ${route} is running with data : ${JSON.stringify({
85
+ headers,
86
+ data,
87
+ route,
88
+ })}`);
89
+ const agent = new https.Agent({
90
+ rejectUnauthorized: rejectUnauthorized,
91
+ });
92
+ const response = await axios.default({
93
+ method: 'get',
94
+ url: route,
95
+ headers: headers,
96
+ data: data,
97
+ httpsAgent: agent,
98
+ });
99
+ logger.info(`Request on the route ${route} completed successfully with data : ${JSON.stringify({
100
+ response: response.data,
101
+ status: response.status,
102
+ statusText: response.statusText,
103
+ })}`);
104
+ return { response: response };
105
+ }
106
+ catch (error) {
107
+ logger.warn(`[Axios] failed to get request on the route: ${route} with data : ${JSON.stringify({ headers, data, route })}`);
108
+ const parsedError = parseAxiosError(error);
109
+ logger.error(JSON.stringify(parsedError));
110
+ return { error: parsedError };
111
+ }
112
+ }
113
+ exports.getRequest = getRequest;
114
+ /**
115
+ * Parses an Axios error and returns a modified error object.
116
+ *
117
+ * @param {unknown} error - The error object to be parsed.
118
+ * @return {unknown} The modified error object.
119
+ */
120
+ function parseAxiosError(error) {
121
+ var _a, _b;
122
+ let err = error;
123
+ if (error instanceof axios_1.AxiosError) {
124
+ if (error.response) {
125
+ err = {
126
+ responseError: {
127
+ data: error.response.data,
128
+ status: error.response.status,
129
+ statusText: error.response.statusText,
130
+ headers: error.response.headers,
131
+ },
132
+ requestBody: error.request.body,
133
+ };
134
+ }
135
+ else if (error.request) {
136
+ err = {
137
+ requestFailed: {
138
+ headers: (_a = error.config) === null || _a === void 0 ? void 0 : _a.headers,
139
+ data: (_b = error.config) === null || _b === void 0 ? void 0 : _b.data,
140
+ },
141
+ };
142
+ }
143
+ else {
144
+ err = {
145
+ configFailed: error.message,
146
+ };
147
+ }
148
+ }
149
+ return err;
150
+ }
151
+ exports.parseAxiosError = parseAxiosError;
152
+ /**
153
+ * Generates a hash using the given key and secret.
154
+ *
155
+ * @param {string} key - The key to be hashed.
156
+ * @param {string} secret - The secret to be hashed.
157
+ * @return {string} - The generated hash.
158
+ */
159
+ function hash(key, secret) {
160
+ const toHash = `${key}:${secret}`;
161
+ if (!global.btoa) {
162
+ return Buffer.from(toHash).toString('base64');
163
+ }
164
+ return global.btoa(toHash);
165
+ }
166
+ exports.hash = hash;
167
+ /**
168
+ * Encode the body of the request.
169
+ * @param {Record<string, string>} bodyRequest the body request.
170
+ * @return {string} the encoded body request result.
171
+ */
172
+ function encodeTheBodyOfRequest(bodyRequest) {
173
+ const formBody = [];
174
+ for (const key in bodyRequest) {
175
+ if ({}.hasOwnProperty.call(bodyRequest, key)) {
176
+ const encodedKey = encodeURIComponent(key);
177
+ const encodedValue = encodeURIComponent(bodyRequest[key]);
178
+ formBody.push(encodedKey + '=' + encodedValue);
179
+ }
180
+ }
181
+ return formBody.join('&');
182
+ }
183
+ exports.encodeTheBodyOfRequest = encodeTheBodyOfRequest;
184
+ // Encode to base64
185
+ const encodeToBase64 = (apiUsername, apiPassword) => {
186
+ return (0, base64url_1.default)(`${apiUsername}:${apiPassword}`);
187
+ };
188
+ exports.encodeToBase64 = encodeToBase64;
189
+ /**
190
+ * Encode the data to w3 x form encoded url.
191
+ * @param {Record<string, string>} data the data to encode.
192
+ * @return {string} the encoded value.
193
+ */
194
+ function encodeDataToXFormUrl(data) {
195
+ const segments = [];
196
+ for (const key in data) {
197
+ if (Object.hasOwnProperty.call(data, key)) {
198
+ const encodedKey = encodeURIComponent(key);
199
+ const encodedValue = encodeURIComponent(data[key]);
200
+ segments.push(`${encodedKey}=${encodedValue}`);
201
+ }
202
+ }
203
+ return segments.join('&');
204
+ }
205
+ exports.encodeDataToXFormUrl = encodeDataToXFormUrl;
206
+ //# sourceMappingURL=https.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"https.js","sourceRoot":"","sources":["../../../../../src/disbursements/utils/https.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,iCAAkD;AAClD,0DAAkC;AAClC,6CAA+B;AAQ/B;;;;;;;GAOG;AACI,KAAK,UAAU,WAAW,CAAI,EACnC,IAAI,EACJ,KAAK,EACL,OAAO,EACP,MAAM,EACN,kBAAkB,GAAG,IAAI,GAO1B;IACC,IAAI;QACF,MAA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AC;YAC3C,MAAM,YAAY,GAAG,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1D,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,GAAG,YAAY,CAAC,CAAC;SAChD;KACF;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAZD,wDAYC;AAED,mBAAmB;AACZ,MAAM,cAAc,GAAG,CAC5B,WAAmB,EACnB,WAAmB,EACX,EAAE;IACV,OAAO,IAAA,mBAAS,EAAC,GAAG,WAAW,IAAI,WAAW,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AALW,QAAA,cAAc,kBAKzB;AAeF;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,IAA4B;IAC/D,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,IAAI,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;YACzC,MAAM,UAAU,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;YAC3C,MAAM,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,GAAG,UAAU,IAAI,YAAY,EAAE,CAAC,CAAC;SAChD;KACF;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5B,CAAC;AAVD,oDAUC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=https.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"https.spec.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/utils/https.spec.ts"],"names":[],"mappings":""}