@konplit-services/common 1.0.351 → 1.0.352
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/subjects.d.ts +1 -0
- package/build/events/subjects.js +1 -0
- package/build/events/transaction-events/interfaces/index.d.ts +1 -0
- package/build/events/transaction-events/interfaces/index.js +1 -0
- package/build/events/transaction-events/interfaces/transaction-webhook.interface.d.ts +16 -0
- package/build/events/transaction-events/interfaces/transaction-webhook.interface.js +2 -0
- package/build/helper/transaction-type.d.ts +9 -0
- package/build/helper/transaction-type.js +11 -1
- package/package.json +1 -1
|
@@ -89,6 +89,7 @@ export declare enum Subjects {
|
|
|
89
89
|
TransactionProcessing = "events.transaction.processing",
|
|
90
90
|
TransactionCancelled = "events.transaction.cancelled",
|
|
91
91
|
TransactionDeclined = "events.transaction.declined",
|
|
92
|
+
TransactionWebhook = "events.transaction.webhook",
|
|
92
93
|
TransactionDailyResetAmountCreated = "events.transaction.daily.reset.created",
|
|
93
94
|
TransactionAmountUpdateSyncCreated = "events.transaction.amount.update.sync.created",
|
|
94
95
|
TransactionExpiryDelayCreated = "events.transaction.expiry.delay.created",
|
package/build/events/subjects.js
CHANGED
|
@@ -114,6 +114,7 @@ var Subjects;
|
|
|
114
114
|
Subjects["TransactionProcessing"] = "events.transaction.processing";
|
|
115
115
|
Subjects["TransactionCancelled"] = "events.transaction.cancelled";
|
|
116
116
|
Subjects["TransactionDeclined"] = "events.transaction.declined";
|
|
117
|
+
Subjects["TransactionWebhook"] = "events.transaction.webhook";
|
|
117
118
|
Subjects["TransactionDailyResetAmountCreated"] = "events.transaction.daily.reset.created";
|
|
118
119
|
Subjects["TransactionAmountUpdateSyncCreated"] = "events.transaction.amount.update.sync.created";
|
|
119
120
|
Subjects["TransactionExpiryDelayCreated"] = "events.transaction.expiry.delay.created";
|
|
@@ -24,3 +24,4 @@ __exportStar(require("./reset-daily-amount-trigger.interface"), exports);
|
|
|
24
24
|
__exportStar(require("./total-amount-triger-update.interface"), exports);
|
|
25
25
|
__exportStar(require("./expiry-delay-timer.interface"), exports);
|
|
26
26
|
__exportStar(require("./expiry-delay-timer.update.interface"), exports);
|
|
27
|
+
__exportStar(require("./transaction-webhook.interface"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TRANSACTION_WEBHOOK_TYPES } from "../../../helper";
|
|
2
|
+
import { StreamEvent, StreamName, Subjects } from "../../subjects";
|
|
3
|
+
export interface TransactionWebhookEvent {
|
|
4
|
+
subject: Subjects.TransactionWebhook;
|
|
5
|
+
streamName: StreamName.name;
|
|
6
|
+
streamEvents: StreamEvent.Event;
|
|
7
|
+
data: {
|
|
8
|
+
type: TRANSACTION_WEBHOOK_TYPES;
|
|
9
|
+
sign: string;
|
|
10
|
+
merchantId: string;
|
|
11
|
+
accountId: string;
|
|
12
|
+
id: string;
|
|
13
|
+
amount: number;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -18,3 +18,12 @@ export declare enum TRANSACTION_TYPES {
|
|
|
18
18
|
TOKENIZE_CARD = "TOKENIZE_CARD",
|
|
19
19
|
CHECK_NQR_TRANSACTION_STATUS = "CHECK_NQR_TRANSACTION_STATUS"
|
|
20
20
|
}
|
|
21
|
+
export declare enum TRANSACTION_WEBHOOK_TYPES {
|
|
22
|
+
created = "transaction.created",
|
|
23
|
+
processing = "transaction.processing",
|
|
24
|
+
cancelled = "transaction.cancelled",
|
|
25
|
+
aborted = "transaction.aborted",
|
|
26
|
+
completed = "transaction.completed",
|
|
27
|
+
declined = "transaction.declined",
|
|
28
|
+
failed = "transaction.failed"
|
|
29
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TRANSACTION_TYPES = exports.TRANSACTION_TYPE = exports.TRANSACTION_STATUS = void 0;
|
|
3
|
+
exports.TRANSACTION_WEBHOOK_TYPES = exports.TRANSACTION_TYPES = exports.TRANSACTION_TYPE = exports.TRANSACTION_STATUS = void 0;
|
|
4
4
|
var TRANSACTION_STATUS;
|
|
5
5
|
(function (TRANSACTION_STATUS) {
|
|
6
6
|
TRANSACTION_STATUS["PENDING"] = "PENDING";
|
|
@@ -24,3 +24,13 @@ var TRANSACTION_TYPES;
|
|
|
24
24
|
TRANSACTION_TYPES["TOKENIZE_CARD"] = "TOKENIZE_CARD";
|
|
25
25
|
TRANSACTION_TYPES["CHECK_NQR_TRANSACTION_STATUS"] = "CHECK_NQR_TRANSACTION_STATUS";
|
|
26
26
|
})(TRANSACTION_TYPES = exports.TRANSACTION_TYPES || (exports.TRANSACTION_TYPES = {}));
|
|
27
|
+
var TRANSACTION_WEBHOOK_TYPES;
|
|
28
|
+
(function (TRANSACTION_WEBHOOK_TYPES) {
|
|
29
|
+
TRANSACTION_WEBHOOK_TYPES["created"] = "transaction.created";
|
|
30
|
+
TRANSACTION_WEBHOOK_TYPES["processing"] = "transaction.processing";
|
|
31
|
+
TRANSACTION_WEBHOOK_TYPES["cancelled"] = "transaction.cancelled";
|
|
32
|
+
TRANSACTION_WEBHOOK_TYPES["aborted"] = "transaction.aborted";
|
|
33
|
+
TRANSACTION_WEBHOOK_TYPES["completed"] = "transaction.completed";
|
|
34
|
+
TRANSACTION_WEBHOOK_TYPES["declined"] = "transaction.declined";
|
|
35
|
+
TRANSACTION_WEBHOOK_TYPES["failed"] = "transaction.failed";
|
|
36
|
+
})(TRANSACTION_WEBHOOK_TYPES = exports.TRANSACTION_WEBHOOK_TYPES || (exports.TRANSACTION_WEBHOOK_TYPES = {}));
|