@mojaloop/central-ledger 9.2.2 → 15.1.3-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 +625 -204
- package/.env +3 -2
- package/.ncurc.yaml +9 -0
- package/.nvmrc +1 -1
- package/.versionrc +15 -0
- package/CHANGELOG.md +353 -0
- package/CODEOWNERS +31 -0
- package/Dockerfile +20 -14
- package/LICENSE.md +4 -4
- package/Onboarding.md +0 -7
- package/README.md +99 -22
- package/audit-resolve.json +136 -1
- package/config/default.json +82 -27
- package/docker/central-ledger/default.json +68 -21
- package/docker/ml-api-adapter/default.json +10 -1
- package/docker/wait-for/wait-for-objstore.sh +1 -6
- package/docker/wait-for/wait-for.env +1 -1
- package/docker-compose.integration.yml +8 -5
- package/docker-compose.yml +73 -16
- package/migrations/310203_transferParticipant-indexes.js +38 -0
- package/migrations/310503_participantLimit-indexes-composite.js +38 -0
- package/migrations/{400401_settlementWindowStateChange-indexes.js → 400401_settlmentWindowStateChange-indexes.js} +0 -0
- package/migrations/401301_settlementModel-indexes.js +2 -0
- package/migrations/500401_quote-hotfix-2719.js +58 -0
- package/migrations/500501_feature-fixSubIdRef.js +53 -0
- package/migrations/500601_party-2480.js +63 -0
- package/migrations/501001_quoteExtension-quote-service-174.js +46 -0
- package/migrations/501002_quoteExtension-2522.js +61 -0
- package/migrations/800101_feature-fixSubIdRef.js +90 -0
- package/migrations/910102_hotfix954.js +4 -1
- package/migrations/940100_quotePartyIdInfoExtension.js +52 -0
- package/migrations/940101_quotePartyIdInfoExtension-2522.js +64 -0
- package/migrations/950100_settlementContentAggregation-decimal184.js +40 -0
- package/migrations/950101_transferParticipantStateChange.js +46 -0
- package/migrations/950102_settlementModel-adjustPosition.js +42 -0
- package/migrations/950103_dropTransferParticipantStateChange.js +47 -0
- package/migrations/950104_settlementModel-settlementAccountTypeId.js +79 -0
- package/migrations/950106_unique_settlement_model_ledger_account_currency.js +38 -0
- package/migrations/950107_settlementWindowContent_foreign_settlementModel.js +60 -0
- package/package.json +99 -81
- package/scripts/_wait4_all.js +146 -0
- package/seeds/amountType.js +4 -6
- package/seeds/balanceOfPayments.js +4 -6
- package/seeds/bulkProcessingState.js +4 -6
- package/seeds/bulkTransferState.js +4 -6
- package/seeds/currency.js +4 -6
- package/seeds/endpointType.js +128 -7
- package/seeds/ledgerAccountType.js +11 -10
- package/seeds/ledgerEntryType.js +5 -7
- package/seeds/participant.js +4 -6
- package/seeds/participantLimitType.js +4 -6
- package/seeds/partyIdentifierType.js +4 -6
- package/seeds/partyType.js +4 -6
- package/seeds/settlementDelay.js +4 -6
- package/seeds/settlementGranularity.js +4 -6
- package/seeds/settlementInterchange.js +4 -6
- package/seeds/settlementState.js +4 -6
- package/seeds/settlementWindow1State.js +4 -6
- package/seeds/transactionInitiator.js +4 -6
- package/seeds/transactionInitiatorType.js +4 -6
- package/seeds/transactionScenario.js +4 -6
- package/seeds/transferParticipantRoleType.js +4 -6
- package/seeds/transferState.js +9 -6
- package/src/api/interface/swagger.json +728 -948
- package/src/api/ledgerAccountTypes/handler.js +55 -0
- package/src/api/ledgerAccountTypes/routes.js +63 -0
- package/src/api/metrics/handler.js +2 -2
- package/src/api/metrics/routes.js +1 -1
- package/src/api/participants/handler.js +43 -35
- package/src/api/participants/routes.js +13 -13
- package/src/api/root/routes.js +2 -2
- package/src/api/settlementModels/handler.js +9 -26
- package/src/api/settlementModels/routes.js +4 -4
- package/src/api/transactions/handler.js +46 -0
- package/src/api/transactions/routes.js +45 -0
- package/src/domain/bulkTransfer/index.js +6 -5
- package/src/domain/ledgerAccountTypes/index.js +58 -0
- package/src/domain/participant/index.js +55 -4
- package/src/domain/position/index.js +18 -2
- package/src/domain/settlement/index.js +39 -6
- package/src/domain/transactions/index.js +61 -0
- package/src/domain/transfer/index.js +22 -2
- package/src/domain/transfer/transform.js +3 -3
- package/src/handlers/admin/handler.js +24 -32
- package/src/handlers/bulk/fulfil/handler.js +89 -56
- package/src/handlers/bulk/get/handler.js +203 -0
- package/src/handlers/bulk/index.js +4 -1
- package/src/handlers/bulk/prepare/handler.js +30 -29
- package/src/handlers/bulk/processing/handler.js +61 -32
- package/src/handlers/bulk/shared/validator.js +13 -1
- package/src/handlers/index.js +18 -9
- package/src/handlers/positions/handler.js +67 -46
- package/src/handlers/register.js +7 -7
- package/src/handlers/timeouts/handler.js +9 -4
- package/src/handlers/transfers/handler.js +408 -182
- package/src/handlers/transfers/validator.js +41 -11
- package/src/lib/cache.js +8 -34
- package/src/lib/config.js +5 -7
- package/src/lib/enum.js +22 -22
- package/src/lib/enumCached.js +76 -0
- package/src/lib/healthCheck/subServiceHealth.js +2 -2
- package/src/lib/requestLogger.js +9 -9
- package/src/lib/urlParser.js +1 -1
- package/src/models/bulkTransfer/bulkTransfer.js +6 -6
- package/src/models/bulkTransfer/bulkTransferAssociation.js +3 -3
- package/src/models/bulkTransfer/bulkTransferDuplicateCheck.js +4 -4
- package/src/models/bulkTransfer/bulkTransferExtension.js +2 -2
- package/src/models/bulkTransfer/bulkTransferFulfilmentDuplicateCheck.js +4 -4
- package/src/models/bulkTransfer/bulkTransferStateChange.js +7 -7
- package/src/models/bulkTransfer/facade.js +54 -3
- package/src/models/bulkTransfer/individualTransfer.js +2 -2
- package/src/models/ilpPackets/ilpPacket.js +36 -0
- package/src/models/ledgerAccountType/ledgerAccountType.js +139 -3
- package/src/models/misc/migrationLock.js +1 -1
- package/src/models/misc/segment.js +1 -1
- package/src/models/participant/facade.js +226 -76
- package/src/models/participant/participant.js +6 -5
- package/src/models/participant/participantCached.js +8 -0
- package/src/models/participant/participantCurrency.js +7 -7
- package/src/models/participant/participantCurrencyCached.js +11 -1
- package/src/models/participant/participantLimit.js +13 -13
- package/src/models/participant/participantLimitCached.js +124 -0
- package/src/models/participant/participantPosition.js +34 -5
- package/src/models/participant/participantPositionChange.js +10 -2
- package/src/models/position/facade.js +112 -18
- package/src/models/position/participantPosition.js +6 -6
- package/src/models/settlement/settlementModel.js +92 -17
- package/src/models/settlement/settlementModelCached.js +139 -0
- package/src/models/transfer/facade.js +97 -32
- package/src/models/transfer/ilpPacket.js +4 -4
- package/src/models/transfer/transfer.js +7 -7
- package/src/models/transfer/transferDuplicateCheck.js +21 -5
- package/src/models/transfer/transferError.js +5 -5
- package/src/models/transfer/transferErrorDuplicateCheck.js +4 -4
- package/src/models/transfer/transferExtension.js +4 -4
- package/src/models/transfer/transferFulfilment.js +5 -5
- package/src/models/transfer/transferFulfilmentDuplicateCheck.js +4 -4
- package/src/models/transfer/transferParticipant.js +3 -3
- package/src/models/transfer/transferStateChange.js +11 -11
- package/src/models/transfer/transferTimeout.js +5 -5
- package/src/schema/bulkTransfer.js +4 -4
- package/src/shared/plugins.js +10 -9
- package/src/shared/setup.js +69 -46
- package/test/integration/domain/participant/index.test.js +2 -0
- package/test/integration/handlers/handlers.test.js +605 -166
- package/test/integration/handlers/root.test.js +1 -1
- package/test/integration/helpers/hubAccounts.js +62 -0
- package/test/integration/helpers/ilpPacket.js +1 -1
- package/test/integration/helpers/participantFundsInOut.js +80 -0
- package/test/integration/helpers/participantLimit.js +6 -1
- package/test/integration/helpers/settlementModels.js +88 -0
- package/test/integration/helpers/testConsumer.js +163 -0
- package/test/integration/helpers/testProducer.js +0 -1
- package/test/integration/helpers/transferDuplicateCheck.js +1 -1
- package/test/integration/helpers/transferStateChange.js +1 -1
- package/test/integration/helpers/transferTestHelper.js +3 -5
- package/test/integration/models/transfer/transferStateChange.test.js +6 -0
- package/test/unit/api/ledgerAccountTypes/handler.test.js +126 -0
- package/test/unit/api/ledgerAccountTypes/routes.test.js +52 -0
- package/test/unit/api/participants/handler.test.js +75 -33
- package/test/unit/api/root/handler.test.js +1 -1
- package/test/unit/api/root/routes.test.js +2 -2
- package/test/unit/api/settlementModels/handler.test.js +21 -57
- package/test/unit/api/transactions/handler.test.js +108 -0
- package/test/unit/api/transactions/routes.test.js +38 -0
- package/test/unit/domain/ledgerAccountTypes/index.test.js +197 -0
- package/test/unit/domain/participant/index.test.js +115 -2
- package/test/unit/domain/settlement/index.test.js +199 -29
- package/test/unit/domain/transactions/index.test.js +128 -0
- package/test/unit/domain/transfer/index.test.js +1 -0
- package/test/unit/domain/transfer/transform.test.js +2 -0
- package/test/unit/handlers/admin/handler.test.js +5 -5
- package/test/unit/handlers/bulk/get/handler.test.js +401 -0
- package/test/unit/handlers/index.test.js +6 -0
- package/test/unit/handlers/positions/handler.test.js +26 -0
- package/test/unit/handlers/register.test.js +2 -0
- package/test/unit/handlers/transfers/handler.test.js +491 -36
- package/test/unit/handlers/transfers/validator.test.js +31 -31
- package/test/unit/lib/cache.test.js +0 -64
- package/test/unit/lib/cachingOfEnums.test.js +121 -0
- package/test/unit/lib/config.test.js +34 -0
- package/test/unit/lib/enum.test.js +6 -1
- package/test/unit/lib/enumCached.test.js +82 -0
- package/test/unit/lib/healthCheck/subServiceHealth.test.js +2 -0
- package/test/unit/lib/requestLogger.test.js +14 -12
- package/test/unit/models/ilpPackets/ilpPacket.test.js +89 -0
- package/test/unit/models/ledgerAccountType/ledgerAccountType.test.js +255 -6
- package/test/unit/models/misc/migrationLock.test.js +4 -0
- package/test/unit/models/misc/segment.test.js +5 -0
- package/test/unit/models/participant/facade.test.js +493 -54
- package/test/unit/models/participant/participant.test.js +4 -0
- package/test/unit/models/participant/participantCurrency.test.js +22 -9
- package/test/unit/models/participant/participantCurrencyCached.test.js +1 -1
- package/test/unit/models/participant/participantLimit.test.js +97 -0
- package/test/unit/models/participant/participantLimitCached.test.js +232 -0
- package/test/unit/models/participant/participantPosition.test.js +217 -0
- package/test/unit/models/participant/participantPositionChange.test.js +3 -0
- package/test/unit/models/position/facade.test.js +318 -29
- package/test/unit/models/position/participantPosition.test.js +22 -7
- package/test/unit/models/settlement/settlementModel.test.js +18 -37
- package/test/unit/models/settlement/settlementModelCached.test.js +171 -0
- package/test/unit/models/transfer/facade.test.js +115 -0
- package/test/unit/models/transfer/ilpPacket.test.js +28 -11
- package/test/unit/models/transfer/transfer.test.js +13 -4
- package/test/unit/models/transfer/transferDuplicateCheck.test.js +4 -0
- package/test/unit/models/transfer/transferError.test.js +5 -1
- package/test/unit/models/transfer/transferErrorDuplicateCheck.test.js +4 -0
- package/test/unit/models/transfer/transferExtension.test.js +26 -9
- package/test/unit/models/transfer/transferFulfilment.test.js +14 -5
- package/test/unit/models/transfer/transferFulfilmentDuplicateCheck.test.js +4 -0
- package/test/unit/models/transfer/transferParticipant.test.js +14 -5
- package/test/unit/models/transfer/transferStateChange.test.js +3 -0
- package/test/unit/models/transfer/transferTimeout.test.js +6 -0
- package/test/unit/seeds/amountType.test.js +6 -22
- package/test/unit/seeds/balanceOfPayments.test.js +6 -22
- package/test/unit/seeds/bulkProcessingState.test.js +84 -0
- package/test/unit/{lib/sidecar/nullClient.test.js → seeds/bulkTransferState.test.js} +36 -39
- package/test/unit/seeds/currency.test.js +6 -22
- package/test/unit/seeds/endpointType.test.js +6 -22
- package/test/unit/seeds/ledgerAccountType.test.js +5 -22
- package/test/unit/seeds/ledgerEntryType.test.js +6 -22
- package/test/unit/seeds/participant.test.js +5 -22
- package/test/unit/seeds/participantLimitType.test.js +6 -22
- package/test/unit/seeds/partyIdentifierType.test.js +6 -22
- package/test/unit/seeds/partyType.test.js +6 -22
- package/test/unit/seeds/settlementState.test.js +5 -22
- package/test/unit/seeds/settlementWindow1State.test.js +5 -22
- package/test/unit/seeds/transactionInitiator.test.js +6 -22
- package/test/unit/seeds/transactionInitiatorType.test.js +6 -22
- package/test/unit/seeds/transactionScenario.test.js +6 -22
- package/test/unit/seeds/transferParticipantRoleType.test.js +6 -22
- package/test/unit/seeds/transferState.test.js +6 -22
- package/test/unit/shared/plugins.test.js +31 -1
- package/test/unit/shared/setup.test.js +25 -36
- package/test/util/helpers.js +37 -2
- package/test/util/randomTransfers.js +1 -1
- package/test/util/scripts/env.sh +6 -5
- package/test/util/scripts/populateTestData.sh +204 -181
- package/test/util/scripts/populateTestDataForLegacySimulator.sh +261 -0
- package/test/util/scripts/restartObjStore.sh +1 -1
- package/test-integration.Dockerfile +15 -15
- package/test.Dockerfile +12 -12
- package/.circleci/_set_up_deploy_envs.sh +0 -47
- package/.dockerignore +0 -17
- package/.ncurc.json +0 -3
- package/server.sh +0 -4
- package/sonar-project.properties +0 -17
- package/src/lib/sidecar/index.js +0 -47
- package/src/lib/sidecar/nullClient.js +0 -18
- package/test/.env +0 -8
- package/test/integration-config.json +0 -367
- package/test/integration-runner.env +0 -31
- package/test/integration-runner.sh +0 -264
- package/test/spec-runner.sh +0 -132
- package/test/unit/lib/sidecar/index.test.js +0 -148
- package/test/unit/models/position/participantLimit.test.js +0 -135
package/seeds/endpointType.js
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
-
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
23
23
|
--------------
|
|
24
24
|
******/
|
|
25
25
|
|
|
@@ -137,17 +137,138 @@ const endpointTypes = [
|
|
|
137
137
|
{
|
|
138
138
|
name: 'FSPIOP_CALLBACK_URL_TRX_REQ_SERVICE',
|
|
139
139
|
description: 'Participant callback URL to which transaction requests can be sent'
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: 'FSPIOP_CALLBACK_URL_BULK_QUOTES',
|
|
143
|
+
description: 'Bulk Quotes callback URL to which put bulkQuotes requests can be sent'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_GET',
|
|
147
|
+
description: 'Participant callback URL where GET /thirdpartyRequests/transactions/{ID} can be sent'
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_POST',
|
|
151
|
+
description: 'Participant callback URL where POST /thirdpartyRequests/transactions can be sent'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_PUT',
|
|
155
|
+
description: 'Participant callback URL where PUT /thirdpartyRequests/transactions/{ID} can be sent'
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_PUT_ERROR',
|
|
159
|
+
description: 'Participant callback URL to which PUT /thirdpartyRequests/transactions/{ID}/error error information can be sent'
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_PATCH',
|
|
163
|
+
description: 'Participant callback URL where PATCH /thirdpartyRequests/transactions/{ID} can be sent'
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_AUTH_POST',
|
|
167
|
+
description: 'Participant callback URL where POST /thirdpartyRequests/transactions/{ID}/authorizations can be sent'
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT',
|
|
171
|
+
description: 'Participant callback URL where PUT /thirdpartyRequests/transactions/{ID}/authorizations can be sent'
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_AUTH_PUT_ERROR',
|
|
175
|
+
description: 'Participant callback URL where PUT /thirdpartyRequests/transactions/{ID}/authorizations/error error information can be sent'
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_VERIFY_POST',
|
|
179
|
+
description: 'Participant callback URL where POST /thirdpartyRequests/verifications can be sent'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT',
|
|
183
|
+
description: 'Participant callback URL where PUT /thirdpartyRequests/verifications/{ID} can be sent'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'TP_CB_URL_TRANSACTION_REQUEST_VERIFY_PUT_ERROR',
|
|
187
|
+
description: 'Participant callback URL where PUT /thirdpartyRequests/verifications/{ID}/error can be sent'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'TP_CB_URL_CONSENT_REQUEST_POST',
|
|
191
|
+
description: 'Participant callback URL where POST /consentRequests can be sent'
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'TP_CB_URL_CONSENT_REQUEST_PUT',
|
|
195
|
+
description: 'Participant callback URL where PUT /consentRequests/{ID} can be sent'
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'TP_CB_URL_CONSENT_REQUEST_PUT_ERROR',
|
|
199
|
+
description: 'Participant callback URL where PUT /consentRequests/{ID}/error error information can be sent'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: 'TP_CB_URL_CONSENT_REQUEST_PATCH',
|
|
203
|
+
description: 'Participant callback URL where PATCH /consentRequests/{ID} can be sent'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'TP_CB_URL_CONSENT_REQUEST_PUT_ERROR',
|
|
207
|
+
description: 'Participant callback URL where PUT /consentRequests/{ID}/error error information can be sent'
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'TP_CB_URL_CREATE_CREDENTIAL_POST',
|
|
211
|
+
description: 'Participant callback URL where POST /consentRequests/{ID}/createCredential can be sent'
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'TP_CB_URL_CONSENT_POST',
|
|
215
|
+
description: 'Participant callback URL where POST /consents/ can be sent'
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'TP_CB_URL_CONSENT_GET',
|
|
219
|
+
description: 'Participant callback URL where GET /consents/{ID} can be sent'
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'TP_CB_URL_CONSENT_PUT',
|
|
223
|
+
description: 'Participant callback URL where PUT /consents/{ID} can be sent'
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: 'TP_CB_URL_CONSENT_PATCH',
|
|
227
|
+
description: 'Participant callback URL where PATCH /consents/{ID} can be sent'
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'TP_CB_URL_CONSENT_PUT_ERROR',
|
|
231
|
+
description: 'Participant callback URL where PUT /consents/{ID}/error error information can be sent'
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
name: 'TP_CB_URL_CONSENT_GENERATE_CHALLENGE_POST',
|
|
235
|
+
description: 'Participant callback URL where POST /consents/{ID}/generateChallenge can be sent'
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: 'TP_CB_URL_CONSENT_GENERATE_CHALLENGE_PUT_ERROR',
|
|
239
|
+
description: 'Participant callback URL where PUT /consents/{ID}/generateChallenge/error error information can be sent'
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'TP_CB_URL_ACCOUNTS_GET',
|
|
243
|
+
description: 'Accounts callback URL where GET /accounts/{ID} can be sent'
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: 'TP_CB_URL_ACCOUNTS_PUT',
|
|
247
|
+
description: 'Accounts callback URL where PUT /accounts/{ID} can be sent'
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'TP_CB_URL_ACCOUNTS_PUT_ERROR',
|
|
251
|
+
description: 'Accounts callback URL where PUT /accounts/{ID}/error error information can be sent'
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: 'TP_CB_URL_SERVICES_GET',
|
|
255
|
+
description: 'Participant callback URL where GET /services/{ServiceType} can be sent'
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: 'TP_CB_URL_SERVICES_PUT',
|
|
259
|
+
description: 'Participant callback URL where PUT /services/{ServiceType} can be sent'
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'TP_CB_URL_SERVICES_PUT_ERROR',
|
|
263
|
+
description: 'Participant callback URL where PUT /services/{ServiceType}/error can be sent'
|
|
140
264
|
}
|
|
141
265
|
]
|
|
142
266
|
|
|
143
267
|
exports.seed = async function (knex) {
|
|
144
268
|
try {
|
|
145
|
-
return await knex('endpointType').insert(endpointTypes)
|
|
269
|
+
return await knex('endpointType').insert(endpointTypes).onConflict('name').ignore()
|
|
146
270
|
} catch (err) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
console.log(`Uploading seeds for endpointType has failed with the following error: ${err}`)
|
|
150
|
-
return -1000
|
|
151
|
-
}
|
|
271
|
+
console.log(`Uploading seeds for endpointType has failed with the following error: ${err}`)
|
|
272
|
+
return -1000
|
|
152
273
|
}
|
|
153
274
|
}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
22
|
* Lazola Lucas <lazola.lucas@modusbox.com>
|
|
23
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
23
24
|
--------------
|
|
24
25
|
******/
|
|
25
26
|
|
|
@@ -43,32 +44,32 @@ const ledgerAccountTypes = [
|
|
|
43
44
|
name: 'HUB_MULTILATERAL_SETTLEMENT',
|
|
44
45
|
description: 'A single account for each currency with which the hub operates. The account is "held" by the Participant representing the hub in the switch'
|
|
45
46
|
},
|
|
46
|
-
{
|
|
47
|
-
name: 'HUB_FEE',
|
|
48
|
-
description: 'An account to which fees will be charged or collected'
|
|
49
|
-
},
|
|
50
47
|
{
|
|
51
48
|
name: 'INTERCHANGE_FEE',
|
|
52
49
|
description: null,
|
|
53
50
|
isSettleable: 1
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'INTERCHANGE_FEE_SETTLEMENT',
|
|
54
|
+
description: null
|
|
54
55
|
}
|
|
55
56
|
]
|
|
57
|
+
|
|
56
58
|
const ledgerAccountList = ledgerAccountTypes.filter(currentValue => {
|
|
57
59
|
return currentValue.isSettleable
|
|
58
60
|
}).map(currentValue => {
|
|
59
61
|
return currentValue.name
|
|
60
62
|
}).sort()
|
|
63
|
+
|
|
61
64
|
const seed = async function (knex) {
|
|
62
65
|
try {
|
|
63
|
-
return await knex('ledgerAccountType').insert(ledgerAccountTypes)
|
|
66
|
+
return await knex('ledgerAccountType').insert(ledgerAccountTypes).onConflict('name').ignore()
|
|
64
67
|
} catch (err) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
console.log(`Uploading seeds for ledgerAccountType has failed with the following error: ${err}`)
|
|
68
|
-
return -1000
|
|
69
|
-
}
|
|
68
|
+
console.log(`Uploading seeds for ledgerAccountType has failed with the following error: ${err}`)
|
|
69
|
+
return -1000
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
|
|
72
73
|
module.exports = {
|
|
73
74
|
ledgerAccountList,
|
|
74
75
|
seed
|
package/seeds/ledgerEntryType.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -33,7 +34,7 @@ const ledgerEntryTypes = [
|
|
|
33
34
|
{
|
|
34
35
|
name: 'INTERCHANGE_FEE',
|
|
35
36
|
description: 'Fees to be paid between DFSP',
|
|
36
|
-
ledgerAccountTypeId:
|
|
37
|
+
ledgerAccountTypeId: 5 // INTERCHANGE_FEE
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
name: 'HUB_FEE',
|
|
@@ -71,12 +72,9 @@ const ledgerEntryTypes = [
|
|
|
71
72
|
|
|
72
73
|
exports.seed = async function (knex) {
|
|
73
74
|
try {
|
|
74
|
-
return await knex('ledgerEntryType').insert(ledgerEntryTypes)
|
|
75
|
+
return await knex('ledgerEntryType').insert(ledgerEntryTypes).onConflict('name').ignore()
|
|
75
76
|
} catch (err) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
console.log(`Uploading seeds for ledgerEntryType has failed with the following error: ${err}`)
|
|
79
|
-
return -1000
|
|
80
|
-
}
|
|
77
|
+
console.log(`Uploading seeds for ledgerEntryType has failed with the following error: ${err}`)
|
|
78
|
+
return -1000
|
|
81
79
|
}
|
|
82
80
|
}
|
package/seeds/participant.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -35,12 +36,9 @@ const participant = [
|
|
|
35
36
|
|
|
36
37
|
exports.seed = async function (knex) {
|
|
37
38
|
try {
|
|
38
|
-
return await knex('participant').insert(participant)
|
|
39
|
+
return await knex('participant').insert(participant).onConflict('name').ignore()
|
|
39
40
|
} catch (err) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
console.log(`Uploading seeds for participant has failed with the following error: ${err}`)
|
|
43
|
-
return -1000
|
|
44
|
-
}
|
|
41
|
+
console.log(`Uploading seeds for participant has failed with the following error: ${err}`)
|
|
42
|
+
return -1000
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -32,12 +33,9 @@ const participantLimitTypes = [
|
|
|
32
33
|
|
|
33
34
|
exports.seed = async function (knex) {
|
|
34
35
|
try {
|
|
35
|
-
return await knex('participantLimitType').insert(participantLimitTypes)
|
|
36
|
+
return await knex('participantLimitType').insert(participantLimitTypes).onConflict('name').ignore()
|
|
36
37
|
} catch (err) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
console.log(`Uploading seeds for participantLimitType has failed with the following error: ${err}`)
|
|
40
|
-
return -1000
|
|
41
|
-
}
|
|
38
|
+
console.log(`Uploading seeds for participantLimitType has failed with the following error: ${err}`)
|
|
39
|
+
return -1000
|
|
42
40
|
}
|
|
43
41
|
}
|
|
@@ -26,6 +26,7 @@ Contributors
|
|
|
26
26
|
|
|
27
27
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
28
28
|
* Henk Kodde <henk.kodde@modusbox.com>
|
|
29
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
29
30
|
--------------
|
|
30
31
|
******/
|
|
31
32
|
|
|
@@ -69,12 +70,9 @@ const partyIdentifierType = [
|
|
|
69
70
|
|
|
70
71
|
exports.seed = async function (knex) {
|
|
71
72
|
try {
|
|
72
|
-
return await knex('partyIdentifierType').insert(partyIdentifierType)
|
|
73
|
+
return await knex('partyIdentifierType').insert(partyIdentifierType).onConflict('name').ignore()
|
|
73
74
|
} catch (err) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
console.log(`Uploading seeds for partyIdentifierType has failed with the following error: ${err}`)
|
|
77
|
-
return -1000
|
|
78
|
-
}
|
|
75
|
+
console.log(`Uploading seeds for partyIdentifierType has failed with the following error: ${err}`)
|
|
76
|
+
return -1000
|
|
79
77
|
}
|
|
80
78
|
}
|
package/seeds/partyType.js
CHANGED
|
@@ -25,6 +25,7 @@ Contributors
|
|
|
25
25
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
26
26
|
|
|
27
27
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
28
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
28
29
|
--------------
|
|
29
30
|
******/
|
|
30
31
|
|
|
@@ -44,12 +45,9 @@ const partyType = [
|
|
|
44
45
|
|
|
45
46
|
exports.seed = async function (knex) {
|
|
46
47
|
try {
|
|
47
|
-
return await knex('partyType').insert(partyType)
|
|
48
|
+
return await knex('partyType').insert(partyType).onConflict('name').ignore()
|
|
48
49
|
} catch (err) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
console.log(`Uploading seeds for partyType has failed with the following error: ${err}`)
|
|
52
|
-
return -1000
|
|
53
|
-
}
|
|
50
|
+
console.log(`Uploading seeds for partyType has failed with the following error: ${err}`)
|
|
51
|
+
return -1000
|
|
54
52
|
}
|
|
55
53
|
}
|
package/seeds/settlementDelay.js
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
22
|
* Lazola Lucas <lazola.lucas@modusbox.com>
|
|
23
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
23
24
|
--------------
|
|
24
25
|
******/
|
|
25
26
|
|
|
@@ -40,13 +41,10 @@ const settlementDelayList = settlementDelayTypes.map(currentValue => {
|
|
|
40
41
|
}).sort()
|
|
41
42
|
const seed = async function (knex) {
|
|
42
43
|
try {
|
|
43
|
-
return await knex('settlementDelay').insert(settlementDelayTypes)
|
|
44
|
+
return await knex('settlementDelay').insert(settlementDelayTypes).onConflict('name').ignore()
|
|
44
45
|
} catch (err) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
console.log(`Uploading seeds for settlementDelay has failed with the following error: ${err}`)
|
|
48
|
-
return -1000
|
|
49
|
-
}
|
|
46
|
+
console.log(`Uploading seeds for settlementDelay has failed with the following error: ${err}`)
|
|
47
|
+
return -1000
|
|
50
48
|
}
|
|
51
49
|
}
|
|
52
50
|
module.exports = {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
22
|
* Lazola Lucas <lazola.lucas@modusbox.com>
|
|
23
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
23
24
|
--------------
|
|
24
25
|
******/
|
|
25
26
|
|
|
@@ -41,13 +42,10 @@ const settlementGranularityList = settlementGranularityTypes.map(currentValue =>
|
|
|
41
42
|
|
|
42
43
|
const seed = async function (knex) {
|
|
43
44
|
try {
|
|
44
|
-
return await knex('settlementGranularity').insert(settlementGranularityTypes)
|
|
45
|
+
return await knex('settlementGranularity').insert(settlementGranularityTypes).onConflict('name').ignore()
|
|
45
46
|
} catch (err) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
console.log(`Uploading seeds for settlementGranularity has failed with the following error: ${err}`)
|
|
49
|
-
return -1000
|
|
50
|
-
}
|
|
47
|
+
console.log(`Uploading seeds for settlementGranularity has failed with the following error: ${err}`)
|
|
48
|
+
return -1000
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
22
|
* Lazola Lucas <lazola.lucas@modusbox.com>
|
|
23
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
23
24
|
--------------
|
|
24
25
|
******/
|
|
25
26
|
|
|
@@ -41,13 +42,10 @@ const settlementInterchangeList = settlementInterchangeTypes.map(currentValue =>
|
|
|
41
42
|
|
|
42
43
|
const seed = async function (knex) {
|
|
43
44
|
try {
|
|
44
|
-
return await knex('settlementInterchange').insert(settlementInterchangeTypes)
|
|
45
|
+
return await knex('settlementInterchange').insert(settlementInterchangeTypes).onConflict('name').ignore()
|
|
45
46
|
} catch (err) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
console.log(`Uploading seeds for settlementInterchange has failed with the following error: ${err}`)
|
|
49
|
-
return -1000
|
|
50
|
-
}
|
|
47
|
+
console.log(`Uploading seeds for settlementInterchange has failed with the following error: ${err}`)
|
|
48
|
+
return -1000
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
51
|
module.exports = {
|
package/seeds/settlementState.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -64,12 +65,9 @@ const settlementStates = [
|
|
|
64
65
|
|
|
65
66
|
exports.seed = async function (knex) {
|
|
66
67
|
try {
|
|
67
|
-
return await knex('settlementState').insert(settlementStates)
|
|
68
|
+
return await knex('settlementState').insert(settlementStates).onConflict('settlementStateId').ignore()
|
|
68
69
|
} catch (err) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
console.log(`Uploading seeds for settlementState has failed with the following error: ${err}`)
|
|
72
|
-
return -1000
|
|
73
|
-
}
|
|
70
|
+
console.log(`Uploading seeds for settlementState has failed with the following error: ${err}`)
|
|
71
|
+
return -1000
|
|
74
72
|
}
|
|
75
73
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -64,12 +65,9 @@ const settlementWindowStates = [
|
|
|
64
65
|
|
|
65
66
|
exports.seed = async function (knex) {
|
|
66
67
|
try {
|
|
67
|
-
return await knex('settlementWindowState').insert(settlementWindowStates)
|
|
68
|
+
return await knex('settlementWindowState').insert(settlementWindowStates).onConflict('settlementWindowStateId').ignore()
|
|
68
69
|
} catch (err) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
console.log(`Uploading seeds for settlementWindowState has failed with the following error: ${err}`)
|
|
72
|
-
return -1000
|
|
73
|
-
}
|
|
70
|
+
console.log(`Uploading seeds for settlementWindowState has failed with the following error: ${err}`)
|
|
71
|
+
return -1000
|
|
74
72
|
}
|
|
75
73
|
}
|
|
@@ -25,6 +25,7 @@ Contributors
|
|
|
25
25
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
26
26
|
|
|
27
27
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
28
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
28
29
|
--------------
|
|
29
30
|
******/
|
|
30
31
|
|
|
@@ -44,12 +45,9 @@ const transactionInitiator = [
|
|
|
44
45
|
|
|
45
46
|
exports.seed = async function (knex) {
|
|
46
47
|
try {
|
|
47
|
-
return await knex('transactionInitiator').insert(transactionInitiator)
|
|
48
|
+
return await knex('transactionInitiator').insert(transactionInitiator).onConflict('name').ignore()
|
|
48
49
|
} catch (err) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
console.log(`Uploading seeds for transactionInitiator has failed with the following error: ${err}`)
|
|
52
|
-
return -1000
|
|
53
|
-
}
|
|
50
|
+
console.log(`Uploading seeds for transactionInitiator has failed with the following error: ${err}`)
|
|
51
|
+
return -1000
|
|
54
52
|
}
|
|
55
53
|
}
|
|
@@ -25,6 +25,7 @@ Contributors
|
|
|
25
25
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
26
26
|
|
|
27
27
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
28
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
28
29
|
--------------
|
|
29
30
|
******/
|
|
30
31
|
|
|
@@ -52,12 +53,9 @@ const transactionInitiatorType = [
|
|
|
52
53
|
|
|
53
54
|
exports.seed = async function (knex) {
|
|
54
55
|
try {
|
|
55
|
-
return await knex('transactionInitiatorType').insert(transactionInitiatorType)
|
|
56
|
+
return await knex('transactionInitiatorType').insert(transactionInitiatorType).onConflict('name').ignore()
|
|
56
57
|
} catch (err) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
console.log(`Uploading seeds for transactionInitiatorType has failed with the following error: ${err}`)
|
|
60
|
-
return -1000
|
|
61
|
-
}
|
|
58
|
+
console.log(`Uploading seeds for transactionInitiatorType has failed with the following error: ${err}`)
|
|
59
|
+
return -1000
|
|
62
60
|
}
|
|
63
61
|
}
|
|
@@ -25,6 +25,7 @@ Contributors
|
|
|
25
25
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
26
26
|
|
|
27
27
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
28
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
28
29
|
--------------
|
|
29
30
|
******/
|
|
30
31
|
|
|
@@ -56,12 +57,9 @@ const transactionScenario = [
|
|
|
56
57
|
|
|
57
58
|
exports.seed = async function (knex) {
|
|
58
59
|
try {
|
|
59
|
-
return await knex('transactionScenario').insert(transactionScenario)
|
|
60
|
+
return await knex('transactionScenario').insert(transactionScenario).onConflict('name').ignore()
|
|
60
61
|
} catch (err) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
console.log(`Uploading seeds for transactionScenario has failed with the following error: ${err}`)
|
|
64
|
-
return -1000
|
|
65
|
-
}
|
|
62
|
+
console.log(`Uploading seeds for transactionScenario has failed with the following error: ${err}`)
|
|
63
|
+
return -1000
|
|
66
64
|
}
|
|
67
65
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -49,12 +50,9 @@ const transferParticipantRoleTypes = [
|
|
|
49
50
|
|
|
50
51
|
exports.seed = async function (knex) {
|
|
51
52
|
try {
|
|
52
|
-
return await knex('transferParticipantRoleType').insert(transferParticipantRoleTypes)
|
|
53
|
+
return await knex('transferParticipantRoleType').insert(transferParticipantRoleTypes).onConflict('name').ignore()
|
|
53
54
|
} catch (err) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
console.log(`Uploading seeds for transferParticipantRoleType has failed with the following error: ${err}`)
|
|
57
|
-
return -1000
|
|
58
|
-
}
|
|
55
|
+
console.log(`Uploading seeds for transferParticipantRoleType has failed with the following error: ${err}`)
|
|
56
|
+
return -1000
|
|
59
57
|
}
|
|
60
58
|
}
|
package/seeds/transferState.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- Name Surname <name.surname@gatesfoundation.com>
|
|
20
20
|
|
|
21
21
|
* Georgi Georgiev <georgi.georgiev@modusbox.com>
|
|
22
|
+
* Shashikant Hirugade <shashikant.hirugade@modusbox.com>
|
|
22
23
|
--------------
|
|
23
24
|
******/
|
|
24
25
|
|
|
@@ -89,17 +90,19 @@ const transferStates = [
|
|
|
89
90
|
transferStateId: 'INVALID',
|
|
90
91
|
enumeration: 'ABORTED',
|
|
91
92
|
description: 'The switch has aborted the transfer due to validation failure.'
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
transferStateId: 'SETTLED',
|
|
96
|
+
enumeration: 'SETTLED',
|
|
97
|
+
description: 'The switch has settled the transfer.'
|
|
92
98
|
}
|
|
93
99
|
]
|
|
94
100
|
|
|
95
101
|
exports.seed = async function (knex) {
|
|
96
102
|
try {
|
|
97
|
-
return await knex('transferState').insert(transferStates)
|
|
103
|
+
return await knex('transferState').insert(transferStates).onConflict('transferStateId').ignore()
|
|
98
104
|
} catch (err) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
console.log(`Uploading seeds for transferState has failed with the following error: ${err}`)
|
|
102
|
-
return -1000
|
|
103
|
-
}
|
|
105
|
+
console.log(`Uploading seeds for transferState has failed with the following error: ${err}`)
|
|
106
|
+
return -1000
|
|
104
107
|
}
|
|
105
108
|
}
|