@mojaloop/sdk-scheme-adapter 12.0.1 → 12.0.2

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 (251) hide show
  1. package/.circleci/config.yml +619 -0
  2. package/CHANGELOG.md +7 -0
  3. package/CODEOWNERS +2 -0
  4. package/Dockerfile +35 -0
  5. package/LICENSE.md +10 -0
  6. package/PROXY.md +84 -0
  7. package/README.md +228 -0
  8. package/SECURITY.md +18 -0
  9. package/docker/ml-testing-toolkit/secrets/keygen.sh +5 -0
  10. package/docker/ml-testing-toolkit/secrets/privatekey.pem +27 -0
  11. package/docker/ml-testing-toolkit/secrets/publickey.cer +21 -0
  12. package/docker/ml-testing-toolkit/secrets/tls/createSecrets.sh +29 -0
  13. package/docker/ml-testing-toolkit/secrets/tls/hub_client.csr +28 -0
  14. package/docker/ml-testing-toolkit/secrets/tls/hub_client_cacert.pem +32 -0
  15. package/docker/ml-testing-toolkit/secrets/tls/hub_client_cakey.key +51 -0
  16. package/docker/ml-testing-toolkit/secrets/tls/hub_client_key.key +51 -0
  17. package/docker/ml-testing-toolkit/secrets/tls/hub_server.csr +28 -0
  18. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cacert.pem +32 -0
  19. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cacert.srl +1 -0
  20. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cakey.key +51 -0
  21. package/docker/ml-testing-toolkit/secrets/tls/hub_server_cert.pem +33 -0
  22. package/docker/ml-testing-toolkit/secrets/tls/hub_server_key.key +51 -0
  23. package/docker/ml-testing-toolkit/secrets/tls/openssl.conf +17 -0
  24. package/docker/ml-testing-toolkit/spec_files/api_definitions/central_admin_9.3/api_spec.yaml +2450 -0
  25. package/docker/ml-testing-toolkit/spec_files/api_definitions/central_admin_9.3/response_map.json +96 -0
  26. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/api_spec.yaml +4187 -0
  27. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/callback_map.json +542 -0
  28. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/mockRef.json +83 -0
  29. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.0/trigger_templates/transaction_request_followup.json +125 -0
  30. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/api_spec.yaml +3703 -0
  31. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/callback_map.json +568 -0
  32. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/mockRef.json +83 -0
  33. package/docker/ml-testing-toolkit/spec_files/api_definitions/fspiop_1.1/trigger_templates/transaction_request_followup.json +125 -0
  34. package/docker/ml-testing-toolkit/spec_files/api_definitions/settlements_1.0/api_spec.yaml +983 -0
  35. package/docker/ml-testing-toolkit/spec_files/api_definitions/settlements_1.0/mockRef.json +38 -0
  36. package/docker/ml-testing-toolkit/spec_files/api_definitions/settlements_1.0/response_map.json +34 -0
  37. package/docker/ml-testing-toolkit/spec_files/reports/templates/newman/html_template.html +1074 -0
  38. package/docker/ml-testing-toolkit/spec_files/reports/templates/newman/pdf_template.html +765 -0
  39. package/docker/ml-testing-toolkit/spec_files/reports/templates/newman/script.js +98 -0
  40. package/docker/ml-testing-toolkit/spec_files/rules_callback/config.json +3 -0
  41. package/docker/ml-testing-toolkit/spec_files/rules_callback/default.json +426 -0
  42. package/docker/ml-testing-toolkit/spec_files/rules_response/config.json +3 -0
  43. package/docker/ml-testing-toolkit/spec_files/rules_response/default.json +1623 -0
  44. package/docker/ml-testing-toolkit/spec_files/rules_response/default_pisp_rules.json +161 -0
  45. package/docker/ml-testing-toolkit/spec_files/rules_validation/config.json +3 -0
  46. package/docker/ml-testing-toolkit/spec_files/rules_validation/default.json +672 -0
  47. package/docker/ml-testing-toolkit/spec_files/system_config.json +62 -0
  48. package/docker/ml-testing-toolkit/spec_files/user_config.json +45 -0
  49. package/docker/wait4/setup_hosts_file.sh +25 -0
  50. package/docker/wait4/wait4.config.js +71 -0
  51. package/docker/wait4/wait4.js +204 -0
  52. package/docker-compose.yml +67 -0
  53. package/docs/Mojaloop - Modusbox Onboarding functionality.pdf +0 -0
  54. package/docs/dfspInboundApi.yaml +1091 -0
  55. package/jest.config.js +4 -1
  56. package/junit.xml +515 -0
  57. package/package.json +9 -8
  58. package/secrets/jwsSigningKey.key +27 -0
  59. package/secrets/jwsVerificationKeys/mojaloop-sdk.pem +9 -0
  60. package/secrets/jwsVerificationKeys/switch.pem +9 -0
  61. package/sequences.puml +99 -0
  62. package/{InboundServer → src/InboundServer}/api.yaml +0 -0
  63. package/src/InboundServer/api_template.yaml +69 -0
  64. package/{InboundServer → src/InboundServer}/handlers.js +0 -0
  65. package/{InboundServer → src/InboundServer}/index.js +0 -0
  66. package/{InboundServer → src/InboundServer}/middlewares.js +0 -0
  67. package/{OAuthTestServer → src/OAuthTestServer}/index.js +0 -0
  68. package/{OAuthTestServer → src/OAuthTestServer}/model.js +0 -0
  69. package/{OutboundServer → src/OutboundServer}/api.yaml +0 -0
  70. package/{OutboundServer → src/OutboundServer}/api_interfaces/index.d.ts +0 -0
  71. package/{OutboundServer → src/OutboundServer}/api_interfaces/openapi.d.ts +0 -0
  72. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/bulkQuoteId.yaml +1 -1
  73. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/bulkTransferId.yaml +1 -1
  74. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/requestToPayTransactionId.yaml +1 -1
  75. package/{OutboundServer → src/OutboundServer}/api_template/components/parameters/transferId.yaml +1 -1
  76. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/accountsCreationCompleted.yaml +0 -0
  77. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/accountsCreationError.yaml +0 -0
  78. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/accountsCreationTimeout.yaml +0 -0
  79. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteBadRequest.yaml +0 -0
  80. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteServerError.yaml +0 -0
  81. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteSuccess.yaml +0 -0
  82. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkQuoteTimeout.yaml +0 -0
  83. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferBadRequest.yaml +0 -0
  84. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferServerError.yaml +0 -0
  85. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferSuccess.yaml +0 -0
  86. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/bulkTransferTimeout.yaml +0 -0
  87. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/partiesByIdError404.yaml +1 -1
  88. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/partiesByIdSuccess.yaml +0 -0
  89. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/quotesPostSuccess.yaml +0 -0
  90. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/quotesServerError.yaml +0 -0
  91. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/requestToPaySuccess.yaml +0 -0
  92. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/requestToPayTransferBadRequest.yaml +0 -0
  93. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/requestToPayTransferSuccess.yaml +0 -0
  94. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/simpleTransfersPostSuccess.yaml +0 -0
  95. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/simpleTransfersServerError.yaml +0 -0
  96. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferBadRequest.yaml +0 -0
  97. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferServerError.yaml +0 -0
  98. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferSuccess.yaml +0 -0
  99. package/{OutboundServer → src/OutboundServer}/api_template/components/responses/transferTimeout.yaml +0 -0
  100. package/src/OutboundServer/api_template/components/schemas/accountCreationStatus.yaml +18 -0
  101. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/accountsCreationState.yaml +0 -0
  102. package/src/OutboundServer/api_template/components/schemas/accountsRequest.yaml +20 -0
  103. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/accountsResponse.yaml +1 -1
  104. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/async2SyncCurrentState.yaml +0 -0
  105. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteErrorResponse.yaml +0 -0
  106. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteRequest.yaml +2 -2
  107. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteResponse.yaml +1 -1
  108. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteStatus.yaml +0 -0
  109. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkQuoteStatusResponse.yaml +1 -1
  110. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferErrorResponse.yaml +0 -0
  111. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferRequest.yaml +2 -2
  112. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferResponse.yaml +1 -1
  113. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferStatus.yaml +0 -0
  114. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/bulkTransferStatusResponse.yaml +1 -1
  115. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorAccountsResponse.yaml +0 -0
  116. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorQuotesResponse.yaml +0 -0
  117. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorResponse.yaml +0 -0
  118. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorSimpleTransfersResponse.yaml +0 -0
  119. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/errorTransferResponse.yaml +0 -0
  120. package/src/OutboundServer/api_template/components/schemas/extensionListEmptiable.yaml +6 -0
  121. package/src/OutboundServer/api_template/components/schemas/individualQuote.yaml +32 -0
  122. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/individualQuoteResult.yaml +5 -5
  123. package/src/OutboundServer/api_template/components/schemas/individualTransfer.yaml +32 -0
  124. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/individualTransferFulfilment.yaml +2 -2
  125. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/individualTransferResult.yaml +6 -6
  126. package/src/OutboundServer/api_template/components/schemas/mojaloopError.yaml +5 -0
  127. package/src/OutboundServer/api_template/components/schemas/mojaloopTransactionRequestState.yaml +2 -0
  128. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/partiesByIdResponse.yaml +1 -1
  129. package/src/OutboundServer/api_template/components/schemas/quote.yaml +3 -0
  130. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/quoteError.yaml +0 -0
  131. package/src/OutboundServer/api_template/components/schemas/quotesPostRequest.yaml +13 -0
  132. package/src/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +48 -0
  133. package/src/OutboundServer/api_template/components/schemas/requestToPayRequest.yaml +39 -0
  134. package/src/OutboundServer/api_template/components/schemas/requestToPayResponse.yaml +41 -0
  135. package/src/OutboundServer/api_template/components/schemas/requestToPayTransferRequest.yaml +42 -0
  136. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/requestToPayTransferResponse.yaml +6 -6
  137. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/simpleTransferServerError.yaml +0 -0
  138. package/src/OutboundServer/api_template/components/schemas/simpleTransfersPostRequest.yaml +12 -0
  139. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/simpleTransfersPostResponse.yaml +1 -1
  140. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transactionType.yaml +0 -0
  141. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferContinuationAcceptOTP.yaml +0 -0
  142. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferContinuationAcceptParty.yaml +0 -0
  143. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferContinuationAcceptQuote.yaml +0 -0
  144. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferError.yaml +0 -0
  145. package/src/OutboundServer/api_template/components/schemas/transferFulfilment.yaml +3 -0
  146. package/src/OutboundServer/api_template/components/schemas/transferParty.yaml +40 -0
  147. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferRequest.yaml +4 -4
  148. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferResponse.yaml +6 -6
  149. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferStatus.yaml +0 -0
  150. package/{OutboundServer → src/OutboundServer}/api_template/components/schemas/transferStatusResponse.yaml +1 -1
  151. package/{OutboundServer → src/OutboundServer}/api_template/health.yaml +0 -0
  152. package/{OutboundServer → src/OutboundServer}/api_template/openapi.yaml +0 -0
  153. package/{OutboundServer → src/OutboundServer}/api_template/paths/accounts.yaml +0 -0
  154. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkQuotes.yaml +0 -0
  155. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkQuotes_bulkQuoteId.yaml +0 -0
  156. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkTransfers.yaml +0 -0
  157. package/{OutboundServer → src/OutboundServer}/api_template/paths/bulkTransfers_bulkTransferId.yaml +0 -0
  158. package/{OutboundServer → src/OutboundServer}/api_template/paths/parties_Type_ID.yaml +2 -2
  159. package/{OutboundServer → src/OutboundServer}/api_template/paths/parties_Type_ID_SubId.yaml +3 -3
  160. package/{OutboundServer → src/OutboundServer}/api_template/paths/quotes.yaml +0 -0
  161. package/{OutboundServer → src/OutboundServer}/api_template/paths/requestToPay.yaml +0 -0
  162. package/{OutboundServer → src/OutboundServer}/api_template/paths/requestToPayTransfer.yaml +0 -0
  163. package/{OutboundServer → src/OutboundServer}/api_template/paths/requestToPayTransfer_requestToPayTransactionId.yaml +0 -0
  164. package/{OutboundServer → src/OutboundServer}/api_template/paths/simpleTransfers.yaml +0 -0
  165. package/{OutboundServer → src/OutboundServer}/api_template/paths/transfers.yaml +0 -0
  166. package/{OutboundServer → src/OutboundServer}/api_template/paths/transfers_transferId.yaml +0 -0
  167. package/{OutboundServer → src/OutboundServer}/handlers.js +0 -0
  168. package/{OutboundServer → src/OutboundServer}/index.js +0 -0
  169. package/{OutboundServer → src/OutboundServer}/middlewares.js +0 -0
  170. package/{TestServer → src/TestServer}/api.yaml +0 -0
  171. package/{TestServer → src/TestServer}/handlers.js +0 -0
  172. package/{TestServer → src/TestServer}/index.js +0 -0
  173. package/{config.js → src/config.js} +0 -0
  174. package/{index.d.ts → src/index.d.ts} +0 -0
  175. package/{index.js → src/index.js} +0 -0
  176. package/{lib → src/lib}/api/index.js +0 -0
  177. package/{lib → src/lib}/cache.js +0 -0
  178. package/{lib → src/lib}/check.js +0 -0
  179. package/{lib → src/lib}/model/AccountsModel.js +0 -0
  180. package/{lib → src/lib}/model/Async2SyncModel.js +0 -0
  181. package/{lib → src/lib}/model/InboundTransfersModel.js +0 -0
  182. package/{lib → src/lib}/model/OutboundBulkQuotesModel.js +0 -0
  183. package/{lib → src/lib}/model/OutboundBulkTransfersModel.js +0 -0
  184. package/{lib → src/lib}/model/OutboundRequestToPayModel.js +0 -0
  185. package/{lib → src/lib}/model/OutboundRequestToPayTransferModel.js +0 -0
  186. package/{lib → src/lib}/model/OutboundTransfersModel.js +0 -0
  187. package/{lib → src/lib}/model/PartiesModel.js +0 -0
  188. package/{lib → src/lib}/model/ProxyModel/MatchRules/Expression.js +0 -0
  189. package/{lib → src/lib}/model/ProxyModel/MatchRules/Headers.js +0 -0
  190. package/{lib → src/lib}/model/ProxyModel/MatchRules/MatchRule.js +0 -0
  191. package/{lib → src/lib}/model/ProxyModel/MatchRules/Path.js +0 -0
  192. package/{lib → src/lib}/model/ProxyModel/MatchRules/Query.js +0 -0
  193. package/{lib → src/lib}/model/ProxyModel/MatchRules/index.js +0 -0
  194. package/{lib → src/lib}/model/ProxyModel/Route.js +0 -0
  195. package/{lib → src/lib}/model/ProxyModel/configSchema.json +0 -0
  196. package/{lib → src/lib}/model/ProxyModel/index.js +0 -0
  197. package/{lib → src/lib}/model/QuotesModel.js +0 -0
  198. package/{lib → src/lib}/model/TransfersModel.js +0 -0
  199. package/{lib → src/lib}/model/common/BackendError.js +0 -0
  200. package/{lib → src/lib}/model/common/PersistentStateMachine.js +0 -0
  201. package/{lib → src/lib}/model/common/index.js +0 -0
  202. package/{lib → src/lib}/model/index.js +0 -0
  203. package/{lib → src/lib}/model/lib/deferredJob.js +0 -0
  204. package/{lib → src/lib}/model/lib/index.js +0 -0
  205. package/{lib → src/lib}/model/lib/requests/backendRequests.js +0 -0
  206. package/{lib → src/lib}/model/lib/requests/common.js +0 -0
  207. package/{lib → src/lib}/model/lib/requests/index.js +0 -0
  208. package/{lib → src/lib}/model/lib/shared.js +0 -0
  209. package/{lib → src/lib}/randomphrase/index.js +0 -0
  210. package/{lib → src/lib}/randomphrase/words.json +0 -0
  211. package/{lib → src/lib}/router.js +0 -0
  212. package/{lib → src/lib}/validate.js +0 -0
  213. package/test/integration/lib/cache.test.js +3 -3
  214. package/test/unit/InboundServer.test.js +4 -4
  215. package/test/unit/TestServer.test.js +5 -5
  216. package/test/unit/api/utils.js +5 -5
  217. package/test/unit/config.test.js +9 -9
  218. package/test/unit/inboundApi/handlers.test.js +6 -6
  219. package/test/unit/index.test.js +1 -1
  220. package/test/unit/lib/cache.test.js +1 -1
  221. package/test/unit/lib/model/AccountsModel.test.js +2 -2
  222. package/test/unit/lib/model/InboundTransfersModel.test.js +5 -5
  223. package/test/unit/lib/model/OutboundBulkQuotesModel.test.js +2 -2
  224. package/test/unit/lib/model/OutboundBulkTransfersModel.test.js +2 -2
  225. package/test/unit/lib/model/OutboundRequestToPayModel.test.js +3 -3
  226. package/test/unit/lib/model/OutboundRequestToPayTransferModel.test.js +2 -2
  227. package/test/unit/lib/model/OutboundTransfersModel.test.js +3 -3
  228. package/test/unit/lib/model/PartiesModel.test.js +28 -28
  229. package/test/unit/lib/model/QuotesModel.test.js +31 -31
  230. package/test/unit/lib/model/TransfersModel.test.js +3 -3
  231. package/test/unit/lib/model/common/PersistentStateMachine.test.js +13 -13
  232. package/test/unit/lib/model/mockedLibRequests.js +1 -1
  233. package/test/unit/outboundApi/handlers.test.js +3 -3
  234. package/.eslintignore +0 -2
  235. package/InboundServer/api_template.yaml +0 -69
  236. package/OutboundServer/api_template/components/schemas/accountCreationStatus.yaml +0 -18
  237. package/OutboundServer/api_template/components/schemas/accountsRequest.yaml +0 -20
  238. package/OutboundServer/api_template/components/schemas/extensionListEmptiable.yaml +0 -6
  239. package/OutboundServer/api_template/components/schemas/individualQuote.yaml +0 -32
  240. package/OutboundServer/api_template/components/schemas/individualTransfer.yaml +0 -32
  241. package/OutboundServer/api_template/components/schemas/mojaloopError.yaml +0 -5
  242. package/OutboundServer/api_template/components/schemas/mojaloopTransactionRequestState.yaml +0 -2
  243. package/OutboundServer/api_template/components/schemas/quote.yaml +0 -3
  244. package/OutboundServer/api_template/components/schemas/quotesPostRequest.yaml +0 -13
  245. package/OutboundServer/api_template/components/schemas/quotesPostResponse.yaml +0 -48
  246. package/OutboundServer/api_template/components/schemas/requestToPayRequest.yaml +0 -39
  247. package/OutboundServer/api_template/components/schemas/requestToPayResponse.yaml +0 -41
  248. package/OutboundServer/api_template/components/schemas/requestToPayTransferRequest.yaml +0 -42
  249. package/OutboundServer/api_template/components/schemas/simpleTransfersPostRequest.yaml +0 -12
  250. package/OutboundServer/api_template/components/schemas/transferFulfilment.yaml +0 -3
  251. package/OutboundServer/api_template/components/schemas/transferParty.yaml +0 -40
