@mojaloop/sdk-scheme-adapter 24.0.7-snapshot.7 → 25.0.0-snapshot.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.
- package/.circleci/config.yml +2 -2
- package/.yarn/cache/{@types-node-npm-22.13.1-f9de886009-a0759e4bed.zip → @types-node-npm-22.13.0-ce5ef5ab7c-934122ad4c.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-eslint-plugin-npm-8.23.0-b3e7a7136e-b7dd9cbba9.zip → @typescript-eslint-eslint-plugin-npm-8.22.0-3ffeac3a34-f5e2fdea36.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-parser-npm-8.23.0-798a01aba9-3a17e8c4f1.zip → @typescript-eslint-parser-npm-8.22.0-024bd80eca-1c5923d76e.zip} +0 -0
- package/.yarn/cache/{@typescript-eslint-type-utils-npm-8.23.0-3e68bceaa0-523e333dd1.zip → @typescript-eslint-type-utils-npm-8.22.0-318d6614d2-1edc3bffc2.zip} +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +0 -27
- package/docker-compose.pm4ml.yml +2 -0
- package/docker-compose.yml +1 -0
- package/modules/api-svc/package.json +2 -2
- package/modules/api-svc/src/lib/dto.js +16 -33
- package/modules/api-svc/src/lib/model/OutboundTransfersModel.js +2 -37
- package/modules/api-svc/src/lib/model/common/Enums.js +1 -1
- package/modules/api-svc/test/unit/lib/model/data/defaultConfig.json +1 -2
- package/modules/api-svc/test/unit/lib/model/data/mockArguments.json +1 -1
- package/modules/outbound-command-event-handler/package.json +4 -4
- package/modules/outbound-domain-event-handler/package.json +4 -4
- package/modules/private-shared-lib/package-lock.json +2 -2
- package/modules/private-shared-lib/package.json +4 -4
- package/package.json +4 -4
- package/.yarn/cache/@mojaloop-central-services-error-handling-npm-13.0.5-8f87cae1ef-504635a52b.zip +0 -0
- package/.yarn/cache/@typescript-eslint-scope-manager-npm-8.23.0-437414802f-cb2772a1f4.zip +0 -0
- package/.yarn/cache/@typescript-eslint-types-npm-8.23.0-972ca6e315-6f3b0f5718.zip +0 -0
- package/.yarn/cache/@typescript-eslint-typescript-estree-npm-8.23.0-1907506b84-16ccabac25.zip +0 -0
- package/.yarn/cache/@typescript-eslint-utils-npm-8.23.0-ab8e41bb24-fba721abac.zip +0 -0
- package/.yarn/cache/@typescript-eslint-visitor-keys-npm-8.23.0-7428536446-20196da5f2.zip +0 -0
- package/.yarn/cache/ts-api-utils-npm-2.0.1-03c1d3773a-ca31f4dc3c.zip +0 -0
package/.circleci/config.yml
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,31 +1,4 @@
|
|
|
1
1
|
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
|
|
2
|
-
### [24.0.6](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.0.5...v24.0.6) (2025-02-04)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### Chore
|
|
6
|
-
|
|
7
|
-
* update build orb version to 1.0.50 ([#541](https://github.com/mojaloop/sdk-scheme-adapter/issues/541)) ([78a78c9](https://github.com/mojaloop/sdk-scheme-adapter/commit/78a78c98e392ba0dd932ab192c4b4a4f0e9fc1ae))
|
|
8
|
-
|
|
9
|
-
### [24.0.5](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.0.4...v24.0.5) (2025-02-03)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
### Bug Fixes
|
|
13
|
-
|
|
14
|
-
* **csi-1159:** post /quoterequest payload's extensionlist internal form fix ([#539](https://github.com/mojaloop/sdk-scheme-adapter/issues/539)) ([4877f9f](https://github.com/mojaloop/sdk-scheme-adapter/commit/4877f9fbbf4d263525a78f5fc7262126e7fb5c37))
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Chore
|
|
18
|
-
|
|
19
|
-
* **release:** 25.0.0 [skip ci] ([4b79333](https://github.com/mojaloop/sdk-scheme-adapter/commit/4b793337c01fc1ae8afd8c34c57c1a227fa12b66))
|
|
20
|
-
* revert version ([#540](https://github.com/mojaloop/sdk-scheme-adapter/issues/540)) ([99da6b4](https://github.com/mojaloop/sdk-scheme-adapter/commit/99da6b495673c9ef9e00c4befc532a716c25ed1c))
|
|
21
|
-
|
|
22
|
-
## [25.0.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.0.4...v25.0.0) (2025-02-03)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Bug Fixes
|
|
26
|
-
|
|
27
|
-
* **csi-1159:** post /quoterequest payload's extensionlist internal form fix ([#539](https://github.com/mojaloop/sdk-scheme-adapter/issues/539)) ([4877f9f](https://github.com/mojaloop/sdk-scheme-adapter/commit/4877f9fbbf4d263525a78f5fc7262126e7fb5c37))
|
|
28
|
-
|
|
29
2
|
### [24.0.4](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.0.3...v24.0.4) (2025-01-30)
|
|
30
3
|
|
|
31
4
|
|
package/docker-compose.pm4ml.yml
CHANGED
package/docker-compose.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-api-svc",
|
|
3
|
-
"version": "21.0.0-snapshot.
|
|
3
|
+
"version": "21.0.0-snapshot.2",
|
|
4
4
|
"description": "An adapter for connecting to Mojaloop API enabled switches.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@koa/cors": "^5.0.0",
|
|
67
67
|
"@mojaloop/api-snippets": "17.7.11",
|
|
68
|
-
"@mojaloop/central-services-error-handling": "^13.0.
|
|
68
|
+
"@mojaloop/central-services-error-handling": "^13.0.4",
|
|
69
69
|
"@mojaloop/central-services-logger": "^11.5.4",
|
|
70
70
|
"@mojaloop/central-services-metrics": "^12.4.4",
|
|
71
71
|
"@mojaloop/central-services-shared": "^18.17.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/*eslint quote-props: ["error", "as-needed"]*/
|
|
28
28
|
const config = require('../config');
|
|
29
29
|
const randomUUID = require('@mojaloop/central-services-shared').Util.id(config.idGenerator);
|
|
30
|
-
const { Directions, SDKStateEnum
|
|
30
|
+
const { Directions, SDKStateEnum} = require('./model/common');
|
|
31
31
|
|
|
32
32
|
const quoteRequestStateDto = (request) => ({
|
|
33
33
|
// transferId: this follows the slightly dodgy assumption that transferId will be same as this transactionId.
|
|
@@ -56,41 +56,24 @@ const fxQuoteRequestStateDto = (request) => ({
|
|
|
56
56
|
* @param data {object} - "state" of inbound transaction request
|
|
57
57
|
* Supports only single FXP and currency for now
|
|
58
58
|
*/
|
|
59
|
-
const outboundPostFxQuotePayloadDto = (data) => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
if (data.amountType === AmountTypes.RECEIVE && !config.supportedCurrencies.includes(data.currency)) {
|
|
71
|
-
sourceAmount = {
|
|
72
|
-
currency: config.supportedCurrencies[0],
|
|
73
|
-
};
|
|
74
|
-
targetAmount = {
|
|
59
|
+
const outboundPostFxQuotePayloadDto = (data) => Object.freeze({
|
|
60
|
+
conversionRequestId: randomUUID(),
|
|
61
|
+
conversionTerms: {
|
|
62
|
+
conversionId: randomUUID(), // should be the same as commitRequestId from fxTransfer
|
|
63
|
+
initiatingFsp: data.from.fspId,
|
|
64
|
+
determiningTransferId: data.transferId,
|
|
65
|
+
counterPartyFsp: data.fxProviders[0],
|
|
66
|
+
amountType: data.amountType,
|
|
67
|
+
sourceAmount: {
|
|
75
68
|
currency: data.currency,
|
|
76
69
|
amount: data.amount
|
|
77
|
-
}
|
|
70
|
+
},
|
|
71
|
+
targetAmount: {
|
|
72
|
+
currency: data.supportedCurrencies[0],
|
|
73
|
+
},
|
|
74
|
+
expiration: data.fxQuoteExpiration,
|
|
78
75
|
}
|
|
79
|
-
|
|
80
|
-
return Object.freeze({
|
|
81
|
-
conversionRequestId: randomUUID(),
|
|
82
|
-
conversionTerms: {
|
|
83
|
-
conversionId: randomUUID(), // should be the same as commitRequestId from fxTransfer
|
|
84
|
-
initiatingFsp: data.from.fspId,
|
|
85
|
-
determiningTransferId: data.transferId,
|
|
86
|
-
counterPartyFsp: data.fxProviders[0],
|
|
87
|
-
amountType: data.amountType,
|
|
88
|
-
sourceAmount,
|
|
89
|
-
targetAmount,
|
|
90
|
-
expiration: data.fxQuoteExpiration,
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
};
|
|
76
|
+
});
|
|
94
77
|
|
|
95
78
|
/**
|
|
96
79
|
* @param data {object} - "state" of inbound transaction request
|
|
@@ -70,7 +70,6 @@ class OutboundTransfersModel {
|
|
|
70
70
|
this._multiplePartiesResponseSeconds = config.multiplePartiesResponseSeconds;
|
|
71
71
|
this._sendFinalNotificationIfRequested = config.sendFinalNotificationIfRequested;
|
|
72
72
|
this._apiType = config.apiType;
|
|
73
|
-
this._supportedCurrencies = config.supportedCurrencies;
|
|
74
73
|
|
|
75
74
|
if (this._autoAcceptParty && this._multiplePartiesResponse) {
|
|
76
75
|
throw new Error('Conflicting config options provided: autoAcceptParty and multiplePartiesResponse');
|
|
@@ -392,20 +391,14 @@ class OutboundTransfersModel {
|
|
|
392
391
|
}
|
|
393
392
|
this.data.to.dateOfBirth = payee.personalInfo.dateOfBirth;
|
|
394
393
|
}
|
|
395
|
-
|
|
394
|
+
|
|
396
395
|
if (Array.isArray(payee.supportedCurrencies)) {
|
|
397
396
|
if (!payee.supportedCurrencies.length) {
|
|
398
397
|
throw new Error(ErrorMessages.noSupportedCurrencies);
|
|
399
398
|
}
|
|
400
399
|
|
|
401
|
-
this.data.needFx =
|
|
400
|
+
this.data.needFx = !payee.supportedCurrencies.includes(this.data.currency);
|
|
402
401
|
this.data.supportedCurrencies = payee.supportedCurrencies;
|
|
403
|
-
|
|
404
|
-
// if (this.data.amountType == AmountTypes.RECEIVE) {
|
|
405
|
-
// if ( !this._supportedCurrencies.includes(this.data.currency) ) {
|
|
406
|
-
// this.data.supportedCurrencies = this._supportedCurrencies;
|
|
407
|
-
// }
|
|
408
|
-
// }
|
|
409
402
|
}
|
|
410
403
|
|
|
411
404
|
this._logger.isVerboseEnabled && this._logger.push({
|
|
@@ -1217,34 +1210,6 @@ class OutboundTransfersModel {
|
|
|
1217
1210
|
return modifiedData;
|
|
1218
1211
|
}
|
|
1219
1212
|
|
|
1220
|
-
/**
|
|
1221
|
-
* Determines if FX is needed for the transfer
|
|
1222
|
-
*
|
|
1223
|
-
* @param {Array} payerCurrencies - Array of supported currencies for the payer
|
|
1224
|
-
* @param {Array} payeeCurrencies - Array of supported currencies for the payee
|
|
1225
|
-
* @param {string} amountCurrency - Currency of the amount being transferred
|
|
1226
|
-
* @param {string} amountType - Type of the amount being transferred (SEND/RECEIVE)
|
|
1227
|
-
* @returns {boolean} - true if FX is needed, false if not
|
|
1228
|
-
*/
|
|
1229
|
-
_isFxNeeded(payerCurrencies, payeeCurrencies, amountCurrency, amountType) {
|
|
1230
|
-
if (payerCurrencies.includes(amountCurrency) && payeeCurrencies.includes(amountCurrency)) {
|
|
1231
|
-
return false;
|
|
1232
|
-
}
|
|
1233
|
-
const intersection = payerCurrencies.filter(currency => payeeCurrencies.includes(currency));
|
|
1234
|
-
if(intersection.length > 0 && !intersection.includes(amountCurrency)) {
|
|
1235
|
-
return true;
|
|
1236
|
-
}
|
|
1237
|
-
if (amountType === AmountTypes.RECEIVE) {
|
|
1238
|
-
if (!payerCurrencies.includes(amountCurrency)) {
|
|
1239
|
-
return true;
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
if (!payeeCurrencies.includes(amountCurrency)) {
|
|
1243
|
-
return true;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
return false;
|
|
1247
|
-
}
|
|
1248
1213
|
|
|
1249
1214
|
/**
|
|
1250
1215
|
* Loads a transfer model from cache for resumption of the transfer process
|
|
@@ -112,7 +112,7 @@ const ErrorMessages = Object.freeze({
|
|
|
112
112
|
noSupportedCurrencies: 'No payee supportedCurrencies received',
|
|
113
113
|
responseMissedExpiryDeadline: 'Response missed expiry deadline',
|
|
114
114
|
quoteRejectedByBackend: 'Quote rejected by backend',
|
|
115
|
-
fxQuoteRejectedByBackend: 'FX quote rejected by backend'
|
|
115
|
+
fxQuoteRejectedByBackend: 'FX quote rejected by backend',
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
const AmountTypes = Object.freeze({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.2",
|
|
4
4
|
"description": "Mojaloop sdk scheme adapter command event handler",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"@types/convict": "^6.1.6",
|
|
60
60
|
"@types/express": "^5.0.0",
|
|
61
61
|
"@types/jest": "^29.5.14",
|
|
62
|
-
"@types/node": "^22.13.
|
|
62
|
+
"@types/node": "^22.13.0",
|
|
63
63
|
"@types/node-cache": "^4.2.5",
|
|
64
64
|
"@types/supertest": "^6.0.2",
|
|
65
65
|
"@types/swagger-ui-express": "4.1.7",
|
|
66
66
|
"@types/yamljs": "^0.2.34",
|
|
67
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
68
|
-
"@typescript-eslint/parser": "^8.
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
68
|
+
"@typescript-eslint/parser": "^8.22.0",
|
|
69
69
|
"copyfiles": "^2.4.1",
|
|
70
70
|
"eslint": "^9.15.0",
|
|
71
71
|
"jest": "^29.7.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.2",
|
|
4
4
|
"description": "mojaloop sdk scheme adapter outbound domain event handler",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter/",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"@types/convict": "^6.1.6",
|
|
57
57
|
"@types/express": "^5.0.0",
|
|
58
58
|
"@types/jest": "^29.5.14",
|
|
59
|
-
"@types/node": "^22.13.
|
|
59
|
+
"@types/node": "^22.13.0",
|
|
60
60
|
"@types/node-cache": "^4.2.5",
|
|
61
61
|
"@types/supertest": "^6.0.2",
|
|
62
62
|
"@types/swagger-ui-express": "^4.1.7",
|
|
63
63
|
"@types/yamljs": "^0.2.34",
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
65
|
-
"@typescript-eslint/parser": "^8.
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.22.0",
|
|
66
66
|
"copyfiles": "^2.4.1",
|
|
67
67
|
"eslint": "^9.15.0",
|
|
68
68
|
"jest": "^29.7.0",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
|
|
3
|
-
"version": "0.4.0-snapshot.
|
|
3
|
+
"version": "0.4.0-snapshot.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
|
|
9
|
-
"version": "0.4.0-snapshot.
|
|
9
|
+
"version": "0.4.0-snapshot.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@mojaloop/api-snippets": "17.7.9",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
|
|
3
|
-
"version": "0.4.0-snapshot.
|
|
3
|
+
"version": "0.4.0-snapshot.2",
|
|
4
4
|
"description": "SDK Scheme Adapter private shared library.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/accounts-and-balances-bc/tree/main/modules/private-types",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/compat": "^1.2.6",
|
|
43
|
-
"@types/node": "^22.13.
|
|
43
|
+
"@types/node": "^22.13.0",
|
|
44
44
|
"@types/uuid": "^10.0.0",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
46
|
-
"@typescript-eslint/parser": "^8.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
46
|
+
"@typescript-eslint/parser": "^8.22.0",
|
|
47
47
|
"eslint": "^9.15.0",
|
|
48
48
|
"jest": "^29.7.0",
|
|
49
49
|
"npm-check-updates": "^16.7.10",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0-snapshot.2",
|
|
4
4
|
"description": "mojaloop sdk-scheme-adapter",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
|
|
@@ -82,10 +82,10 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/jest": "^29.5.14",
|
|
85
|
-
"@types/node": "^22.13.
|
|
85
|
+
"@types/node": "^22.13.0",
|
|
86
86
|
"@types/node-cache": "^4.2.5",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
88
|
-
"@typescript-eslint/parser": "^8.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
88
|
+
"@typescript-eslint/parser": "^8.22.0",
|
|
89
89
|
"audit-ci": "^7.1.0",
|
|
90
90
|
"eslint": "^9.15.0",
|
|
91
91
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
package/.yarn/cache/@mojaloop-central-services-error-handling-npm-13.0.5-8f87cae1ef-504635a52b.zip
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/.yarn/cache/@typescript-eslint-typescript-estree-npm-8.23.0-1907506b84-16ccabac25.zip
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|