@mojaloop/sdk-scheme-adapter 11.18.8

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 (277) hide show
  1. package/.env.example +140 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc.json +30 -0
  4. package/.nvmrc +1 -0
  5. package/.versionrc +15 -0
  6. package/CHANGELOG.md +118 -0
  7. package/InboundServer/api.yaml +3594 -0
  8. package/InboundServer/api_template.yaml +69 -0
  9. package/InboundServer/handlers.js +940 -0
  10. package/InboundServer/index.js +205 -0
  11. package/InboundServer/middlewares.js +426 -0
  12. package/OAuthTestServer/index.js +66 -0
  13. package/OAuthTestServer/model.js +70 -0
  14. package/OutboundServer/api.yaml +2732 -0
  15. package/OutboundServer/api_interfaces/index.d.ts +117 -0
  16. package/OutboundServer/api_interfaces/openapi.d.ts +1475 -0
  17. package/OutboundServer/api_template/components/parameters/bulkQuoteId.yaml +9 -0
  18. package/OutboundServer/api_template/components/parameters/bulkTransferId.yaml +9 -0
  19. package/OutboundServer/api_template/components/parameters/requestToPayTransactionId.yaml +9 -0
  20. package/OutboundServer/api_template/components/parameters/transferId.yaml +9 -0
  21. package/OutboundServer/api_template/components/responses/accountsCreationCompleted.yaml +5 -0
  22. package/OutboundServer/api_template/components/responses/accountsCreationError.yaml +5 -0
  23. package/OutboundServer/api_template/components/responses/accountsCreationTimeout.yaml +5 -0
  24. package/OutboundServer/api_template/components/responses/authorizationPostSuccess.yaml +5 -0
  25. package/OutboundServer/api_template/components/responses/authorizationsServerError.yaml +5 -0
  26. package/OutboundServer/api_template/components/responses/bulkQuoteBadRequest.yaml +5 -0
  27. package/OutboundServer/api_template/components/responses/bulkQuoteServerError.yaml +5 -0
  28. package/OutboundServer/api_template/components/responses/bulkQuoteSuccess.yaml +5 -0
  29. package/OutboundServer/api_template/components/responses/bulkQuoteTimeout.yaml +5 -0
  30. package/OutboundServer/api_template/components/responses/bulkTransferBadRequest.yaml +5 -0
  31. package/OutboundServer/api_template/components/responses/bulkTransferServerError.yaml +5 -0
  32. package/OutboundServer/api_template/components/responses/bulkTransferSuccess.yaml +5 -0
  33. package/OutboundServer/api_template/components/responses/bulkTransferTimeout.yaml +5 -0
  34. package/OutboundServer/api_template/components/responses/partiesByIdError404.yaml +9 -0
  35. package/OutboundServer/api_template/components/responses/partiesByIdSuccess.yaml +5 -0
  36. package/OutboundServer/api_template/components/responses/quotesPostSuccess.yaml +5 -0
  37. package/OutboundServer/api_template/components/responses/quotesServerError.yaml +5 -0
  38. package/OutboundServer/api_template/components/responses/requestToPaySuccess.yaml +5 -0
  39. package/OutboundServer/api_template/components/responses/requestToPayTransferBadRequest.yaml +5 -0
  40. package/OutboundServer/api_template/components/responses/requestToPayTransferSuccess.yaml +5 -0
  41. package/OutboundServer/api_template/components/responses/simpleTransfersPostSuccess.yaml +5 -0
  42. package/OutboundServer/api_template/components/responses/simpleTransfersServerError.yaml +5 -0
  43. package/OutboundServer/api_template/components/responses/transferBadRequest.yaml +5 -0
  44. package/OutboundServer/api_template/components/responses/transferServerError.yaml +5 -0
  45. package/OutboundServer/api_template/components/responses/transferSuccess.yaml +5 -0
  46. package/OutboundServer/api_template/components/responses/transferTimeout.yaml +5 -0
  47. package/OutboundServer/api_template/components/schemas/accountCreationStatus.yaml +18 -0
  48. package/OutboundServer/api_template/components/schemas/accountsCreationState.yaml +4 -0
  49. package/OutboundServer/api_template/components/schemas/accountsRequest.yaml +20 -0
  50. package/OutboundServer/api_template/components/schemas/accountsResponse.yaml +15 -0
  51. package/OutboundServer/api_template/components/schemas/async2SyncCurrentState.yaml +5 -0
  52. package/OutboundServer/api_template/components/schemas/authorizationsPostRequest.yaml +15 -0
  53. package/OutboundServer/api_template/components/schemas/authorizationsPostResponse.yaml +19 -0
  54. package/OutboundServer/api_template/components/schemas/bulkQuoteErrorResponse.yaml +8 -0
  55. package/OutboundServer/api_template/components/schemas/bulkQuoteRequest.yaml +26 -0
  56. package/OutboundServer/api_template/components/schemas/bulkQuoteResponse.yaml +21 -0
  57. package/OutboundServer/api_template/components/schemas/bulkQuoteStatus.yaml +4 -0
  58. package/OutboundServer/api_template/components/schemas/bulkQuoteStatusResponse.yaml +17 -0
  59. package/OutboundServer/api_template/components/schemas/bulkTransferErrorResponse.yaml +8 -0
  60. package/OutboundServer/api_template/components/schemas/bulkTransferRequest.yaml +26 -0
  61. package/OutboundServer/api_template/components/schemas/bulkTransferResponse.yaml +16 -0
  62. package/OutboundServer/api_template/components/schemas/bulkTransferStatus.yaml +4 -0
  63. package/OutboundServer/api_template/components/schemas/bulkTransferStatusResponse.yaml +17 -0
  64. package/OutboundServer/api_template/components/schemas/errorAccountsResponse.yaml +8 -0
  65. package/OutboundServer/api_template/components/schemas/errorAuthorizationsResponse.yaml +3 -0
  66. package/OutboundServer/api_template/components/schemas/errorQuotesResponse.yaml +9 -0
  67. package/OutboundServer/api_template/components/schemas/errorResponse.yaml +8 -0
  68. package/OutboundServer/api_template/components/schemas/errorSimpleTransfersResponse.yaml +3 -0
  69. package/OutboundServer/api_template/components/schemas/errorTransferResponse.yaml +8 -0
  70. package/OutboundServer/api_template/components/schemas/extensionListEmptiable.yaml +6 -0
  71. package/OutboundServer/api_template/components/schemas/individualQuote.yaml +32 -0
  72. package/OutboundServer/api_template/components/schemas/individualQuoteResult.yaml +28 -0
  73. package/OutboundServer/api_template/components/schemas/individualTransfer.yaml +32 -0
  74. package/OutboundServer/api_template/components/schemas/individualTransferFulfilment.yaml +13 -0
  75. package/OutboundServer/api_template/components/schemas/individualTransferResult.yaml +41 -0
  76. package/OutboundServer/api_template/components/schemas/mojaloopError.yaml +5 -0
  77. package/OutboundServer/api_template/components/schemas/mojaloopTransactionRequestState.yaml +2 -0
  78. package/OutboundServer/api_template/components/schemas/partiesByIdResponse.yaml +13 -0
  79. package/OutboundServer/api_template/components/schemas/quote.yaml +3 -0
  80. package/OutboundServer/api_template/components/schemas/quoteError.yaml +16 -0
  81. package/OutboundServer/api_template/components/schemas/quotesPostRequest.yaml +13 -0
  82. package/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +48 -0
  83. package/OutboundServer/api_template/components/schemas/requestToPayRequest.yaml +39 -0
  84. package/OutboundServer/api_template/components/schemas/requestToPayResponse.yaml +41 -0
  85. package/OutboundServer/api_template/components/schemas/requestToPayTransferRequest.yaml +42 -0
  86. package/OutboundServer/api_template/components/schemas/requestToPayTransferResponse.yaml +58 -0
  87. package/OutboundServer/api_template/components/schemas/simpleTransferServerError.yaml +5 -0
  88. package/OutboundServer/api_template/components/schemas/simpleTransfersPostRequest.yaml +12 -0
  89. package/OutboundServer/api_template/components/schemas/simpleTransfersPostResponse.yaml +11 -0
  90. package/OutboundServer/api_template/components/schemas/transactionType.yaml +4 -0
  91. package/OutboundServer/api_template/components/schemas/transferContinuationAcceptOTP.yaml +9 -0
  92. package/OutboundServer/api_template/components/schemas/transferContinuationAcceptParty.yaml +8 -0
  93. package/OutboundServer/api_template/components/schemas/transferContinuationAcceptQuote.yaml +9 -0
  94. package/OutboundServer/api_template/components/schemas/transferError.yaml +16 -0
  95. package/OutboundServer/api_template/components/schemas/transferFulfilment.yaml +3 -0
  96. package/OutboundServer/api_template/components/schemas/transferParty.yaml +40 -0
  97. package/OutboundServer/api_template/components/schemas/transferRequest.yaml +37 -0
  98. package/OutboundServer/api_template/components/schemas/transferResponse.yaml +58 -0
  99. package/OutboundServer/api_template/components/schemas/transferStatus.yaml +6 -0
  100. package/OutboundServer/api_template/components/schemas/transferStatusResponse.yaml +13 -0
  101. package/OutboundServer/api_template/health.yaml +12 -0
  102. package/OutboundServer/api_template/openapi.yaml +55 -0
  103. package/OutboundServer/api_template/paths/accounts.yaml +26 -0
  104. package/OutboundServer/api_template/paths/authorizations.yaml +19 -0
  105. package/OutboundServer/api_template/paths/bulkQuotes.yaml +23 -0
  106. package/OutboundServer/api_template/paths/bulkQuotes_bulkQuoteId.yaml +24 -0
  107. package/OutboundServer/api_template/paths/bulkTransfers.yaml +23 -0
  108. package/OutboundServer/api_template/paths/bulkTransfers_bulkTransferId.yaml +24 -0
  109. package/OutboundServer/api_template/paths/parties_Type_ID.yaml +20 -0
  110. package/OutboundServer/api_template/paths/parties_Type_ID_SubId.yaml +22 -0
  111. package/OutboundServer/api_template/paths/quotes.yaml +20 -0
  112. package/OutboundServer/api_template/paths/requestToPay.yaml +22 -0
  113. package/OutboundServer/api_template/paths/requestToPayTransfer.yaml +57 -0
  114. package/OutboundServer/api_template/paths/requestToPayTransfer_requestToPayTransactionId.yaml +34 -0
  115. package/OutboundServer/api_template/paths/simpleTransfers.yaml +19 -0
  116. package/OutboundServer/api_template/paths/transfers.yaml +55 -0
  117. package/OutboundServer/api_template/paths/transfers_transferId.yaml +58 -0
  118. package/OutboundServer/handlers.js +622 -0
  119. package/OutboundServer/index.js +137 -0
  120. package/OutboundServer/middlewares.js +67 -0
  121. package/TestServer/api.yaml +62 -0
  122. package/TestServer/handlers.js +63 -0
  123. package/TestServer/index.js +215 -0
  124. package/audit-resolve.json +65 -0
  125. package/babel.config.js +3 -0
  126. package/config.js +158 -0
  127. package/index.d.ts +1 -0
  128. package/index.js +149 -0
  129. package/jest.config.js +15 -0
  130. package/lib/api/index.js +12 -0
  131. package/lib/cache.js +352 -0
  132. package/lib/check.js +25 -0
  133. package/lib/model/AccountsModel.js +396 -0
  134. package/lib/model/Async2SyncModel.js +283 -0
  135. package/lib/model/AuthorizationsModel.js +86 -0
  136. package/lib/model/InboundTransfersModel.js +730 -0
  137. package/lib/model/OutboundBulkQuotesModel.js +485 -0
  138. package/lib/model/OutboundBulkTransfersModel.js +479 -0
  139. package/lib/model/OutboundRequestToPayModel.js +517 -0
  140. package/lib/model/OutboundRequestToPayTransferModel.js +893 -0
  141. package/lib/model/OutboundTransfersModel.js +823 -0
  142. package/lib/model/PartiesModel.js +70 -0
  143. package/lib/model/ProxyModel/MatchRules/Expression.js +48 -0
  144. package/lib/model/ProxyModel/MatchRules/Headers.js +65 -0
  145. package/lib/model/ProxyModel/MatchRules/MatchRule.js +27 -0
  146. package/lib/model/ProxyModel/MatchRules/Path.js +36 -0
  147. package/lib/model/ProxyModel/MatchRules/Query.js +65 -0
  148. package/lib/model/ProxyModel/MatchRules/index.js +19 -0
  149. package/lib/model/ProxyModel/Route.js +82 -0
  150. package/lib/model/ProxyModel/configSchema.json +118 -0
  151. package/lib/model/ProxyModel/index.js +138 -0
  152. package/lib/model/QuotesModel.js +94 -0
  153. package/lib/model/TransfersModel.js +81 -0
  154. package/lib/model/common/BackendError.js +26 -0
  155. package/lib/model/common/PersistentStateMachine.js +93 -0
  156. package/lib/model/common/index.js +18 -0
  157. package/lib/model/index.js +43 -0
  158. package/lib/model/lib/deferredJob.js +113 -0
  159. package/lib/model/lib/index.js +9 -0
  160. package/lib/model/lib/requests/backendRequests.js +227 -0
  161. package/lib/model/lib/requests/common.js +76 -0
  162. package/lib/model/lib/requests/index.js +19 -0
  163. package/lib/model/lib/shared.js +468 -0
  164. package/lib/randomphrase/index.js +21 -0
  165. package/lib/randomphrase/words.json +3397 -0
  166. package/lib/router.js +28 -0
  167. package/lib/validate.js +205 -0
  168. package/package.json +102 -0
  169. package/test/__mocks__/@mojaloop/sdk-standard-components.js +152 -0
  170. package/test/__mocks__/javascript-state-machine.js +21 -0
  171. package/test/__mocks__/redis.js +49 -0
  172. package/test/__mocks__/uuidv4.js +16 -0
  173. package/test/config/integration.env +136 -0
  174. package/test/integration/lib/Outbound/authorizations.test.js +58 -0
  175. package/test/integration/lib/Outbound/data/authorizationsPostRequest.json +43 -0
  176. package/test/integration/lib/Outbound/data/quotesPostRequest.json +52 -0
  177. package/test/integration/lib/Outbound/data/transfersPostRequest.json +24 -0
  178. package/test/integration/lib/Outbound/parties.test.js +28 -0
  179. package/test/integration/lib/Outbound/quotes.test.js +58 -0
  180. package/test/integration/lib/Outbound/simpleTransfers.test.js +67 -0
  181. package/test/integration/lib/cache.test.js +80 -0
  182. package/test/integration/testEnv.js +7 -0
  183. package/test/unit/InboundServer.test.js +443 -0
  184. package/test/unit/TestServer.test.js +394 -0
  185. package/test/unit/api/accounts/accounts.test.js +128 -0
  186. package/test/unit/api/accounts/data/postAccountsBody.json +7 -0
  187. package/test/unit/api/accounts/data/postAccountsErrorMojaloopResponse.json +25 -0
  188. package/test/unit/api/accounts/data/postAccountsErrorTimeoutResponse.json +19 -0
  189. package/test/unit/api/accounts/data/postAccountsSuccessResponse.json +17 -0
  190. package/test/unit/api/accounts/data/postAccountsSuccessResponseWithError1.json +21 -0
  191. package/test/unit/api/accounts/data/postAccountsSuccessResponseWithError2.json +21 -0
  192. package/test/unit/api/accounts/utils.js +65 -0
  193. package/test/unit/api/proxy/data/proxyConfig.yaml +82 -0
  194. package/test/unit/api/proxy/data/requestBody.json +22 -0
  195. package/test/unit/api/proxy/data/requestHeaders.json +5 -0
  196. package/test/unit/api/proxy/data/requestQuery.json +6 -0
  197. package/test/unit/api/proxy/data/responseBody.json +21 -0
  198. package/test/unit/api/proxy/data/responseHeaders.json +5 -0
  199. package/test/unit/api/proxy/proxy.test.js +220 -0
  200. package/test/unit/api/proxy/utils.js +79 -0
  201. package/test/unit/api/transfers/data/getTransfersCommittedResponse.json +21 -0
  202. package/test/unit/api/transfers/data/getTransfersErrorNotFound.json +17 -0
  203. package/test/unit/api/transfers/data/postQuotesBody.json +52 -0
  204. package/test/unit/api/transfers/data/postTransfersBadBody.json +17 -0
  205. package/test/unit/api/transfers/data/postTransfersBody.json +24 -0
  206. package/test/unit/api/transfers/data/postTransfersErrorMojaloopResponse.json +53 -0
  207. package/test/unit/api/transfers/data/postTransfersErrorTimeoutResponse.json +47 -0
  208. package/test/unit/api/transfers/data/postTransfersSimpleBody.json +26 -0
  209. package/test/unit/api/transfers/data/postTransfersSuccessResponse.json +101 -0
  210. package/test/unit/api/transfers/data/putPartiesBody.json +20 -0
  211. package/test/unit/api/transfers/data/putQuotesBody.json +37 -0
  212. package/test/unit/api/transfers/data/putTransfersBody.json +17 -0
  213. package/test/unit/api/transfers/transfers.test.js +191 -0
  214. package/test/unit/api/transfers/utils.js +183 -0
  215. package/test/unit/api/utils.js +75 -0
  216. package/test/unit/config.test.js +119 -0
  217. package/test/unit/data/commonHttpHeaders.json +6 -0
  218. package/test/unit/data/defaultConfig.json +58 -0
  219. package/test/unit/data/postQuotesBody.json +52 -0
  220. package/test/unit/data/putParticipantsBody.json +12 -0
  221. package/test/unit/data/putPartiesBody.json +20 -0
  222. package/test/unit/data/testFile.json +29 -0
  223. package/test/unit/data/testFile.yaml +14 -0
  224. package/test/unit/inboundApi/data/mockArguments.json +117 -0
  225. package/test/unit/inboundApi/data/mockTransactionRequest.json +42 -0
  226. package/test/unit/inboundApi/handlers.test.js +799 -0
  227. package/test/unit/index.test.js +55 -0
  228. package/test/unit/lib/cache.test.js +146 -0
  229. package/test/unit/lib/model/AccountsModel.test.js +121 -0
  230. package/test/unit/lib/model/AuthorizationsModel.test.js +460 -0
  231. package/test/unit/lib/model/InboundTransfersModel.test.js +628 -0
  232. package/test/unit/lib/model/OutboundBulkQuotesModel.test.js +249 -0
  233. package/test/unit/lib/model/OutboundBulkTransfersModel.test.js +244 -0
  234. package/test/unit/lib/model/OutboundRequestToPayModel.test.js +166 -0
  235. package/test/unit/lib/model/OutboundRequestToPayTransferModel.test.js +245 -0
  236. package/test/unit/lib/model/OutboundTransfersModel.test.js +836 -0
  237. package/test/unit/lib/model/PartiesModel.test.js +468 -0
  238. package/test/unit/lib/model/QuotesModel.test.js +470 -0
  239. package/test/unit/lib/model/TransfersModel.test.js +474 -0
  240. package/test/unit/lib/model/common/PersistentStateMachine.test.js +179 -0
  241. package/test/unit/lib/model/data/authorizationsResponse.json +13 -0
  242. package/test/unit/lib/model/data/bulkQuoteRequest.json +27 -0
  243. package/test/unit/lib/model/data/bulkQuoteResponse.json +35 -0
  244. package/test/unit/lib/model/data/bulkTransferFulfil.json +13 -0
  245. package/test/unit/lib/model/data/bulkTransferRequest.json +29 -0
  246. package/test/unit/lib/model/data/defaultConfig.json +47 -0
  247. package/test/unit/lib/model/data/getBulkTransfersBackendResponse.json +42 -0
  248. package/test/unit/lib/model/data/getBulkTransfersMojaloopResponse.json +22 -0
  249. package/test/unit/lib/model/data/getTransfersBackendResponse.json +34 -0
  250. package/test/unit/lib/model/data/getTransfersMojaloopResponse.json +17 -0
  251. package/test/unit/lib/model/data/mockArguments.json +131 -0
  252. package/test/unit/lib/model/data/mockTxnRequestsArguments.json +63 -0
  253. package/test/unit/lib/model/data/notificationToPayee.json +10 -0
  254. package/test/unit/lib/model/data/payeeParty.json +16 -0
  255. package/test/unit/lib/model/data/putAuthorizationsResponse.json +10 -0
  256. package/test/unit/lib/model/data/putQuotesResponse.json +33 -0
  257. package/test/unit/lib/model/data/putTransfersResponse.json +5 -0
  258. package/test/unit/lib/model/data/quoteResponse.json +31 -0
  259. package/test/unit/lib/model/data/requestToPayRequest.json +20 -0
  260. package/test/unit/lib/model/data/requestToPayTransferRequest.json +27 -0
  261. package/test/unit/lib/model/data/transactionRequestResponse.json +18 -0
  262. package/test/unit/lib/model/data/transferFulfil.json +8 -0
  263. package/test/unit/lib/model/data/transferRequest.json +26 -0
  264. package/test/unit/lib/model/mockedLibRequests.js +74 -0
  265. package/test/unit/mockLogger.js +39 -0
  266. package/test/unit/outboundApi/data/bulkQuoteRequest.json +28 -0
  267. package/test/unit/outboundApi/data/bulkTransferRequest.json +28 -0
  268. package/test/unit/outboundApi/data/mockBulkQuoteError.json +45 -0
  269. package/test/unit/outboundApi/data/mockBulkTransferError.json +48 -0
  270. package/test/unit/outboundApi/data/mockError.json +41 -0
  271. package/test/unit/outboundApi/data/mockGetPartiesError.json +4 -0
  272. package/test/unit/outboundApi/data/mockRequestToPayError.json +32 -0
  273. package/test/unit/outboundApi/data/mockRequestToPayTransferError.json +39 -0
  274. package/test/unit/outboundApi/data/requestToPay.json +21 -0
  275. package/test/unit/outboundApi/data/requestToPayTransferRequest.json +20 -0
  276. package/test/unit/outboundApi/data/transferRequest.json +21 -0
  277. package/test/unit/outboundApi/handlers.test.js +986 -0