@@ -0,0 +1,1623 @@
1
+ [
2
+ {
3
+ "ruleId": 1,
4
+ "priority": 1,
5
+ "description": "post /settlementWindows/{id}",
6
+ "apiVersion": {
7
+ "minorVersion": 0,
8
+ "majorVersion": 1,
9
+ "type": "settlements",
10
+ "asynchronous": false
11
+ },
12
+ "conditions": {
13
+ "all": [
14
+ {
15
+ "fact": "operationPath",
16
+ "operator": "equal",
17
+ "value": "/settlementWindows/{id}"
18
+ },
19
+ {
20
+ "fact": "method",
21
+ "operator": "equal",
22
+ "value": "post"
23
+ }
24
+ ]
25
+ },
26
+ "event": {
27
+ "method": null,
28
+ "path": null,
29
+ "params": {
30
+ "body": {
31
+ "state": "OPEN"
32
+ },
33
+ "statusCode": "200"
34
+ },
35
+ "delay": 0,
36
+ "type": "MOCK_RESPONSE"
37
+ },
38
+ "type": "response",
39
+ "version": 1
40
+ },
41
+ {
42
+ "ruleId": 2,
43
+ "priority": 1,
44
+ "description": "post /settlements",
45
+ "apiVersion": {
46
+ "minorVersion": 0,
47
+ "majorVersion": 1,
48
+ "type": "settlements",
49
+ "asynchronous": false
50
+ },
51
+ "conditions": {
52
+ "all": [
53
+ {
54
+ "fact": "operationPath",
55
+ "operator": "equal",
56
+ "value": "/settlements"
57
+ },
58
+ {
59
+ "fact": "method",
60
+ "operator": "equal",
61
+ "value": "post"
62
+ }
63
+ ]
64
+ },
65
+ "event": {
66
+ "method": null,
67
+ "path": null,
68
+ "params": {
69
+ "body": {
70
+ "id": "123",
71
+ "state": "PENDING_SETTLEMENT",
72
+ "settlementWindows": [
73
+ [
74
+ {
75
+ "id": 123,
76
+ "createdDate": "1954-11-03",
77
+ "state": "PENDING_SETTLEMENT",
78
+ "reason": "do",
79
+ "changedDate": "1954-11-03"
80
+ }
81
+ ]
82
+ ],
83
+ "participants": [
84
+ {
85
+ "id": -91450113,
86
+ "accounts": [
87
+ {
88
+ "id": 81795155,
89
+ "reason": "veniam est proident commodo aliqua",
90
+ "state": "PENDING_SETTLEMENT",
91
+ "netSettlementAmount": {
92
+ "amount": 100,
93
+ "currency": "USD"
94
+ }
95
+ }
96
+ ]
97
+ }
98
+ ]
99
+ },
100
+ "statusCode": "200"
101
+ },
102
+ "delay": 0,
103
+ "type": "FIXED_RESPONSE"
104
+ },
105
+ "type": "response",
106
+ "version": 1
107
+ },
108
+ {
109
+ "ruleId": 3,
110
+ "priority": 1,
111
+ "description": "get /settlements/{id}",
112
+ "apiVersion": {
113
+ "minorVersion": 0,
114
+ "majorVersion": 1,
115
+ "type": "settlements",
116
+ "asynchronous": false
117
+ },
118
+ "conditions": {
119
+ "all": [
120
+ {
121
+ "fact": "operationPath",
122
+ "operator": "equal",
123
+ "value": "/settlements/{id}"
124
+ },
125
+ {
126
+ "fact": "method",
127
+ "operator": "equal",
128
+ "value": "get"
129
+ }
130
+ ]
131
+ },
132
+ "event": {
133
+ "method": null,
134
+ "path": null,
135
+ "params": {
136
+ "body": {
137
+ "id": "{$request.params.id}",
138
+ "state": "PS_TRANSFERS_RECORDED",
139
+ "settlementWindows": [
140
+ [
141
+ {
142
+ "createdDate": "2020-02-10",
143
+ "id": "{$request.params.id}",
144
+ "state": "PS_TRANSFERS_RECORDED",
145
+ "reason": "amet cillum culpa v",
146
+ "changedDate": "2020-02-10"
147
+ }
148
+ ]
149
+ ],
150
+ "participants": [
151
+ {
152
+ "id": -35933071,
153
+ "accounts": [
154
+ {
155
+ "id": -14386227,
156
+ "reason": "aliquip aliqua nulla deserunt",
157
+ "state": "PS_TRANSFERS_RECORDED",
158
+ "netSettlementAmount": {
159
+ "amount": 100,
160
+ "currency": "USD"
161
+ }
162
+ }
163
+ ]
164
+ }
165
+ ]
166
+ },
167
+ "statusCode": "200"
168
+ },
169
+ "delay": 0,
170
+ "type": "FIXED_RESPONSE"
171
+ },
172
+ "type": "response",
173
+ "version": 1
174
+ },
175
+ {
176
+ "ruleId": 4,
177
+ "priority": 1,
178
+ "description": "get /settlementWindows",
179
+ "apiVersion": {
180
+ "minorVersion": 0,
181
+ "majorVersion": 1,
182
+ "type": "settlements",
183
+ "asynchronous": false
184
+ },
185
+ "conditions": {
186
+ "all": [
187
+ {
188
+ "fact": "operationPath",
189
+ "operator": "equal",
190
+ "value": "/settlementWindows"
191
+ },
192
+ {
193
+ "fact": "method",
194
+ "operator": "equal",
195
+ "value": "get"
196
+ }
197
+ ]
198
+ },
199
+ "event": {
200
+ "method": null,
201
+ "path": null,
202
+ "params": {
203
+ "body": [
204
+ {
205
+ "createdDate": "2020-02-10",
206
+ "id": 123,
207
+ "state": "{$request.query.state}",
208
+ "reason": "string",
209
+ "changedDate": "2020-02-10"
210
+ }
211
+ ],
212
+ "statusCode": "200"
213
+ },
214
+ "delay": 0,
215
+ "type": "FIXED_RESPONSE"
216
+ },
217
+ "type": "response",
218
+ "version": 1
219
+ },
220
+ {
221
+ "ruleId": 5,
222
+ "priority": 1,
223
+ "description": "put /consentRequests/{ID} - final authorization",
224
+ "apiVersion": {
225
+ "minorVersion": 1,
226
+ "majorVersion": 0,
227
+ "type": "thirdparty_pisp",
228
+ "asynchronous": true
229
+ },
230
+ "conditions": {
231
+ "all": [
232
+ {
233
+ "fact": "operationPath",
234
+ "operator": "equal",
235
+ "value": "/consentRequests/{ID}"
236
+ },
237
+ {
238
+ "fact": "method",
239
+ "operator": "equal",
240
+ "value": "put"
241
+ },
242
+ {
243
+ "fact": "body",
244
+ "operator": "equal",
245
+ "value": "111222",
246
+ "path": "authToken"
247
+ }
248
+ ]
249
+ },
250
+ "event": {
251
+ "method": null,
252
+ "path": null,
253
+ "params": {
254
+ "scripts": {
255
+ "exec": [
256
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
257
+ "const curDate = (new Date()).toUTCString()",
258
+ "const consentRequestId = pm.request.url.path[1]",
259
+ "const thirdpartyRequest = {",
260
+ "url: userConfig.CALLBACK_ENDPOINT + '/consents',",
261
+ "method: 'post',",
262
+ "header: {",
263
+ " 'FSPIOP-Source': 'dfspA',",
264
+ " 'Accept': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
265
+ " 'Content-Type': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
266
+ " 'Date': curDate",
267
+ "},",
268
+ "body: {",
269
+ " mode: 'raw',",
270
+ " raw: JSON.stringify({",
271
+ " \"id\": \"9d553d59-610f-44aa-b7ec-b483af24e98a\",",
272
+ " \"requestId\": consentRequestId,",
273
+ " \"participantId\": \"dfspA\",",
274
+ " \"initiatorId\": \"pispA\",",
275
+ " \"scopes\": [",
276
+ " {",
277
+ " \"accountId\": \"dfspa.alice.1234\",",
278
+ " \"actions\": [",
279
+ " \"accounts.transfer\",",
280
+ " \"accounts.getBalance\"",
281
+ " ]",
282
+ " },",
283
+ " {",
284
+ " \"accountId\": \"dfspa.alice.5678\",",
285
+ " \"actions\": [",
286
+ " \"accounts.transfer\",",
287
+ " \"accounts.getBalance\"",
288
+ " ]",
289
+ " }",
290
+ " ]",
291
+ "})",
292
+ "}",
293
+ "}",
294
+ "pm.sendRequest(thirdpartyRequest, function (err, response) {",
295
+ "console.log('consents response : '+JSON.stringify(response.json()))",
296
+ "});"
297
+ ]
298
+ }
299
+ },
300
+ "type": "MOCK_RESPONSE"
301
+ },
302
+ "type": "response",
303
+ "version": 1
304
+ },
305
+ {
306
+ "ruleId": 6,
307
+ "priority": 1,
308
+ "description": "put /consents/{ID} - generic",
309
+ "apiVersion": {
310
+ "minorVersion": 1,
311
+ "majorVersion": 0,
312
+ "type": "thirdparty_pisp",
313
+ "asynchronous": true
314
+ },
315
+ "conditions": {
316
+ "all": [
317
+ {
318
+ "fact": "operationPath",
319
+ "operator": "equal",
320
+ "value": "/consents/{ID}"
321
+ },
322
+ {
323
+ "fact": "method",
324
+ "operator": "equal",
325
+ "value": "put"
326
+ }
327
+ ]
328
+ },
329
+ "event": {
330
+ "method": null,
331
+ "path": null,
332
+ "params": {
333
+ "scripts": {
334
+ "exec": [
335
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
336
+ "const curDate = (new Date()).toUTCString()",
337
+ "const consentId = pm.request.url.path[1]",
338
+ "console.log('authToken is', pm.request.body.authToken)",
339
+ "",
340
+ "const thirdpartyRequest = {",
341
+ "url: userConfig.CALLBACK_ENDPOINT + '/consents/' + consentId,",
342
+ "method: 'put',",
343
+ "header: {",
344
+ " 'FSPIOP-Source': 'auth.dfspA',",
345
+ " 'Accept': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
346
+ " 'Content-Type': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
347
+ " 'Date': curDate",
348
+ "},",
349
+ "body: {",
350
+ " mode: 'raw',",
351
+ " raw: JSON.stringify({",
352
+ " \"requestId\": \"4cab6274-8b3e-41b4-83ce-fc0847409155\",",
353
+ " \"participantId\": \"dfspA\",",
354
+ " \"initiatorId\": \"pispA\",",
355
+ " \"scopes\": [",
356
+ " {",
357
+ " \"accountId\": \"dfspa.alice.1234\",",
358
+ " \"actions\": [",
359
+ " \"accounts.transfer\",",
360
+ " \"accounts.getBalance\"",
361
+ " ]",
362
+ " },",
363
+ " {",
364
+ " \"accountId\": \"dfspa.alice.5678\",",
365
+ " \"actions\": [",
366
+ " \"accounts.transfer\",",
367
+ " \"accounts.getBalance\"",
368
+ " ]",
369
+ " }",
370
+ " ],",
371
+ " \"credential\": {",
372
+ " \"id\": \"9876\",",
373
+ " \"type\": \"FIDO\",",
374
+ " \"status\": \"VERIFIED\",",
375
+ " \"challenge\": {",
376
+ " \"payload\": \"base64 encoded challenge\",",
377
+ " \"signature\": \"payload signed by PISP - using private key\"",
378
+ " },",
379
+ " \"payload\": \"base64 encoded bytes- using public key\"",
380
+ " }",
381
+ "})",
382
+ "}",
383
+ "}",
384
+ "pm.sendRequest(thirdpartyRequest, function (err, response) {",
385
+ "console.log('consents response : '+JSON.stringify(response.json()))",
386
+ "});"
387
+ ]
388
+ }
389
+ },
390
+ "type": "MOCK_RESPONSE"
391
+ },
392
+ "type": "response",
393
+ "version": 1
394
+ },
395
+ {
396
+ "ruleId": 7,
397
+ "priority": 1,
398
+ "description": "put /authorizations/{ID}",
399
+ "apiVersion": {
400
+ "minorVersion": 1,
401
+ "majorVersion": 0,
402
+ "type": "thirdparty_pisp",
403
+ "asynchronous": true
404
+ },
405
+ "conditions": {
406
+ "all": [
407
+ {
408
+ "fact": "headers",
409
+ "operator": "equal",
410
+ "value": "nonexistent-dfsp",
411
+ "path": "FSPIOP-Destination"
412
+ },
413
+ {
414
+ "fact": "operationPath",
415
+ "operator": "equal",
416
+ "value": "/authorizations/{ID}"
417
+ },
418
+ {
419
+ "fact": "method",
420
+ "operator": "equal",
421
+ "value": "put"
422
+ }
423
+ ]
424
+ },
425
+ "event": {
426
+ "method": null,
427
+ "path": null,
428
+ "params": {
429
+ "body": {
430
+ "errorInformation": {
431
+ "errorCode": "3201",
432
+ "errorDescription": "ad magna",
433
+ "extensionList": {
434
+ "extension": [
435
+ {
436
+ "key": "dolor esse ut",
437
+ "value": "dolor"
438
+ }
439
+ ]
440
+ }
441
+ }
442
+ },
443
+ "statusCode": "400",
444
+ "scripts": {}
445
+ },
446
+ "type": "FIXED_RESPONSE"
447
+ },
448
+ "type": "response",
449
+ "version": 1
450
+ },
451
+ {
452
+ "ruleId": 8,
453
+ "priority": 1,
454
+ "description": "put /authorizations/{ID}",
455
+ "apiVersion": {
456
+ "minorVersion": 1,
457
+ "majorVersion": 0,
458
+ "type": "thirdparty_pisp",
459
+ "asynchronous": true
460
+ },
461
+ "conditions": {
462
+ "all": [
463
+ {
464
+ "fact": "pathParams",
465
+ "operator": "equal",
466
+ "value": "f4a0e590-7cee-4e98-a48a-b7a22d23ff12",
467
+ "path": "ID"
468
+ },
469
+ {
470
+ "fact": "operationPath",
471
+ "operator": "equal",
472
+ "value": "/authorizations/{ID}"
473
+ },
474
+ {
475
+ "fact": "method",
476
+ "operator": "equal",
477
+ "value": "put"
478
+ }
479
+ ]
480
+ },
481
+ "event": {
482
+ "method": null,
483
+ "path": null,
484
+ "params": {
485
+ "body": {
486
+ "errorInformation": {
487
+ "errorCode": "6205",
488
+ "errorDescription": "nostrud",
489
+ "extensionList": {
490
+ "extension": [
491
+ {
492
+ "key": "amet",
493
+ "value": "id ea"
494
+ }
495
+ ]
496
+ }
497
+ }
498
+ },
499
+ "statusCode": "400",
500
+ "scripts": {}
501
+ },
502
+ "type": "FIXED_RESPONSE"
503
+ },
504
+ "type": "response",
505
+ "version": 1
506
+ },
507
+ {
508
+ "ruleId": 9,
509
+ "priority": 1,
510
+ "description": "put /authorizations/{ID}",
511
+ "apiVersion": {
512
+ "minorVersion": 1,
513
+ "majorVersion": 0,
514
+ "type": "thirdparty_pisp",
515
+ "asynchronous": true
516
+ },
517
+ "conditions": {
518
+ "all": [
519
+ {
520
+ "fact": "pathParams",
521
+ "operator": "equal",
522
+ "value": "d35943eb-b7a0-49f5-8d61-23cf6806d552",
523
+ "path": "ID"
524
+ },
525
+ {
526
+ "fact": "operationPath",
527
+ "operator": "equal",
528
+ "value": "/authorizations/{ID}"
529
+ },
530
+ {
531
+ "fact": "method",
532
+ "operator": "equal",
533
+ "value": "put"
534
+ }
535
+ ]
536
+ },
537
+ "event": {
538
+ "method": null,
539
+ "path": null,
540
+ "params": {
541
+ "body": {
542
+ "errorInformation": {
543
+ "errorCode": "6000",
544
+ "errorDescription": "quis nostrud esse",
545
+ "extensionList": {
546
+ "extension": [
547
+ {
548
+ "key": "i",
549
+ "value": "laboris commodo in"
550
+ }
551
+ ]
552
+ }
553
+ }
554
+ },
555
+ "statusCode": "400",
556
+ "scripts": {}
557
+ },
558
+ "type": "FIXED_RESPONSE"
559
+ },
560
+ "type": "response",
561
+ "version": 1
562
+ },
563
+ {
564
+ "ruleId": 10,
565
+ "priority": 1,
566
+ "description": "put /authorizations/{ID}",
567
+ "apiVersion": {
568
+ "minorVersion": 1,
569
+ "majorVersion": 0,
570
+ "type": "thirdparty_pisp",
571
+ "asynchronous": true
572
+ },
573
+ "conditions": {
574
+ "all": [
575
+ {
576
+ "fact": "pathParams",
577
+ "operator": "equal",
578
+ "value": "7c4b1be2-dff2-441d-9d94-6aa2c1a5169f",
579
+ "path": "ID"
580
+ },
581
+ {
582
+ "fact": "operationPath",
583
+ "operator": "equal",
584
+ "value": "/authorizations/{ID}"
585
+ },
586
+ {
587
+ "fact": "method",
588
+ "operator": "equal",
589
+ "value": "put"
590
+ }
591
+ ]
592
+ },
593
+ "event": {
594
+ "method": null,
595
+ "path": null,
596
+ "params": {
597
+ "body": {
598
+ "errorInformation": {
599
+ "errorCode": "6201",
600
+ "errorDescription": "ex laboris",
601
+ "extensionList": {
602
+ "extension": [
603
+ {
604
+ "key": "mollit ",
605
+ "value": "in exercitation Lorem"
606
+ }
607
+ ]
608
+ }
609
+ }
610
+ },
611
+ "statusCode": "400",
612
+ "scripts": {}
613
+ },
614
+ "type": "FIXED_RESPONSE"
615
+ },
616
+ "type": "response",
617
+ "version": 1
618
+ },
619
+ {
620
+ "ruleId": 11,
621
+ "priority": 1,
622
+ "description": "put /authorizations/{ID}",
623
+ "apiVersion": {
624
+ "minorVersion": 1,
625
+ "majorVersion": 0,
626
+ "type": "thirdparty_pisp",
627
+ "asynchronous": true
628
+ },
629
+ "conditions": {
630
+ "all": [
631
+ {
632
+ "fact": "pathParams",
633
+ "operator": "equal",
634
+ "value": "3dc003a0-5e49-4271-99ac-598053ed4488",
635
+ "path": "ID"
636
+ },
637
+ {
638
+ "fact": "operationPath",
639
+ "operator": "equal",
640
+ "value": "/authorizations/{ID}"
641
+ },
642
+ {
643
+ "fact": "method",
644
+ "operator": "equal",
645
+ "value": "put"
646
+ }
647
+ ]
648
+ },
649
+ "event": {
650
+ "method": null,
651
+ "path": null,
652
+ "params": {
653
+ "body": {
654
+ "errorInformation": {
655
+ "errorCode": "6105",
656
+ "errorDescription": "amet consectetur cupidatat",
657
+ "extensionList": {
658
+ "extension": [
659
+ {
660
+ "key": "eiusmod consequat vo",
661
+ "value": "Duis dolor sit aliquip dolor"
662
+ }
663
+ ]
664
+ }
665
+ }
666
+ },
667
+ "statusCode": "400",
668
+ "scripts": {}
669
+ },
670
+ "type": "FIXED_RESPONSE"
671
+ },
672
+ "type": "response",
673
+ "version": 1
674
+ },
675
+ {
676
+ "ruleId": 12,
677
+ "priority": 1,
678
+ "description": "put /authorizations/{ID}",
679
+ "apiVersion": {
680
+ "minorVersion": 1,
681
+ "majorVersion": 0,
682
+ "type": "thirdparty_pisp",
683
+ "asynchronous": true
684
+ },
685
+ "conditions": {
686
+ "all": [
687
+ {
688
+ "fact": "pathParams",
689
+ "operator": "equal",
690
+ "value": "58a715c8-7c9c-46d5-8705-ba57093e77a9",
691
+ "path": "ID"
692
+ },
693
+ {
694
+ "fact": "operationPath",
695
+ "operator": "equal",
696
+ "value": "/authorizations/{ID}"
697
+ },
698
+ {
699
+ "fact": "method",
700
+ "operator": "equal",
701
+ "value": "put"
702
+ }
703
+ ]
704
+ },
705
+ "event": {
706
+ "method": null,
707
+ "path": null,
708
+ "params": {
709
+ "body": {
710
+ "errorInformation": {
711
+ "errorCode": "6105",
712
+ "errorDescription": "irure",
713
+ "extensionList": {
714
+ "extension": [
715
+ {
716
+ "key": "ex velit reprehenderi",
717
+ "value": "est"
718
+ }
719
+ ]
720
+ }
721
+ }
722
+ },
723
+ "statusCode": "400",
724
+ "scripts": {}
725
+ },
726
+ "type": "FIXED_RESPONSE"
727
+ },
728
+ "type": "response",
729
+ "version": 1
730
+ },
731
+ {
732
+ "ruleId": 13,
733
+ "priority": 1,
734
+ "description": "put /authorizations/{ID}",
735
+ "apiVersion": {
736
+ "minorVersion": 1,
737
+ "majorVersion": 0,
738
+ "type": "thirdparty_pisp",
739
+ "asynchronous": true
740
+ },
741
+ "conditions": {
742
+ "all": [
743
+ {
744
+ "fact": "pathParams",
745
+ "operator": "equal",
746
+ "value": "e4283875-d152-4681-aae3-691365c60deb",
747
+ "path": "ID"
748
+ },
749
+ {
750
+ "fact": "operationPath",
751
+ "operator": "equal",
752
+ "value": "/authorizations/{ID}"
753
+ },
754
+ {
755
+ "fact": "method",
756
+ "operator": "equal",
757
+ "value": "put"
758
+ }
759
+ ]
760
+ },
761
+ "event": {
762
+ "method": null,
763
+ "path": null,
764
+ "params": {
765
+ "body": {
766
+ "errorInformation": {
767
+ "errorCode": "6200",
768
+ "errorDescription": "et aute ea adipisicing",
769
+ "extensionList": {
770
+ "extension": [
771
+ {
772
+ "key": "irure",
773
+ "value": "amet reprehenderit veniam"
774
+ }
775
+ ]
776
+ }
777
+ }
778
+ },
779
+ "statusCode": "400",
780
+ "scripts": {}
781
+ },
782
+ "type": "FIXED_RESPONSE"
783
+ },
784
+ "type": "response",
785
+ "version": 1
786
+ },
787
+ {
788
+ "ruleId": 14,
789
+ "priority": 1,
790
+ "description": "put /consentRequests/{ID} - DFSP add authUri for WEB flow",
791
+ "apiVersion": {
792
+ "minorVersion": 1,
793
+ "majorVersion": 0,
794
+ "type": "thirdparty_pisp",
795
+ "asynchronous": true
796
+ },
797
+ "conditions": {
798
+ "all": [
799
+ {
800
+ "fact": "body",
801
+ "operator": "equal",
802
+ "value": "dfspa.com/authorize?consentRequestId=xxxxx",
803
+ "path": "authUri"
804
+ },
805
+ {
806
+ "fact": "operationPath",
807
+ "operator": "equal",
808
+ "value": "/consentRequests/{ID}"
809
+ },
810
+ {
811
+ "fact": "method",
812
+ "operator": "equal",
813
+ "value": "put"
814
+ }
815
+ ]
816
+ },
817
+ "event": {
818
+ "method": null,
819
+ "path": null,
820
+ "params": {
821
+ "scripts": {
822
+ "exec": [
823
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
824
+ "const curDate = (new Date()).toUTCString()",
825
+ "const consentRequestId = pm.request.url.path[1]",
826
+ "const thirdpartyRequest = {",
827
+ " url: userConfig.CALLBACK_ENDPOINT + '/consentRequests/' + consentRequestId,",
828
+ " method: 'put',",
829
+ " header: {",
830
+ " 'FSPIOP-Source': 'pispA',",
831
+ " 'Accept': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
832
+ " 'Content-Type': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
833
+ " 'Date': curDate",
834
+ " },",
835
+ " body: {",
836
+ " mode: 'raw',",
837
+ " raw: JSON.stringify({",
838
+ " \"initiatorId\": \"pispA\",",
839
+ " \"authChannels\": [\"WEB\"],",
840
+ " \"scopes\": [",
841
+ " {",
842
+ " \"accountId\": \"dfspa.alice.1234\",",
843
+ " \"actions\": [",
844
+ " \"accounts.transfer\",",
845
+ " \"accounts.getBalance\"",
846
+ " ]",
847
+ " },",
848
+ " {",
849
+ " \"accountId\": \"dfspa.alice.5678\",",
850
+ " \"actions\": [",
851
+ " \"accounts.transfer\",",
852
+ " \"accounts.getBalance\"",
853
+ " ]",
854
+ " }",
855
+ " ],",
856
+ " \"callbackUri\": \"pisp-app://callback.com\",",
857
+ " \"authUri\": \"dfspa.com/authorize?consentRequestId=xxxxx\",",
858
+ " \"authToken\": \"111222\"",
859
+ " })",
860
+ " }",
861
+ "}",
862
+ "",
863
+ "pm.sendRequest(thirdpartyRequest, function (err, response) {",
864
+ " console.log('consents response : '+JSON.stringify(response.json()))",
865
+ "});"
866
+ ]
867
+ }
868
+ },
869
+ "type": "MOCK_RESPONSE"
870
+ },
871
+ "type": "response",
872
+ "version": 1
873
+ },
874
+ {
875
+ "ruleId": 15,
876
+ "priority": 1,
877
+ "description": "put /consentRequests/{ID} - DFSP request for OTP flow",
878
+ "apiVersion": {
879
+ "minorVersion": 1,
880
+ "majorVersion": 0,
881
+ "type": "thirdparty_pisp",
882
+ "asynchronous": true
883
+ },
884
+ "conditions": {
885
+ "all": [
886
+ {
887
+ "fact": "operationPath",
888
+ "operator": "equal",
889
+ "value": "/consentRequests/{ID}"
890
+ },
891
+ {
892
+ "fact": "method",
893
+ "operator": "equal",
894
+ "value": "put"
895
+ }
896
+ ]
897
+ },
898
+ "event": {
899
+ "method": null,
900
+ "path": null,
901
+ "params": {
902
+ "scripts": {
903
+ "exec": [
904
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
905
+ "const curDate = (new Date()).toUTCString()",
906
+ "const consentRequestId = pm.request.url.path[1]",
907
+ "const thirdpartyRequest = {",
908
+ " url: userConfig.CALLBACK_ENDPOINT + '/consentRequests/' + consentRequestId,",
909
+ " method: 'put',",
910
+ " header: {",
911
+ " 'FSPIOP-Source': 'pispA',",
912
+ " 'Accept': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
913
+ " 'Content-Type': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
914
+ " 'Date': curDate",
915
+ " },",
916
+ " body: {",
917
+ " mode: 'raw',",
918
+ " raw: JSON.stringify({",
919
+ " \"initiatorId\": \"pispA\",",
920
+ " \"authChannels\": [\"OTP\"],",
921
+ " \"scopes\": [",
922
+ " {",
923
+ " \"accountId\": \"dfspa.alice.1234\",",
924
+ " \"actions\": [",
925
+ " \"accounts.transfer\",",
926
+ " \"accounts.getBalance\"",
927
+ " ]",
928
+ " },",
929
+ " {",
930
+ " \"accountId\": \"dfspa.alice.5678\",",
931
+ " \"actions\": [",
932
+ " \"accounts.transfer\",",
933
+ " \"accounts.getBalance\"",
934
+ " ]",
935
+ " }",
936
+ " ],",
937
+ " \"callbackUri\": \"pisp-app://callback.com\",",
938
+ " \"authToken\": \"111222\"",
939
+ " })",
940
+ " }",
941
+ "}",
942
+ "",
943
+ "pm.sendRequest(thirdpartyRequest, function (err, response) {",
944
+ " console.log('consents response : '+JSON.stringify(response.json()))",
945
+ "});"
946
+ ]
947
+ }
948
+ },
949
+ "type": "MOCK_RESPONSE"
950
+ },
951
+ "type": "response",
952
+ "version": 1
953
+ },
954
+ {
955
+ "ruleId": 16,
956
+ "priority": 1,
957
+ "description": "put /consents/{ID} - response to challenge from auth-service",
958
+ "apiVersion": {
959
+ "minorVersion": 1,
960
+ "majorVersion": 0,
961
+ "type": "thirdparty_pisp",
962
+ "asynchronous": true
963
+ },
964
+ "conditions": {
965
+ "all": [
966
+ {
967
+ "fact": "body",
968
+ "operator": "equal",
969
+ "value": "PENDING",
970
+ "path": "credential.status"
971
+ },
972
+ {
973
+ "fact": "operationPath",
974
+ "operator": "equal",
975
+ "value": "/consents/{ID}"
976
+ },
977
+ {
978
+ "fact": "method",
979
+ "operator": "equal",
980
+ "value": "put"
981
+ }
982
+ ]
983
+ },
984
+ "event": {
985
+ "method": null,
986
+ "path": null,
987
+ "params": {
988
+ "scripts": {
989
+ "exec": [
990
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
991
+ "const curDate = (new Date()).toUTCString()",
992
+ "const consentId = pm.request.url.path[1]",
993
+ "console.log('authToken is', pm.request.body.authToken)",
994
+ "",
995
+ "const thirdpartyRequest = {",
996
+ "url: userConfig.CALLBACK_ENDPOINT + '/consents/' + consentId,",
997
+ "method: 'put',",
998
+ "header: {",
999
+ " 'FSPIOP-Source': 'auth.dfspA',",
1000
+ " 'Accept': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
1001
+ " 'Content-Type': 'application/vnd.interoperability.thirdparty+json;version=1.0',",
1002
+ " 'Date': curDate",
1003
+ "},",
1004
+ "body: {",
1005
+ " mode: 'raw',",
1006
+ " raw: JSON.stringify({",
1007
+ " \"requestId\": \"4cab6274-8b3e-41b4-83ce-fc0847409155\",",
1008
+ " \"participantId\": \"dfspA\",",
1009
+ " \"initiatorId\": \"pispA\",",
1010
+ " \"scopes\": [",
1011
+ " {",
1012
+ " \"accountId\": \"dfspa.alice.1234\",",
1013
+ " \"actions\": [",
1014
+ " \"accounts.transfer\",",
1015
+ " \"accounts.getBalance\"",
1016
+ " ]",
1017
+ " },",
1018
+ " {",
1019
+ " \"accountId\": \"dfspa.alice.5678\",",
1020
+ " \"actions\": [",
1021
+ " \"accounts.transfer\",",
1022
+ " \"accounts.getBalance\"",
1023
+ " ]",
1024
+ " }",
1025
+ " ],",
1026
+ " \"credential\": {",
1027
+ " \"id\": \"9876\",",
1028
+ " \"type\": \"FIDO\",",
1029
+ " \"status\": \"PENDING\",",
1030
+ " \"challenge\": {",
1031
+ " \"payload\": \"base64 encoded challenge\",",
1032
+ " \"signature\": \"payload signed by PISP - using private key\"",
1033
+ " },",
1034
+ " \"payload\": \"base64 encoded bytes- using public key\"",
1035
+ " }",
1036
+ "})",
1037
+ "}",
1038
+ "}",
1039
+ "pm.sendRequest(thirdpartyRequest, function (err, response) {",
1040
+ "console.log('consents response : '+JSON.stringify(response.json()))",
1041
+ "});"
1042
+ ]
1043
+ }
1044
+ },
1045
+ "type": "MOCK_RESPONSE"
1046
+ },
1047
+ "type": "response",
1048
+ "version": 1
1049
+ },
1050
+ {
1051
+ "ruleId": 17,
1052
+ "priority": 1,
1053
+ "description": "get /participants/CONSENT/{ID} - generic",
1054
+ "apiVersion": {
1055
+ "minorVersion": 0,
1056
+ "majorVersion": 1,
1057
+ "type": "fspiop",
1058
+ "asynchronous": true
1059
+ },
1060
+ "conditions": {
1061
+ "all": [
1062
+ {
1063
+ "fact": "pathParams",
1064
+ "operator": "equal",
1065
+ "value": "CONSENT",
1066
+ "path": "Type"
1067
+ },
1068
+ {
1069
+ "fact": "operationPath",
1070
+ "operator": "equal",
1071
+ "value": "/participants/{Type}/{ID}"
1072
+ },
1073
+ {
1074
+ "fact": "method",
1075
+ "operator": "equal",
1076
+ "value": "get"
1077
+ }
1078
+ ]
1079
+ },
1080
+ "event": {
1081
+ "method": null,
1082
+ "path": null,
1083
+ "params": {
1084
+ "scripts": {
1085
+ "exec": [
1086
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
1087
+ "const curDate = (new Date()).toUTCString()",
1088
+ "const consentId = pm.request.url.path[2]",
1089
+ "",
1090
+ "const participantsRequest = {",
1091
+ "url: userConfig.ALS_ENDPOINT + '/participants/CONSENT/' + consentId,",
1092
+ "method: 'delete',",
1093
+ "header: {",
1094
+ " 'FSPIOP-Source': 'dfspa',",
1095
+ " 'Accept': 'application/vnd.interoperability.participants+json;version=1.0',",
1096
+ " 'Content-Type': 'application/vnd.interoperability.participants+json;version=1.0',",
1097
+ " 'Date': curDate",
1098
+ "}",
1099
+ "}",
1100
+ "pm.sendRequest(participantsRequest, function (err, response) {",
1101
+ "console.log('consents response : '+JSON.stringify(response.json()))",
1102
+ "});"
1103
+ ]
1104
+ }
1105
+ },
1106
+ "type": "MOCK_RESPONSE"
1107
+ },
1108
+ "type": "response",
1109
+ "version": 1
1110
+ },
1111
+ {
1112
+ "ruleId": 18,
1113
+ "priority": 1,
1114
+ "description": "post /participants/CONSENT/{ID} - generic",
1115
+ "apiVersion": {
1116
+ "minorVersion": 0,
1117
+ "majorVersion": 1,
1118
+ "type": "fspiop",
1119
+ "asynchronous": true
1120
+ },
1121
+ "conditions": {
1122
+ "all": [
1123
+ {
1124
+ "fact": "pathParams",
1125
+ "operator": "equal",
1126
+ "value": "CONSENT",
1127
+ "path": "Type"
1128
+ },
1129
+ {
1130
+ "fact": "operationPath",
1131
+ "operator": "equal",
1132
+ "value": "/participants/{Type}/{ID}"
1133
+ },
1134
+ {
1135
+ "fact": "method",
1136
+ "operator": "equal",
1137
+ "value": "post"
1138
+ }
1139
+ ]
1140
+ },
1141
+ "event": {
1142
+ "method": null,
1143
+ "path": null,
1144
+ "params": {
1145
+ "scripts": {
1146
+ "exec": [
1147
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
1148
+ "const curDate = (new Date()).toUTCString()",
1149
+ "const consentId = pm.request.url.path[2]",
1150
+ "",
1151
+ "const participantsRequest = {",
1152
+ "url: userConfig.ALS_ENDPOINT + '/participants/CONSENT/' + consentId,",
1153
+ "method: 'post',",
1154
+ "header: {",
1155
+ " 'FSPIOP-Source': 'dfspa',",
1156
+ " 'Accept': 'application/vnd.interoperability.participants+json;version=1.0',",
1157
+ " 'Content-Type': 'application/vnd.interoperability.participants+json;version=1.0',",
1158
+ " 'Date': curDate",
1159
+ "},",
1160
+ "body: {",
1161
+ " mode: 'raw',",
1162
+ " raw: JSON.stringify({",
1163
+ " \"fspId\": \"dfspa\"",
1164
+ " })",
1165
+ "}",
1166
+ "}",
1167
+ "pm.sendRequest(participantsRequest, function (err, response) {",
1168
+ "console.log('consents response : '+JSON.stringify(response.json()))",
1169
+ "});"
1170
+ ]
1171
+ }
1172
+ },
1173
+ "type": "MOCK_RESPONSE"
1174
+ },
1175
+ "type": "response",
1176
+ "version": 1
1177
+ },
1178
+ {
1179
+ "ruleId": 19,
1180
+ "priority": 1,
1181
+ "description": "delete /participants/CONSENT/{ID} - generic",
1182
+ "apiVersion": {
1183
+ "minorVersion": 0,
1184
+ "majorVersion": 1,
1185
+ "type": "fspiop",
1186
+ "asynchronous": true
1187
+ },
1188
+ "conditions": {
1189
+ "all": [
1190
+ {
1191
+ "fact": "pathParams",
1192
+ "operator": "equal",
1193
+ "value": "CONSENT",
1194
+ "path": "Type"
1195
+ },
1196
+ {
1197
+ "fact": "operationPath",
1198
+ "operator": "equal",
1199
+ "value": "/participants/{Type}/{ID}"
1200
+ },
1201
+ {
1202
+ "fact": "method",
1203
+ "operator": "equal",
1204
+ "value": "delete"
1205
+ }
1206
+ ]
1207
+ },
1208
+ "event": {
1209
+ "method": null,
1210
+ "path": null,
1211
+ "params": {
1212
+ "scripts": {
1213
+ "exec": [
1214
+ "const userConfig = JSON.parse(pm.globals.get('userConfig'))",
1215
+ "const curDate = (new Date()).toUTCString()",
1216
+ "const consentId = pm.request.url.path[2]",
1217
+ "",
1218
+ "const participantsRequest = {",
1219
+ "url: userConfig.ALS_ENDPOINT + '/participants/CONSENT/' + consentId,",
1220
+ "method: 'delete',",
1221
+ "header: {",
1222
+ " 'FSPIOP-Source': 'dfspa',",
1223
+ " 'Accept': 'application/vnd.interoperability.participants+json;version=1.0',",
1224
+ " 'Content-Type': 'application/vnd.interoperability.participants+json;version=1.0',",
1225
+ " 'Date': curDate",
1226
+ "}",
1227
+ "}",
1228
+ "pm.sendRequest(participantsRequest, function (err, response) {",
1229
+ "console.log('consents response : '+JSON.stringify(response.json()))",
1230
+ "});"
1231
+ ]
1232
+ }
1233
+ },
1234
+ "type": "MOCK_RESPONSE"
1235
+ },
1236
+ "type": "response",
1237
+ "version": 1
1238
+ },
1239
+ {
1240
+ "ruleId": 21,
1241
+ "priority": 1,
1242
+ "description": "post /login",
1243
+ "apiVersion": {
1244
+ "minorVersion": 1,
1245
+ "majorVersion": 0,
1246
+ "type": "thirdparty_simulator",
1247
+ "asynchronous": false
1248
+ },
1249
+ "conditions": {
1250
+ "all": [
1251
+ {
1252
+ "fact": "operationPath",
1253
+ "operator": "equal",
1254
+ "value": "/login"
1255
+ },
1256
+ {
1257
+ "fact": "method",
1258
+ "operator": "equal",
1259
+ "value": "post"
1260
+ }
1261
+ ]
1262
+ },
1263
+ "event": {
1264
+ "method": null,
1265
+ "path": null,
1266
+ "params": {
1267
+ "body": {},
1268
+ "statusCode": "200",
1269
+ "scripts": {}
1270
+ },
1271
+ "delay": 0,
1272
+ "type": "FIXED_RESPONSE"
1273
+ },
1274
+ "type": "response",
1275
+ "version": 1
1276
+ },
1277
+ {
1278
+ "ruleId": 22,
1279
+ "priority": 1,
1280
+ "description": "post /authorize",
1281
+ "apiVersion": {
1282
+ "minorVersion": 1,
1283
+ "majorVersion": 0,
1284
+ "type": "thirdparty_simulator",
1285
+ "asynchronous": false
1286
+ },
1287
+ "conditions": {
1288
+ "all": [
1289
+ {
1290
+ "fact": "operationPath",
1291
+ "operator": "equal",
1292
+ "value": "/authorize"
1293
+ },
1294
+ {
1295
+ "fact": "method",
1296
+ "operator": "equal",
1297
+ "value": "post"
1298
+ }
1299
+ ]
1300
+ },
1301
+ "event": {
1302
+ "method": null,
1303
+ "path": null,
1304
+ "params": {
1305
+ "body": {
1306
+ "secret": "{$environment.secretOrOTPAuth}"
1307
+ },
1308
+ "statusCode": "200",
1309
+ "scripts": {
1310
+ "exec": [
1311
+ "const body = JSON.parse(pm.request.body)",
1312
+ "const consReqId = body.consentRequestId",
1313
+ "pm.environment.set(consReqId, 'some-secret-' + consReqId)",
1314
+ "pm.environment.set('secretOrOTPAuth', 'some-secret-' + consReqId)"
1315
+ ]
1316
+ }
1317
+ },
1318
+ "delay": 0,
1319
+ "type": "FIXED_RESPONSE"
1320
+ },
1321
+ "type": "response",
1322
+ "version": 1
1323
+ },
1324
+ {
1325
+ "ruleId": 23,
1326
+ "priority": 1,
1327
+ "description": "post /sendOTP",
1328
+ "apiVersion": {
1329
+ "minorVersion": 1,
1330
+ "majorVersion": 0,
1331
+ "type": "thirdparty_simulator",
1332
+ "asynchronous": false
1333
+ },
1334
+ "conditions": {
1335
+ "all": [
1336
+ {
1337
+ "fact": "operationPath",
1338
+ "operator": "equal",
1339
+ "value": "/sendOTP"
1340
+ },
1341
+ {
1342
+ "fact": "method",
1343
+ "operator": "equal",
1344
+ "value": "post"
1345
+ }
1346
+ ]
1347
+ },
1348
+ "event": {
1349
+ "method": null,
1350
+ "path": null,
1351
+ "params": {
1352
+ "body": {
1353
+ "otp": "{$environment.secretOrOTPPost}"
1354
+ },
1355
+ "statusCode": "200",
1356
+ "scripts": {
1357
+ "exec": [
1358
+ "const body = JSON.parse(pm.request.body)",
1359
+ "const consReqId = body.consentRequestId",
1360
+ "pm.environment.set(consReqId, body.message)",
1361
+ "pm.environment.set('secretOrOTPPost', body.message)"
1362
+ ]
1363
+ }
1364
+ },
1365
+ "delay": 0,
1366
+ "type": "FIXED_RESPONSE"
1367
+ },
1368
+ "type": "response",
1369
+ "version": 1
1370
+ },
1371
+ {
1372
+ "ruleId": 24,
1373
+ "priority": 2,
1374
+ "description": "post /verifyOTPorSecret -FAIL",
1375
+ "apiVersion": {
1376
+ "minorVersion": 1,
1377
+ "majorVersion": 0,
1378
+ "type": "thirdparty_simulator",
1379
+ "asynchronous": false
1380
+ },
1381
+ "conditions": {
1382
+ "all": [
1383
+ {
1384
+ "fact": "body",
1385
+ "operator": "equal",
1386
+ "value": "000000",
1387
+ "path": "value"
1388
+ },
1389
+ {
1390
+ "fact": "body",
1391
+ "operator": "equal",
1392
+ "value": "000001",
1393
+ "path": "value"
1394
+ },
1395
+ {
1396
+ "fact": "operationPath",
1397
+ "operator": "equal",
1398
+ "value": "/verifyOTPorSecret"
1399
+ },
1400
+ {
1401
+ "fact": "method",
1402
+ "operator": "equal",
1403
+ "value": "post"
1404
+ }
1405
+ ]
1406
+ },
1407
+ "event": {
1408
+ "method": null,
1409
+ "path": null,
1410
+ "params": {
1411
+ "body": {
1412
+ "statusCode": "401",
1413
+ "status": "FAIL",
1414
+ "secretOrOTP": "{$request.body.value}"
1415
+ },
1416
+ "statusCode": "401",
1417
+ "scripts": {
1418
+ "exec": []
1419
+ }
1420
+ },
1421
+ "delay": 0,
1422
+ "type": "FIXED_RESPONSE"
1423
+ },
1424
+ "type": "response",
1425
+ "version": 1
1426
+ },
1427
+ {
1428
+ "ruleId": 25,
1429
+ "priority": 1,
1430
+ "description": "post /verifyOTPorSecret",
1431
+ "apiVersion": {
1432
+ "minorVersion": 1,
1433
+ "majorVersion": 0,
1434
+ "type": "thirdparty_simulator",
1435
+ "asynchronous": false
1436
+ },
1437
+ "conditions": {
1438
+ "all": [
1439
+ {
1440
+ "fact": "operationPath",
1441
+ "operator": "equal",
1442
+ "value": "/verifyOTPorSecret"
1443
+ },
1444
+ {
1445
+ "fact": "method",
1446
+ "operator": "equal",
1447
+ "value": "post"
1448
+ }
1449
+ ]
1450
+ },
1451
+ "event": {
1452
+ "method": null,
1453
+ "path": null,
1454
+ "params": {
1455
+ "body": {
1456
+ "statusCode": "{$environment.statusCode}",
1457
+ "status": "{$environment.verifyOTPorSecretStatus}"
1458
+ },
1459
+ "statusCode": "200",
1460
+ "scripts": {
1461
+ "exec": [
1462
+ "const body = JSON.parse(pm.request.body)",
1463
+ "const secretOrOTPVerify = pm.environment.get(body.consentRequestId)",
1464
+ "if (body.value == secretOrOTPVerify) {",
1465
+ " pm.environment.set('verifyOTPorSecretStatus', 'SUCCESS')",
1466
+ " pm.environment.set('statusCode', 200)",
1467
+ "} else {",
1468
+ " pm.environment.set('verifyOTPorSecretStatus', 'FAIL')",
1469
+ " pm.environment.set('statusCode', 401)",
1470
+ "}"
1471
+ ]
1472
+ }
1473
+ },
1474
+ "delay": 0,
1475
+ "type": "FIXED_RESPONSE"
1476
+ },
1477
+ "type": "response",
1478
+ "version": 1
1479
+ },
1480
+ {
1481
+ "ruleId": 26,
1482
+ "priority": 1,
1483
+ "description": "get /OTPorSecret/{ID}",
1484
+ "apiVersion": {
1485
+ "minorVersion": 1,
1486
+ "majorVersion": 0,
1487
+ "type": "thirdparty_simulator",
1488
+ "asynchronous": false
1489
+ },
1490
+ "conditions": {
1491
+ "all": [
1492
+ {
1493
+ "fact": "operationPath",
1494
+ "operator": "equal",
1495
+ "value": "/OTPorSecret/{ID}"
1496
+ },
1497
+ {
1498
+ "fact": "method",
1499
+ "operator": "equal",
1500
+ "value": "get"
1501
+ }
1502
+ ]
1503
+ },
1504
+ "event": {
1505
+ "method": null,
1506
+ "path": null,
1507
+ "params": {
1508
+ "body": {
1509
+ "value": "{$environment.secretOrOTPGet}"
1510
+ },
1511
+ "statusCode": "200",
1512
+ "scripts": {
1513
+ "exec": [
1514
+ "const consReqId = pm.request.url.path[1]",
1515
+ "const secretOrOTPGet = pm.environment.get(consReqId)",
1516
+ "pm.environment.set('secretOrOTPGet', secretOrOTPGet)"
1517
+ ]
1518
+ }
1519
+ },
1520
+ "delay": 0,
1521
+ "type": "FIXED_RESPONSE"
1522
+ },
1523
+ "type": "response",
1524
+ "version": 1
1525
+ },
1526
+ {
1527
+ "ruleId": 27,
1528
+ "priority": 1,
1529
+ "description": "post /store/consentRequests/{ID}",
1530
+ "apiVersion": {
1531
+ "minorVersion": 1,
1532
+ "majorVersion": 0,
1533
+ "type": "thirdparty_simulator",
1534
+ "asynchronous": false
1535
+ },
1536
+ "conditions": {
1537
+ "all": [
1538
+ {
1539
+ "fact": "operationPath",
1540
+ "operator": "equal",
1541
+ "value": "/store/consentRequests/{ID}"
1542
+ },
1543
+ {
1544
+ "fact": "method",
1545
+ "operator": "equal",
1546
+ "value": "post"
1547
+ }
1548
+ ]
1549
+ },
1550
+ "event": {
1551
+ "method": null,
1552
+ "path": null,
1553
+ "params": {
1554
+ "body": {
1555
+ "value": "{$environment.consReqStorePost}"
1556
+ },
1557
+ "statusCode": "200",
1558
+ "scripts": {
1559
+ "exec": [
1560
+ "const body = JSON.parse(pm.request.body)",
1561
+ "const consReqId = (pm.request.url.path[2] + '-store')",
1562
+ "const searchRegExp = /\\\"/gi",
1563
+ "const replaceWith = '\\''",
1564
+ "const reqAsStr = JSON.stringify(body)",
1565
+ "const reqAsObj = reqAsStr.replace(searchRegExp, replaceWith)",
1566
+ "pm.environment.set(consReqId, reqAsObj)",
1567
+ "pm.environment.set('consReqStorePost', reqAsObj)"
1568
+ ]
1569
+ }
1570
+ },
1571
+ "delay": 0,
1572
+ "type": "FIXED_RESPONSE"
1573
+ },
1574
+ "type": "response",
1575
+ "version": 1
1576
+ },
1577
+ {
1578
+ "ruleId": 28,
1579
+ "priority": 1,
1580
+ "description": "get /store/consentRequests/{ID}",
1581
+ "apiVersion": {
1582
+ "minorVersion": 1,
1583
+ "majorVersion": 0,
1584
+ "type": "thirdparty_simulator",
1585
+ "asynchronous": false
1586
+ },
1587
+ "conditions": {
1588
+ "all": [
1589
+ {
1590
+ "fact": "operationPath",
1591
+ "operator": "equal",
1592
+ "value": "/store/consentRequests/{ID}"
1593
+ },
1594
+ {
1595
+ "fact": "method",
1596
+ "operator": "equal",
1597
+ "value": "get"
1598
+ }
1599
+ ]
1600
+ },
1601
+ "event": {
1602
+ "method": null,
1603
+ "path": null,
1604
+ "params": {
1605
+ "body": {
1606
+ "value": "{$environment.consReqStoreGet}"
1607
+ },
1608
+ "statusCode": "200",
1609
+ "scripts": {
1610
+ "exec": [
1611
+ "const consReqId = (pm.request.url.path[2] + '-store')",
1612
+ "const consReqStoreGet = pm.environment.get(consReqId)",
1613
+ "pm.environment.set('consReqStoreGet', consReqStoreGet)"
1614
+ ]
1615
+ }
1616
+ },
1617
+ "delay": 0,
1618
+ "type": "FIXED_RESPONSE"
1619
+ },
1620
+ "type": "response",
1621
+ "version": 1
1622
+ }
1623
+ ]