@konplit-services/common 1.0.350 → 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.
@@ -8,7 +8,7 @@ export declare enum Subjects {
8
8
  AccountCreated = "events.account.created",
9
9
  AccountUpdated = "events.account.updated",
10
10
  UserCreated = "events.user.created",
11
- UserUpdated = "events.account.updated",
11
+ UserUpdated = "events.user.updated",
12
12
  MerchantCreated = "events.merchant.created",
13
13
  MerchantUpdated = "events.merchant.updated",
14
14
  MerchantKeyUpdated = "events.merchant.key.updated",
@@ -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",
@@ -16,7 +16,7 @@ var Subjects;
16
16
  Subjects["AccountUpdated"] = "events.account.updated";
17
17
  //users
18
18
  Subjects["UserCreated"] = "events.user.created";
19
- Subjects["UserUpdated"] = "events.account.updated";
19
+ Subjects["UserUpdated"] = "events.user.updated";
20
20
  //Merchants Subjects
21
21
  Subjects["MerchantCreated"] = "events.merchant.created";
22
22
  Subjects["MerchantUpdated"] = "events.merchant.updated";
@@ -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";
@@ -8,3 +8,4 @@ export * from "./reset-daily-amount-trigger.interface";
8
8
  export * from "./total-amount-triger-update.interface";
9
9
  export * from "./expiry-delay-timer.interface";
10
10
  export * from "./expiry-delay-timer.update.interface";
11
+ export * from "./transaction-webhook.interface";
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.350",
3
+ "version": "1.0.352",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",