quoting-service 17.14.0 → 17.14.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/.grype.yaml +5 -0
- package/CHANGELOG.md +20 -0
- package/audit-ci.jsonc +2 -1
- package/package.json +8 -8
- package/src/data/database.js +1 -1
- package/src/data/testDatabase.js +187 -0
package/.grype.yaml
CHANGED
|
@@ -14,6 +14,11 @@ ignore:
|
|
|
14
14
|
- vulnerability: CVE-2026-22184
|
|
15
15
|
- vulnerability: CVE-2025-64718
|
|
16
16
|
- vulnerability: GHSA-34x7-hfp2-rc4v
|
|
17
|
+
# High severity vulnerabilities
|
|
18
|
+
- vulnerability: GHSA-37qj-frw5-hhjh # fast-xml-parser 4.5.3
|
|
19
|
+
# Medium severity vulnerabilities
|
|
20
|
+
- vulnerability: GHSA-p5wg-g6qr-c7cg # eslint 8.57.1
|
|
21
|
+
- vulnerability: GHSA-3966-f6p6-2qr9
|
|
17
22
|
|
|
18
23
|
# Set output format defaults
|
|
19
24
|
output:
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
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.14.2](https://github.com/mojaloop/quoting-service/compare/v17.14.1...v17.14.2) (2026-02-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* fix quoteParty party name mapping ([#452](https://github.com/mojaloop/quoting-service/issues/452)) ([a0ac28e](https://github.com/mojaloop/quoting-service/commit/a0ac28e4e758ef72de6a4018f5ef68161844bf70))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Chore
|
|
14
|
+
|
|
15
|
+
* **sbom:** update sbom [skip ci] ([d54fb98](https://github.com/mojaloop/quoting-service/commit/d54fb98872b2f49abf1ed857fd60ed14d5272a70))
|
|
16
|
+
|
|
17
|
+
### [17.14.1](https://github.com/mojaloop/quoting-service/compare/v17.14.0...v17.14.1) (2026-02-03)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chore
|
|
21
|
+
|
|
22
|
+
* bump dep ([#451](https://github.com/mojaloop/quoting-service/issues/451)) ([f9456ea](https://github.com/mojaloop/quoting-service/commit/f9456ea95c754fc5d2d646770d9f03e62720a8ef))
|
|
23
|
+
* **sbom:** update sbom [skip ci] ([bdecbc3](https://github.com/mojaloop/quoting-service/commit/bdecbc3acf0f9da0fb3a374fea38fa74e7ea4bcf))
|
|
24
|
+
|
|
5
25
|
## [17.14.0](https://github.com/mojaloop/quoting-service/compare/v17.13.11...v17.14.0) (2026-01-29)
|
|
6
26
|
|
|
7
27
|
|
package/audit-ci.jsonc
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "quoting-service",
|
|
3
3
|
"description": "Quoting Service hosted by a scheme",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "17.14.
|
|
5
|
+
"version": "17.14.2",
|
|
6
6
|
"author": "ModusBox",
|
|
7
7
|
"contributors": [
|
|
8
8
|
"Georgi Georgiev <georgi.georgiev@modusbox.com>",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"lint": "npx standard",
|
|
59
59
|
"lint:fix": "npx standard --fix",
|
|
60
60
|
"test": "npm run test:unit",
|
|
61
|
-
"test:unit": "jest --testMatch '**/test/unit/**/*.test.js' ",
|
|
61
|
+
"test:unit": "jest --runInBand --testMatch '**/test/unit/**/*.test.js' ",
|
|
62
62
|
"test:unit:dto": "jest --testMatch '**/test/unit/lib/dto.test.js'",
|
|
63
63
|
"test:unit:pc": "jest --testMatch '**/test/unit/lib/payloadCache.test.js'",
|
|
64
64
|
"test:xunit": "npm run test:junit",
|
|
@@ -120,17 +120,17 @@
|
|
|
120
120
|
"@mojaloop/central-services-logger": "11.10.3",
|
|
121
121
|
"@mojaloop/central-services-metrics": "12.8.3",
|
|
122
122
|
"@mojaloop/central-services-shared": "18.35.2",
|
|
123
|
-
"@mojaloop/central-services-stream": "11.
|
|
123
|
+
"@mojaloop/central-services-stream": "11.9.0",
|
|
124
124
|
"@mojaloop/event-sdk": "14.8.2",
|
|
125
125
|
"@mojaloop/inter-scheme-proxy-cache-lib": "2.9.0",
|
|
126
126
|
"@mojaloop/ml-number": "11.4.2",
|
|
127
|
-
"@mojaloop/ml-schema-transformer-lib": "2.
|
|
128
|
-
"@mojaloop/sdk-standard-components": "19.18.
|
|
127
|
+
"@mojaloop/ml-schema-transformer-lib": "2.9.0",
|
|
128
|
+
"@mojaloop/sdk-standard-components": "19.18.7",
|
|
129
129
|
"ajv": "8.17.1",
|
|
130
130
|
"ajv-keywords": "5.1.0",
|
|
131
131
|
"axios": "1.13.4",
|
|
132
132
|
"blipp": "4.0.2",
|
|
133
|
-
"commander": "14.0.
|
|
133
|
+
"commander": "14.0.3",
|
|
134
134
|
"event-stream": "4.0.1",
|
|
135
135
|
"fast-safe-stringify": "2.1.1",
|
|
136
136
|
"joi": "18.0.2",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"knex": "3.1.0",
|
|
139
139
|
"memory-cache": "0.2.0",
|
|
140
140
|
"minimist": "1.2.8",
|
|
141
|
-
"mysql2": "^3.16.
|
|
141
|
+
"mysql2": "^3.16.3",
|
|
142
142
|
"node-fetch": "3.3.2",
|
|
143
143
|
"parse-strings-in-object": "2.0.0",
|
|
144
144
|
"rc": "1.2.8"
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"audit-ci": "7.1.0",
|
|
148
148
|
"eslint": "8.57.1",
|
|
149
149
|
"eslint-config-standard": "17.1.0",
|
|
150
|
-
"eslint-plugin-jest": "29.12.
|
|
150
|
+
"eslint-plugin-jest": "29.12.2",
|
|
151
151
|
"ioredis-mock": "8.13.1",
|
|
152
152
|
"jest": "29.7.0",
|
|
153
153
|
"jest-junit": "16.0.0",
|
package/src/data/database.js
CHANGED
|
@@ -498,7 +498,7 @@ class Database {
|
|
|
498
498
|
fspId: party.partyIdInfo.fspId,
|
|
499
499
|
participantId: refs.participantId,
|
|
500
500
|
merchantClassificationCode: party.merchantClassificationCode,
|
|
501
|
-
partyName: party.
|
|
501
|
+
partyName: party.name,
|
|
502
502
|
transferParticipantRoleTypeId: refs.transferParticipantRoleTypeId,
|
|
503
503
|
ledgerEntryTypeId: refs.ledgerEntryTypeId,
|
|
504
504
|
amount: new MLNumber(amount).toFixed(this.config.amount.scale),
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*****
|
|
2
|
+
License
|
|
3
|
+
--------------
|
|
4
|
+
Copyright © 2020-2025 Mojaloop Foundation
|
|
5
|
+
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License. You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
10
|
+
|
|
11
|
+
Contributors
|
|
12
|
+
--------------
|
|
13
|
+
This is the official list of the Mojaloop project contributors for this file.
|
|
14
|
+
Names of the original copyright holders (individuals or organizations)
|
|
15
|
+
should be listed with a '*' in the first column. People who have
|
|
16
|
+
contributed from an organization can be listed under the organization
|
|
17
|
+
that actually holds the copyright for their contributions (see the
|
|
18
|
+
Mojaloop Foundation for an example). Those individuals should have
|
|
19
|
+
their names indented and be marked with a '-'. Email address can be added
|
|
20
|
+
optionally within square brackets <email>.
|
|
21
|
+
|
|
22
|
+
* Mojaloop Foundation
|
|
23
|
+
- Name Surname <name.surname@mojaloop.io>
|
|
24
|
+
*****/
|
|
25
|
+
|
|
26
|
+
'use strict'
|
|
27
|
+
|
|
28
|
+
const Database = require('./database')
|
|
29
|
+
const { logger } = require('../lib/')
|
|
30
|
+
const libUtil = require('../lib/util')
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Test-specific database operations extending the base Database class
|
|
34
|
+
*/
|
|
35
|
+
class TestDatabase extends Database {
|
|
36
|
+
constructor (config, log, queryBuilder) {
|
|
37
|
+
super(config, log || logger.child({ component: 'TestDatabase' }), queryBuilder)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gets the complete quote by quoteId
|
|
42
|
+
*
|
|
43
|
+
* @returns {promise} - quote object or null if not found
|
|
44
|
+
*/
|
|
45
|
+
async getQuote (quoteId) {
|
|
46
|
+
try {
|
|
47
|
+
const rows = await this.queryBuilder('quote')
|
|
48
|
+
.where('quoteId', quoteId)
|
|
49
|
+
.select()
|
|
50
|
+
|
|
51
|
+
if ((!rows) || rows.length < 1) {
|
|
52
|
+
return null
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return rows[0]
|
|
56
|
+
} catch (err) {
|
|
57
|
+
this.log.error('Error in getQuote:', err)
|
|
58
|
+
libUtil.rethrowDatabaseError(err)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets the complete quote response by quoteId
|
|
64
|
+
*
|
|
65
|
+
* @returns {promise} - quote response object or null if not found
|
|
66
|
+
*/
|
|
67
|
+
async getQuoteResponse (quoteId) {
|
|
68
|
+
try {
|
|
69
|
+
const rows = await this.queryBuilder('quoteResponse')
|
|
70
|
+
.where('quoteId', quoteId)
|
|
71
|
+
.select()
|
|
72
|
+
|
|
73
|
+
if ((!rows) || rows.length < 1) {
|
|
74
|
+
return null
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return rows[0]
|
|
78
|
+
} catch (err) {
|
|
79
|
+
this.log.error('Error in getQuoteResponse:', err)
|
|
80
|
+
libUtil.rethrowDatabaseError(err)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Gets all quote parties for a given quoteId
|
|
86
|
+
*
|
|
87
|
+
* @returns {promise} - array of quote party objects or empty array if none found
|
|
88
|
+
*/
|
|
89
|
+
async getQuoteParties (quoteId) {
|
|
90
|
+
try {
|
|
91
|
+
const rows = await this.queryBuilder('quoteParty')
|
|
92
|
+
.where('quoteId', quoteId)
|
|
93
|
+
.select()
|
|
94
|
+
|
|
95
|
+
return rows || []
|
|
96
|
+
} catch (err) {
|
|
97
|
+
this.log.error('Error in getQuoteParties:', err)
|
|
98
|
+
libUtil.rethrowDatabaseError(err)
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Gets party information by quotePartyId
|
|
104
|
+
*
|
|
105
|
+
* @returns {promise} - party object or null if not found
|
|
106
|
+
*/
|
|
107
|
+
async getParty (quotePartyId) {
|
|
108
|
+
try {
|
|
109
|
+
const rows = await this.queryBuilder('party')
|
|
110
|
+
.where('quotePartyId', quotePartyId)
|
|
111
|
+
.select()
|
|
112
|
+
|
|
113
|
+
if ((!rows) || rows.length < 1) {
|
|
114
|
+
return null
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return rows[0]
|
|
118
|
+
} catch (err) {
|
|
119
|
+
this.log.error('Error in getParty:', err)
|
|
120
|
+
libUtil.rethrowDatabaseError(err)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Gets transaction reference by quoteId
|
|
126
|
+
*
|
|
127
|
+
* @returns {promise} - transaction reference object or null if not found
|
|
128
|
+
*/
|
|
129
|
+
async getTransactionReference (quoteId) {
|
|
130
|
+
try {
|
|
131
|
+
const rows = await this.queryBuilder('transactionReference')
|
|
132
|
+
.where('quoteId', quoteId)
|
|
133
|
+
.select()
|
|
134
|
+
|
|
135
|
+
if ((!rows) || rows.length < 1) {
|
|
136
|
+
return null
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return rows[0]
|
|
140
|
+
} catch (err) {
|
|
141
|
+
this.log.error('Error in getTransactionReference:', err)
|
|
142
|
+
libUtil.rethrowDatabaseError(err)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Gets quote extensions by quoteId
|
|
148
|
+
*
|
|
149
|
+
* @returns {promise} - array of extension objects or empty array if none found
|
|
150
|
+
*/
|
|
151
|
+
async getQuoteExtensions (quoteId) {
|
|
152
|
+
try {
|
|
153
|
+
const rows = await this.queryBuilder('quoteExtension')
|
|
154
|
+
.where('quoteId', quoteId)
|
|
155
|
+
.select()
|
|
156
|
+
|
|
157
|
+
return rows || []
|
|
158
|
+
} catch (err) {
|
|
159
|
+
this.log.error('Error in getQuoteExtensions:', err)
|
|
160
|
+
libUtil.rethrowDatabaseError(err)
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Gets the ILP packet for a quote response
|
|
166
|
+
*
|
|
167
|
+
* @returns {promise} - ILP packet value or null if not found
|
|
168
|
+
*/
|
|
169
|
+
async getQuoteResponseIlpPacket (quoteResponseId) {
|
|
170
|
+
try {
|
|
171
|
+
const rows = await this.queryBuilder('quoteResponseIlpPacket')
|
|
172
|
+
.where('quoteResponseId', quoteResponseId)
|
|
173
|
+
.select()
|
|
174
|
+
|
|
175
|
+
if ((!rows) || rows.length < 1) {
|
|
176
|
+
return null
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return rows[0].value
|
|
180
|
+
} catch (err) {
|
|
181
|
+
this.log.error('Error in getQuoteResponseIlpPacket:', err)
|
|
182
|
+
libUtil.rethrowDatabaseError(err)
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
module.exports = TestDatabase
|