@konplit-services/common 1.0.162 → 1.0.165

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.
@@ -41,6 +41,12 @@ interface InterswitchTransfer {
41
41
  access_token_url: string;
42
42
  base_url: string;
43
43
  }
44
+ interface ValuePaySenderTransfer {
45
+ lastname: string;
46
+ othernames: string;
47
+ email: string;
48
+ phone: string;
49
+ }
44
50
  interface MessageQueue {
45
51
  sendMail: string;
46
52
  Payment: string;
@@ -166,6 +172,7 @@ declare class AppConfigs {
166
172
  };
167
173
  getInterswitchDetails(): Interswitch;
168
174
  getInterswitchTransferDetails(): InterswitchTransfer;
175
+ getValuPayTransferSenderDetails(): ValuePaySenderTransfer;
169
176
  getMonoDetails(): {
170
177
  base_url: string;
171
178
  public_key: string;
@@ -586,6 +586,27 @@ class AppConfigs {
586
586
  base_url: this.env.INTERSWITCH_BASE_URL,
587
587
  };
588
588
  }
589
+ // VALUEPAY
590
+ getValuPayTransferSenderDetails() {
591
+ if (!this.env.VALUEPAY_TRANSFER_SENDER_LASTNAME) {
592
+ throw new Error("VALUEPAY_TRANSFER_SENDER_LASTNAME is required");
593
+ }
594
+ if (!this.env.VALUEPAY_TRANSFER_SENDER_OTHERNAMES) {
595
+ throw new Error("VALUEPAY_TRANSFER_SENDER_OTHERNAMES is required");
596
+ }
597
+ if (!this.env.VALUEPAY_TRANSFER_SENDER_EMAIL) {
598
+ throw new Error("VALUEPAY_TRANSFER_SENDER_EMAIL is required");
599
+ }
600
+ if (!this.env.VALUEPAY_TRANSFER_SENDER_PHONE) {
601
+ throw new Error("VALUEPAY_TRANSFER_SENDER_PHONE is required");
602
+ }
603
+ return {
604
+ lastname: this.env.VALUEPAY_TRANSFER_SENDER_LASTNAME,
605
+ othernames: this.env.VALUEPAY_TRANSFER_SENDER_OTHERNAMES,
606
+ email: this.env.VALUEPAY_TRANSFER_SENDER_EMAIL,
607
+ phone: this.env.VALUEPAY_TRANSFER_SENDER_PHONE,
608
+ };
609
+ }
589
610
  // MONO MOBILE MONEY
590
611
  getMonoDetails() {
591
612
  if (!this.env.MONO_BASE_URL) {
@@ -0,0 +1,23 @@
1
+ import { CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface BankAccountCreatedEvent {
4
+ subject: Subjects.BANKACCOUNT_CREATED;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ id: string;
9
+ merchantId: string;
10
+ accountId: string;
11
+ bankName: string;
12
+ accountNumber: string;
13
+ accountName: string;
14
+ bankId: string;
15
+ currency?: CURRENCY_TYPE;
16
+ bvn?: string;
17
+ bankCode?: string;
18
+ code?: string;
19
+ defaultAccount?: boolean;
20
+ isVerified?: boolean;
21
+ version?: number;
22
+ };
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface BankAccountUpdatedEvent {
4
+ subject: Subjects.BANKACCOUNT_UPDATED;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ id: string;
9
+ merchantId: string;
10
+ accountId: string;
11
+ bankName: string;
12
+ accountNumber: string;
13
+ accountName: string;
14
+ bankId: string;
15
+ currency?: CURRENCY_TYPE;
16
+ bvn?: string;
17
+ bankCode?: string;
18
+ code?: string;
19
+ defaultAccount?: boolean;
20
+ isVerified?: boolean;
21
+ version: number;
22
+ };
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { BankAccountVerificationStatus, CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface BankAccountVerifyUpdateEvent {
4
+ subject: Subjects.BANKACCOUNT_VERIFY_UPDATED;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ id: string;
9
+ merchantId: string;
10
+ accountNumber: string;
11
+ accountName: string;
12
+ verificationStatus: BankAccountVerificationStatus;
13
+ bankId: string;
14
+ currency?: CURRENCY_TYPE;
15
+ bvn?: string;
16
+ bankCode?: string;
17
+ code?: string;
18
+ };
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ import { CURRENCY_TYPE } from "../../../helper";
2
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
3
+ export interface BankAccountVerifyEvent {
4
+ subject: Subjects.BANKACCOUNT_VERIFY;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: {
8
+ id: string;
9
+ merchantId: string;
10
+ accountNumber: string;
11
+ accountName: string;
12
+ bankId: string;
13
+ currency?: CURRENCY_TYPE;
14
+ bvn?: string;
15
+ bankCode?: string;
16
+ code?: string;
17
+ };
18
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,3 +7,7 @@ export * from "./setting-created.interface";
7
7
  export * from "./setting-updated.interface";
8
8
  export * from "./business-created.interface";
9
9
  export * from "./business-updated.interface";
10
+ export * from "./bank-account-created.interface";
11
+ export * from "./bank-account-updated.interface";
12
+ export * from "./bank-account-verify.interface";
13
+ export * from "./bank-account-verify-update.interface";
@@ -23,3 +23,8 @@ __exportStar(require("./setting-created.interface"), exports);
23
23
  __exportStar(require("./setting-updated.interface"), exports);
24
24
  __exportStar(require("./business-created.interface"), exports);
25
25
  __exportStar(require("./business-updated.interface"), exports);
26
+ //bankAccounts
27
+ __exportStar(require("./bank-account-created.interface"), exports);
28
+ __exportStar(require("./bank-account-updated.interface"), exports);
29
+ __exportStar(require("./bank-account-verify.interface"), exports);
30
+ __exportStar(require("./bank-account-verify-update.interface"), exports);
@@ -44,6 +44,10 @@ export declare enum Subjects {
44
44
  KeysUpdatedComplete = "events.keys.updated.complete",
45
45
  APIConfigCreated = "events.apiconfig.created",
46
46
  APIConfigUpdated = "events.apiconfig.updated",
47
+ BANKACCOUNT_CREATED = "events.bank.account.created",
48
+ BANKACCOUNT_UPDATED = "events.bank.account.updated",
49
+ BANKACCOUNT_VERIFY = "events.bank.account.verify",
50
+ BANKACCOUNT_VERIFY_UPDATED = "events.bank.account.verify_updated",
47
51
  DefaultChargeUpdated = "events.default.charge.updated",
48
52
  SettingCreated = "events.setting.created",
49
53
  SettingUpdated = "events.setting.updated",
@@ -62,6 +62,11 @@ var Subjects;
62
62
  //APICONFIG
63
63
  Subjects["APIConfigCreated"] = "events.apiconfig.created";
64
64
  Subjects["APIConfigUpdated"] = "events.apiconfig.updated";
65
+ //APICONFIG
66
+ Subjects["BANKACCOUNT_CREATED"] = "events.bank.account.created";
67
+ Subjects["BANKACCOUNT_UPDATED"] = "events.bank.account.updated";
68
+ Subjects["BANKACCOUNT_VERIFY"] = "events.bank.account.verify";
69
+ Subjects["BANKACCOUNT_VERIFY_UPDATED"] = "events.bank.account.verify_updated";
65
70
  //Default Charges
66
71
  Subjects["DefaultChargeUpdated"] = "events.default.charge.updated";
67
72
  //Settings
@@ -13,3 +13,7 @@ export declare enum Status {
13
13
  Approved = "Approved",
14
14
  Rejected = "Rejected"
15
15
  }
16
+ export declare enum BankAccountVerificationStatus {
17
+ Success = "Success",
18
+ Failed = "Failed"
19
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Status = void 0;
3
+ exports.BankAccountVerificationStatus = exports.Status = void 0;
4
4
  var Status;
5
5
  (function (Status) {
6
6
  Status["Error"] = "Error";
@@ -17,3 +17,8 @@ var Status;
17
17
  Status["Approved"] = "Approved";
18
18
  Status["Rejected"] = "Rejected";
19
19
  })(Status = exports.Status || (exports.Status = {}));
20
+ var BankAccountVerificationStatus;
21
+ (function (BankAccountVerificationStatus) {
22
+ BankAccountVerificationStatus["Success"] = "Success";
23
+ BankAccountVerificationStatus["Failed"] = "Failed";
24
+ })(BankAccountVerificationStatus = exports.BankAccountVerificationStatus || (exports.BankAccountVerificationStatus = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.162",
3
+ "version": "1.0.165",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",