@mojaloop/sdk-scheme-adapter 24.10.1 → 24.10.3

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 (66) hide show
  1. package/.ncurc.yaml +3 -1
  2. package/.yarn/cache/@eslint-compat-npm-1.3.0-c396ca9ba3-cf4ae18816.zip +0 -0
  3. package/.yarn/cache/{@grpc-grpc-js-npm-1.13.3-9dcb5a84de-2576e65c9a.zip → @grpc-grpc-js-npm-1.13.4-4aa5cd2dfd-fe5db84bbb.zip} +0 -0
  4. package/.yarn/cache/@jest-diff-sequences-npm-30.0.0-a54cd58e53-e73302913a.zip +0 -0
  5. package/.yarn/cache/@jest-expect-utils-npm-30.0.0-bddc827ac5-852792f196.zip +0 -0
  6. package/.yarn/cache/@jest-get-type-npm-30.0.0-db16e5ad7d-6dc432caac.zip +0 -0
  7. package/.yarn/cache/@jest-pattern-npm-30.0.0-8f812d915e-65ef698689.zip +0 -0
  8. package/.yarn/cache/@jest-schemas-npm-30.0.0-7943bf35b9-fe07a0d388.zip +0 -0
  9. package/.yarn/cache/@jest-transform-npm-30.0.0-001baf8c75-54c65b818a.zip +0 -0
  10. package/.yarn/cache/@jest-types-npm-30.0.0-ee47462915-fde997f884.zip +0 -0
  11. package/.yarn/cache/{@mojaloop-central-services-shared-npm-18.27.0-66f0d90603-bf265a09bd.zip → @mojaloop-central-services-shared-npm-18.28.2-67cde6c542-425242d6f3.zip} +0 -0
  12. package/.yarn/cache/{@mojaloop-event-sdk-npm-14.5.1-3c060d2a60-faf8eead3d.zip → @mojaloop-event-sdk-npm-14.6.1-a36281071d-4520a3d177.zip} +0 -0
  13. package/.yarn/cache/@sinclair-typebox-npm-0.34.35-4698edbad1-65e2944495.zip +0 -0
  14. package/.yarn/cache/@types-jest-npm-30.0.0-7c3c407336-d80c0c30b2.zip +0 -0
  15. package/.yarn/cache/@types-node-npm-24.0.3-e96f3e375e-84ab3ee3b7.zip +0 -0
  16. package/.yarn/cache/{@typescript-eslint-eslint-plugin-npm-8.33.1-ac6a7a1440-8732c42790.zip → @typescript-eslint-eslint-plugin-npm-8.34.1-a6ae5aed2f-ea7cd0e45e.zip} +0 -0
  17. package/.yarn/cache/{@typescript-eslint-parser-npm-8.33.1-9a3fc183f0-2b527529a1.zip → @typescript-eslint-parser-npm-8.34.1-c5cdfb4415-4d2a5c7615.zip} +0 -0
  18. package/.yarn/cache/{@typescript-eslint-project-service-npm-8.33.1-fd3317e16e-237618a025.zip → @typescript-eslint-project-service-npm-8.34.1-96e02739ba-41c128ab88.zip} +0 -0
  19. package/.yarn/cache/{@typescript-eslint-scope-manager-npm-8.33.1-2e7c814c1c-fbc3ec340f.zip → @typescript-eslint-scope-manager-npm-8.34.1-083136ef41-6853a5639e.zip} +0 -0
  20. package/.yarn/cache/{@typescript-eslint-tsconfig-utils-npm-8.33.1-82226a8649-9e0e348af4.zip → @typescript-eslint-tsconfig-utils-npm-8.34.1-6a326cb07f-81a874a433.zip} +0 -0
  21. package/.yarn/cache/{@typescript-eslint-type-utils-npm-8.33.1-0cc601298c-54099177a5.zip → @typescript-eslint-type-utils-npm-8.34.1-30e4169fb0-c1c53ff76f.zip} +0 -0
  22. package/.yarn/cache/{@typescript-eslint-types-npm-8.33.1-e7c6a5abd5-80ad8b8573.zip → @typescript-eslint-types-npm-8.34.1-a7afc98a06-e05a8e56f8.zip} +0 -0
  23. package/.yarn/cache/{@typescript-eslint-typescript-estree-npm-8.33.1-83df5ea6f8-aacb925257.zip → @typescript-eslint-typescript-estree-npm-8.34.1-622f7240fd-1800ce71b8.zip} +0 -0
  24. package/.yarn/cache/{@typescript-eslint-utils-npm-8.33.1-27dd8aa528-aef41fe93d.zip → @typescript-eslint-utils-npm-8.34.1-e8923747e2-6e465f0454.zip} +0 -0
  25. package/.yarn/cache/{@typescript-eslint-visitor-keys-npm-8.33.1-f3a9c59a3a-d8bbb35ff2.zip → @typescript-eslint-visitor-keys-npm-8.34.1-418d3d8006-2a0e5b9db8.zip} +0 -0
  26. package/.yarn/cache/@ungap-structured-clone-npm-1.3.0-aea1bdf957-64ed518f49.zip +0 -0
  27. package/.yarn/cache/babel-jest-npm-30.0.0-0949ae6173-8912bb4a33.zip +0 -0
  28. package/.yarn/cache/babel-plugin-istanbul-npm-7.0.0-924905ff8c-fd3048d793.zip +0 -0
  29. package/.yarn/cache/babel-plugin-jest-hoist-npm-30.0.0-4a6d09d0fa-aa56f11fb7.zip +0 -0
  30. package/.yarn/cache/babel-preset-jest-npm-30.0.0-e566b89f5b-6f1c477c8a.zip +0 -0
  31. package/.yarn/cache/ci-info-npm-4.2.0-5451b2fa90-0e37267215.zip +0 -0
  32. package/.yarn/cache/{eslint-plugin-jest-npm-28.13.0-f1bc2edf00-1be5c0fcc4.zip → eslint-plugin-jest-npm-28.14.0-5ea5eb873a-7daeb0ebc3.zip} +0 -0
  33. package/.yarn/cache/eslint-visitor-keys-npm-4.2.1-435d5be22a-3a77e3f99a.zip +0 -0
  34. package/.yarn/cache/expect-npm-30.0.0-c4f29cc906-91dd0d10b9.zip +0 -0
  35. package/.yarn/cache/immutable-npm-5.1.3-27d8e1c55d-63a1df5f68.zip +0 -0
  36. package/.yarn/cache/jest-diff-npm-30.0.0-3d7984567d-c583cef9e1.zip +0 -0
  37. package/.yarn/cache/jest-haste-map-npm-30.0.0-3606160998-ce4a73ddd7.zip +0 -0
  38. package/.yarn/cache/jest-matcher-utils-npm-30.0.0-df3cb56c58-20bc82f18d.zip +0 -0
  39. package/.yarn/cache/jest-message-util-npm-30.0.0-3d72ccf669-e0f423baf5.zip +0 -0
  40. package/.yarn/cache/jest-mock-npm-30.0.0-1cab834040-46fb408dd4.zip +0 -0
  41. package/.yarn/cache/jest-regex-util-npm-30.0.0-b67c1fc2bc-aa4449a029.zip +0 -0
  42. package/.yarn/cache/jest-util-npm-30.0.0-de14658072-53f41bfdbe.zip +0 -0
  43. package/.yarn/cache/jest-worker-npm-30.0.0-0e18cd85f6-1151a0ea39.zip +0 -0
  44. package/.yarn/cache/picomatch-npm-4.0.2-e93516ddf2-a7a5188c95.zip +0 -0
  45. package/.yarn/cache/pirates-npm-4.0.7-5e4ee2f078-3dcbaff13c.zip +0 -0
  46. package/.yarn/cache/pretty-format-npm-30.0.0-d8f817d24c-f8044ca65e.zip +0 -0
  47. package/.yarn/cache/protobufjs-npm-7.5.3-a54566937a-8a8842338c.zip +0 -0
  48. package/.yarn/cache/{ts-jest-npm-29.3.4-ab85c5ac0f-2634134223.zip → ts-jest-npm-29.4.0-9f040f13a5-4083840a71.zip} +0 -0
  49. package/.yarn/cache/undici-types-npm-7.8.0-86f3e2d23e-59521a5b9b.zip +0 -0
  50. package/.yarn/cache/write-file-atomic-npm-5.0.1-52283db6ee-8dbb0e2512.zip +0 -0
  51. package/.yarn/install-state.gz +0 -0
  52. package/CHANGELOG.md +14 -0
  53. package/modules/api-svc/package.json +6 -6
  54. package/modules/api-svc/src/InboundServer/handlers.js +6 -0
  55. package/modules/api-svc/test/unit/inboundApi/data/isoBodies.json +31 -0
  56. package/modules/api-svc/test/unit/inboundApi/handlers-iso20022.test.js +43 -0
  57. package/modules/outbound-command-event-handler/package.json +7 -7
  58. package/modules/outbound-domain-event-handler/package.json +5 -5
  59. package/modules/private-shared-lib/package.json +6 -6
  60. package/package.json +6 -6
  61. package/.yarn/cache/@eslint-compat-npm-1.2.9-e5c479f5a9-5c1b792cba.zip +0 -0
  62. package/.yarn/cache/@types-jest-npm-29.5.14-506446c38e-18dba4623f.zip +0 -0
  63. package/.yarn/cache/@types-node-npm-22.15.30-04ae714c4d-c380ad1765.zip +0 -0
  64. package/.yarn/cache/immutable-npm-5.1.2-ce2e5e7696-85db3b2fdd.zip +0 -0
  65. package/.yarn/cache/protobufjs-npm-7.5.2-528e926c0e-fe5663a1f3.zip +0 -0
  66. package/.yarn/cache/undici-types-npm-6.21.0-eb2b0ed56a-46331c7d60.zip +0 -0
