@konplit-services/common 1.26.1 → 1.27.1

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.
@@ -159,6 +159,12 @@ interface InterswitchTransfer {
159
159
  terminalId: string;
160
160
  initiatingEntity: string;
161
161
  }
162
+ export interface InterswitchDispute {
163
+ base_url: string;
164
+ client_id: string;
165
+ secret_key: string;
166
+ access_token_url: string;
167
+ }
162
168
  interface Opay {
163
169
  publicKey: string;
164
170
  secretKey: string;
@@ -357,6 +363,7 @@ declare class AppConfigs {
357
363
  };
358
364
  getInterswitchDetails(): Interswitch;
359
365
  getInterswitchTransferDetails(): InterswitchTransfer;
366
+ getInterswitchDisputeDetails(): InterswitchDispute;
360
367
  getValuPayTransferSenderDetails(): ValuePaySenderTransfer;
361
368
  getTransactionSetting(merchantId?: string): {
362
369
  dailyLimitKey: string;
@@ -871,6 +871,26 @@ class AppConfigs {
871
871
  initiatingEntity: this.env.INTERSWITCH_TRANSFER_INITIATING_ENTITY,
872
872
  };
873
873
  }
874
+ getInterswitchDisputeDetails() {
875
+ if (!this.env.INTERSWITCH_DISPUTE_BASE_URL) {
876
+ throw new Error("INTERSWITCH_DISPUTE_BASE_URL is required");
877
+ }
878
+ if (!this.env.INTERSWITCH_DISPUTE_CLIENT_ID) {
879
+ throw new Error("INTERSWITCH_DISPUTE_CLIENT_ID is required");
880
+ }
881
+ if (!this.env.INTERSWITCH_DISPUTE_SECRET_KEY) {
882
+ throw new Error("INTERSWITCH_DISPUTE_SECRET_KEY is required");
883
+ }
884
+ if (!this.env.INTERSWITCH_ACCESS_TOKEN_URL) {
885
+ throw new Error("INTERSWITCH_ACCESS_TOKEN_URL is required");
886
+ }
887
+ return {
888
+ base_url: this.env.INTERSWITCH_DISPUTE_BASE_URL,
889
+ client_id: this.env.INTERSWITCH_DISPUTE_CLIENT_ID,
890
+ secret_key: this.env.INTERSWITCH_DISPUTE_SECRET_KEY,
891
+ access_token_url: this.env.INTERSWITCH_ACCESS_TOKEN_URL,
892
+ };
893
+ }
874
894
  // VALUEPAY
875
895
  getValuPayTransferSenderDetails() {
876
896
  if (!this.env.VALUEPAY_TRANSFER_SENDER_LASTNAME) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.26.1",
3
+ "version": "1.27.1",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",