@konplit-services/common 1.0.208 → 1.0.210

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.
@@ -4,14 +4,16 @@ import { ErrorReturn } from "./error.interface";
4
4
  export declare class GatewayError extends CustomError {
5
5
  message: string;
6
6
  private error_data;
7
+ private gatewayaResponse?;
7
8
  readonly statusCode = 502;
8
- constructor(message: string, error_data: ErrorReturn);
9
+ constructor(message: string, error_data: ErrorReturn, gatewayaResponse?: string | undefined);
9
10
  sequalizeErrors(): {
10
11
  status: Status;
11
12
  errors: {
12
13
  message: string;
13
14
  code: number;
14
15
  error_code: string;
16
+ gatewayaResponse: string | undefined;
15
17
  }[];
16
18
  };
17
19
  }
@@ -4,10 +4,11 @@ exports.GatewayError = void 0;
4
4
  const status_1 = require("../helper/status");
5
5
  const custom_error_1 = require("./custom-error");
6
6
  class GatewayError extends custom_error_1.CustomError {
7
- constructor(message, error_data) {
7
+ constructor(message, error_data, gatewayaResponse) {
8
8
  super(message);
9
9
  this.message = message;
10
10
  this.error_data = error_data;
11
+ this.gatewayaResponse = gatewayaResponse;
11
12
  this.statusCode = 502;
12
13
  this.error_data = error_data;
13
14
  Object.setPrototypeOf(this, GatewayError.prototype);
@@ -20,6 +21,7 @@ class GatewayError extends custom_error_1.CustomError {
20
21
  message: this.message,
21
22
  code: this.error_data.code,
22
23
  error_code: this.error_data.error_code,
24
+ gatewayaResponse: this.gatewayaResponse,
23
25
  },
24
26
  ],
25
27
  };
@@ -0,0 +1,7 @@
1
+ import { ResSubjects } from "../../subjects";
2
+ export interface Card3DSAuthorizerEvent {
3
+ subject: ResSubjects.CardAuthorized3DS;
4
+ data: {
5
+ transactionId: string;
6
+ };
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { ResSubjects } from "../../subjects";
2
+ export interface CardAuthenticateOtpEvent {
3
+ subject: ResSubjects.CardAuthenticatedOTP;
4
+ data: {
5
+ transactionId: string;
6
+ otp: string;
7
+ };
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { TRANSACTION_CHARGES_TYPE } from "../../../helper";
1
+ import { CURRENCY_TYPE, TRANSACTION_CHARGES_TYPE } from "../../../helper";
2
2
  import { ResSubjects } from "../../subjects";
3
3
  export interface CardInitiationEvent {
4
4
  subject: ResSubjects.CardInitiationTransaction;
@@ -8,8 +8,9 @@ export interface CardInitiationEvent {
8
8
  transactionType: TRANSACTION_CHARGES_TYPE;
9
9
  customerId: string;
10
10
  amount: string;
11
- transactionRef: string;
12
- currency: string;
11
+ transactionId: string;
12
+ transactionDate: Date;
13
+ currency: CURRENCY_TYPE;
13
14
  authData: string;
14
15
  callbackUrl?: string;
15
16
  deviceInformation?: {
@@ -4,8 +4,6 @@ export interface CardOTPResendEvent {
4
4
  streamName: StreamName.name;
5
5
  streamEvents: StreamEvent.Event;
6
6
  data: {
7
- paymentId: string;
8
- amount: string;
9
- currency: string;
7
+ transactionId: string;
10
8
  };
11
9
  }
@@ -0,0 +1,17 @@
1
+ import { CURRENCY_TYPE, TRANSACTION_CHARGES_TYPE } from "../../../helper";
2
+ import { ResSubjects } from "../../subjects";
3
+ export interface CardRecurrentEvent {
4
+ subject: ResSubjects.CardRecurrentTransaction;
5
+ data: {
6
+ merchantId: string;
7
+ accountId: string;
8
+ transactionType: TRANSACTION_CHARGES_TYPE;
9
+ customerId: string;
10
+ amount: string;
11
+ transactionId: string;
12
+ transactionDate: Date;
13
+ currency: CURRENCY_TYPE;
14
+ token: string;
15
+ tokenExpiryDate: string;
16
+ };
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { ResSubjects } from "../../subjects";
2
+ export interface CardTokenizeEvent {
3
+ subject: ResSubjects.CardInitiationTransaction;
4
+ data: {
5
+ transactionId: string;
6
+ authData: string;
7
+ };
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,6 @@
1
1
  export * from "./card-payment-initiation.interface";
2
+ export * from "./card-3ds-auth.interface";
3
+ export * from "./card-auth-request.interface";
4
+ export * from "./card-payment-otp-resend.interface";
5
+ export * from "./card-recurrent-charge.interface";
6
+ export * from "./card-tokenize.interface";
@@ -15,3 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./card-payment-initiation.interface"), exports);
18
+ __exportStar(require("./card-3ds-auth.interface"), exports);
19
+ __exportStar(require("./card-auth-request.interface"), exports);
20
+ __exportStar(require("./card-payment-otp-resend.interface"), exports);
21
+ __exportStar(require("./card-recurrent-charge.interface"), exports);
22
+ __exportStar(require("./card-tokenize.interface"), exports);
@@ -77,6 +77,7 @@ export declare enum ResSubjects {
77
77
  NIBSSInstitutions = "res.nibss.institution.list",
78
78
  QRDynamicCodeCreated = "res.dynamic.code.created",
79
79
  CardInitiationTransaction = "res.card.initiation.transaction",
80
+ CardRecurrentTransaction = "res.card.recurrent.transaction",
80
81
  CardAuthenticatedOTP = "res.card.auth.otp",
81
82
  CardAuthorized3DS = "res.card.ath.threeds",
82
83
  CashierInitiation = "res.cashier.initiation"
@@ -111,6 +111,7 @@ var ResSubjects;
111
111
  ResSubjects["QRDynamicCodeCreated"] = "res.dynamic.code.created";
112
112
  //Interswitch
113
113
  ResSubjects["CardInitiationTransaction"] = "res.card.initiation.transaction";
114
+ ResSubjects["CardRecurrentTransaction"] = "res.card.recurrent.transaction";
114
115
  ResSubjects["CardAuthenticatedOTP"] = "res.card.auth.otp";
115
116
  ResSubjects["CardAuthorized3DS"] = "res.card.ath.threeds";
116
117
  //Opay
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.208",
3
+ "version": "1.0.210",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",