@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,63 @@
1
+ import Joi from 'joi';
2
+ import { DisbursementXTargetEnvironmentType } from '../utils/constants';
3
+ import { LoggerInterface } from '../../utils/logging_interface';
4
+ import { CreateAccessTokenResponse } from '../operations/create_access_token';
5
+ import { TransferRequest, TransferResponse } from '../operations/transfer';
6
+ import { GetTransferStatusRequest, GetTransferStatusResponse } from '../operations/get_transfer_status';
7
+ /**
8
+ * Interface for DisbursementServiceConfig.
9
+ */
10
+ export interface DisbursementServiceConfig {
11
+ clientId: string;
12
+ clientSecret: string;
13
+ customerKey: string;
14
+ customerSecret: string;
15
+ channelUserMsisdn: string;
16
+ pin: string;
17
+ environment: DisbursementXTargetEnvironmentType;
18
+ logger: LoggerInterface;
19
+ }
20
+ /**
21
+ * Joi schema for DisbursementServiceConfigSchema.
22
+ */
23
+ export declare const DisbursementServiceConfigSchema: Joi.ObjectSchema<DisbursementServiceConfig>;
24
+ /**
25
+ * Orange Money API Disbursement.
26
+ * @class
27
+ */
28
+ export interface DisbursementInterface {
29
+ /**
30
+ * Creates an access token.
31
+ *
32
+ * @return {Promise<CreateAccessTokenResponse>} The method response containing a string and a token.
33
+ */
34
+ createAccessToken(): Promise<CreateAccessTokenResponse>;
35
+ /**
36
+ * Transfers the specified amount of money from one account to another.
37
+ *
38
+ * @param {TransferRequest} params - The parameters for the transfer.
39
+ * @return {Promise<TransferResponse>} - The response from the transfer method.
40
+ */
41
+ transfer(params: TransferRequest): Promise<TransferResponse>;
42
+ /**
43
+ * Retrieves the status of a transfer.
44
+ *
45
+ * @param {GetTransferStatusRequest} params - The parameters for retrieving the transfer status.
46
+ * @return {Promise<GetTransferStatusResponse>} - The method response containing the status and transfer status response.
47
+ */
48
+ getTransferStatus(params: GetTransferStatusRequest): Promise<GetTransferStatusResponse>;
49
+ }
50
+ /**
51
+ * Orange Money API Disbursement.
52
+ * @class
53
+ */
54
+ export declare class Disbursement {
55
+ /**
56
+ * Creates a new Disbursement object based on the provided configuration.
57
+ *
58
+ * @param {DisbursementServiceConfig} config - The configuration for the Disbursement object.
59
+ * @return {Disbursement} A new Disbursement object based on the provided configuration.
60
+ */
61
+ static createDisbursement(config: DisbursementServiceConfig): DisbursementInterface;
62
+ }
63
+ //# sourceMappingURL=disbursement_service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disbursement_service.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/implementations/disbursement_service.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,kCAAkC,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAI3C;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,kCAAkC,CAAC;IAChD,MAAM,EAAE,eAAe,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,+BAA+B,6CAgDxC,CAAC;AAEL;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,iBAAiB,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAExD;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAE7D;;;;;OAKG;IACH,iBAAiB,CACf,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACvC;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CACvB,MAAM,EAAE,yBAAyB,GAChC,qBAAqB;CAQzB"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Disbursement = exports.DisbursementServiceConfigSchema = void 0;
7
+ const joi_1 = __importDefault(require("joi"));
8
+ const constants_1 = require("../utils/constants");
9
+ const regex_1 = require("../utils/regex");
10
+ const live_1 = require("./src/live");
11
+ const sandbox_1 = require("./src/sandbox");
12
+ /**
13
+ * Joi schema for DisbursementServiceConfigSchema.
14
+ */
15
+ exports.DisbursementServiceConfigSchema = joi_1.default.object({
16
+ clientId: joi_1.default.string().required().messages({
17
+ 'string.base': '"clientId" should be a type of \'text\'',
18
+ 'string.empty': '"clientId" cannot be an empty field',
19
+ 'any.required': '"clientId" is a required field',
20
+ }),
21
+ clientSecret: joi_1.default.string().required().messages({
22
+ 'string.base': '"clientSecret" should be a type of \'text\'',
23
+ 'string.empty': '"clientSecret" cannot be an empty field',
24
+ 'any.required': '"clientSecret" is a required field',
25
+ }),
26
+ customerKey: joi_1.default.string().required().messages({
27
+ 'string.base': '"customerKey" should be a type of \'text\'',
28
+ 'string.empty': '"customerKey" cannot be an empty field',
29
+ 'any.required': '"customerKey" is a required field',
30
+ }),
31
+ customerSecret: joi_1.default.string().required().messages({
32
+ 'string.base': '"customerSecret" should be a type of \'text\'',
33
+ 'string.empty': '"customerSecret" cannot be an empty field',
34
+ 'any.required': '"customerSecret" is a required field',
35
+ }),
36
+ channelUserMsisdn: joi_1.default.string()
37
+ .pattern(regex_1.merchantPhoneNumberRegex)
38
+ .required()
39
+ .messages({
40
+ 'string.base': '"channelUserMsisdn" should be a type of \'text\'',
41
+ 'string.empty': '"channelUserMsisdn" cannot be an empty field',
42
+ 'any.required': '"channelUserMsisdn" is a required field',
43
+ }),
44
+ pin: joi_1.default.string().required().messages({
45
+ 'string.base': '"pin" should be a type of \'text\'',
46
+ 'string.empty': '"pin" cannot be an empty field',
47
+ 'any.required': '"pin" is a required field',
48
+ }),
49
+ environment: joi_1.default.string()
50
+ .valid(...Object.values(constants_1.DisbursementXTargetEnvironmentType))
51
+ .required()
52
+ .messages({
53
+ 'string.base': '"environment" should be a type of \'text\'',
54
+ 'string.empty': '"environment" cannot be an empty field',
55
+ 'any.required': '"environment" is a required field',
56
+ }),
57
+ logger: joi_1.default.object().required().messages({
58
+ 'string.base': '"logger" should be a type of \'object\'',
59
+ 'string.empty': '"logger" cannot be an empty field',
60
+ 'any.required': '"logger" is a required field',
61
+ }),
62
+ });
63
+ /**
64
+ * Orange Money API Disbursement.
65
+ * @class
66
+ */
67
+ class Disbursement {
68
+ /**
69
+ * Creates a new Disbursement object based on the provided configuration.
70
+ *
71
+ * @param {DisbursementServiceConfig} config - The configuration for the Disbursement object.
72
+ * @return {Disbursement} A new Disbursement object based on the provided configuration.
73
+ */
74
+ static createDisbursement(config) {
75
+ switch (config.environment) {
76
+ case constants_1.DisbursementXTargetEnvironmentType.prod:
77
+ return new live_1.DisbursementLive(config);
78
+ case constants_1.DisbursementXTargetEnvironmentType.sandbox:
79
+ return new sandbox_1.DisbursementFake(config);
80
+ }
81
+ }
82
+ }
83
+ exports.Disbursement = Disbursement;
84
+ //# sourceMappingURL=disbursement_service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"disbursement_service.js","sourceRoot":"","sources":["../../../../../src/disbursements/implementations/disbursement_service.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,kDAAwE;AAExE,0CAA0D;AAO1D,qCAA8C;AAC9C,2CAAiD;AAgBjD;;GAEG;AACU,QAAA,+BAA+B,GAC1C,aAAG,CAAC,MAAM,CAA4B;IACpC,QAAQ,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACzC,aAAa,EAAE,yCAAyC;QACxD,cAAc,EAAE,qCAAqC;QACrD,cAAc,EAAE,gCAAgC;KACjD,CAAC;IACF,YAAY,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QAC7C,aAAa,EAAE,6CAA6C;QAC5D,cAAc,EAAE,yCAAyC;QACzD,cAAc,EAAE,oCAAoC;KACrD,CAAC;IACF,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QAC5C,aAAa,EAAE,4CAA4C;QAC3D,cAAc,EAAE,wCAAwC;QACxD,cAAc,EAAE,mCAAmC;KACpD,CAAC;IACF,cAAc,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QAC/C,aAAa,EAAE,+CAA+C;QAC9D,cAAc,EAAE,2CAA2C;QAC3D,cAAc,EAAE,sCAAsC;KACvD,CAAC;IACF,iBAAiB,EAAE,aAAG,CAAC,MAAM,EAAE;SAC5B,OAAO,CAAC,gCAAwB,CAAC;SACjC,QAAQ,EAAE;SACV,QAAQ,CAAC;QACR,aAAa,EAAE,kDAAkD;QACjE,cAAc,EAAE,8CAA8C;QAC9D,cAAc,EAAE,yCAAyC;KAC1D,CAAC;IACJ,GAAG,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpC,aAAa,EAAE,oCAAoC;QACnD,cAAc,EAAE,gCAAgC;QAChD,cAAc,EAAE,2BAA2B;KAC5C,CAAC;IACF,WAAW,EAAE,aAAG,CAAC,MAAM,EAAE;SACtB,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,8CAAkC,CAAC,CAAC;SAC3D,QAAQ,EAAE;SACV,QAAQ,CAAC;QACR,aAAa,EAAE,4CAA4C;QAC3D,cAAc,EAAE,wCAAwC;QACxD,cAAc,EAAE,mCAAmC;KACpD,CAAC;IACJ,MAAM,EAAE,aAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACvC,aAAa,EAAE,yCAAyC;QACxD,cAAc,EAAE,mCAAmC;QACnD,cAAc,EAAE,8BAA8B;KAC/C,CAAC;CACH,CAAC,CAAC;AAiCL;;;GAGG;AACH,MAAa,YAAY;IACvB;;;;;OAKG;IACH,MAAM,CAAC,kBAAkB,CACvB,MAAiC;QAEjC,QAAQ,MAAM,CAAC,WAAW,EAAE;YAC1B,KAAK,8CAAkC,CAAC,IAAI;gBAC1C,OAAO,IAAI,uBAAgB,CAAC,MAAM,CAAC,CAAC;YACtC,KAAK,8CAAkC,CAAC,OAAO;gBAC7C,OAAO,IAAI,0BAAgB,CAAC,MAAM,CAAC,CAAC;SACvC;IACH,CAAC;CACF;AAjBD,oCAiBC"}
@@ -0,0 +1,40 @@
1
+ import { TransferRequest, TransferResponse } from '../../operations/transfer';
2
+ import { CreateAccessTokenResponse } from '../../operations/create_access_token';
3
+ import { Routes } from '../../routes/routes';
4
+ import { DisbursementInterface, DisbursementServiceConfig } from '../disbursement_service';
5
+ import { GetTransferStatusRequest, GetTransferStatusResponse } from '../../operations/get_transfer_status';
6
+ /**
7
+ * Orange Money API Live Disbursement.
8
+ * @class
9
+ */
10
+ export declare class DisbursementLive implements DisbursementInterface {
11
+ protected readonly config: DisbursementServiceConfig;
12
+ protected readonly routes: Routes;
13
+ /**
14
+ * Constructs a new {Disbursement}.
15
+ * @constructor
16
+ * @param {DisbursementServiceConfig} config - The required global route configuration.
17
+ */
18
+ constructor(config: DisbursementServiceConfig);
19
+ /**
20
+ * Creates an access token.
21
+ *
22
+ * @return {Promise<CreateAccessTokenResponse>} The method response containing a string and a token.
23
+ */
24
+ createAccessToken(): Promise<CreateAccessTokenResponse>;
25
+ /**
26
+ * Transfers the specified amount of money from one account to another.
27
+ *
28
+ * @param {TransferRequest} params - The parameters for the transfer.
29
+ * @return {Promise<TransferResponse>} - The response from the transfer method.
30
+ */
31
+ transfer(params: TransferRequest): Promise<TransferResponse>;
32
+ /**
33
+ * Retrieves the status of a transfer.
34
+ *
35
+ * @param {GetTransferStatusRequest} params - The parameters for retrieving the transfer status.
36
+ * @return {Promise<GetTransferStatusResponse>} - The method response containing the status and transfer status response.
37
+ */
38
+ getTransferStatus(params: GetTransferStatusRequest): Promise<GetTransferStatusResponse>;
39
+ }
40
+ //# sourceMappingURL=live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../../../../../src/disbursements/implementations/src/live.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,gBAAgB,EAEjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,yBAAyB,EAE1B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EAE1B,MAAM,sCAAsC,CAAC;AAE9C;;;GAGG;AACH,qBAAa,gBAAiB,YAAW,qBAAqB;IAC5D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IACrD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC;;;;OAIG;gBACS,MAAM,EAAE,yBAAyB;IAK7C;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAO7D;;;;;OAKG;IACG,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAQlE;;;;;OAKG;IACG,iBAAiB,CACrB,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,yBAAyB,CAAC;CAOtC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DisbursementLive = void 0;
4
+ const transfer_1 = require("../../operations/transfer");
5
+ const create_access_token_1 = require("../../operations/create_access_token");
6
+ const routes_1 = require("../../routes/routes");
7
+ const get_transfer_status_1 = require("../../operations/get_transfer_status");
8
+ /**
9
+ * Orange Money API Live Disbursement.
10
+ * @class
11
+ */
12
+ class DisbursementLive {
13
+ /**
14
+ * Constructs a new {Disbursement}.
15
+ * @constructor
16
+ * @param {DisbursementServiceConfig} config - The required global route configuration.
17
+ */
18
+ constructor(config) {
19
+ this.routes = new routes_1.Routes();
20
+ this.config = config;
21
+ }
22
+ /**
23
+ * Creates an access token.
24
+ *
25
+ * @return {Promise<CreateAccessTokenResponse>} The method response containing a string and a token.
26
+ */
27
+ async createAccessToken() {
28
+ return await (0, create_access_token_1.createAccessToken)({
29
+ configs: this.config,
30
+ endPoint: this.routes.createAccessToken(),
31
+ });
32
+ }
33
+ /**
34
+ * Transfers the specified amount of money from one account to another.
35
+ *
36
+ * @param {TransferRequest} params - The parameters for the transfer.
37
+ * @return {Promise<TransferResponse>} - The response from the transfer method.
38
+ */
39
+ async transfer(params) {
40
+ return await (0, transfer_1.transfer)({
41
+ configs: this.config,
42
+ params: params,
43
+ endPoint: this.routes.transfer(),
44
+ });
45
+ }
46
+ /**
47
+ * Retrieves the status of a transfer.
48
+ *
49
+ * @param {GetTransferStatusRequest} params - The parameters for retrieving the transfer status.
50
+ * @return {Promise<GetTransferStatusResponse>} - The method response containing the status and transfer status response.
51
+ */
52
+ async getTransferStatus(params) {
53
+ return await (0, get_transfer_status_1.getTransferStatus)({
54
+ configs: this.config,
55
+ params: params,
56
+ endPoint: this.routes.transferStatus(params.messageId),
57
+ });
58
+ }
59
+ }
60
+ exports.DisbursementLive = DisbursementLive;
61
+ //# sourceMappingURL=live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.js","sourceRoot":"","sources":["../../../../../../src/disbursements/implementations/src/live.ts"],"names":[],"mappings":";;;AAAA,wDAImC;AACnC,8EAG8C;AAC9C,gDAA6C;AAK7C,8EAI8C;AAE9C;;;GAGG;AACH,MAAa,gBAAgB;IAG3B;;;;OAIG;IACH,YAAY,MAAiC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB;QACrB,OAAO,MAAM,IAAA,uCAAiB,EAAC;YAC7B,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAuB;QACpC,OAAO,MAAM,IAAA,mBAAQ,EAAC;YACpB,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB,CACrB,MAAgC;QAEhC,OAAO,MAAM,IAAA,uCAAiB,EAAC;YAC7B,OAAO,EAAE,IAAI,CAAC,MAAM;YACpB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC;SACvD,CAAC,CAAC;IACL,CAAC;CACF;AAtDD,4CAsDC"}
@@ -0,0 +1,40 @@
1
+ import { TransferResponse } from '../../operations/transfer';
2
+ import { CreateAccessTokenResponse } from '../../operations/create_access_token';
3
+ import { Routes } from '../../routes/routes';
4
+ import { DisbursementInterface, DisbursementServiceConfig } from '../disbursement_service';
5
+ import { GetTransferStatusResponse } from '../../operations/get_transfer_status';
6
+ /**
7
+ * Orange Money API Fake Disbursement.
8
+ * @class
9
+ */
10
+ export declare class DisbursementFake implements DisbursementInterface {
11
+ protected readonly config: DisbursementServiceConfig;
12
+ protected readonly routes: Routes;
13
+ /**
14
+ * Constructs a new {Disbursement}.
15
+ * @constructor
16
+ * @param {DisbursementServiceConfig} config - The required global route configuration.
17
+ */
18
+ constructor(config: DisbursementServiceConfig);
19
+ /**
20
+ * Creates an access token.
21
+ *
22
+ * @return {Promise<CreateAccessTokenResponse>} The method response containing a string and a token.
23
+ */
24
+ createAccessToken(): Promise<CreateAccessTokenResponse>;
25
+ /**
26
+ * Transfers the specified amount of money from one account to another.
27
+ *
28
+ * @param {TransferRequest} params - The parameters for the transfer.
29
+ * @return {Promise<TransferResponse>} - The response from the transfer method.
30
+ */
31
+ transfer(): Promise<TransferResponse>;
32
+ /**
33
+ * Retrieves the status of a transfer.
34
+ *
35
+ * @param {GetTransferStatusRequest} params - The parameters for retrieving the transfer status.
36
+ * @return {Promise<GetTransferStatusResponse>} - The method response containing the status and transfer status response.
37
+ */
38
+ getTransferStatus(): Promise<GetTransferStatusResponse>;
39
+ }
40
+ //# sourceMappingURL=sandbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../../../../src/disbursements/implementations/src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,yBAAyB,EAC1B,MAAM,sCAAsC,CAAC;AAM9C;;;GAGG;AACH,qBAAa,gBAAiB,YAAW,qBAAqB;IAC5D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IACrD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAClC;;;;OAIG;gBACS,MAAM,EAAE,yBAAyB;IAK7C;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAW7D;;;;;OAKG;IACG,QAAQ,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAwB3C;;;;;OAKG;IACG,iBAAiB,IAAI,OAAO,CAAC,yBAAyB,CAAC;CAsC9D"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DisbursementFake = void 0;
4
+ const routes_1 = require("../../routes/routes");
5
+ const get_transfer_status_1 = require("../../operations/get_transfer_status");
6
+ const status_1 = require("../../utils/status");
7
+ /**
8
+ * Orange Money API Fake Disbursement.
9
+ * @class
10
+ */
11
+ class DisbursementFake {
12
+ /**
13
+ * Constructs a new {Disbursement}.
14
+ * @constructor
15
+ * @param {DisbursementServiceConfig} config - The required global route configuration.
16
+ */
17
+ constructor(config) {
18
+ this.routes = new routes_1.Routes();
19
+ this.config = config;
20
+ }
21
+ /**
22
+ * Creates an access token.
23
+ *
24
+ * @return {Promise<CreateAccessTokenResponse>} The method response containing a string and a token.
25
+ */
26
+ async createAccessToken() {
27
+ return {
28
+ data: 'accessToken',
29
+ raw: {
30
+ access_token: 'accessToken',
31
+ token_type: 'Bearer',
32
+ expires_in: '300',
33
+ },
34
+ };
35
+ }
36
+ /**
37
+ * Transfers the specified amount of money from one account to another.
38
+ *
39
+ * @param {TransferRequest} params - The parameters for the transfer.
40
+ * @return {Promise<TransferResponse>} - The response from the transfer method.
41
+ */
42
+ async transfer() {
43
+ return {
44
+ data: 'f7ec5a39-b1ad-4fa5-a734-60ab4217ba75',
45
+ raw: {
46
+ MD5OfMessageBody: '4b55cf6629b5f0ee3c8ac91435a2eb35',
47
+ MD5OfMessageAttributes: '50e3084aee2bf840dd63b6bbf0a62fa9',
48
+ MessageId: 'f7ec5a39-b1ad-4fa5-a734-60ab4217ba75',
49
+ ResponseMetadata: {
50
+ RequestId: 'bbb43d42-95d1-5a6b-92a7-60c0d420e103',
51
+ HTTPStatusCode: 200,
52
+ HTTPHeaders: {
53
+ 'x-amzn-requestid': 'bbb43d42-95d1-5a6b-92a7-60c0d420e103',
54
+ 'x-amzn-trace-id': 'Root=1-65083fb1-37fbf881380338ed3b5fcd2b;Parent=6bfc3c24556c9b27;Sampled=0;Lineage=79e6faf7:0',
55
+ date: 'Mon, 18 Sep 2023 12:16:49 GMT',
56
+ 'content-type': 'text/xml',
57
+ 'content-length': '459',
58
+ },
59
+ RetryAttempts: 0,
60
+ },
61
+ },
62
+ };
63
+ }
64
+ /**
65
+ * Retrieves the status of a transfer.
66
+ *
67
+ * @param {GetTransferStatusRequest} params - The parameters for retrieving the transfer status.
68
+ * @return {Promise<GetTransferStatusResponse>} - The method response containing the status and transfer status response.
69
+ */
70
+ async getTransferStatus() {
71
+ return {
72
+ data: {
73
+ status: status_1.DisbursementStatus.succeeded,
74
+ refundStep: get_transfer_status_1.DisbursementStep.TransferSent,
75
+ },
76
+ raw: {
77
+ result: {
78
+ message: 'Cash in performed successfully',
79
+ data: {
80
+ subscriberMsisdn: 'subscriberMsisdn',
81
+ channelUserMsisdn: 'channelUserMsisdn',
82
+ createtime: '1695039280',
83
+ amount: 100,
84
+ payToken: 'C2C2309183CB702A1CBB39ECE32C',
85
+ txnid: 'PP230918.1314.B57973',
86
+ txnmode: 'refundYNote',
87
+ txnstatus: '00068',
88
+ orderId: 'refundYNote',
89
+ status: status_1.DisbursementApiRawStatus.succeeded,
90
+ description: 'Remboursement Fond',
91
+ },
92
+ },
93
+ parameters: {
94
+ amount: '100',
95
+ xauth: 'WU5PVEVIRUFEOllOT1RFSEVBRDIwMjA=',
96
+ channel_user_msisdn: 'channel_user_msisdn',
97
+ customer_key: 'customer_key',
98
+ customer_secret: 'customer_secret',
99
+ final_customer_name: 'Steve',
100
+ final_customer_phone: '692232239',
101
+ },
102
+ CreateAt: '09-18-2023 12:14:43',
103
+ MessageId: 'caee8310-02fa-45da-9b22-a1effcada25c',
104
+ RefundStep: get_transfer_status_1.DisbursementStep.TransferSent,
105
+ },
106
+ };
107
+ }
108
+ }
109
+ exports.DisbursementFake = DisbursementFake;
110
+ //# sourceMappingURL=sandbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../../../../src/disbursements/implementations/src/sandbox.ts"],"names":[],"mappings":";;;AAEA,gDAA6C;AAK7C,8EAG8C;AAC9C,+CAG4B;AAE5B;;;GAGG;AACH,MAAa,gBAAgB;IAG3B;;;;OAIG;IACH,YAAY,MAAiC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB;QACrB,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,GAAG,EAAE;gBACH,YAAY,EAAE,aAAa;gBAC3B,UAAU,EAAE,QAAQ;gBACpB,UAAU,EAAE,KAAK;aAClB;SACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ;QACZ,OAAO;YACL,IAAI,EAAE,sCAAsC;YAC5C,GAAG,EAAE;gBACH,gBAAgB,EAAE,kCAAkC;gBACpD,sBAAsB,EAAE,kCAAkC;gBAC1D,SAAS,EAAE,sCAAsC;gBACjD,gBAAgB,EAAE;oBAChB,SAAS,EAAE,sCAAsC;oBACjD,cAAc,EAAE,GAAG;oBACnB,WAAW,EAAE;wBACX,kBAAkB,EAAE,sCAAsC;wBAC1D,iBAAiB,EACf,+FAA+F;wBACjG,IAAI,EAAE,+BAA+B;wBACrC,cAAc,EAAE,UAAU;wBAC1B,gBAAgB,EAAE,KAAK;qBACxB;oBACD,aAAa,EAAE,CAAC;iBACjB;aACF;SACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,iBAAiB;QACrB,OAAO;YACL,IAAI,EAAE;gBACJ,MAAM,EAAE,2BAAkB,CAAC,SAAS;gBACpC,UAAU,EAAE,sCAAgB,CAAC,YAAY;aAC1C;YACD,GAAG,EAAE;gBACH,MAAM,EAAE;oBACN,OAAO,EAAE,gCAAgC;oBACzC,IAAI,EAAE;wBACJ,gBAAgB,EAAE,kBAAkB;wBACpC,iBAAiB,EAAE,mBAAmB;wBACtC,UAAU,EAAE,YAAY;wBACxB,MAAM,EAAE,GAAG;wBACX,QAAQ,EAAE,8BAA8B;wBACxC,KAAK,EAAE,sBAAsB;wBAC7B,OAAO,EAAE,aAAa;wBACtB,SAAS,EAAE,OAAO;wBAClB,OAAO,EAAE,aAAa;wBACtB,MAAM,EAAE,iCAAwB,CAAC,SAAS;wBAC1C,WAAW,EAAE,oBAAoB;qBAClC;iBACF;gBACD,UAAU,EAAE;oBACV,MAAM,EAAE,KAAK;oBACb,KAAK,EAAE,kCAAkC;oBACzC,mBAAmB,EAAE,qBAAqB;oBAC1C,YAAY,EAAE,cAAc;oBAC5B,eAAe,EAAE,iBAAiB;oBAClC,mBAAmB,EAAE,OAAO;oBAC5B,oBAAoB,EAAE,WAAW;iBAClC;gBACD,QAAQ,EAAE,qBAAqB;gBAC/B,SAAS,EAAE,sCAAsC;gBACjD,UAAU,EAAE,sCAAgB,CAAC,YAAY;aAC1C;SACF,CAAC;IACJ,CAAC;CACF;AAvGD,4CAuGC"}
@@ -0,0 +1,28 @@
1
+ import { OperationResponse } from '../../common/utils/operation_response';
2
+ import { DisbursementServiceConfig } from '../implementations/disbursement_service';
3
+ export declare type Token = {
4
+ /**
5
+ * The requested token.
6
+ */
7
+ access_token: string;
8
+ scope?: string;
9
+ /**
10
+ * The type of the requested token.
11
+ */
12
+ token_type: string;
13
+ /** The time to live in seconds. */
14
+ expires_in: string;
15
+ };
16
+ export declare type CreateAccessTokenResponse = OperationResponse<string, Token>;
17
+ /**
18
+ * Creates an access token.
19
+ *
20
+ * @param {CreateAccessTokenRequest} configs - The disbursement service config.
21
+ * @param {string} endPoint - The end point.
22
+ * @return {CreateAccessTokenResponse} The method response containing the access token and raw response.
23
+ */
24
+ export declare function createAccessToken({ configs, endPoint, }: {
25
+ configs: DisbursementServiceConfig;
26
+ endPoint: string;
27
+ }): Promise<CreateAccessTokenResponse>;
28
+ //# sourceMappingURL=create_access_token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_access_token.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/operations/create_access_token.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EACL,yBAAyB,EAE1B,MAAM,yCAAyC,CAAC;AAEjD,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,yBAAyB,GAAG,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEzE;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,QAAQ,GACT,EAAE;IACD,OAAO,EAAE,yBAAyB,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAsCrC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAccessToken = void 0;
4
+ const https_1 = require("../../common/utils/https");
5
+ const disbursement_service_1 = require("../implementations/disbursement_service");
6
+ /**
7
+ * Creates an access token.
8
+ *
9
+ * @param {CreateAccessTokenRequest} configs - The disbursement service config.
10
+ * @param {string} endPoint - The end point.
11
+ * @return {CreateAccessTokenResponse} The method response containing the access token and raw response.
12
+ */
13
+ async function createAccessToken({ configs, endPoint, }) {
14
+ const logger = configs.logger;
15
+ logger.info('createAccessToken is running ...');
16
+ const { error: configsValidationError, value: configValues } = disbursement_service_1.DisbursementServiceConfigSchema.validate(configs);
17
+ if (configsValidationError) {
18
+ logger.error(`Invalid DisbursementServiceConfig request parameters. params : ${JSON.stringify(configsValidationError.details)}`);
19
+ return { error: configsValidationError.details };
20
+ }
21
+ const authorization = (0, https_1.hash)(configValues.clientId, configValues.clientSecret);
22
+ const headers = {
23
+ 'Content-Type': 'application/x-www-form-urlencoded',
24
+ Authorization: `Basic ${authorization}`,
25
+ };
26
+ const body = (0, https_1.encodeDataToXFormUrl)({
27
+ grant_type: 'client_credentials',
28
+ });
29
+ const response = await (0, https_1.postRequest)({
30
+ logger: logger,
31
+ route: endPoint,
32
+ data: body,
33
+ headers: headers,
34
+ rejectUnauthorized: false,
35
+ });
36
+ if (!response.response) {
37
+ return { error: response.error };
38
+ }
39
+ return {
40
+ data: response.response.data.access_token,
41
+ raw: response.response.data,
42
+ };
43
+ }
44
+ exports.createAccessToken = createAccessToken;
45
+ //# sourceMappingURL=create_access_token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_access_token.js","sourceRoot":"","sources":["../../../../../src/disbursements/operations/create_access_token.ts"],"names":[],"mappings":";;;AAAA,oDAKkC;AAElC,kFAGiD;AAqBjD;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CAAC,EACtC,OAAO,EACP,QAAQ,GAIT;IACC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;IAChD,MAAM,EAAE,KAAK,EAAE,sBAAsB,EAAE,KAAK,EAAE,YAAY,EAAE,GAC1D,sDAA+B,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAEpD,IAAI,sBAAsB,EAAE;QAC1B,MAAM,CAAC,KAAK,CACV,kEAAkE,IAAI,CAAC,SAAS,CAC9E,sBAAsB,CAAC,OAAO,CAC/B,EAAE,CACJ,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,sBAAsB,CAAC,OAAO,EAAE,CAAC;KAClD;IACD,MAAM,aAAa,GAAG,IAAA,YAAI,EAAC,YAAY,CAAC,QAAQ,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IAC7E,MAAM,OAAO,GAAG;QACd,cAAc,EAAE,mCAAmC;QACnD,aAAa,EAAE,SAAS,aAAa,EAAE;KACxC,CAAC;IACF,MAAM,IAAI,GAAG,IAAA,4BAAoB,EAAC;QAChC,UAAU,EAAE,oBAAoB;KACjC,CAAC,CAAC;IACH,MAAM,QAAQ,GAA2B,MAAM,IAAA,mBAAW,EAAQ;QAChE,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,OAAO;QAChB,kBAAkB,EAAE,KAAK;KAC1B,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACtB,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;KAClC;IAED,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY;QACzC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI;KAC5B,CAAC;AACJ,CAAC;AA5CD,8CA4CC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=create_access_token.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_access_token.spec.d.ts","sourceRoot":"","sources":["../../../../../src/disbursements/operations/create_access_token.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,106 @@
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 axios_1 = require("axios");
27
+ const logging_1 = require("../../../../logging/src/logging");
28
+ const requests = __importStar(require("../../common/utils/https"));
29
+ const constants_1 = require("../utils/constants");
30
+ const create_access_token_1 = require("./create_access_token");
31
+ describe('createAccessToken', () => {
32
+ it('Should fail on invalid parameter', async () => {
33
+ const result = await (0, create_access_token_1.createAccessToken)({
34
+ endPoint: '',
35
+ configs: {
36
+ channelUserMsisdn: '',
37
+ clientId: '',
38
+ clientSecret: '',
39
+ customerKey: '',
40
+ customerSecret: '',
41
+ pin: '',
42
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
43
+ logger: new logging_1.Logger(),
44
+ },
45
+ });
46
+ expect(result.data).toBeUndefined();
47
+ });
48
+ it('Should fail on request rejection', async () => {
49
+ const errorMessage = 'mock reject the request';
50
+ const postSpy = jest
51
+ .spyOn(requests, 'postRequest')
52
+ .mockImplementation()
53
+ .mockResolvedValue({ error: new axios_1.AxiosError(errorMessage) });
54
+ const result = await (0, create_access_token_1.createAccessToken)({
55
+ endPoint: 'https://route.com/link',
56
+ configs: {
57
+ channelUserMsisdn: '237699947943',
58
+ clientId: 'clientId',
59
+ clientSecret: 'clientSecret',
60
+ customerKey: 'customerKey',
61
+ customerSecret: 'customerSecret',
62
+ pin: 'pin',
63
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
64
+ logger: new logging_1.Logger(),
65
+ },
66
+ });
67
+ expect(postSpy).toHaveBeenCalledTimes(1);
68
+ expect(result.data).toBeUndefined();
69
+ expect(result.error).toBeDefined();
70
+ postSpy.mockRestore();
71
+ });
72
+ it('Should successfully retrieve token', async () => {
73
+ const accessToken = 'THEaCCESStOKEN';
74
+ const postSpy = jest
75
+ .spyOn(requests, 'postRequest')
76
+ .mockImplementation()
77
+ .mockResolvedValue({
78
+ response: {
79
+ data: {
80
+ access_token: accessToken,
81
+ },
82
+ },
83
+ });
84
+ const result = await (0, create_access_token_1.createAccessToken)({
85
+ endPoint: 'https://route.com/link',
86
+ configs: {
87
+ channelUserMsisdn: '237699947943',
88
+ clientId: 'clientId',
89
+ clientSecret: 'clientSecret',
90
+ customerKey: 'customerKey',
91
+ customerSecret: 'customerSecret',
92
+ pin: 'pin',
93
+ environment: constants_1.DisbursementXTargetEnvironmentType.sandbox,
94
+ logger: new logging_1.Logger(),
95
+ },
96
+ });
97
+ expect(postSpy).toHaveBeenCalledTimes(1);
98
+ expect(result.error).toBeUndefined();
99
+ expect(result.raw).toEqual({
100
+ access_token: accessToken,
101
+ });
102
+ expect(result.data).toBe(accessToken);
103
+ postSpy.mockRestore();
104
+ });
105
+ });
106
+ //# sourceMappingURL=create_access_token.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create_access_token.spec.js","sourceRoot":"","sources":["../../../../../src/disbursements/operations/create_access_token.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAkD;AAClD,6DAAyD;AACzD,mEAAqD;AACrD,kDAAwE;AACxE,+DAAiE;AAEjE,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,MAAM,GAAG,MAAM,IAAA,uCAAiB,EAAC;YACrC,QAAQ,EAAE,EAAE;YACZ,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;SACF,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,YAAY,GAAG,yBAAyB,CAAC;QAC/C,MAAM,OAAO,GAAG,IAAI;aACjB,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC;aAC9B,kBAAkB,EAAE;aACpB,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,kBAAU,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAE9D,MAAM,MAAM,GAAG,MAAM,IAAA,uCAAiB,EAAC;YACrC,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE;gBACP,iBAAiB,EAAE,cAAc;gBACjC,QAAQ,EAAE,UAAU;gBACpB,YAAY,EAAE,cAAc;gBAC5B,WAAW,EAAE,aAAa;gBAC1B,cAAc,EAAE,gBAAgB;gBAChC,GAAG,EAAE,KAAK;gBACV,WAAW,EAAE,8CAAkC,CAAC,OAAO;gBACvD,MAAM,EAAE,IAAI,gBAAM,EAAE;aACrB;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,CAAC;QACpC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;QACnC,OAAO,CAAC,WAAW,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,KAAK,IAAI,EAAE;QAClD,MAAM,WAAW,GAAG,gBAAgB,CAAC;QACrC,MAAM,OAAO,GAAG,IAAI;aACjB,KAAK,CAAC,QAAQ,EAAE,aAAa,CAAC;aAC9B,kBAAkB,EAAE;aACpB,iBAAiB,CAAC;YACjB,QAAQ,EAAwB;gBAC9B,IAAI,EAAE;oBACJ,YAAY,EAAE,WAAW;iBAC1B;aACF;SACF,CAAC,CAAC;QAEL,MAAM,MAAM,GAAG,MAAM,IAAA,uCAAiB,EAAC;YACrC,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE;gBACP,iBAAiB,EAAE,cAAc;gBACjC,QAAQ,EAAE,UAAU;gBACpB,YAAY,EAAE,cAAc;gBAC5B,WAAW,EAAE,aAAa;gBAC1B,cAAc,EAAE,gBAAgB;gBAChC,GAAG,EAAE,KAAK;gBACV,WAAW,EAAE,8CAAkC,CAAC,OAAO;gBACvD,MAAM,EAAE,IAAI,gBAAM,EAAE;aACrB;SACF,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC;YACzB,YAAY,EAAE,WAAW;SAC1B,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACtC,OAAO,CAAC,WAAW,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}