@mojaloop/sdk-scheme-adapter 24.4.1 → 24.5.0-snapshot.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/.yarn/cache/{@mojaloop-api-snippets-npm-17.10.0-382257dafb-71493aed2a.zip → @mojaloop-api-snippets-npm-17.9.0-56be759f33-e21f71f413.zip} +0 -0
- package/.yarn/cache/supertest-npm-7.0.0-8060c32e4d-974743aa51.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +0 -7
- package/modules/api-svc/package.json +3 -3
- package/modules/outbound-command-event-handler/package.json +2 -2
- package/modules/outbound-command-event-handler/src/domain/bulk_transaction_agg/handlers/prepare_sdk_outbound_bulk_response.ts +1 -1
- package/modules/outbound-command-event-handler/src/domain/bulk_transaction_agg/index.ts +3 -3
- package/modules/outbound-command-event-handler/test/integration/application/agreement/process_bulk_quotes_callback.test.ts +2 -2
- package/modules/outbound-command-event-handler/test/integration/application/agreement/process_sdk_outbound_bulk_quotes_request.test.ts +1 -1
- package/modules/outbound-command-event-handler/test/integration/application/discovery/process_bulk_accept_party_info.test.ts +1 -1
- package/modules/outbound-command-event-handler/test/integration/application/discovery/process_bulk_party_info_request.test.ts +2 -2
- package/modules/outbound-command-event-handler/test/integration/application/discovery/process_bulk_request.test.ts +1 -1
- package/modules/outbound-command-event-handler/test/integration/application/discovery/process_party_info_callback.test.ts +3 -3
- package/modules/outbound-command-event-handler/test/integration/application/transfers/process_prepare_bulk_response.test.ts +1 -1
- package/modules/outbound-command-event-handler/test/integration/sample_events/process_sdk_outbound_bulk_transfers_request.test.ts +2 -2
- package/modules/outbound-command-event-handler/test/integration/sample_events/sdk_outbound_bulk_accept_party_info_received.test.ts +1 -1
- package/modules/outbound-command-event-handler/test/integration/sample_events/sdk_outbound_bulk_request_received.test.ts +1 -1
- package/modules/outbound-command-event-handler/test/unit/data/bulk_transaction_request.ts +1 -1
- package/modules/outbound-command-event-handler/test/util/generator.ts +5 -5
- package/modules/outbound-domain-event-handler/package.json +2 -2
- package/modules/private-shared-lib/package.json +2 -2
- package/modules/private-shared-lib/src/domain/bulk_batch_entity.ts +13 -13
- package/modules/private-shared-lib/src/domain/bulk_transaction_entity.ts +10 -10
- package/modules/private-shared-lib/src/domain/individual_transfer_entity.ts +15 -15
- package/modules/private-shared-lib/src/events/outbound_command_event/process_sdk_outbound_bulk_accept_party_info.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_command_event/process_sdk_outbound_bulk_accept_quote.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_command_event/process_sdk_outbound_bulk_request.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_domain_event/bulk_quotes_requested.ts +2 -2
- package/modules/private-shared-lib/src/events/outbound_domain_event/bulk_transfers_requested.ts +2 -2
- package/modules/private-shared-lib/src/events/outbound_domain_event/party_info_callback_received.ts +1 -1
- package/modules/private-shared-lib/src/events/outbound_domain_event/sdk_outbound_bulk_accept_party_info_received.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_domain_event/sdk_outbound_bulk_accept_party_info_requested.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_domain_event/sdk_outbound_bulk_accept_quote_received.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_domain_event/sdk_outbound_bulk_accept_quote_requested.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_domain_event/sdk_outbound_bulk_request_received.ts +4 -4
- package/modules/private-shared-lib/src/events/outbound_domain_event/sdk_outbound_bulk_response_prepared.ts +1 -1
- package/modules/private-shared-lib/src/types/events/PartyInfoRequest.ts +3 -3
- package/modules/private-shared-lib/src/types/events/PartyResponse.ts +2 -2
- package/modules/private-shared-lib/src/types/index.ts +7 -7
- package/package.json +1 -1
- package/.yarn/cache/supertest-npm-7.1.0-76eb506602-366372311e.zip +0 -0
|
Binary file
|
|
Binary file
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
|
|
2
|
-
### [24.4.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.4.0...v24.4.1) (2025-03-20)
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### Bug Fixes
|
|
6
|
-
|
|
7
|
-
* **csi-1328:** add sdk 2.1 spec files for ttksims ([#563](https://github.com/mojaloop/sdk-scheme-adapter/issues/563)) ([b5e498e](https://github.com/mojaloop/sdk-scheme-adapter/commit/b5e498ee7bf22fd48c6c2d2c4d53347b72ee70cc))
|
|
8
|
-
|
|
9
2
|
## [24.4.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.3.2...v24.4.0) (2025-03-19)
|
|
10
3
|
|
|
11
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-api-svc",
|
|
3
|
-
"version": "21.0.0-snapshot.
|
|
3
|
+
"version": "21.0.0-snapshot.30",
|
|
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,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@koa/cors": "5.0.0",
|
|
67
|
-
"@mojaloop/api-snippets": "17.
|
|
67
|
+
"@mojaloop/api-snippets": "17.9.0",
|
|
68
68
|
"@mojaloop/central-services-error-handling": "13.0.7",
|
|
69
69
|
"@mojaloop/central-services-logger": "11.7.0",
|
|
70
70
|
"@mojaloop/central-services-metrics": "12.5.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"redis-mock": "0.56.3",
|
|
119
119
|
"replace": "1.2.2",
|
|
120
120
|
"standard-version": "9.5.0",
|
|
121
|
-
"supertest": "7.
|
|
121
|
+
"supertest": "7.0.0",
|
|
122
122
|
"swagger-cli": "4.0.4"
|
|
123
123
|
},
|
|
124
124
|
"standard-version": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-command-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.28",
|
|
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,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.
|
|
44
|
+
"@mojaloop/api-snippets": "17.9.0",
|
|
45
45
|
"@mojaloop/central-services-shared": "18.23.0",
|
|
46
46
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
47
47
|
"@mojaloop/logging-bc-public-types-lib": "0.5.5",
|
|
@@ -62,7 +62,7 @@ export async function handlePrepareSDKOutboundBulkResponseCmdEvt(
|
|
|
62
62
|
return individualTransfer.toIndividualTransferResult();
|
|
63
63
|
}));
|
|
64
64
|
|
|
65
|
-
const bulkTransactionResponse: SDKSchemeAdapter.
|
|
65
|
+
const bulkTransactionResponse: SDKSchemeAdapter.V2_0_0.Backend.Types.bulkTransactionResponse = {
|
|
66
66
|
bulkHomeTransactionID: bulkTransaction.bulkHomeTransactionID,
|
|
67
67
|
bulkTransactionId: bulkTransaction.id,
|
|
68
68
|
currentState: bulkTransaction.state == BulkTransactionInternalState.TRANSFERS_COMPLETED ? SDKOutboundTransferState.COMPLETED : SDKOutboundTransferState.ERROR_OCCURRED,
|
|
@@ -73,7 +73,7 @@ export class BulkTransactionAgg extends BaseAggregate<BulkTransactionEntity, Bul
|
|
|
73
73
|
// }
|
|
74
74
|
|
|
75
75
|
static async CreateFromRequest(
|
|
76
|
-
request: SDKSchemeAdapter.
|
|
76
|
+
request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest,
|
|
77
77
|
entityStateRepo: IEntityStateRepository<BulkTransactionState>,
|
|
78
78
|
logger: ILogger,
|
|
79
79
|
): Promise<BulkTransactionAgg> {
|
|
@@ -404,7 +404,7 @@ export class BulkTransactionAgg extends BaseAggregate<BulkTransactionEntity, Bul
|
|
|
404
404
|
const party = individualTransfer.partyResponse?.party;
|
|
405
405
|
if(party) {
|
|
406
406
|
// Generate Quote request
|
|
407
|
-
const individualBulkQuoteRequest: SDKSchemeAdapter.
|
|
407
|
+
const individualBulkQuoteRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.individualQuote = {
|
|
408
408
|
quoteId: individualTransfer.quoteId,
|
|
409
409
|
to: {
|
|
410
410
|
idType: party.partyIdInfo.partyIdType,
|
|
@@ -493,7 +493,7 @@ export class BulkTransactionAgg extends BaseAggregate<BulkTransactionEntity, Bul
|
|
|
493
493
|
|
|
494
494
|
if(party) {
|
|
495
495
|
// Generate Transfers request
|
|
496
|
-
const individualBulkTransferRequest: SDKSchemeAdapter.
|
|
496
|
+
const individualBulkTransferRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.individualTransfer = {
|
|
497
497
|
transferId: individualTransfer.transferId,
|
|
498
498
|
to: {
|
|
499
499
|
idType: party.partyIdInfo.partyIdType,
|
|
@@ -139,7 +139,7 @@ import { Timer } from "../../../util/timer";
|
|
|
139
139
|
|
|
140
140
|
// Publish this message so that it is stored internally in redis
|
|
141
141
|
const bulkTransactionId = randomUUID();
|
|
142
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
142
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
143
143
|
bulkHomeTransactionID: "string",
|
|
144
144
|
bulkTransactionId: bulkTransactionId,
|
|
145
145
|
options: {
|
|
@@ -552,7 +552,7 @@ import { Timer } from "../../../util/timer";
|
|
|
552
552
|
And domain event SDKOutboundBulkQuotesRequestProcessed should be published", async () => {
|
|
553
553
|
// Publish this message so that it is stored internally in redis
|
|
554
554
|
const bulkTransactionId = randomUUID();
|
|
555
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
555
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
556
556
|
bulkHomeTransactionID: "string",
|
|
557
557
|
bulkTransactionId: bulkTransactionId,
|
|
558
558
|
options: {
|
|
@@ -118,7 +118,7 @@ describe("Tests for ProcessSDKOutboundBulkQuotesRequest Event Handler", () => {
|
|
|
118
118
|
And update the state of each batch to AGREEMENT_PROCESSING.", async () => {
|
|
119
119
|
// Publish this message so that it is stored internally in redis
|
|
120
120
|
const bulkTransactionId = randomUUID();
|
|
121
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
121
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
122
122
|
bulkHomeTransactionID: "string",
|
|
123
123
|
bulkTransactionId: bulkTransactionId,
|
|
124
124
|
options: {
|
|
@@ -117,7 +117,7 @@ describe("Tests for ProcessSDKOutboundBulkAcceptPartyInfo Event Handler", () =>
|
|
|
117
117
|
And outbound event SDKOutboundBulkAcceptPartyInfoProcessed should be published", async () => {
|
|
118
118
|
// Publish this message so that it is stored internally in redis
|
|
119
119
|
const bulkTransactionId = randomUUID();
|
|
120
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
120
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
121
121
|
bulkHomeTransactionID: "string",
|
|
122
122
|
bulkTransactionId: bulkTransactionId,
|
|
123
123
|
options: {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
|
|
112
112
|
//Publish this message so that it is stored internally in redis
|
|
113
113
|
const bulkTransactionId = randomUUID();
|
|
114
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
114
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
115
115
|
bulkHomeTransactionID: "string",
|
|
116
116
|
bulkTransactionId: bulkTransactionId,
|
|
117
117
|
options: {
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
|
|
210
210
|
//Publish this message so that it is stored internally in redis
|
|
211
211
|
const bulkTransactionId = randomUUID();
|
|
212
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
212
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
213
213
|
bulkHomeTransactionID: "string",
|
|
214
214
|
bulkTransactionId,
|
|
215
215
|
options: {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
And Global state should be updated to RECEIVED.", async () => {
|
|
106
106
|
|
|
107
107
|
const bulkTransactionId = randomUUID();
|
|
108
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
108
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
109
109
|
bulkHomeTransactionID: "string",
|
|
110
110
|
bulkTransactionId: bulkTransactionId,
|
|
111
111
|
options: {
|
|
@@ -117,7 +117,7 @@ describe("Tests for discovery part in Outbound Command Event Handler", () => {
|
|
|
117
117
|
// SETUP
|
|
118
118
|
// Publish this message so that it is stored internally in redis
|
|
119
119
|
const bulkTransactionId = randomUUID();
|
|
120
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
120
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
121
121
|
bulkHomeTransactionID: "string",
|
|
122
122
|
bulkTransactionId: bulkTransactionId,
|
|
123
123
|
options: {
|
|
@@ -264,7 +264,7 @@ describe("Tests for discovery part in Outbound Command Event Handler", () => {
|
|
|
264
264
|
// SETUP
|
|
265
265
|
// Publish this message so that it is stored internally in redis
|
|
266
266
|
const bulkTransactionId = randomUUID();
|
|
267
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
267
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
268
268
|
bulkHomeTransactionID: "string",
|
|
269
269
|
bulkTransactionId: bulkTransactionId,
|
|
270
270
|
options: {
|
|
@@ -398,7 +398,7 @@ describe("Tests for discovery part in Outbound Command Event Handler", () => {
|
|
|
398
398
|
|
|
399
399
|
// //Publish this message so that it is stored internally in redis
|
|
400
400
|
// const bulkTransactionId = randomUUID();
|
|
401
|
-
// const bulkRequest: SDKSchemeAdapter.
|
|
401
|
+
// const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
402
402
|
// bulkHomeTransactionID: "string",
|
|
403
403
|
// bulkTransactionId: bulkTransactionId,
|
|
404
404
|
// options: {
|
|
@@ -113,7 +113,7 @@ describe("Tests for PrepareSDKOutboundBulkResponseCmdEvt Command Event", () => {
|
|
|
113
113
|
|
|
114
114
|
// Publish this message so that it is stored internally in redis
|
|
115
115
|
const bulkTransactionId = randomUUID();
|
|
116
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
116
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
117
117
|
bulkHomeTransactionID: "string",
|
|
118
118
|
bulkTransactionId: bulkTransactionId,
|
|
119
119
|
options: {
|
|
@@ -88,7 +88,7 @@ const bulkTransactionId = randomUUID();
|
|
|
88
88
|
const homeTransactionId = randomUUID();
|
|
89
89
|
|
|
90
90
|
// Initial BulkTransactionRequest
|
|
91
|
-
const bulkTransactionRequest: SDKSchemeAdapter.
|
|
91
|
+
const bulkTransactionRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
92
92
|
bulkHomeTransactionID: homeTransactionId,
|
|
93
93
|
bulkTransactionId: bulkTransactionId,
|
|
94
94
|
options: {
|
|
@@ -193,7 +193,7 @@ describe('processSDKOutboundBulkTransfersRequestCmdEvt', () => {
|
|
|
193
193
|
const individualTransferId = bulkBatch.getReferenceIdForQuoteId(bulkBatch.bulkQuotesRequest.individualQuotes[0].quoteId);
|
|
194
194
|
|
|
195
195
|
// Lets create a bulkQuoteResult
|
|
196
|
-
const bulkQuoteResponse: SDKSchemeAdapter.
|
|
196
|
+
const bulkQuoteResponse: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteResponse = {
|
|
197
197
|
bulkQuoteId: bulkBatch.bulkQuoteId,
|
|
198
198
|
expiration: '2016-05-24T08:38:08.699-04:00',
|
|
199
199
|
homeTransactionId: bulkTransactionRequest.bulkHomeTransactionID,
|
|
@@ -68,7 +68,7 @@ const bulkTransactionEntityRepoOptions: IRedisBulkTransactionStateRepoOptions =
|
|
|
68
68
|
|
|
69
69
|
const bulkTransactionEntityRepo = new RedisBulkTransactionStateRepo(bulkTransactionEntityRepoOptions, logger);
|
|
70
70
|
|
|
71
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
71
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
72
72
|
bulkHomeTransactionID: "abc123",
|
|
73
73
|
bulkTransactionId: bulkTransactionId,
|
|
74
74
|
options: {
|
|
@@ -59,7 +59,7 @@ const bulkTransactionId = randomUUID();
|
|
|
59
59
|
const homeTransactionId1 = randomUUID();
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
62
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
63
63
|
bulkHomeTransactionID: "abc123",
|
|
64
64
|
bulkTransactionId: bulkTransactionId,
|
|
65
65
|
options: {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
32
32
|
import { randomUUID } from "crypto";
|
|
33
33
|
|
|
34
|
-
export const BULK_REQUEST: SDKSchemeAdapter.
|
|
34
|
+
export const BULK_REQUEST: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
35
35
|
bulkHomeTransactionID: "string",
|
|
36
36
|
bulkTransactionId: randomUUID(),
|
|
37
37
|
options: {
|
|
@@ -94,7 +94,7 @@ export enum StopAfterEventEnum {
|
|
|
94
94
|
export type IProcessHelperGenerateOptions = {
|
|
95
95
|
bulkTransactionRequest?: {
|
|
96
96
|
bulkTransactionId?: string,
|
|
97
|
-
options: SDKSchemeAdapter.
|
|
97
|
+
options: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['options']
|
|
98
98
|
},
|
|
99
99
|
StopAfterEvent?: StopAfterEventEnum,
|
|
100
100
|
messageTimeout?: number,
|
|
@@ -113,7 +113,7 @@ export type GenerateReturn = {
|
|
|
113
113
|
export class ProcessHelper {
|
|
114
114
|
|
|
115
115
|
public domainEvents: Array<DomainEvent> = [];
|
|
116
|
-
public bulkTransactionRequest: SDKSchemeAdapter.
|
|
116
|
+
public bulkTransactionRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest;
|
|
117
117
|
public bulkTransactionEntityRepo: IBulkTransactionEntityRepo;
|
|
118
118
|
public commandEventProducer: ICommandEventProducer;
|
|
119
119
|
public domainEventProducer: IDomainEventProducer;
|
|
@@ -172,7 +172,7 @@ export class ProcessHelper {
|
|
|
172
172
|
): Promise<GenerateReturn> {
|
|
173
173
|
const bulkTransactionId = options?.bulkTransactionRequest?.bulkTransactionId || randomUUID();
|
|
174
174
|
|
|
175
|
-
const defaultBulkTransactionOptions: SDKSchemeAdapter.
|
|
175
|
+
const defaultBulkTransactionOptions: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['options'] = {
|
|
176
176
|
onlyValidateParty: true,
|
|
177
177
|
autoAcceptParty: {
|
|
178
178
|
enabled: false
|
|
@@ -185,12 +185,12 @@ export class ProcessHelper {
|
|
|
185
185
|
bulkExpiration: "2016-05-24T08:38:08.699-04:00"
|
|
186
186
|
};
|
|
187
187
|
|
|
188
|
-
const bulkTransactionOptions: SDKSchemeAdapter.
|
|
188
|
+
const bulkTransactionOptions: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['options'] = {
|
|
189
189
|
... defaultBulkTransactionOptions,
|
|
190
190
|
... options?.bulkTransactionRequest?.options
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
-
const bulkRequest: SDKSchemeAdapter.
|
|
193
|
+
const bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest = {
|
|
194
194
|
bulkHomeTransactionID: "string",
|
|
195
195
|
bulkTransactionId: bulkTransactionId,
|
|
196
196
|
options: bulkTransactionOptions,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-outbound-domain-event-handler",
|
|
3
|
-
"version": "0.3.0-snapshot.
|
|
3
|
+
"version": "0.3.0-snapshot.28",
|
|
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.
|
|
44
|
+
"@mojaloop/api-snippets": "17.9.0",
|
|
45
45
|
"@mojaloop/logging-bc-client-lib": "0.5.8",
|
|
46
46
|
"@mojaloop/logging-bc-public-types-lib": "0.5.5",
|
|
47
47
|
"@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/sdk-scheme-adapter-private-shared-lib",
|
|
3
|
-
"version": "0.4.0-snapshot.
|
|
3
|
+
"version": "0.4.0-snapshot.28",
|
|
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,7 +29,7 @@
|
|
|
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.
|
|
32
|
+
"@mojaloop/api-snippets": "17.9.0",
|
|
33
33
|
"@mojaloop/central-services-shared": "18.23.0",
|
|
34
34
|
"@mojaloop/logging-bc-public-types-lib": "0.5.5",
|
|
35
35
|
"@mojaloop/platform-shared-lib-messaging-types-lib": "0.7.1",
|
|
@@ -63,13 +63,13 @@ export interface BulkBatchState extends BaseEntityState {
|
|
|
63
63
|
bulkId: string;
|
|
64
64
|
bulkQuoteId: string;
|
|
65
65
|
bulkTransferId: string;
|
|
66
|
-
bulkQuotesRequest: SDKSchemeAdapter.
|
|
66
|
+
bulkQuotesRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteRequest;
|
|
67
67
|
bulkQuotesResponse?: BulkQuoteResponse;
|
|
68
|
-
bulkTransfersRequest: SDKSchemeAdapter.
|
|
68
|
+
bulkTransfersRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferRequest;
|
|
69
69
|
bulkTransfersResponse?: BulkTransferResponse;
|
|
70
70
|
quoteIdReferenceIdMap: { [quoteId: string]: string }; // Key = individual quoteId from bulkQuotesRequest, Value = transactionId representing an individual transfer from the bulkTransaction
|
|
71
71
|
transferIdReferenceIdMap: { [transactionId: string]: string }; // Key = individual transferId from bulkTransferRequest, Value = transactionId representing an individual transfer from the bulkTransaction
|
|
72
|
-
lastError?: SDKSchemeAdapter.
|
|
72
|
+
lastError?: SDKSchemeAdapter.V2_0_0.Outbound.Types.transferError;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
@@ -88,7 +88,7 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
88
88
|
return this._state.bulkTransferId;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
get bulkQuotesRequest(): SDKSchemeAdapter.
|
|
91
|
+
get bulkQuotesRequest(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteRequest {
|
|
92
92
|
return this._state.bulkQuotesRequest;
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -96,7 +96,7 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
96
96
|
return this._state.bulkQuotesResponse;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
get bulkTransfersRequest(): SDKSchemeAdapter.
|
|
99
|
+
get bulkTransfersRequest(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferRequest {
|
|
100
100
|
return this._state.bulkTransfersRequest;
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -116,7 +116,7 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
116
116
|
return this._state.lastError;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
private static _convertPartyToFrom(party: SDKSchemeAdapter.
|
|
119
|
+
private static _convertPartyToFrom(party: SDKSchemeAdapter.V2_0_0.Outbound.Types.Party): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteRequest['from'] {
|
|
120
120
|
return {
|
|
121
121
|
idType: party.partyIdInfo.partyIdType,
|
|
122
122
|
idValue: party.partyIdInfo.partyIdentifier,
|
|
@@ -170,13 +170,13 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
170
170
|
return new BulkBatchEntity(initialState);
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
addIndividualQuote(individualQuote: SDKSchemeAdapter.
|
|
173
|
+
addIndividualQuote(individualQuote: SDKSchemeAdapter.V2_0_0.Outbound.Types.individualQuote, referenceId: string) {
|
|
174
174
|
this._state.bulkQuotesRequest.individualQuotes.push(individualQuote);
|
|
175
175
|
this._state.quoteIdReferenceIdMap[individualQuote.quoteId] = referenceId;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
addIndividualTransfer(
|
|
179
|
-
individualTransfer: SDKSchemeAdapter.
|
|
179
|
+
individualTransfer: SDKSchemeAdapter.V2_0_0.Outbound.Types.individualTransfer,
|
|
180
180
|
referenceId: string,
|
|
181
181
|
) {
|
|
182
182
|
this._state.bulkTransfersRequest.individualTransfers.push(individualTransfer);
|
|
@@ -207,7 +207,7 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
207
207
|
this._state.bulkTransfersResponse = response;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
setLastError(response: SDKSchemeAdapter.
|
|
210
|
+
setLastError(response: SDKSchemeAdapter.V2_0_0.Outbound.Types.transferError) {
|
|
211
211
|
this._state.lastError = response;
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -219,8 +219,8 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
219
219
|
BulkBatchEntity._validateBulkTransfersRequest(this._state.bulkTransfersRequest);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
private static _validateBulkQuotesRequest(request: SDKSchemeAdapter.
|
|
223
|
-
const requestSchema = SDKSchemeAdapter.
|
|
222
|
+
private static _validateBulkQuotesRequest(request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteRequest): void {
|
|
223
|
+
const requestSchema = SDKSchemeAdapter.V2_0_0.Outbound.Schemas.bulkQuoteRequest;
|
|
224
224
|
const validate = ajv.compile(requestSchema);
|
|
225
225
|
const validationResult = validate(request);
|
|
226
226
|
if(!validationResult) {
|
|
@@ -228,8 +228,8 @@ export class BulkBatchEntity extends BaseEntity<BulkBatchState> {
|
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
private static _validateBulkTransfersRequest(request: SDKSchemeAdapter.
|
|
232
|
-
const requestSchema = SDKSchemeAdapter.
|
|
231
|
+
private static _validateBulkTransfersRequest(request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferRequest): void {
|
|
232
|
+
const requestSchema = SDKSchemeAdapter.V2_0_0.Outbound.Schemas.bulkTransferRequest;
|
|
233
233
|
const validate = ajv.compile(requestSchema);
|
|
234
234
|
const validationResult = validate(request);
|
|
235
235
|
if(!validationResult) {
|
|
@@ -60,9 +60,9 @@ export enum BulkTransactionInternalState {
|
|
|
60
60
|
export interface BulkTransactionState extends BaseEntityState {
|
|
61
61
|
bulkTransactionId: string;
|
|
62
62
|
bulkHomeTransactionID: string;
|
|
63
|
-
options: SDKSchemeAdapter.
|
|
64
|
-
from: SDKSchemeAdapter.
|
|
65
|
-
extensions: SDKSchemeAdapter.
|
|
63
|
+
options: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionOptions;
|
|
64
|
+
from: SDKSchemeAdapter.V2_0_0.Outbound.Types.Party;
|
|
65
|
+
extensions: SDKSchemeAdapter.V2_0_0.Outbound.Types.ExtensionList | undefined;
|
|
66
66
|
state: BulkTransactionInternalState;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -78,7 +78,7 @@ export class BulkTransactionEntity extends BaseEntity<BulkTransactionState> {
|
|
|
78
78
|
return this._state.bulkHomeTransactionID;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
get from(): SDKSchemeAdapter.
|
|
81
|
+
get from(): SDKSchemeAdapter.V2_0_0.Outbound.Types.Party {
|
|
82
82
|
return this._state.from;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -86,16 +86,16 @@ export class BulkTransactionEntity extends BaseEntity<BulkTransactionState> {
|
|
|
86
86
|
return this._state.state;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
get options(): SDKSchemeAdapter.
|
|
89
|
+
get options(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionOptions {
|
|
90
90
|
return this._state.options;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
get extensions(): SDKSchemeAdapter.
|
|
93
|
+
get extensions(): SDKSchemeAdapter.V2_0_0.Outbound.Types.ExtensionList | undefined {
|
|
94
94
|
return this._state.extensions;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
static CreateFromRequest(
|
|
98
|
-
request: SDKSchemeAdapter.
|
|
98
|
+
request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest,
|
|
99
99
|
): BulkTransactionEntity {
|
|
100
100
|
BulkTransactionEntity._validateRequest(request);
|
|
101
101
|
const bulkTransactionId = request?.bulkTransactionId || randomUUID();
|
|
@@ -135,7 +135,7 @@ export class BulkTransactionEntity extends BaseEntity<BulkTransactionState> {
|
|
|
135
135
|
return this._state.options.autoAcceptQuote.enabled;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
// getAutoAcceptQuotePerTransferFeeLimits (): SDKSchemeAdapter.
|
|
138
|
+
// getAutoAcceptQuotePerTransferFeeLimits (): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkPerTransferFeeLimit[] | undefined {
|
|
139
139
|
// return this._state.options.autoAcceptQuote.perTransferFeeLimits
|
|
140
140
|
// }
|
|
141
141
|
|
|
@@ -143,8 +143,8 @@ export class BulkTransactionEntity extends BaseEntity<BulkTransactionState> {
|
|
|
143
143
|
// return this._state.options.bulkExpiration
|
|
144
144
|
// }
|
|
145
145
|
|
|
146
|
-
private static _validateRequest(request: SDKSchemeAdapter.
|
|
147
|
-
const requestSchema = SDKSchemeAdapter.
|
|
146
|
+
private static _validateRequest(request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest): void {
|
|
147
|
+
const requestSchema = SDKSchemeAdapter.V2_0_0.Outbound.Schemas.bulkTransactionRequest;
|
|
148
148
|
const validate = ajv.compile(requestSchema);
|
|
149
149
|
const validationResult = validate(request);
|
|
150
150
|
if(!validationResult) {
|
|
@@ -58,23 +58,23 @@ export enum IndividualTransferInternalState {
|
|
|
58
58
|
TRANSFERS_SUCCESS = 'TRANSFERS_SUCCESS',
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export interface IndividualQuoteResponse extends SDKSchemeAdapter.
|
|
62
|
-
expiration: SDKSchemeAdapter.
|
|
61
|
+
export interface IndividualQuoteResponse extends SDKSchemeAdapter.V2_0_0.Outbound.Types.individualQuoteResult {
|
|
62
|
+
expiration: SDKSchemeAdapter.V2_0_0.Outbound.Types.DateTime;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export interface IndividualTransferResponse extends SDKSchemeAdapter.
|
|
66
|
-
completedTimestamp?: SDKSchemeAdapter.
|
|
65
|
+
export interface IndividualTransferResponse extends SDKSchemeAdapter.V2_0_0.Outbound.Types.individualTransferResult {
|
|
66
|
+
completedTimestamp?: SDKSchemeAdapter.V2_0_0.Outbound.Types.DateTime;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
export type IndividualTransferError = SDKSchemeAdapter.
|
|
69
|
+
export type IndividualTransferError = SDKSchemeAdapter.V2_0_0.Outbound.Types.transferError;
|
|
70
70
|
// TODO: Extend API-Snippets lastError with the following types
|
|
71
|
-
// SDKSchemeAdapter.
|
|
72
|
-
// SDKSchemeAdapter.
|
|
73
|
-
// SDKSchemeAdapter.
|
|
71
|
+
// SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferErrorResponse |
|
|
72
|
+
// SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteErrorResponse |
|
|
73
|
+
// SDKSchemeAdapter.V2_0_0.Outbound.Types.partyError;
|
|
74
74
|
|
|
75
75
|
export interface IndividualTransferState extends BaseEntityState {
|
|
76
76
|
id: string;
|
|
77
|
-
request: SDKSchemeAdapter.
|
|
77
|
+
request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionIndividualTransfer;
|
|
78
78
|
state: IndividualTransferInternalState;
|
|
79
79
|
batchId?: string;
|
|
80
80
|
partyRequest?: PartyInfoRequest;
|
|
@@ -107,7 +107,7 @@ export class IndividualTransferEntity extends BaseEntity<IndividualTransferState
|
|
|
107
107
|
return this._state.transactionId as string;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
get request(): SDKSchemeAdapter.
|
|
110
|
+
get request(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionIndividualTransfer {
|
|
111
111
|
return this._state.request;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -133,7 +133,7 @@ export class IndividualTransferEntity extends BaseEntity<IndividualTransferState
|
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
static CreateFromRequest(
|
|
136
|
-
request: SDKSchemeAdapter.
|
|
136
|
+
request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionIndividualTransfer,
|
|
137
137
|
): IndividualTransferEntity {
|
|
138
138
|
// IndividualTransferEntity._validateRequest(request)
|
|
139
139
|
const initialState: IndividualTransferState = {
|
|
@@ -148,7 +148,7 @@ export class IndividualTransferEntity extends BaseEntity<IndividualTransferState
|
|
|
148
148
|
return new IndividualTransferEntity(initialState);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
get payee(): SDKSchemeAdapter.
|
|
151
|
+
get payee(): SDKSchemeAdapter.V2_0_0.Outbound.Types.Party {
|
|
152
152
|
return this._state.request.to;
|
|
153
153
|
}
|
|
154
154
|
|
|
@@ -210,7 +210,7 @@ export class IndividualTransferEntity extends BaseEntity<IndividualTransferState
|
|
|
210
210
|
return this._state.partyResponse?.party?.partyIdInfo?.fspId;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
toIndividualTransferResult(): SDKSchemeAdapter.
|
|
213
|
+
toIndividualTransferResult(): SDKSchemeAdapter.V2_0_0.Backend.Types.bulkTransactionIndividualTransferResult {
|
|
214
214
|
// TODO: Should we infer the FSPIOP-transferState for the individualTransfer based on the SDK-IndividualTransferInternalState? See comments below in the Fulfil mapping.
|
|
215
215
|
// eslint-disable-next-line max-len
|
|
216
216
|
const transferState = (this.transferState === IndividualTransferInternalState.TRANSFERS_SUCCESS) ? CentralServicedSharedEnum.Transfers.TransferState.COMMITTED : CentralServicedSharedEnum.Transfers.TransferState.ABORTED;
|
|
@@ -241,8 +241,8 @@ export class IndividualTransferEntity extends BaseEntity<IndividualTransferState
|
|
|
241
241
|
super(initialState);
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
private static _validateRequest(request: SDKSchemeAdapter.
|
|
245
|
-
const requestSchema = SDKSchemeAdapter.
|
|
244
|
+
private static _validateRequest(request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionIndividualTransfer): void {
|
|
245
|
+
const requestSchema = SDKSchemeAdapter.V2_0_0.Outbound.Schemas.bulkTransactionIndividualTransfer;
|
|
246
246
|
const validate = ajv.compile(requestSchema);
|
|
247
247
|
const validationResult = validate(request);
|
|
248
248
|
if(!validationResult) {
|
|
@@ -35,7 +35,7 @@ import { randomUUID } from 'crypto';
|
|
|
35
35
|
|
|
36
36
|
export interface IProcessSDKOutboundBulkAcceptPartyInfoCmdEvtData {
|
|
37
37
|
bulkId: string;
|
|
38
|
-
bulkTransactionContinuationAcceptParty: SDKSchemeAdapter.
|
|
38
|
+
bulkTransactionContinuationAcceptParty: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty;
|
|
39
39
|
timestamp: number | null;
|
|
40
40
|
headers: IMessageHeader[] | null;
|
|
41
41
|
}
|
|
@@ -57,15 +57,15 @@ export class ProcessSDKOutboundBulkAcceptPartyInfoCmdEvt extends CommandEvent {
|
|
|
57
57
|
}
|
|
58
58
|
const data: IProcessSDKOutboundBulkAcceptPartyInfoCmdEvtData = {
|
|
59
59
|
bulkId: message.getKey(),
|
|
60
|
-
bulkTransactionContinuationAcceptParty: message.getContent() as SDKSchemeAdapter.
|
|
60
|
+
bulkTransactionContinuationAcceptParty: message.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty,
|
|
61
61
|
timestamp: message.getTimeStamp(),
|
|
62
62
|
headers: message.getHeaders(),
|
|
63
63
|
};
|
|
64
64
|
return new ProcessSDKOutboundBulkAcceptPartyInfoCmdEvt(data);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
getBulkTransactionContinuationAcceptParty(): SDKSchemeAdapter.
|
|
68
|
-
return this.getContent() as SDKSchemeAdapter.
|
|
67
|
+
getBulkTransactionContinuationAcceptParty(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty {
|
|
68
|
+
return this.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
}
|
|
@@ -36,7 +36,7 @@ import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
|
36
36
|
export interface IProcessSDKOutboundBulkAcceptQuoteCmdEvtData {
|
|
37
37
|
bulkId: string;
|
|
38
38
|
// eslint-disable-next-line max-len
|
|
39
|
-
bulkTransactionContinuationAcceptQuote: SDKSchemeAdapter.
|
|
39
|
+
bulkTransactionContinuationAcceptQuote: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote;
|
|
40
40
|
timestamp: number | null;
|
|
41
41
|
headers: IMessageHeader[] | null;
|
|
42
42
|
}
|
|
@@ -58,7 +58,7 @@ export class ProcessSDKOutboundBulkAcceptQuoteCmdEvt extends CommandEvent {
|
|
|
58
58
|
const data: IProcessSDKOutboundBulkAcceptQuoteCmdEvtData = {
|
|
59
59
|
bulkId: message.getKey(),
|
|
60
60
|
// eslint-disable-next-line max-len
|
|
61
|
-
bulkTransactionContinuationAcceptQuote: message.getContent() as SDKSchemeAdapter.
|
|
61
|
+
bulkTransactionContinuationAcceptQuote: message.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote,
|
|
62
62
|
timestamp: message.getTimeStamp(),
|
|
63
63
|
headers: message.getHeaders(),
|
|
64
64
|
};
|
|
@@ -66,7 +66,7 @@ export class ProcessSDKOutboundBulkAcceptQuoteCmdEvt extends CommandEvent {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// eslint-disable-next-line max-len
|
|
69
|
-
getBulkTransactionContinuationAcceptQuote(): SDKSchemeAdapter.
|
|
70
|
-
return this.getContent() as SDKSchemeAdapter.
|
|
69
|
+
getBulkTransactionContinuationAcceptQuote(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote {
|
|
70
|
+
return this.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -34,7 +34,7 @@ import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
|
34
34
|
import { randomUUID } from 'crypto';
|
|
35
35
|
|
|
36
36
|
export interface IProcessSDKOutboundBulkRequestCmdEvtData {
|
|
37
|
-
bulkRequest: SDKSchemeAdapter.
|
|
37
|
+
bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest;
|
|
38
38
|
timestamp: number | null;
|
|
39
39
|
headers: IMessageHeader[] | null;
|
|
40
40
|
}
|
|
@@ -55,14 +55,14 @@ export class ProcessSDKOutboundBulkRequestCmdEvt extends CommandEvent {
|
|
|
55
55
|
throw new Error('Content is in unknown format');
|
|
56
56
|
}
|
|
57
57
|
const data: IProcessSDKOutboundBulkRequestCmdEvtData = {
|
|
58
|
-
bulkRequest: message.getContent() as SDKSchemeAdapter.
|
|
58
|
+
bulkRequest: message.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest,
|
|
59
59
|
timestamp: message.getTimeStamp(),
|
|
60
60
|
headers: message.getHeaders(),
|
|
61
61
|
};
|
|
62
62
|
return new ProcessSDKOutboundBulkRequestCmdEvt(data);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
getBulkRequest(): SDKSchemeAdapter.
|
|
66
|
-
return this.getContent() as SDKSchemeAdapter.
|
|
65
|
+
getBulkRequest(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest {
|
|
66
|
+
return this.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest;
|
|
67
67
|
}
|
|
68
68
|
}
|
package/modules/private-shared-lib/src/events/outbound_domain_event/bulk_quotes_requested.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type IBulkQuotesRequestedDmEvtData = {
|
|
|
36
36
|
bulkId: string;
|
|
37
37
|
content: {
|
|
38
38
|
batchId: string;
|
|
39
|
-
request: SDKSchemeAdapter.
|
|
39
|
+
request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteRequest;
|
|
40
40
|
};
|
|
41
41
|
timestamp: number | null;
|
|
42
42
|
headers: IMessageHeader[] | null;
|
|
@@ -71,7 +71,7 @@ export class BulkQuotesRequestedDmEvt extends DomainEvent {
|
|
|
71
71
|
return content.batchId;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
get request(): SDKSchemeAdapter.
|
|
74
|
+
get request(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteRequest {
|
|
75
75
|
const content = this.getContent() as IBulkQuotesRequestedDmEvtData['content'];
|
|
76
76
|
return content.request;
|
|
77
77
|
}
|
package/modules/private-shared-lib/src/events/outbound_domain_event/bulk_transfers_requested.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type IBulkTransfersRequestedDmEvtData = {
|
|
|
36
36
|
bulkId: string;
|
|
37
37
|
content: {
|
|
38
38
|
batchId: string;
|
|
39
|
-
request: SDKSchemeAdapter.
|
|
39
|
+
request: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferRequest;
|
|
40
40
|
};
|
|
41
41
|
timestamp: number | null;
|
|
42
42
|
headers: IMessageHeader[] | null;
|
|
@@ -71,7 +71,7 @@ export class BulkTransfersRequestedDmEvt extends DomainEvent {
|
|
|
71
71
|
return content.batchId;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
get request(): SDKSchemeAdapter.
|
|
74
|
+
get request(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferRequest {
|
|
75
75
|
const content = this.getContent() as IBulkTransfersRequestedDmEvtData['content'];
|
|
76
76
|
return content.request;
|
|
77
77
|
}
|
package/modules/private-shared-lib/src/events/outbound_domain_event/party_info_callback_received.ts
CHANGED
|
@@ -94,7 +94,7 @@ export class PartyInfoCallbackReceivedDmEvt extends DomainEvent {
|
|
|
94
94
|
// }
|
|
95
95
|
// if( content.partyResult.currentState === 'COMPLETED' ) {
|
|
96
96
|
// if (content.partyResult.hasOwnProperty('party')) {
|
|
97
|
-
// const partySchema = SDKSchemeAdapter.
|
|
97
|
+
// const partySchema = SDKSchemeAdapter.V2_0_0.Outbound.Schemas.Party;
|
|
98
98
|
// const validate = ajv.compile(partySchema);
|
|
99
99
|
// const validationResult = validate(content.partyResult.party);
|
|
100
100
|
// if(!validationResult) {
|
|
@@ -34,7 +34,7 @@ import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
|
34
34
|
|
|
35
35
|
export interface ISDKOutboundBulkAcceptPartyInfoReceivedDmEvtData {
|
|
36
36
|
bulkId: string;
|
|
37
|
-
bulkTransactionContinuationAcceptParty: SDKSchemeAdapter.
|
|
37
|
+
bulkTransactionContinuationAcceptParty: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty;
|
|
38
38
|
timestamp: number | null;
|
|
39
39
|
headers: IMessageHeader[] | null;
|
|
40
40
|
}
|
|
@@ -55,15 +55,15 @@ export class SDKOutboundBulkAcceptPartyInfoReceivedDmEvt extends DomainEvent {
|
|
|
55
55
|
// Prepare Data
|
|
56
56
|
const data = {
|
|
57
57
|
bulkId: message.getKey(),
|
|
58
|
-
bulkTransactionContinuationAcceptParty: message.getContent() as SDKSchemeAdapter.
|
|
58
|
+
bulkTransactionContinuationAcceptParty: message.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty,
|
|
59
59
|
timestamp: message.getTimeStamp(),
|
|
60
60
|
headers: message.getHeaders(),
|
|
61
61
|
};
|
|
62
62
|
return new SDKOutboundBulkAcceptPartyInfoReceivedDmEvt(data);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
getBulkTransactionContinuationAcceptParty(): SDKSchemeAdapter.
|
|
66
|
-
return this.getContent() as SDKSchemeAdapter.
|
|
65
|
+
getBulkTransactionContinuationAcceptParty(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty {
|
|
66
|
+
return this.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptParty;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
}
|
|
@@ -34,16 +34,16 @@ import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
|
34
34
|
import { IndividualTransferError } from '@module-domain';
|
|
35
35
|
|
|
36
36
|
export type CoreConnectorBulkAcceptPartyInfoRequestIndividualTransferResult = {
|
|
37
|
-
homeTransactionId: SDKSchemeAdapter.
|
|
37
|
+
homeTransactionId: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionIndividualTransfer['homeTransactionId'];
|
|
38
38
|
transferId: string;
|
|
39
39
|
transactionId: string;
|
|
40
|
-
to?: SDKSchemeAdapter.
|
|
40
|
+
to?: SDKSchemeAdapter.V2_0_0.Outbound.Types.Party;
|
|
41
41
|
lastError: IndividualTransferError
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export type CoreConnectorBulkAcceptPartyInfoRequest = {
|
|
45
|
-
bulkHomeTransactionID: SDKSchemeAdapter.
|
|
46
|
-
bulkTransactionId: SDKSchemeAdapter.
|
|
45
|
+
bulkHomeTransactionID: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['bulkHomeTransactionID'];
|
|
46
|
+
bulkTransactionId: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['bulkTransactionId'];
|
|
47
47
|
individualTransferResults: CoreConnectorBulkAcceptPartyInfoRequestIndividualTransferResult[];
|
|
48
48
|
};
|
|
49
49
|
|
|
@@ -36,7 +36,7 @@ import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
|
36
36
|
export interface ISDKOutboundBulkAcceptQuoteReceivedDmEvtData {
|
|
37
37
|
bulkId: string;
|
|
38
38
|
// eslint-disable-next-line max-len
|
|
39
|
-
bulkTransactionContinuationAcceptQuote: SDKSchemeAdapter.
|
|
39
|
+
bulkTransactionContinuationAcceptQuote: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote;
|
|
40
40
|
timestamp: number | null;
|
|
41
41
|
headers: IMessageHeader[] | null;
|
|
42
42
|
}
|
|
@@ -58,7 +58,7 @@ export class SDKOutboundBulkAcceptQuoteReceivedDmEvt extends DomainEvent {
|
|
|
58
58
|
const data = {
|
|
59
59
|
bulkId: message.getKey(),
|
|
60
60
|
// eslint-disable-next-line max-len
|
|
61
|
-
bulkTransactionContinuationAcceptQuote: message.getContent() as SDKSchemeAdapter.
|
|
61
|
+
bulkTransactionContinuationAcceptQuote: message.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote,
|
|
62
62
|
timestamp: message.getTimeStamp(),
|
|
63
63
|
headers: message.getHeaders(),
|
|
64
64
|
};
|
|
@@ -66,7 +66,7 @@ export class SDKOutboundBulkAcceptQuoteReceivedDmEvt extends DomainEvent {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// eslint-disable-next-line max-len
|
|
69
|
-
getBulkTransactionContinuationAcceptQuote(): SDKSchemeAdapter.
|
|
70
|
-
return this.getContent() as SDKSchemeAdapter.
|
|
69
|
+
getBulkTransactionContinuationAcceptQuote(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote {
|
|
70
|
+
return this.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionContinuationAcceptQuote;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -36,16 +36,16 @@ import { IndividualTransferError } from '@module-domain';
|
|
|
36
36
|
// TODO: Current dfspInboundAPI is outdated and its better to add the core connector API to the API snippets library as single source of truth.
|
|
37
37
|
// For now we are defining these types here.
|
|
38
38
|
export type CoreConnectorBulkAcceptQuoteRequestIndividualTransferResult = {
|
|
39
|
-
homeTransactionId: SDKSchemeAdapter.
|
|
39
|
+
homeTransactionId: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionIndividualTransfer['homeTransactionId'];
|
|
40
40
|
transferId: string,
|
|
41
41
|
transactionId?: string;
|
|
42
|
-
quoteResponse?: SDKSchemeAdapter.
|
|
42
|
+
quoteResponse?: SDKSchemeAdapter.V2_0_0.Outbound.Types.individualQuoteResult;
|
|
43
43
|
lastError?: IndividualTransferError
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export type CoreConnectorBulkAcceptQuoteRequest = {
|
|
47
|
-
bulkHomeTransactionID: SDKSchemeAdapter.
|
|
48
|
-
bulkTransactionId: SDKSchemeAdapter.
|
|
47
|
+
bulkHomeTransactionID: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['bulkHomeTransactionID'];
|
|
48
|
+
bulkTransactionId: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest['bulkTransactionId'];
|
|
49
49
|
individualTransferResults: CoreConnectorBulkAcceptQuoteRequestIndividualTransferResult[];
|
|
50
50
|
};
|
|
51
51
|
|
|
@@ -34,7 +34,7 @@ import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
|
34
34
|
import { randomUUID } from 'crypto';
|
|
35
35
|
|
|
36
36
|
export interface ISDKOutboundBulkRequestReceivedDmEvtData {
|
|
37
|
-
bulkRequest: SDKSchemeAdapter.
|
|
37
|
+
bulkRequest: SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest;
|
|
38
38
|
timestamp: number | null;
|
|
39
39
|
headers: IMessageHeader[] | null;
|
|
40
40
|
}
|
|
@@ -55,15 +55,15 @@ export class SDKOutboundBulkRequestReceivedDmEvt extends DomainEvent {
|
|
|
55
55
|
static CreateFromDomainEvent(message: DomainEvent): SDKOutboundBulkRequestReceivedDmEvt {
|
|
56
56
|
// Prepare Data
|
|
57
57
|
const data = {
|
|
58
|
-
bulkRequest: message.getContent() as SDKSchemeAdapter.
|
|
58
|
+
bulkRequest: message.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest,
|
|
59
59
|
timestamp: message.getTimeStamp(),
|
|
60
60
|
headers: message.getHeaders(),
|
|
61
61
|
};
|
|
62
62
|
return new SDKOutboundBulkRequestReceivedDmEvt(data);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
getBulkRequest(): SDKSchemeAdapter.
|
|
66
|
-
return this.getContent() as SDKSchemeAdapter.
|
|
65
|
+
getBulkRequest(): SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest {
|
|
66
|
+
return this.getContent() as SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransactionRequest;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// // Sample validation function
|
|
@@ -32,7 +32,7 @@ import { DomainEvent } from '../domain_event';
|
|
|
32
32
|
import { IMessageHeader } from '@module-types';
|
|
33
33
|
import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
34
34
|
|
|
35
|
-
type BulkTransactionResponse = SDKSchemeAdapter.
|
|
35
|
+
type BulkTransactionResponse = SDKSchemeAdapter.V2_0_0.Backend.Types.bulkTransactionResponse;
|
|
36
36
|
|
|
37
37
|
export type ISDKOutboundBulkResponsePreparedDmEvtData = {
|
|
38
38
|
bulkId: string;
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
32
32
|
|
|
33
33
|
export type PartyInfoRequest = {
|
|
34
|
-
partyIdType: SDKSchemeAdapter.
|
|
35
|
-
partyIdentifier: SDKSchemeAdapter.
|
|
36
|
-
partySubIdOrType?: SDKSchemeAdapter.
|
|
34
|
+
partyIdType: SDKSchemeAdapter.V2_0_0.Outbound.Types.PartyIdType;
|
|
35
|
+
partyIdentifier: SDKSchemeAdapter.V2_0_0.Outbound.Types.PartyIdentifier;
|
|
36
|
+
partySubIdOrType?: SDKSchemeAdapter.V2_0_0.Outbound.Types.PartySubIdOrType | undefined;
|
|
37
37
|
};
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
import { SDKSchemeAdapter } from '@mojaloop/api-snippets';
|
|
32
32
|
export interface PartyResponse {
|
|
33
|
-
party?: SDKSchemeAdapter.
|
|
34
|
-
currentState: SDKSchemeAdapter.
|
|
33
|
+
party?: SDKSchemeAdapter.V2_0_0.Outbound.Types.Party;
|
|
34
|
+
currentState: SDKSchemeAdapter.V2_0_0.Outbound.Types.partiesByIdResponse['currentState'];
|
|
35
35
|
}
|
|
@@ -38,10 +38,10 @@ export * from './infra';
|
|
|
38
38
|
export * from './events';
|
|
39
39
|
export * from './bulk_transaction_entity_repo';
|
|
40
40
|
|
|
41
|
-
export type BulkQuoteResponse = SDKSchemeAdapter.
|
|
42
|
-
export type BulkQuoteErrorResponse = SDKSchemeAdapter.
|
|
43
|
-
// export type BulkQuoteErrorResponse = SDKSchemeAdapter.
|
|
44
|
-
export type PartyErrorResponse = SDKSchemeAdapter.
|
|
45
|
-
export type BulkTransferResponse = SDKSchemeAdapter.
|
|
46
|
-
export type BulkTransferErrorResponse = SDKSchemeAdapter.
|
|
47
|
-
// export type BulkTransferErrorResponse = SDKSchemeAdapter.
|
|
41
|
+
export type BulkQuoteResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteResponse;
|
|
42
|
+
export type BulkQuoteErrorResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.transferError;
|
|
43
|
+
// export type BulkQuoteErrorResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkQuoteErrorResponse;
|
|
44
|
+
export type PartyErrorResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.transferError;
|
|
45
|
+
export type BulkTransferResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferResponse;
|
|
46
|
+
export type BulkTransferErrorResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.transferError;
|
|
47
|
+
// export type BulkTransferErrorResponse = SDKSchemeAdapter.V2_0_0.Outbound.Types.bulkTransferErrorResponse;
|
package/package.json
CHANGED
|
Binary file
|