@mojaloop/sdk-scheme-adapter 24.0.8 → 24.1.0-snapshot.5

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 (45) hide show
  1. package/.yarn/cache/{@babel-core-npm-7.26.8-54ef19fd50-9d83fb7ad3.zip → @babel-core-npm-7.26.9-12b18cb40d-b6e33bdcbb.zip} +0 -0
  2. package/.yarn/cache/@babel-generator-npm-7.26.9-3260f562f4-57d034fb6c.zip +0 -0
  3. package/.yarn/cache/@babel-helpers-npm-7.26.9-629d8a6154-06363f8288.zip +0 -0
  4. package/.yarn/cache/@babel-parser-npm-7.26.9-5be13f2551-2df965dbf3.zip +0 -0
  5. package/.yarn/cache/@babel-plugin-transform-for-of-npm-7.26.9-d57529b62a-361323cfc1.zip +0 -0
  6. package/.yarn/cache/@babel-preset-env-npm-7.26.9-71d435f5cc-7a657f947d.zip +0 -0
  7. package/.yarn/cache/@babel-template-npm-7.26.9-6339558068-32259298c7.zip +0 -0
  8. package/.yarn/cache/@babel-traverse-npm-7.26.9-5dc40fea71-d42d3a5e61.zip +0 -0
  9. package/.yarn/cache/@babel-types-npm-7.26.9-ef3f43c2d5-cc124c1496.zip +0 -0
  10. package/.yarn/cache/{@grpc-grpc-js-npm-1.12.5-81cf2bb511-415bad1041.zip → @grpc-grpc-js-npm-1.12.6-a1a04f725c-eec210e689.zip} +0 -0
  11. package/.yarn/cache/{@mojaloop-api-snippets-npm-17.7.11-b34e0af657-4b69b4ff2a.zip → @mojaloop-api-snippets-npm-17.8.0-7566be28d1-ed10394e2d.zip} +0 -0
  12. package/.yarn/cache/@mojaloop-central-services-error-handling-npm-13.0.6-38733fdd51-26f32fda64.zip +0 -0
  13. package/.yarn/cache/@mojaloop-central-services-logger-npm-11.5.5-51bc5aa3e3-3e86e95f05.zip +0 -0
  14. package/.yarn/cache/@mojaloop-central-services-metrics-npm-12.4.5-95409a54bc-c4acfa9e84.zip +0 -0
  15. package/.yarn/cache/{@mojaloop-central-services-shared-npm-18.17.0-c76d59c605-2ad3d4170c.zip → @mojaloop-central-services-shared-npm-18.18.0-d791b2e2d2-5b03977f4a.zip} +0 -0
  16. package/.yarn/cache/@mojaloop-event-sdk-npm-14.1.4-06eb082f24-5cab6c2cee.zip +0 -0
  17. package/.yarn/cache/@mojaloop-sdk-standard-components-npm-19.6.5-eb738c4a25-4088204a4c.zip +0 -0
  18. package/.yarn/cache/{@types-node-npm-22.13.1-f9de886009-a0759e4bed.zip → @types-node-npm-22.13.4-80985669cb-39ecbd84fc.zip} +0 -0
  19. package/.yarn/cache/{@typescript-eslint-eslint-plugin-npm-8.23.0-b3e7a7136e-b7dd9cbba9.zip → @typescript-eslint-eslint-plugin-npm-8.24.1-43fd154139-9627eb794d.zip} +0 -0
  20. package/.yarn/cache/{@typescript-eslint-parser-npm-8.23.0-798a01aba9-3a17e8c4f1.zip → @typescript-eslint-parser-npm-8.24.1-fedd86ba37-859b78630a.zip} +0 -0
  21. package/.yarn/cache/{@typescript-eslint-scope-manager-npm-8.23.0-437414802f-cb2772a1f4.zip → @typescript-eslint-scope-manager-npm-8.24.1-bbbd19850f-193c072cd0.zip} +0 -0
  22. package/.yarn/cache/{@typescript-eslint-type-utils-npm-8.23.0-3e68bceaa0-523e333dd1.zip → @typescript-eslint-type-utils-npm-8.24.1-a739e69814-18a4431890.zip} +0 -0
  23. package/.yarn/cache/{@typescript-eslint-types-npm-8.23.0-972ca6e315-6f3b0f5718.zip → @typescript-eslint-types-npm-8.24.1-599b1de09d-6304b153de.zip} +0 -0
  24. package/.yarn/cache/{@typescript-eslint-typescript-estree-npm-8.23.0-1907506b84-16ccabac25.zip → @typescript-eslint-typescript-estree-npm-8.24.1-006a219495-9a4055ebed.zip} +0 -0
  25. package/.yarn/cache/{@typescript-eslint-utils-npm-8.23.0-ab8e41bb24-fba721abac.zip → @typescript-eslint-utils-npm-8.24.1-d8e526dcfa-87b62de9d0.zip} +0 -0
  26. package/.yarn/cache/{@typescript-eslint-visitor-keys-npm-8.23.0-7428536446-20196da5f2.zip → @typescript-eslint-visitor-keys-npm-8.24.1-7dbb0c7cb9-82b91cf090.zip} +0 -0
  27. package/.yarn/cache/ioredis-npm-5.5.0-6f0f729609-3dcca32094.zip +0 -0
  28. package/.yarn/cache/koa-npm-2.15.4-5a729e75eb-cd2bf396fa.zip +0 -0
  29. package/.yarn/cache/{uuid-npm-11.0.5-685b7c1023-8a8ed824c7.zip → uuid-npm-11.1.0-61d0d08928-840f197585.zip} +0 -0
  30. package/.yarn/install-state.gz +0 -0
  31. package/modules/api-svc/package.json +11 -11
  32. package/modules/api-svc/src/lib/model/OutboundTransfersModel.js +31 -3
  33. package/modules/api-svc/src/lib/model/lib/shared.js +4 -0
  34. package/modules/outbound-command-event-handler/package.json +6 -6
  35. package/modules/outbound-domain-event-handler/package.json +5 -5
  36. package/modules/private-shared-lib/package-lock.json +2 -2
  37. package/modules/private-shared-lib/package.json +7 -7
  38. package/package.json +4 -4
  39. package/.yarn/cache/@babel-plugin-transform-for-of-npm-7.25.9-7580278020-41b56e7025.zip +0 -0
  40. package/.yarn/cache/@babel-preset-env-npm-7.26.8-aa759ac29f-409066e5ab.zip +0 -0
  41. package/.yarn/cache/@mojaloop-central-services-error-handling-npm-13.0.5-8f87cae1ef-504635a52b.zip +0 -0
  42. package/.yarn/cache/@mojaloop-central-services-metrics-npm-12.4.4-46a6232a33-e0ea0ba14b.zip +0 -0
  43. package/.yarn/cache/@mojaloop-event-sdk-npm-14.1.3-7c116831cd-8df6a1a39e.zip +0 -0
  44. package/.yarn/cache/@types-gensync-npm-1.0.4-5007ea58f7-99c3aa0d3f.zip +0 -0
  45. package/.yarn/cache/koa-npm-2.15.3-7a802d72e9-7c3537443b.zip +0 -0
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-api-svc",
3
- "version": "21.0.0-snapshot.19",
3
+ "version": "21.0.0-snapshot.25",
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",
@@ -64,16 +64,16 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@koa/cors": "^5.0.0",
67
- "@mojaloop/api-snippets": "17.7.11",
68
- "@mojaloop/central-services-error-handling": "^13.0.5",
69
- "@mojaloop/central-services-logger": "^11.5.4",
70
- "@mojaloop/central-services-metrics": "^12.4.4",
71
- "@mojaloop/central-services-shared": "^18.17.0",
72
- "@mojaloop/event-sdk": "^14.1.3",
67
+ "@mojaloop/api-snippets": "17.8.0",
68
+ "@mojaloop/central-services-error-handling": "^13.0.6",
69
+ "@mojaloop/central-services-logger": "^11.5.5",
70
+ "@mojaloop/central-services-metrics": "^12.4.5",
71
+ "@mojaloop/central-services-shared": "^18.18.0",
72
+ "@mojaloop/event-sdk": "^14.1.4",
73
73
  "@mojaloop/logging-bc-client-lib": "0.5.8",
