Skip to content

Commit

Permalink
feat(3953): added FSPIOP FX APIs v.2, SDK backend/outbound v2.1 to TT…
Browse files Browse the repository at this point in the history
…K; removed outdated fx-api_2.0 (#248)

* feat(3953): added FSPIOP FX APIs to TTK; removed outdated fx-api_2.0

* feat(3953): fixed PR checks

* feat(3953): fixed PR checks

* feat(3953): added SDK backend/outbound

* feat(3953): increased version

* feat(3953): updated deps

* feat(3953): updated deps

* feat(3953): updated deps

* feat(3953): rolled back chai to version 4

* feat(3953): rolled back sdk-standard-components

* feat(3953): fspiop_fxp --> fspiop

* feat(3953): fspiop_fxp --> fspiop

* feat(3953): removed additionalApi from system_config.json

* feat(3953): updated deps

* Update .ncurc.yaml

dummy commit to re-trigger license/cla check
  • Loading branch information
geka-evk authored Feb 28, 2024
1 parent 5f62d15 commit 6edbade
Show file tree
Hide file tree
Showing 18 changed files with 13,597 additions and 704 deletions.
2 changes: 2 additions & 0 deletions .ncurc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Add a TODO comment indicating the reason for each rejected dependency upgrade added to this list, and what should be done to resolve it (i.e. handle it through a story, etc).
reject: [
"chai", # version 5 uses only ESM
"@mojaloop/sdk-standard-components" ## version 17.4.0 introduces a bug: this.logger.isDebugEnabled is not a function
]

3 changes: 2 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"GHSA-qwph-4952-7xr6", // https://github.com/advisories/GHSA-qwph-4952-7xr6
// request-provise-native, no fix available
"GHSA-p8p7-x288-28g6", // https://github.com/advisories/GHSA-p8p7-x288-28g6
"GHSA-72xf-g2v4-qvf3" // https://github.com/advisories/GHSA-72xf-g2v4-qvf3
"GHSA-72xf-g2v4-qvf3", // https://github.com/advisories/GHSA-72xf-g2v4-qvf3,
"GHSA-78xj-cgh5-2h22" // https://github.com/advisories/GHSA-78xj-cgh5-2h22
]
}
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ services:
build:
context: .
target: builder
user: root
volumes:
- "./spec_files:/opt/app/spec_files"
- "./secrets:/opt/app/secrets"
- "./examples:/opt/app/examples"
environment:
REPORTING_DB_CONNECTION_PASSWORD: ttk@123$asdf
TTK_SYSTEM_CONFIG: |-
Expand Down
264 changes: 264 additions & 0 deletions examples/collections/fxp/FXP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
{
"options": {},
"name": "multi",
"test_cases": [
{
"id": 1,
"name": "fxQuotes",
"fileInfo": {
"path": "fxp/FXP.json"
},
"meta": {
"info": "fxQuotes"
},
"requests": [
{
"id": 1,
"description": "POST /fxQuotes",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 2,
"type": "fspiop",
"asynchronous": true,
"additionalApi": true,
"specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates"
},
"operationPath": "/fxQuotes",
"path": "/fxQuotes",
"method": "post",
"url": null,
"body": {
"conversionRequestId": "b51ec534-ee48-4575-b6a9-ead2955b8069",
"conversionTerms": {
"conversionId": "b51ec534-ee48-4575-b6a9-ead2955b8069",
"determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069",
"initiatingFsp": "{$inputs.fromFspId}",
"counterPartyFsp": "{$inputs.fxpId}",
"amountType": "RECEIVE",
"sourceAmount": {
"currency": "{$inputs.currency}"
},
"targetAmount": {
"currency": "EUR",
"amount": "100"
},
"expiration": "2024-05-24T08:38:08.699-04:00"
}
},
"headers": {
"Accept": "{$inputs.acceptFxQuotes}",
"Content-Type": "{$inputs.contentTypeFxQuotes}",
"Date": "{$function.generic.curDate}",
"FSPIOP-Source": "{$inputs.fromFspId}"
},
"disabled": false
}
]
},
{
"id": 2,
"name": "GET /fxQuotes",
"requests": [
{
"id": 1,
"description": "GET /fxQuotes",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 2,
"type": "fspiop",
"asynchronous": true,
"additionalApi": true,
"specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates"
},
"operationPath": "/fxQuotes/{ID}",
"path": "/fxQuotes/{$function.generic.generateUUID}",
"method": "get",
"params": {
"ID": "{$function.generic.generateUUID}"
},
"url": null,
"headers": {
"Content-Type": "{$inputs.contentTypeFxQuotes}",
"Date": "{$function.generic.curDate}",
"FSPIOP-Source": "{$inputs.fromFspId}",
"Accept": "{$inputs.acceptFxQuotes}"
}
}
],
"fileInfo": {
"path": "fxp/FXP.json"
}
},
{
"id": 3,
"name": "FX Transfers",
"requests": [
{
"id": 1,
"description": "POST /fxTransfers",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 2,
"type": "fspiop",
"asynchronous": true,
"additionalApi": true,
"specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates"
},
"operationPath": "/fxTransfers",
"path": "/fxTransfers",
"method": "post",
"url": null,
"body": {
"commitRequestId": "b51ec534-ee48-4575-b6a9-ead2955b8069",
"determiningTransferId": "b51ec534-ee48-4575-b6a9-ead2955b8069",
"initiatingFsp": "{$inputs.fromFspId}",
"counterPartyFsp": "{$inputs.fxpId}",
"sourceAmount": {
"currency": "USD",
"amount": "105.23"
},
"targetAmount": {
"currency": "EUR",
"amount": "100"
},
"condition": "HOr33-H3AfTDHrSkPjJtVPRdKouuMkDXTR4ejlQa8Ks",
"expiration": "2016-05-24T08:38:08.699-04:00"
},
"headers": {
"Accept": "{$inputs.acceptFxTransfers}",
"Content-Type": "{$inputs.contentTypeFxTransfers}",
"Date": "{$function.generic.curDate}",
"FSPIOP-Source": "{$inputs.fromFspId}"
}
}
],
"fileInfo": {
"path": "fxp/FXP.json"
}
},
{
"id": 4,
"name": "GET /fxTransfers/{ID}",
"requests": [
{
"id": 1,
"description": "GET /fxTransfers/{ID}",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 2,
"type": "fspiop",
"asynchronous": true,
"additionalApi": true,
"specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates"
},
"operationPath": "/fxTransfers/{ID}",
"path": "/fxTransfers/{$function.generic.generateUUID}",
"method": "get",
"params": {
"ID": "{$function.generic.generateUUID}"
},
"url": null,
"headers": {
"Content-Type": "{$inputs.contentTypeFxTransfers}",
"Date": "{$function.generic.curDate}",
"FSPIOP-Source": "{$inputs.fromFspId}",
"Accept": "{$inputs.acceptFxTransfers}"
}
}
],
"fileInfo": {
"path": "fxp/FXP.json"
}
},
{
"id": 5,
"name": "GET /services/FXP",
"requests": [
{
"id": 1,
"description": "GET /services/FXP",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 2,
"type": "fspiop",
"asynchronous": true,
"additionalApi": true,
"specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates"
},
"operationPath": "/services/FXP",
"path": "/services/FXP",
"method": "get",
"url": null,
"headers": {
"Content-Type": "{$inputs.contentTypeServicesFxp}",
"Date": "{$function.generic.curDate}",
"FSPIOP-Source": "{$inputs.fromFspId}",
"Accept": "{$inputs.acceptServicesFxp}"
}
}
],
"fileInfo": {
"path": "fxp/FXP.json"
}
},
{
"id": 6,
"name": "GET /services/FXP/{SourceCurrency}/{TargetCurrency}",
"requests": [
{
"id": 1,
"description": "/services/FXP/{SourceCurrency}/{TargetCurrency}",
"apiVersion": {
"minorVersion": 0,
"majorVersion": 2,
"type": "fspiop",
"asynchronous": true,
"additionalApi": true,
"specFile": "spec_files/api_definitions/fspiop_2.0/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/fspiop_2.0/callback_map.json",
"responseMapFile": "spec_files/api_definitions/fspiop_2.0/response_map.json",
"jsfRefFile": "spec_files/api_definitions/fspiop_2.0/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/fspiop_2.0/trigger_templates"
},
"operationPath": "/services/FXP/{SourceCurrency}/{TargetCurrency}",
"path": "/services/FXP/USD/EUR",
"method": "get",
"params": {
"SourceCurrency": "USD",
"TargetCurrency": "EUR"
},
"url": null,
"headers": {
"Content-Type": "{$inputs.contentTypeServicesFxp}",
"Date": "{$function.generic.curDate}",
"FSPIOP-Source": "{$inputs.fromFspId}",
"Accept": "{$inputs.acceptServicesFxp}"
}
}
],
"fileInfo": {
"path": "fxp/FXP.json"
}
}
]
}
98 changes: 98 additions & 0 deletions examples/collections/fxp/SDK_backend.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"test_cases": [
{
"id": 1,
"name": "POST /fxQuotes",
"requests": [
{
"id": 1,
"description": "post /fxQuotes",
"apiVersion": {
"minorVersion": 1,
"majorVersion": 2,
"type": "sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets",
"asynchronous": false,
"additionalApi": true,
"specFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/callback_map.json",
"responseMapFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/response_map.json",
"jsfRefFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/trigger_templates"
},
"operationPath": "/fxQuotes",
"path": "/fxQuotes",
"method": "post",
"url": "http://localhost:4040/sdk-backend",
"body": {
"conversionRequestId": "828cc75f-1654-415e-8fcd-df76cc9329b9",
"conversionTerms": {
"conversionId": "581f68ef-b54f-416f-9161-ac34e889a84b",
"initiatingFsp": "PayerFSP",
"counterPartyFsp": "FDH_FX",
"amountType": "SEND",
"sourceAmount": {
"currency": "BWP",
"amount": "300"
},
"targetAmount": {
"currency": "TZS"
},
"expiration": "2021-08-25T14:17:09.663+01:00"
}
},
"headers": {},
"ignoreCallbacks": true
}
],
"fileInfo": {
"path": "fxp/SDK_backend.json"
}
},
{
"id": 2,
"name": "POST /fxTransfers",
"requests": [
{
"id": 1,
"description": "post /fxTransfers (backend)",
"apiVersion": {
"minorVersion": 1,
"majorVersion": 2,
"type": "sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets",
"asynchronous": false,
"prefix": "/sdk-backend",
"additionalApi": true,
"specFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/api_spec.yaml",
"callbackMapFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/callback_map.json",
"responseMapFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/response_map.json",
"jsfRefFile": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/mockRef.json",
"triggerTemplatesFolder": "spec_files/api_definitions/sdk-scheme-adapter-backend-v2_1_0-openapi3-snippets_2.1/trigger_templates"
},
"operationPath": "/fxTransfers",
"path": "/fxTransfers",
"method": "post",
"url": "http://localhost:4040/sdk-backend",
"body": {
"commitRequestId": "77c9d78d-c26a-4474-8b3c-99b96a814bfc",
"determiningTransferId": "d9ce59d4-3598-4396-8630-581bb0551451",
"initiatingFsp": "PayerFSP",
"counterPartyFsp": "FDH_FX",
"amountType": "SEND",
"sourceAmount": {
"currency": "BWP",
"amount": "300"
},
"targetAmount": {
"currency": "TZS",
"amount": "48000"
},
"condition": "{$inputs.condition}"
}
}
],
"fileInfo": {
"path": "fxp/SDK_backend.json"
}
}
]
}
Loading

0 comments on commit 6edbade

Please sign in to comment.