account-lookup-service 16.1.0-iso.0 → 17.0.0
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/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/src/constants.js +0 -1
- package/src/domain/parties/getPartiesByTypeAndID.js +1 -1
- package/src/domain/parties/parties.js +1 -1
- package/test/fixtures/index.js +0 -1
- package/test/unit/domain/parties/parties.test.js +2 -2
- package/test/unit/models/participantEndpoint/facade.test.js +4 -2
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4
4
|
|
5
|
+
## [17.0.0](https://github.com/mojaloop/account-lookup-service/compare/v16.0.2...v17.0.0) (2025-01-19)
|
6
|
+
|
7
|
+
|
8
|
+
### ⚠ BREAKING CHANGES
|
9
|
+
|
10
|
+
* add iso20022 compatibility (#518)
|
11
|
+
|
12
|
+
### Features
|
13
|
+
|
14
|
+
* add iso20022 compatibility ([#518](https://github.com/mojaloop/account-lookup-service/issues/518)) ([1eaaff1](https://github.com/mojaloop/account-lookup-service/commit/1eaaff13048af5bc34cd55fcd85b2152e6413963)), closes [#482](https://github.com/mojaloop/account-lookup-service/issues/482) [#483](https://github.com/mojaloop/account-lookup-service/issues/483)
|
15
|
+
|
5
16
|
### [16.0.2](https://github.com/mojaloop/account-lookup-service/compare/v16.0.1...v16.0.2) (2025-01-07)
|
6
17
|
|
7
18
|
|
package/package.json
CHANGED
package/src/constants.js
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
const ERROR_MESSAGES = Object.freeze({
|
2
2
|
sourceFspNotFound: 'Requester FSP not found',
|
3
|
-
partySourceFspNotFound: 'Requester FSP not found', // todo: use sourceFspNotFound
|
4
3
|
partyDestinationFspNotFound: 'Destination FSP not found',
|
5
4
|
partyProxyNotFound: 'Proxy not found',
|
6
5
|
proxyConnectionError: 'Proxy connection error',
|
@@ -52,7 +52,7 @@ const validateRequester = async ({ source, proxy, proxyCache }) => {
|
|
52
52
|
}
|
53
53
|
|
54
54
|
if (!proxy) {
|
55
|
-
const errMessage = ERROR_MESSAGES.
|
55
|
+
const errMessage = ERROR_MESSAGES.sourceFspNotFound
|
56
56
|
throw ErrorHandler.Factory.createFSPIOPError(ErrorHandler.Enums.FSPIOPErrorCodes.ID_NOT_FOUND, errMessage)
|
57
57
|
}
|
58
58
|
|
@@ -81,7 +81,7 @@ const putPartiesByTypeAndID = async (headers, params, method, payload, dataUri,
|
|
81
81
|
const requesterParticipant = await participant.validateParticipant(source)
|
82
82
|
if (!requesterParticipant) {
|
83
83
|
if (!proxyEnabled || !proxy) {
|
84
|
-
const errMessage = ERROR_MESSAGES.
|
84
|
+
const errMessage = ERROR_MESSAGES.sourceFspNotFound
|
85
85
|
throw ErrorHandler.Factory.createFSPIOPError(ErrorHandler.Enums.FSPIOPErrorCodes.ID_NOT_FOUND, errMessage)
|
86
86
|
}
|
87
87
|
step = 'addDfspIdToProxyMapping-1'
|
package/test/fixtures/index.js
CHANGED
@@ -61,7 +61,6 @@ const participantsCallHeadersDto = ({
|
|
61
61
|
contentType: interopHeader('participants', contentTypeVersion)
|
62
62
|
})
|
63
63
|
|
64
|
-
// todo: add ISO mode support
|
65
64
|
const interopHeader = (resource, version = '1') => `application/vnd.interoperability.${resource}+json;version=${version}`
|
66
65
|
|
67
66
|
const oracleRequestResponseDto = ({
|
@@ -251,7 +251,7 @@ describe('Parties Tests', () => {
|
|
251
251
|
|
252
252
|
const { errorInformation } = participant.sendErrorToParticipant.getCall(0).args[2]
|
253
253
|
expect(errorInformation.errorCode).toBe('3200')
|
254
|
-
expect(errorInformation.errorDescription).toContain(ERROR_MESSAGES.
|
254
|
+
expect(errorInformation.errorDescription).toContain(ERROR_MESSAGES.sourceFspNotFound)
|
255
255
|
})
|
256
256
|
|
257
257
|
it('should send error callback, if proxy-header is present, but no proxy in the scheme', async () => {
|
@@ -634,7 +634,7 @@ describe('Parties Tests', () => {
|
|
634
634
|
// Assert
|
635
635
|
expect(participant.sendErrorToParticipant.callCount).toBe(1)
|
636
636
|
const firstLoggerCallArgs = loggerStub.getCall(0).args
|
637
|
-
expect(firstLoggerCallArgs[1].message).toBe(ERROR_MESSAGES.
|
637
|
+
expect(firstLoggerCallArgs[1].message).toBe(ERROR_MESSAGES.sourceFspNotFound)
|
638
638
|
loggerStub.reset()
|
639
639
|
participant.sendErrorToParticipant.reset()
|
640
640
|
})
|
@@ -50,16 +50,18 @@ jest.mock('@mojaloop/central-services-shared', () => ({
|
|
50
50
|
Participants: { getParticipant: mockGetParticipant },
|
51
51
|
Request: { sendRequest: mockSendRequest },
|
52
52
|
Http: { SwitchDefaultHeaders: jest.fn() },
|
53
|
-
HeaderValidation: { getHubNameRegex: jest.fn().mockReturnValue(new RegExp(mockHubName)) }
|
53
|
+
HeaderValidation: { getHubNameRegex: jest.fn().mockReturnValue(new RegExp(mockHubName)) },
|
54
|
+
Hapi: jest.requireActual('@mojaloop/central-services-shared').Util.Hapi
|
54
55
|
},
|
55
56
|
Enum: mockEnums
|
56
57
|
}))
|
57
58
|
|
58
59
|
const Logger = require('@mojaloop/central-services-logger')
|
59
60
|
const fixtures = require('../../../fixtures')
|
61
|
+
const { API_TYPES } = require('@mojaloop/central-services-shared').Util.Hapi
|
60
62
|
|
61
63
|
const mockConfigDto = ({
|
62
|
-
apiType =
|
64
|
+
apiType = API_TYPES.fspiop,
|
63
65
|
jwsSign = false
|
64
66
|
} = {}) => ({
|
65
67
|
API_TYPE: apiType,
|