package/.ncurc.yaml CHANGED
@@ -12,5 +12,7 @@ reject: [
12
12
  ## esLint 9.15.0 caused the error: TypeError: Error while loading rule '@typescript-eslint/no-unused-expressions': Cannot read properties of undefined (reading 'allowShortCircuit')
13
13
  "eslint",
14
14
  ## express >5 introduces breaking changes that are not compatible with the current codebase.
15
- "express"
15
+ "express",
16
+ ## jest 30 is released but libraries that work with jest have not been updated to support it yet.
17
+ "jest"
16
18
  ]
Binary file
package/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
1
  # Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
2
+ ### [24.10.3](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.2...v24.10.3) (2025-06-26)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * add logic to transform iso to fspiop for payee notif ([#569](https://github.com/mojaloop/sdk-scheme-adapter/issues/569)) ([019a652](https://github.com/mojaloop/sdk-scheme-adapter/commit/019a652390569fc8d3ce6bd9237c27bd4fa2e81f))
8
+
9
+ ### [24.10.2](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.1...v24.10.2) (2025-06-17)
10
+
11
+
12
+ ### Chore
13
+
14
+ * bump deps for rdkafka ([#590](https://github.com/mojaloop/sdk-scheme-adapter/issues/590)) ([41efe48](https://github.com/mojaloop/sdk-scheme-adapter/commit/41efe48781421f3e05d35b533ba9bdcbca7c2ae0))
15
+
2
16
  ### [24.10.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.10.0...v24.10.1) (2025-06-09)
3
17
 
4
18
 
@@ -68,14 +68,14 @@
68
68
  "@mojaloop/central-services-error-handling": "13.1.0",
69
69
  "@mojaloop/central-services-logger": "11.9.0",
70
70
  "@mojaloop/central-services-metrics": "12.6.0",
71
- "@mojaloop/central-services-shared": "18.27.0",
72
- "@mojaloop/event-sdk": "14.5.1",
71
+ "@mojaloop/central-services-shared": "18.28.2",
72
+ "@mojaloop/event-sdk": "14.6.1",
73
73
  "@mojaloop/logging-bc-client-lib": "0.5.8",
74
74
  "@mojaloop/ml-schema-transformer-lib": "2.7.1",
75
75
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
76
76
  "@mojaloop/sdk-standard-components": "19.15.2",
77
77
  "ajv": "8.17.1",
78
- "axios": "1.9.0",
78
+ "axios": "1.10.0",
79
79
  "body-parser": "2.2.0",
80
80
  "co-body": "6.2.0",
81
81
  "dotenv": "16.5.0",
@@ -104,13 +104,13 @@
104
104
  "@babel/core": "7.27.4",
105
105
  "@babel/preset-env": "7.27.2",
106
106
  "@redocly/openapi-cli": "1.0.0-beta.95",
107
- "@types/jest": "29.5.14",
107
+ "@types/jest": "30.0.0",
108
108
  "axios-mock-adapter": "2.1.0",
109
- "babel-jest": "29.7.0",
109
+ "babel-jest": "30.0.0",
110
110
  "eslint": "9.15.0",
111
111
  "eslint-config-airbnb-base": "15.0.0",
112
112
  "eslint-plugin-import": "2.31.0",
113
- "eslint-plugin-jest": "28.13.0",
113
+ "eslint-plugin-jest": "28.14.0",
114
114
  "jest": "29.7.0",
115
115
  "jest-junit": "16.0.0",
116
116
  "npm-check-updates": "16.7.10",
@@ -714,6 +714,12 @@ const putTransfersById = async (ctx) => {
714
714
  * Handles a PATCH /transfers/{ID} from the Switch to Payee for successful transfer
715
715
  */
716
716
  const patchTransfersById = async (ctx) => {
717
+ if (ctx.state.conf.isIsoApi) {
718
+ ctx.state.logger.isDebugEnabled && ctx.state.logger.push(ctx.request.body).debug('Transforming incoming ISO20022 patch transfers body to FSPIOP');
719
+ const target = await TransformFacades.FSPIOPISO20022.transfers.patch({ body: ctx.request.body }, { rollUpUnmappedAsExtensions: true });
720
+ ctx.request.body = target.body;
721
+ }
722
+
717
723
  const req = {
718
724
  headers: { ...ctx.request.headers },
719
725
  data: { ...ctx.request.body }
@@ -443,5 +443,36 @@
443
443
  "Ustrd": "Payment for invoice 12345"
444
444
  }
445
445
  }
446
+ },
447
+ "patchTransfersRequest": {
448
+ "GrpHdr": {
449
+ "MsgId": "01JB251SPSN3NERYQ78MREHP9X",
450
+ "CreDtTm": "2024-10-25T15:34:49.305Z"
451
+ },
452
+ "TxInfAndSts": {
453
+ "StsId": "01JB251SPTD685SBNWGG9KVH58",
454
+ "OrgnlInstrId": "undefined",
455
+ "OrgnlEndToEndId": "undefined",
456
+ "OrgnlTxId": "01JB251RGPWJ31SEWCZQCQCSHE",
457
+ "OrgnlUETR": "123e4567-e89b-12d3-a456-426614174000",
458
+ "TxSts": "COMM",
459
+ "StsRsnInf": {
460
+ "Rsn": {
461
+ "Prtry": "COMM"
462
+ },
463
+ "AddtlInf": "ADDITIONAL"
464
+ },
465
+ "AccptncDtTm": "2024-10-25T15:34:49.305Z",
466
+ "PrcgDt": {
467
+ "DtTm": "2024-10-25T15:34:49.305Z"
468
+ },
469
+ "AcctSvcrRef": "ACCTSVCRREF",
470
+ "ClrSysRef": "CLRSYSREF",
471
+ "ExctnConf": "yc8z3j2C5RQofE0XEP5acBylI-hzWK7Zo6KMw2cxElk",
472
+ "SplmtryData": {
473
+ "PlcAndNm": "PLACE",
474
+ "Envlp": {}
475
+ }
476
+ }
446
477
  }
447
478
  }
@@ -284,6 +284,49 @@ describe('Inbound API handlers transforming incoming ISO20022 message bodies', (
284
284
  });
285
285
  });