74
74
  "@mojaloop/ml-schema-transformer-lib": "^2.5.2",
75
75
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
76
- "@mojaloop/sdk-standard-components": "^19.6.4",
76
+ "@mojaloop/sdk-standard-components": "19.6.5",
77
77
  "ajv": "8.17.1",
78
78
  "axios": "^1.7.9",
79
79
  "body-parser": "^1.20.3",
@@ -86,7 +86,7 @@
86
86
  "javascript-state-machine": "^3.1.0",
87
87
  "js-yaml": "^4.1.0",
88
88
  "json-schema-ref-parser": "^9.0.9",
89
- "koa": "^2.15.3",
89
+ "koa": "^2.15.4",
90
90
  "koa-body": "^6.0.1",
91
91
  "lodash": "^4.17.21",
92
92
  "module-alias": "^2.2.3",
@@ -100,8 +100,8 @@
100
100
  "ws": "^8.18.0"
101
101
  },
102
102
  "devDependencies": {
103
- "@babel/core": "^7.26.8",
104
- "@babel/preset-env": "^7.26.8",
103
+ "@babel/core": "^7.26.9",
104
+ "@babel/preset-env": "^7.26.9",
105
105
  "@redocly/openapi-cli": "^1.0.0-beta.95",
106
106
  "@types/jest": "^29.5.14",
107
107
  "axios-mock-adapter": "^2.1.0",
@@ -1103,6 +1103,29 @@ class OutboundTransfersModel {
1103
1103
  };
1104
1104
  }
