@konplit-services/common 1.0.204 → 1.0.205

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.
@@ -6,25 +6,22 @@ export interface CardInitiationEvent {
6
6
  merchantId: string;
7
7
  accountId: string;
8
8
  transactionType: TRANSACTION_CHARGES_TYPE;
9
- customer: {
10
- firstname: string;
11
- middlename: string;
12
- surname: string;
13
- dob: string;
14
- gender: string;
15
- title: string;
16
- address1: string;
17
- city: string;
18
- state: string;
19
- country: string;
20
- email: string;
21
- phone: string;
22
- business_name: string;
23
- };
24
- transaction: {
25
- transactionId: string;
26
- description: string;
27
- amount: number;
9
+ customerId: string;
10
+ amount: string;
11
+ transactionRef: string;
12
+ currency: string;
13
+ authData: string;
14
+ callbackUrl?: string;
15
+ deviceInformation?: {
16
+ httpBrowserLanguage: string;
17
+ httpBrowserJavaEnabled: boolean;
18
+ httpBrowserJavaScriptEnabled: boolean;
19
+ httpBrowserColorDepth: number;
20
+ httpBrowserScreenHeight: number;
21
+ httpBrowserScreenWidth: number;
22
+ httpBrowserTimeDifference: number;
23
+ userAgentBrowserValue: string;
24
+ deviceChannel: string;
28
25
  };
29
26
  };
30
27
  }
@@ -0,0 +1,11 @@
1
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
2
+ export interface CardOTPResendEvent {
3
+ subject: Subjects.CardOtpResend;
4
+ streamName: StreamName.name;
5
+ streamEvents: StreamEvent.Event;
6
+ data: {
7
+ paymentId: string;
8
+ amount: string;
9
+ currency: string;
10
+ };
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -66,7 +66,8 @@ export declare enum Subjects {
66
66
  QRQueryOrderStatus = "events.qrqueryorder.status",
67
67
  QRQueryStatusDelay = "events.qrqueryorder.delay",
68
68
  QRQueryStatusComplete = "events.qrqueryorder.complete",
69
- VirtualFixedAccountCreatedEvent = "events.virtualfixedaccount.created"
69
+ VirtualFixedAccountCreatedEvent = "events.virtualfixedaccount.created",
70
+ CardOtpResend = "events.card.otp.resend"
70
71
  }
71
72
  export declare enum ResSubjects {
72
73
  VirtualDynamicAccountCreatedEvent = "res.virtual.dynamicaccount.created",
@@ -76,5 +77,7 @@ export declare enum ResSubjects {
76
77
  NIBSSInstitutions = "res.nibss.institution.list",
77
78
  QRDynamicCodeCreated = "res.dynamic.code.created",
78
79
  CardInitiationTransaction = "res.card.initiation.transaction",
80
+ CardAuthenticatedOTP = "res.card.auth.otp",
81
+ CardAuthorized3DS = "res.card.ath.threeds",
79
82
  CashierInitiation = "res.cashier.initiation"
80
83
  }
@@ -93,6 +93,9 @@ var Subjects;
93
93
  Subjects["QRQueryStatusComplete"] = "events.qrqueryorder.complete";
94
94
  //Virtual Fixed Account
95
95
  Subjects["VirtualFixedAccountCreatedEvent"] = "events.virtualfixedaccount.created";
96
+ //Interswitch
97
+ //Card
98
+ Subjects["CardOtpResend"] = "events.card.otp.resend";
96
99
  })(Subjects = exports.Subjects || (exports.Subjects = {}));
97
100
  var ResSubjects;
98
101
  (function (ResSubjects) {
@@ -108,6 +111,8 @@ var ResSubjects;
108
111
  ResSubjects["QRDynamicCodeCreated"] = "res.dynamic.code.created";
109
112
  //Interswitch
110
113
  ResSubjects["CardInitiationTransaction"] = "res.card.initiation.transaction";
114
+ ResSubjects["CardAuthenticatedOTP"] = "res.card.auth.otp";
115
+ ResSubjects["CardAuthorized3DS"] = "res.card.ath.threeds";
111
116
  //Opay
112
117
  ResSubjects["CashierInitiation"] = "res.cashier.initiation";
113
118
  })(ResSubjects = exports.ResSubjects || (exports.ResSubjects = {}));
@@ -1,5 +1,6 @@
1
1
  import { PLAN_INTERVAL } from "./plan-types";
2
2
  export declare const formatDate: (dataString: string) => string;
3
+ export declare const interswitchRefundDateFormat: (dataString: string) => string;
3
4
  export declare const formatDateTime: (dataString: string) => string;
4
5
  export declare const convertToDate: (date: string) => Date;
5
6
  export declare const getPreviousDayRange: () => {
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getDuration = exports.convertDateToUTC = exports.convertDateToUTCString = exports.convertDateToUTCRange = exports.convertDateToUTCRangeString = exports.getCurrentDayRange = exports.getPreviousDayRange = exports.convertToDate = exports.formatDateTime = exports.formatDate = void 0;
6
+ exports.getDuration = exports.convertDateToUTC = exports.convertDateToUTCString = exports.convertDateToUTCRange = exports.convertDateToUTCRangeString = exports.getCurrentDayRange = exports.getPreviousDayRange = exports.convertToDate = exports.formatDateTime = exports.interswitchRefundDateFormat = exports.formatDate = void 0;
7
7
  const dayjs_1 = __importDefault(require("dayjs"));
8
8
  const utc_1 = __importDefault(require("dayjs/plugin/utc"));
9
9
  // Extend dayjs with the UTC plugin
@@ -13,6 +13,10 @@ const formatDate = (dataString) => {
13
13
  return (0, dayjs_1.default)(dataString).format("YYYY-MM-DD");
14
14
  };
15
15
  exports.formatDate = formatDate;
16
+ const interswitchRefundDateFormat = (dataString) => {
17
+ return (0, dayjs_1.default)(dataString).format("DD/MM/YYYY");
18
+ };
19
+ exports.interswitchRefundDateFormat = interswitchRefundDateFormat;
16
20
  const formatDateTime = (dataString) => {
17
21
  return (0, dayjs_1.default)(dataString).format("YYYY-MM-DD HH:mm:ss");
18
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.204",
3
+ "version": "1.0.205",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",