286
286
 
287
+ describe('PATCH /transfers/{ID}', () => {
288
+ let mockContext;
289
+
290
+ beforeEach(() => {
291
+ mockContext = {
292
+ request: {
293
+ body: isoBodies.patchTransfersRequest,
294
+ headers: {
295
+ 'fspiop-source': 'foo',
296
+ 'content-type': createIsoHeader('transfers')
297
+ }
298
+ },
299
+ response: {},
300
+ state: {
301
+ conf: {
302
+ isIsoApi: true,
303
+ },
304
+ path: {
305
+ params: {
306
+ 'ID': '1234567890'
307
+ }
308
+ },
309
+ logger,
310
+ cache: {
311
+ publish: jest.fn(() => Promise.resolve(true))
312
+ }
313
+ }
314
+ };
315
+
316
+ });
317
+
318
+ test('calls `prepareTransfer` with the expected arguments.', async () => {
319
+ const transferRequestSpy = jest.spyOn(Model.prototype, 'sendNotificationToPayee');
320
+
321
+ await expect(handlers['/transfers/{ID}'].patch(mockContext)).resolves.toBe(undefined);
322
+
323
+ expect(transferRequestSpy).toHaveBeenCalledTimes(1);
324
+ expect(transferRequestSpy.mock.calls[0][0]).not.toBeUndefined();
325
+ expect(transferRequestSpy.mock.calls[0][0]).not.toEqual(isoBodies.patchTransfersRequest);
326
+ expect(transferRequestSpy.mock.calls[0][0].transferState).toBe('COMMITTED');
327
+ });
328
+ });
329
+
287
330
  describe('POST /fxQuotes Tests', () => {
288
331
  let mockContext;
289
332
 
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@mojaloop/api-snippets": "17.10.3",
45
- "@mojaloop/central-services-shared": "18.27.0",
45
+ "@mojaloop/central-services-shared": "18.28.2",
46
46
  "@mojaloop/logging-bc-client-lib": "0.5.8",
47
47
  "@mojaloop/logging-bc-public-types-lib": "0.5.5",
48
48
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
@@ -56,17 +56,17 @@
56
56
  "yamljs": "0.3.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@eslint/compat": "1.2.9",
59
+ "@eslint/compat": "1.3.0",
60
60
  "@types/convict": "6.1.6",
61
61
  "@types/express": "5.0.3",
62
- "@types/jest": "29.5.14",
63
- "@types/node": "22.15.30",
62
+ "@types/jest": "30.0.0",
63
+ "@types/node": "24.0.3",
64
64
  "@types/node-cache": "4.2.5",
65
65
  "@types/supertest": "6.0.3",
66
66
  "@types/swagger-ui-express": "4.1.8",
67
67
  "@types/yamljs": "0.2.34",
68
- "@typescript-eslint/eslint-plugin": "8.33.1",
69
- "@typescript-eslint/parser": "8.33.1",
68
+ "@typescript-eslint/eslint-plugin": "8.34.1",
69
+ "@typescript-eslint/parser": "8.34.1",
70
70
  "copyfiles": "2.4.1",
71
71
  "eslint": "9.15.0",
72
72
  "jest": "29.7.0",
@@ -74,7 +74,7 @@
74
74
  "npm-check-updates": "16.7.10",
75
75
  "replace": "1.2.2",
76
76
  "standard-version": "9.5.0",
77
- "ts-jest": "29.3.4",
77
+ "ts-jest": "29.4.0",
78
78
  "ts-node": "10.9.2",
79
79
  "typescript": "5.8.3"
80
80
  },
@@ -56,14 +56,14 @@
56
56
  "devDependencies": {
57
57
  "@types/convict": "6.1.6",
58
58
  "@types/express": "5.0.3",
59
- "@types/jest": "29.5.14",
60
- "@types/node": "22.15.30",
59
+ "@types/jest": "30.0.0",
60
+ "@types/node": "24.0.3",
61
61
  "@types/node-cache": "4.2.5",
62
62
  "@types/supertest": "6.0.3",
63
63
  "@types/swagger-ui-express": "4.1.8",
64
64
  "@types/yamljs": "0.2.34",
65
- "@typescript-eslint/eslint-plugin": "8.33.1",
66
- "@typescript-eslint/parser": "8.33.1",
65
+ "@typescript-eslint/eslint-plugin": "8.34.1",
66
+ "@typescript-eslint/parser": "8.34.1",
67
67
  "copyfiles": "2.4.1",
68
68
  "eslint": "9.15.0",
69
69
  "jest": "29.7.0",
@@ -71,7 +71,7 @@
71
71
  "npm-check-updates": "16.7.10",
72
72
  "replace": "1.2.2",
73
73
  "standard-version": "9.5.0",
74
- "ts-jest": "29.3.4",
74
+ "ts-jest": "29.4.0",
75
75
  "ts-node": "10.9.2",
76
76
  "typescript": "5.8.3"
77
77
  },
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@mojaloop/api-snippets": "17.10.3",
33
- "@mojaloop/central-services-shared": "18.27.0",
33
+ "@mojaloop/central-services-shared": "18.28.2",
34
34
  "@mojaloop/logging-bc-public-types-lib": "0.5.5",
35
35
  "@mojaloop/platform-shared-lib-messaging-types-lib": "0.7.2",
36
36
  "@mojaloop/platform-shared-lib-nodejs-kafka-client-lib": "0.5.18",
@@ -39,17 +39,17 @@
39
39
  "uuid": "11.1.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@eslint/compat": "1.2.9",
43
- "@types/node": "22.15.30",
42
+ "@eslint/compat": "1.3.0",
43
+ "@types/node": "24.0.3",
44
44
  "@types/uuid": "10.0.0",
45
- "@typescript-eslint/eslint-plugin": "8.33.1",
46
- "@typescript-eslint/parser": "8.33.1",
45
+ "@typescript-eslint/eslint-plugin": "8.34.1",
46
+ "@typescript-eslint/parser": "8.34.1",
47
47
  "eslint": "9.15.0",
48
48
  "jest": "29.7.0",
49
49
  "npm-check-updates": "16.7.10",
50
50
  "replace": "1.2.2",
51
51
  "standard-version": "9.5.0",
52
- "ts-jest": "29.3.4",
52
+ "ts-jest": "29.4.0",
53
53
  "tslib": "2.8.1",
54
54
  "typescript": "5.8.3"
55
55
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.10.1",
3
+ "version": "24.10.3",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",
@@ -81,11 +81,11 @@
81
81
  "tslib": "2.8.1"
82
82
  },
83
83
  "devDependencies": {
84
- "@types/jest": "29.5.14",
85
- "@types/node": "22.15.30",
84
+ "@types/jest": "30.0.0",
85
+ "@types/node": "24.0.3",
86
86
  "@types/node-cache": "4.2.5",
87
- "@typescript-eslint/eslint-plugin": "8.33.1",
88
- "@typescript-eslint/parser": "8.33.1",
87
+ "@typescript-eslint/eslint-plugin": "8.34.1",
88
+ "@typescript-eslint/parser": "8.34.1",
89
89
  "audit-ci": "7.1.0",
90
90
  "eslint": "9.15.0",
91
91
  "eslint-config-airbnb-typescript": "18.0.0",
@@ -97,7 +97,7 @@
97
97
  "npm-check-updates": "16.7.10",
98
98
  "replace": "1.2.2",
99
99
  "standard-version": "9.5.0",
100
- "ts-jest": "29.3.4",
100
+ "ts-jest": "29.4.0",
101
101
  "ts-node": "10.9.2",
102
102
  "typescript": "5.8.3",
103
103
  "yarn-audit-fix": "10.1.1"