1105
1105
 
1106
+ if (this._apiType === API_TYPES.iso20022) {
1107
+ // Append keys from quoteResponse extensionList with specific prefixes
1108
+ const quoteResponseExtensions = this.data.quoteResponse.body.extensionList?.extension;
1109
+ if (quoteResponseExtensions) {
1110
+ const prefixes = [
1111
+ 'CdtTrfTxInf.Cdtr.',
1112
+ 'CdtTrfTxInf.CdtrAcct.',
1113
+ 'CdtTrfTxInf.CdtrAgt.',
1114
+ 'CdtTrfTxInf.InstrForCdtrAgt.',
1115
+ 'CdtTrfTxInf.InstrForNxtAgt.'
1116
+ ];
1117
+ const filteredExtensions = quoteResponseExtensions.filter(ext =>
1118
+ prefixes.some(prefix => ext.key.startsWith(prefix))
1119
+ );
1120
+ if (filteredExtensions.length > 0) {
1121
+ if (!prepare.extensionList) {
1122
+ prepare.extensionList = { extension: [] };
1123
+ }
1124
+ prepare.extensionList.extension.push(...filteredExtensions);
1125
+ }
1126
+ }
1127
+ }
1128
+
1106
1129
  return prepare;
1107
1130
  }
1108
1131
 
