@konplit-services/common 1.0.140 → 1.0.142
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/build/events/base-events/base-events.listener.js +1 -1
- package/build/events/base-events/base-events.publisher.js +1 -1
- package/build/events/subjects.d.ts +2 -1
- package/build/events/subjects.js +1 -0
- package/build/events/virtual-account-events/interfaces/index.d.ts +1 -0
- package/build/events/virtual-account-events/interfaces/index.js +1 -0
- package/build/events/virtual-account-events/interfaces/virtual-dynamic-account.interface.d.ts +30 -0
- package/build/events/virtual-account-events/interfaces/virtual-dynamic-account.interface.js +2 -0
- package/package.json +1 -1
|
@@ -91,7 +91,7 @@ class Listener {
|
|
|
91
91
|
// Decode the request data
|
|
92
92
|
const decodedRequest = this.jc.decode(msg.data);
|
|
93
93
|
console.log("Received Request:", decodedRequest);
|
|
94
|
-
const response = this.onMessageResponse(decodedRequest, msg);
|
|
94
|
+
const response = yield this.onMessageResponse(decodedRequest, msg);
|
|
95
95
|
// Send a reply back
|
|
96
96
|
msg.respond(this.jc.encode({ data: response }));
|
|
97
97
|
}
|
|
@@ -70,7 +70,7 @@ class Publisher {
|
|
|
70
70
|
* @param {number} timeout - The timeout duration to wait for a response
|
|
71
71
|
* @returns {Promise<any>} - Resolves with the reply data from the responding service
|
|
72
72
|
*/
|
|
73
|
-
request(data, timeout =
|
|
73
|
+
request(data, timeout = 5000) {
|
|
74
74
|
var _a;
|
|
75
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
76
76
|
try {
|
|
@@ -41,5 +41,6 @@ export declare enum Subjects {
|
|
|
41
41
|
TransactionProcessing = "events.transaction.processing",
|
|
42
42
|
TransactionCancelled = "events.transaction.cancelled",
|
|
43
43
|
TransactionDeclined = "events.transaction.declined",
|
|
44
|
-
VirtualFixedAccountCreatedEvent = "events.virtualfixedaccount.created"
|
|
44
|
+
VirtualFixedAccountCreatedEvent = "events.virtualfixedaccount.created",
|
|
45
|
+
VirtualDynamicAccountCreatedEvent = "events.virtualdynamicaccount.created"
|
|
45
46
|
}
|
package/build/events/subjects.js
CHANGED
|
@@ -62,4 +62,5 @@ var Subjects;
|
|
|
62
62
|
Subjects["TransactionDeclined"] = "events.transaction.declined";
|
|
63
63
|
//Virtual Fixed Account
|
|
64
64
|
Subjects["VirtualFixedAccountCreatedEvent"] = "events.virtualfixedaccount.created";
|
|
65
|
+
Subjects["VirtualDynamicAccountCreatedEvent"] = "events.virtualdynamicaccount.created";
|
|
65
66
|
})(Subjects = exports.Subjects || (exports.Subjects = {}));
|
|
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./virtual-fixed-account.interface"), exports);
|
|
18
|
+
__exportStar(require("./virtual-dynamic-account.interface"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StreamEvent, StreamName, Subjects } from "../../subjects";
|
|
2
|
+
export interface VirtualDynamicAccountCreatedEvent {
|
|
3
|
+
subject: Subjects.VirtualDynamicAccountCreatedEvent;
|
|
4
|
+
streamName: StreamName.name;
|
|
5
|
+
streamEvents: StreamEvent.Event;
|
|
6
|
+
data: {
|
|
7
|
+
merchantId: string;
|
|
8
|
+
accountId: string;
|
|
9
|
+
customer: {
|
|
10
|
+
firstname: string;
|
|
11
|
+
middlename: string;
|
|
12
|
+
surname: string;
|
|
13
|
+
dob: string;
|
|
14
|
+
gender: string;
|
|
15
|
+
title: string;
|
|
16
|
+
address1: string;
|
|
17
|
+
city: string;
|
|
18
|
+
state: string;
|
|
19
|
+
country: string;
|
|
20
|
+
email: string;
|
|
21
|
+
phone: string;
|
|
22
|
+
business_name: string;
|
|
23
|
+
};
|
|
24
|
+
transaction: {
|
|
25
|
+
transactionId: string;
|
|
26
|
+
description: string;
|
|
27
|
+
amount: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|