@@ -0,0 +1,42 @@
1
+ type: object
2
+ required:
3
+ - requestToPayTransactionId
4
+ - from
5
+ - to
6
+ - amountType
7
+ - currency
8
+ - amount
9
+ - scenario
10
+ - initiator
11
+ - initiatorType
12
+ properties:
13
+ requestToPayTransactionId:
14
+ type: string
15
+ description: >-
16
+ Transaction ID from the DFSP backend, used to reconcile transactions
17
+ between the Switch and DFSP backend systems.
18
+ from:
19
+ $ref: ./transferParty.yaml
20
+ to:
21
+ $ref: ./transferParty.yaml
22
+ amountType:
23
+ $ref: >-
24
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/AmountType.yaml
25
+ currency:
26
+ $ref: >-
27
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Currency.yaml
28
+ amount:
29
+ $ref: >-
30
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Amount.yaml
31
+ scenario:
32
+ $ref: >-
33
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransactionType.yaml
34
+ initiator:
35
+ $ref: >-
36
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransactionInitiator.yaml
37
+ initiatorType:
38
+ $ref: >-
39
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransactionInitiatorType.yaml
40
+ note:
41
+ $ref: >-
42
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Note.yaml
@@ -0,0 +1,58 @@
1
+ type: object
2
+ required:
3
+ - requestToPayTransactionId
4
+ - from
5
+ - to
6
+ - amountType
7
+ - currency
8
+ - amount
9
+ - transactionType
10
+ properties:
11
+ transferId:
12
+ $ref: >-
13
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/CorrelationId.yaml
14
+ requestToPayTransactionId:
15
+ type: string
16
+ description: >-
17
+ Transaction ID from the DFSP backend, used to reconcile transactions
18
+ between the Switch and DFSP backend systems.
19
+ from:
20
+ $ref: ./transferParty.yaml
21
+ to:
22
+ $ref: ./transferParty.yaml
23
+ amountType:
24
+ $ref: >-
25
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/AmountType.yaml
26
+ currency:
27
+ $ref: >-
28
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Currency.yaml
29
+ amount:
30
+ $ref: >-
31
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Amount.yaml
32
+ transactionType:
33
+ $ref: ./transactionType.yaml
34
+ note:
35
+ $ref: >-
36
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Note.yaml
37
+ currentState:
38
+ $ref: ./transferStatus.yaml
39
+ quoteId:
40
+ $ref: >-
41
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/CorrelationId.yaml
42
+ quoteResponse:
43
+ $ref: ./quote.yaml
44
+ quoteResponseSource:
45
+ type: string
46
+ description: >
47
+ FSPID of the entity that supplied the quote response. This may not be the
48
+ same as the FSPID of the entity which owns the end user account in the
49
+ case of a FOREX transfer. i.e. it may be a FOREX gateway.
50
+ fulfil:
51
+ $ref: ./transferFulfilment.yaml
52
+ lastError:
53
+ description: >
54
+ Object representing the last error to occur during a transfer process.
55
+ This may be a Mojaloop API error returned from another entity in the
56
+ scheme or an object representing other types of error e.g. exceptions that
57
+ may occur inside the scheme adapter.
58
+ $ref: ./transferError.yaml
@@ -0,0 +1,5 @@
1
+ description: An error occurred processing the simple transfers request
2
+ content:
3
+ application/json:
4
+ schema:
5
+ $ref: ../schemas/errorSimpleTransfersResponse.yaml
@@ -0,0 +1,12 @@
1
+ title: SimpleTransfersPostRequest
2
+ type: object
3
+ properties:
4
+ fspId:
5
+ $ref: >-
6
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/FspId.yaml
7
+ transfersPostRequest:
8
+ $ref: >-
9
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransfersPostRequest.yaml
10
+ required:
11
+ - fspId
12
+ - transfersPostRequest
@@ -0,0 +1,11 @@
1
+ title: SimpleTransfersPostResponse
2
+ type: object
3
+ properties:
4
+ transfer:
5
+ $ref: >-
6
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransfersIDPutResponse.yaml
7
+ currentState:
8
+ $ref: ../schemas/async2SyncCurrentState.yaml
9
+ required:
10
+ - transfer
11
+ - currentState
@@ -0,0 +1,4 @@
1
+ type: string
2
+ enum:
3
+ - TRANSFER
4
+ description: Type of transaction.
@@ -0,0 +1,9 @@
1
+ type: object
2
+ required:
3
+ - acceptOTP
4
+ properties:
5
+ acceptOTP:
6
+ type: boolean
7
+ enum:
8
+ - true
9
+ - false
@@ -0,0 +1,8 @@
1
+ type: object
2
+ required:
3
+ - acceptParty
4
+ properties:
5
+ acceptParty:
6
+ type: boolean
7
+ enum:
8
+ - true
@@ -0,0 +1,9 @@
1
+ type: object
2
+ required:
3
+ - acceptQuote
4
+ properties:
5
+ acceptQuote:
6
+ type: boolean
7
+ enum:
8
+ - true
9
+ - false
@@ -0,0 +1,16 @@
1
+ type: object
2
+ description: >-
3
+ This object represents a Mojaloop API error received at any time during the
4
+ transfer process
5
+ properties:
6
+ httpStatusCode:
7
+ type: integer
8
+ description: >-
9
+ The HTTP status code returned to the caller. This is the same as the
10
+ actual HTTP status code returned with the response.
11
+ mojaloopError:
12
+ description: >-
13
+ If a transfer process results in an error callback during the asynchronous
14
+ Mojaloop API exchange, this property will contain the underlying Mojaloop
15
+ API error object.
16
+ $ref: ./mojaloopError.yaml
@@ -0,0 +1,3 @@
1
+ description: A Mojaloop API transfer fulfilment
2
+ $ref: >-
3
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransfersIDPutResponse.yaml
@@ -0,0 +1,40 @@
1
+ type: object
2
+ required:
3
+ - idType
4
+ - idValue
5
+ properties:
6
+ type:
7
+ $ref: >-
8
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/TransactionInitiatorType.yaml
9
+ idType:
10
+ $ref: >-
11
+ ../../../../node_modules/@mojaloop/api-snippets/thirdparty/openapi3/components/schemas/PartyIdType.yaml
12
+ idValue:
13
+ $ref: >-
14
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/PartyIdentifier.yaml
15
+ idSubValue:
16
+ $ref: >-
17
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/PartySubIdOrType.yaml
18
+ displayName:
19
+ $ref: >-
20
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Name.yaml
21
+ firstName:
22
+ $ref: >-
23
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/FirstName.yaml
24
+ middleName:
25
+ $ref: >-
26
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/MiddleName.yaml
27
+ lastName:
28
+ $ref: >-
29
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/LastName.yaml
30
+ dateOfBirth:
31
+ $ref: >-
32
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/DateOfBirth.yaml
33
+ merchantClassificationCode:
34
+ $ref: >-
35
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/MerchantClassificationCode.yaml
36
+ fspId:
37
+ $ref: >-
38
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/FspId.yaml
39
+ extensionList:
40
+ $ref: ./extensionListEmptiable.yaml
@@ -0,0 +1,37 @@
1
+ type: object
2
+ required:
3
+ - homeTransactionId
4
+ - from
5
+ - to
6
+ - amountType
7
+ - currency
8
+ - amount
9
+ - transactionType
10
+ properties:
11
+ homeTransactionId:
12
+ type: string
13
+ description: >-
14
+ Transaction ID from the DFSP backend, used to reconcile transactions
15
+ between the Switch and DFSP backend systems.
16
+ from:
17
+ $ref: ./transferParty.yaml
18
+ to:
19
+ $ref: ./transferParty.yaml
20
+ amountType:
21
+ $ref: >-
22
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/AmountType.yaml
23
+ currency:
24
+ $ref: >-
25
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Currency.yaml
26
+ amount:
27
+ $ref: >-
28
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Amount.yaml
29
+ transactionType:
30
+ $ref: ./transactionType.yaml
31
+ note:
32
+ $ref: >-
33
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Note.yaml
34
+ quoteRequestExtensions:
35
+ $ref: ./extensionListEmptiable.yaml
36
+ transferRequestExtensions:
37
+ $ref: ./extensionListEmptiable.yaml
@@ -0,0 +1,58 @@
1
+ type: object
2
+ required:
3
+ - homeTransactionId
4
+ - from
5
+ - to
6
+ - amountType
7
+ - currency
8
+ - amount
9
+ - transactionType
10
+ properties:
11
+ transferId:
12
+ $ref: >-
13
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/CorrelationId.yaml
14
+ homeTransactionId:
15
+ type: string
16
+ description: >-
17
+ Transaction ID from the DFSP backend, used to reconcile transactions
18
+ between the Switch and DFSP backend systems.
19
+ from:
20
+ $ref: ./transferParty.yaml
21
+ to:
22
+ $ref: ./transferParty.yaml
23
+ amountType:
24
+ $ref: >-
25
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/AmountType.yaml
26
+ currency:
27
+ $ref: >-
28
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Currency.yaml
29
+ amount:
30
+ $ref: >-
31
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Amount.yaml
32
+ transactionType:
33
+ $ref: ./transactionType.yaml
34
+ note:
35
+ $ref: >-
36
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/Note.yaml
37
+ currentState:
38
+ $ref: ./transferStatus.yaml
39
+ quoteId:
40
+ $ref: >-
41
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/CorrelationId.yaml
42
+ quoteResponse:
43
+ $ref: ./quote.yaml
44
+ quoteResponseSource:
45
+ type: string
46
+ description: >
47
+ FSPID of the entity that supplied the quote response. This may not be the
48
+ same as the FSPID of the entity which owns the end user account in the
49
+ case of a FOREX transfer. i.e. it may be a FOREX gateway.
50
+ fulfil:
51
+ $ref: ./transferFulfilment.yaml
52
+ lastError:
53
+ description: >
54
+ Object representing the last error to occur during a transfer process.
55
+ This may be a Mojaloop API error returned from another entity in the
56
+ scheme or an object representing other types of error e.g. exceptions that
57
+ may occur inside the scheme adapter.
58
+ $ref: ./transferError.yaml
@@ -0,0 +1,6 @@
1
+ type: string
2
+ enum:
3
+ - ERROR_OCCURRED
4
+ - WAITING_FOR_PARTY_ACCEPTANCE
5
+ - WAITING_FOR_QUOTE_ACCEPTANCE
6
+ - COMPLETED
@@ -0,0 +1,13 @@
1
+ type: object
2
+ required:
3
+ - transferId
4
+ - currentState
5
+ - fulfil
6
+ properties:
7
+ transferId:
8
+ $ref: >-
9
+ ../../../../node_modules/@mojaloop/api-snippets/fspiop/v1_1/openapi3/components/schemas/CorrelationId.yaml
10
+ currentState:
11
+ $ref: ./transferStatus.yaml
12
+ fulfil:
13
+ $ref: ./transferFulfilment.yaml
@@ -0,0 +1,12 @@
1
+ get:
2
+ summary: Health check endpoint
3
+ description: >-
4
+ This endpoint allows a user of the SDK scheme adapter to check the outbound
5
+ transfers service is listening.
6
+ tags:
7
+ - Health
8
+ responses:
9
+ '200':
10
+ description: >-
11
+ Returns empty body if the scheme adapter outbound transfers service is
12
+ running.
@@ -0,0 +1,55 @@
1
+ openapi: 3.0.1
2
+ info:
3
+ title: Mojaloop SDK Outbound Scheme Adapter API
4
+ description: >
5
+ Specification for the Mojaloop SDK Scheme Adapter Outbound Transfers API
6
+
7
+
8
+ This API can be used by DFSP backends to simplify the process of sending
9
+ funds to other parties within a Mojaloop scheme.
10
+
11
+
12
+ Please see other documentation on
13
+ https://github.com/mojaloop/sdk-scheme-adapter for more information.
14
+
15
+
16
+ **Note on terminology:** The term "Switch" is equal to the term "Hub", and
17
+ the term "FSP" is equal to the term "DFSP".
18
+ license:
19
+ name: 'Apache License Version 2.0, January 2004'
20
+ url: 'http://www.apache.org/licenses/'
21
+ version: 1.0.0
22
+ paths:
23
+ '/':
24
+ $ref: health.yaml
25
+ '/transfers':
26
+ $ref: paths/transfers.yaml
27
+ '/transfers/{transferId}':
28
+ $ref: 'paths/transfers_transferId.yaml'
29
+ '/bulkTransfers':
30
+ $ref: paths/bulkTransfers.yaml
31
+ '/bulkTransfers/{bulkTransferId}':
32
+ $ref: 'paths/bulkTransfers_bulkTransferId.yaml'
33
+ '/bulkQuotes':
34
+ $ref: paths/bulkQuotes.yaml
35
+ '/bulkQuotes/{bulkQuoteId}':
36
+ $ref: 'paths/bulkQuotes_bulkQuoteId.yaml'
37
+ '/requestToPay':
38
+ $ref: paths/requestToPay.yaml
39
+ '/requestToPayTransfer':
40
+ $ref: paths/requestToPayTransfer.yaml
41
+ '/requestToPayTransfer/{requestToPayTransactionId}':
42
+ $ref: 'paths/requestToPayTransfer_requestToPayTransactionId.yaml'
43
+ '/accounts':
44
+ $ref: paths/accounts.yaml
45
+ '/parties/{Type}/{ID}':
46
+ $ref: 'paths/parties_Type_ID.yaml'
47
+ '/parties/{Type}/{ID}/{SubId}':
48
+ $ref: 'paths/parties_Type_ID_SubId.yaml'
49
+ '/quotes':
50
+ $ref: 'paths/quotes.yaml'
51
+ '/simpleTransfers':
52
+ $ref: 'paths/simpleTransfers.yaml'
53
+ '/authorizations':
54
+ $ref: 'paths/authorizations.yaml'
55
+
@@ -0,0 +1,26 @@
1
+ post:
2
+ summary: Create accounts on the Account Lookup Service
3
+ description: >-
4
+ The HTTP request `POST /accounts` is used to create account information on
5
+ the Account Lookup Service (ALS) regarding the provided list of identities.
6
+
7
+
8
+ Caller DFSP is used as the account source FSP information
9
+ tags:
10
+ - Accounts
11
+ requestBody:
12
+ description: Identities list request body
13
+ content:
14
+ application/json:
15
+ schema:
16
+ $ref: ../components/schemas/accountsRequest.yaml
17
+ required: true
18
+ responses:
19
+ '200':
20
+ $ref: ../components/responses/accountsCreationCompleted.yaml
21
+ '400':
22
+ $ref: ../components/responses/accountsCreationError.yaml
23
+ '500':
24
+ $ref: ../components/responses/accountsCreationError.yaml
25
+ '504':
26
+ $ref: ../components/responses/accountsCreationTimeout.yaml