@@ -1275,7 +1298,7 @@ class OutboundTransfersModel {
1275
1298
  // first remove any merge keys that we do not want to allow to be changed
1276
1299
  // note that we could do this in the swagger also. this is to put a responsibility
1277
1300
  // on this model to defend itself.
1278
- const permittedMergeKeys = ['acceptParty', 'acceptConversion', 'acceptQuote', 'amount', 'to'];
1301
+ const permittedMergeKeys = ['acceptParty', 'acceptConversion', 'acceptQuote', 'acceptQuoteOrConversion', 'amount', 'to'];
1279
1302
  Object.keys(mergeData).forEach(k => {
1280
1303
  if(permittedMergeKeys.indexOf(k) === -1) {
1281
1304
  delete mergeData[k]; // try to avoid mutation of parameters
@@ -1352,7 +1375,9 @@ class OutboundTransfersModel {
1352
1375
  }
1353
1376
 
1354
1377
  case States.FX_QUOTE_RECEIVED: {
1355
- if (!this.data.acceptConversion) {
1378
+ if ((this.data.acceptConversion !== undefined && this.data.acceptConversion === false) ||
1379
+ (this.data.acceptQuoteOrConversion !== undefined && this.data.acceptQuoteOrConversion === false) ||
1380
+ (this.data.acceptConversion === undefined && this.data.acceptQuoteOrConversion === undefined)) {
1356
1381
  await this.stateMachine.abort(ErrorMessages.fxQuoteRejectedByBackend);
1357
1382
  await this._save();
1358
1383
  return this.getResponse();
@@ -1374,7 +1399,10 @@ class OutboundTransfersModel {
1374
1399
  }
1375
1400
 
1376
1401
  case States.QUOTE_RECEIVED: {
1377
- if (!this._autoAcceptQuotes && !this.data.acceptQuote) {
1402
+ if (!this._autoAcceptQuotes &&
1403
+ ((this.data.acceptQuote !== undefined && this.data.acceptQuote === false) ||
1404
+ (this.data.acceptQuoteOrConversion !== undefined && this.data.acceptQuoteOrConversion === false) ||
1405
+ (this.data.acceptQuote === undefined && this.data.acceptQuoteOrConversion === undefined))) {
1378
1406
  // resuming after a party resolution halt, backend did not accept the party.
1379
1407
  await this.stateMachine.abort(ErrorMessages.quoteRejectedByBackend);
1380
1408
  await this._save();
@@ -313,6 +313,10 @@ const mojaloopPrepareToInternalTransfer = (external, quote, ilp, checkILP) => {
313
313
  };
314
314
  }
315
315
 
316
+ if(external.extensionList) {
317
+ internal.extensionList = external.extensionList.extension;
318
+ }
319
+
316
320
  return internal;
317
321
  };
318
322
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
3
- "version": "0.3.0-snapshot.18",
3
+ "version": "0.3.0-snapshot.24",
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/",
@@ -41,8 +41,8 @@
41
41
  "snapshot": "standard-version --no-verify --skip.changelog --prerelease snapshot --releaseCommitMessageFormat 'chore(snapshot): {{currentTag}}'"
42
42
  },
43
43
  "dependencies": {
44
- "@mojaloop/api-snippets": "17.7.11",
45
- "@mojaloop/central-services-shared": "^18.17.0",
44
+ "@mojaloop/api-snippets": "17.8.0",
45
+ "@mojaloop/central-services-shared": "^18.18.0",
46
46
  "@mojaloop/logging-bc-client-lib": "^0.5.8",
47
47
  "@mojaloop/logging-bc-public-types-lib": "^0.5.4",
48
48
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
@@ -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.1",
62
+ "@types/node": "^22.13.4",
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.23.0",
68
- "@typescript-eslint/parser": "^8.23.0",
67
+ "@typescript-eslint/eslint-plugin": "^8.24.1",
68
+ "@typescript-eslint/parser": "^8.24.1",
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.18",
3
+ "version": "0.3.0-snapshot.24",
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/",
@@ -41,7 +41,7 @@
41
41
  "snapshot": "standard-version --no-verify --skip.changelog --prerelease snapshot --releaseCommitMessageFormat 'chore(snapshot): {{currentTag}}'"
42
42
  },
43
43
  "dependencies": {
44
- "@mojaloop/api-snippets": "17.7.11",
44
+ "@mojaloop/api-snippets": "17.8.0",
45
45
  "@mojaloop/logging-bc-client-lib": "^0.5.8",
46
46
  "@mojaloop/logging-bc-public-types-lib": "^0.5.4",
47
47
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
@@ -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.1",
59
+ "@types/node": "^22.13.4",
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.23.0",
65
- "@typescript-eslint/parser": "^8.23.0",
64
+ "@typescript-eslint/eslint-plugin": "^8.24.1",
65
+ "@typescript-eslint/parser": "^8.24.1",
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.17",
3
+ "version": "0.4.0-snapshot.23",
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.17",
9
+ "version": "0.4.0-snapshot.23",
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.18",
3
+ "version": "0.4.0-snapshot.24",
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",
@@ -29,21 +29,21 @@
29
29
  "snapshot": "standard-version --no-verify --skip.changelog --prerelease snapshot --releaseCommitMessageFormat 'chore(snapshot): {{currentTag}}'"
30
30
  },
31
31
  "dependencies": {
32
- "@mojaloop/api-snippets": "17.7.11",
33
- "@mojaloop/central-services-shared": "^18.17.0",
32
+ "@mojaloop/api-snippets": "17.8.0",
33
+ "@mojaloop/central-services-shared": "^18.18.0",
34
34
  "@mojaloop/logging-bc-public-types-lib": "^0.5.4",
35
35
  "@mojaloop/platform-shared-lib-messaging-types-lib": "^0.7.1",
36
36
  "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "0.5.18",
37
37
  "ajv": "^8.17.1",
38
38
  "redis": "^4.7.0",
39
- "uuid": "^11.0.5"
39
+ "uuid": "^11.1.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/compat": "^1.2.6",
43
- "@types/node": "^22.13.1",
43
+ "@types/node": "^22.13.4",
44
44
  "@types/uuid": "^10.0.0",
45
- "@typescript-eslint/eslint-plugin": "^8.23.0",
46
- "@typescript-eslint/parser": "^8.23.0",
45
+ "@typescript-eslint/eslint-plugin": "^8.24.1",
46
+ "@typescript-eslint/parser": "^8.24.1",
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": "24.0.8",
3
+ "version": "24.1.0-snapshot.5",
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.1",
85
+ "@types/node": "^22.13.4",
86
86
  "@types/node-cache": "^4.2.5",
87
- "@typescript-eslint/eslint-plugin": "^8.23.0",
88
- "@typescript-eslint/parser": "^8.23.0",
87
+ "@typescript-eslint/eslint-plugin": "^8.24.1",
88
+ "@typescript-eslint/parser": "^8.24.1",
89
89
  "audit-ci": "^7.1.0",
90
90
  "eslint": "^9.15.0",
91
91
  "eslint-config-airbnb-typescript": "^18.0.0",