@konplit-services/common 1.0.259 → 1.0.260

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.
@@ -207,6 +207,16 @@ declare class AppConfigs {
207
207
  getInterswitchDetails(): Interswitch;
208
208
  getInterswitchTransferDetails(): InterswitchTransfer;
209
209
  getValuPayTransferSenderDetails(): ValuePaySenderTransfer;
210
+ getTransactionSetting(merchantId?: string): {
211
+ dailyLimitKey: string;
212
+ dailyLimitValue: string;
213
+ totalKey: string;
214
+ totalValue: string;
215
+ maxAmountKey: string;
216
+ maxAmountValue: string;
217
+ totalInterval: string;
218
+ resetInterval: string;
219
+ };
210
220
  getMonoDetails(): {
211
221
  base_url: string;
212
222
  public_key: string;
@@ -752,6 +752,33 @@ class AppConfigs {
752
752
  phone: this.env.VALUEPAY_TRANSFER_SENDER_PHONE,
753
753
  };
754
754
  }
755
+ getTransactionSetting(merchantId) {
756
+ if (!this.env.TRANSACTION_DAILY_LIMIT) {
757
+ throw new Error("TRANSACTION_DAILY_LIMIT is required");
758
+ }
759
+ if (!this.env.TRANSACTION_TOTAL) {
760
+ throw new Error("TRANSACTION_TOTAL is required");
761
+ }
762
+ if (!this.env.TRANSACTION_MAX_AMOUNT) {
763
+ throw new Error("TRANSACTION_MAX_AMOUNT is required");
764
+ }
765
+ if (!this.env.TRANSACTION_TOTAL_INTERVAL) {
766
+ throw new Error("TRANSACTION_TOTAL_INTERVAL is required");
767
+ }
768
+ if (!this.env.TRANSACTION_RESET_INTERVAL) {
769
+ throw new Error("TRANSACTION_RESET_INTERVAL is required");
770
+ }
771
+ return {
772
+ dailyLimitKey: this.env.TRANSACTION_DAILY_LIMIT,
773
+ dailyLimitValue: `${this.env.TRANSACTION_DAILY_LIMIT}:${merchantId}`,
774
+ totalKey: this.env.TRANSACTION_TOTAL,
775
+ totalValue: `${this.env.TRANSACTION_TOTAL}:${merchantId}`,
776
+ maxAmountKey: this.env.TRANSACTION_MAX_AMOUNT,
777
+ maxAmountValue: `${this.env.TRANSACTION_MAX_AMOUNT}:${merchantId}`,
778
+ totalInterval: this.env.TRANSACTION_TOTAL_INTERVAL,
779
+ resetInterval: `${this.env.TRANSACTION_RESET_INTERVAL}`,
780
+ };
781
+ }
755
782
  // MONO MOBILE MONEY
756
783
  getMonoDetails() {
757
784
  if (!this.env.MONO_BASE_URL) {
@@ -65,6 +65,8 @@ export declare enum Subjects {
65
65
  TransactionProcessing = "events.transaction.processing",
66
66
  TransactionCancelled = "events.transaction.cancelled",
67
67
  TransactionDeclined = "events.transaction.declined",
68
+ TransactionDailyResetAmountCreated = "events.transaction.daily.reset.created",
69
+ TransactionAmountUpdateSyncCreated = "events.transaction.amount.update.sync.created",
68
70
  QRDynamicCodeCancelled = "events.qrdynamiccode.cancelled",
69
71
  QRQueryOrderStatus = "events.qrqueryorder.status",
70
72
  QRQueryStatusDelay = "events.qrqueryorder.delay",
@@ -89,6 +89,8 @@ var Subjects;
89
89
  Subjects["TransactionProcessing"] = "events.transaction.processing";
90
90
  Subjects["TransactionCancelled"] = "events.transaction.cancelled";
91
91
  Subjects["TransactionDeclined"] = "events.transaction.declined";
92
+ Subjects["TransactionDailyResetAmountCreated"] = "events.transaction.daily.reset.created";
93
+ Subjects["TransactionAmountUpdateSyncCreated"] = "events.transaction.amount.update.sync.created";
92
94
  //NIBSS
93
95
  //QRCODE
94
96
  Subjects["QRDynamicCodeCancelled"] = "events.qrdynamiccode.cancelled";
@@ -4,3 +4,5 @@ export * from "./transaction-failed.interface";
4
4
  export * from "./transaction-declined.interface";
5
5
  export * from "./transaction-processing.interface";
6
6
  export * from "./transaction-aborted.interface";
7
+ export * from "./reset-daily-amount-trigger.interface";
8
+ export * from "./total-amount-triger-update.interface";
@@ -20,3 +20,5 @@ __exportStar(require("./transaction-failed.interface"), exports);
20
20
  __exportStar(require("./transaction-declined.interface"), exports);
21
21
  __exportStar(require("./transaction-processing.interface"), exports);
22
22
  __exportStar(require("./transaction-aborted.interface"), exports);
23
+ __exportStar(require("./reset-daily-amount-trigger.interface"), exports);
24
+ __exportStar(require("./total-amount-triger-update.interface"), exports);
@@ -0,0 +1,9 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionAmountDailyResetTrigerEvent {
3
+ subject: Subjects.TransactionDailyResetAmountCreated;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ message: string;
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface TransactionAmountUpdateSyncEvent {
3
+ subject: Subjects.TransactionAmountUpdateSyncCreated;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ message: string;
8
+ };
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.259",
3
+ "version": "1.0.260",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",