@konplit-services/common 1.0.108 → 1.0.110

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.
@@ -3,3 +3,5 @@ export * from "./keys-update-timer.interface";
3
3
  export * from "./api-config-created.interface";
4
4
  export * from "./api-config.updated.interface";
5
5
  export * from "./default-charg-updated.interfeace";
6
+ export * from "./setting-created.interface";
7
+ export * from "./setting-updated.interface";
@@ -19,3 +19,5 @@ __exportStar(require("./keys-update-timer.interface"), exports);
19
19
  __exportStar(require("./api-config-created.interface"), exports);
20
20
  __exportStar(require("./api-config.updated.interface"), exports);
21
21
  __exportStar(require("./default-charg-updated.interfeace"), exports);
22
+ __exportStar(require("./setting-created.interface"), exports);
23
+ __exportStar(require("./setting-updated.interface"), exports);
@@ -0,0 +1,23 @@
1
+ import { Subscription } from "nats";
2
+ import { Alert, CURRENCY_TYPE, PaymentMethods, PaymentReceiptReceiver, Settlement, Transfer } from "../../../helper";
3
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
4
+ export interface SettingCreatedEvent {
5
+ subject: Subjects.SettingCreated;
6
+ streamName: StreamName.name;
7
+ streamEvents: StreamEvent.Event;
8
+ data: {
9
+ id: string;
10
+ merchantId: string;
11
+ accountId: string;
12
+ paymentOptions: PaymentMethods[];
13
+ transactionReceiptReceivers: PaymentReceiptReceiver[];
14
+ defaultCurrency?: CURRENCY_TYPE;
15
+ settlementType: Settlement[];
16
+ subscriptions: Subscription;
17
+ transfer: Transfer;
18
+ alert: Alert[];
19
+ max_limit: number;
20
+ businessLogo: string;
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 { Subscription } from "nats";
2
+ import { Alert, CURRENCY_TYPE, PaymentMethods, PaymentReceiptReceiver, Settlement, Transfer } from "../../../helper";
3
+ import { StreamEvent, StreamName, Subjects } from "../../subjects";
4
+ export interface SettingUpdatedEvent {
5
+ subject: Subjects.SettingUpdated;
6
+ streamName: StreamName.name;
7
+ streamEvents: StreamEvent.Event;
8
+ data: {
9
+ id: string;
10
+ merchantId: string;
11
+ accountId: string;
12
+ paymentOptions: PaymentMethods[];
13
+ transactionReceiptReceivers: PaymentReceiptReceiver[];
14
+ defaultCurrency?: CURRENCY_TYPE;
15
+ settlementType: Settlement[];
16
+ subscriptions: Subscription;
17
+ transfer: Transfer;
18
+ alert: Alert[];
19
+ max_limit: number;
20
+ businessLogo: string;
21
+ version?: number;
22
+ };
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -30,5 +30,7 @@ export declare enum Subjects {
30
30
  KeysUpdatedComplete = "events.keys.updated.complete",
31
31
  APIConfigCreated = "events.apiconfig.created",
32
32
  APIConfigUpdated = "events.apiconfig.updated",
33
- DefaultChargeUpdated = "events.default.charge.updated"
33
+ DefaultChargeUpdated = "events.default.charge.updated",
34
+ SettingCreated = "events.setting.created",
35
+ SettingUpdated = "events.setting.updated"
34
36
  }
@@ -48,4 +48,7 @@ var Subjects;
48
48
  Subjects["APIConfigUpdated"] = "events.apiconfig.updated";
49
49
  //Default Charges
50
50
  Subjects["DefaultChargeUpdated"] = "events.default.charge.updated";
51
+ //Settings
52
+ Subjects["SettingCreated"] = "events.setting.created";
53
+ Subjects["SettingUpdated"] = "events.setting.updated";
51
54
  })(Subjects = exports.Subjects || (exports.Subjects = {}));
@@ -36,3 +36,4 @@ export * from "./user-types";
36
36
  export * from "./validateParams";
37
37
  export * from "./worker-task-types";
38
38
  export * from "./api-config-types";
39
+ export * from "./settings-types";
@@ -52,3 +52,4 @@ __exportStar(require("./user-types"), exports);
52
52
  __exportStar(require("./validateParams"), exports);
53
53
  __exportStar(require("./worker-task-types"), exports);
54
54
  __exportStar(require("./api-config-types"), exports);
55
+ __exportStar(require("./settings-types"), exports);
@@ -0,0 +1,62 @@
1
+ import { CURRENCY_TYPE } from "./currency-types";
2
+ import { PaymentOptions } from "./payment-options";
3
+ import { Status } from "./status";
4
+ export interface PaymentMethods {
5
+ method: PaymentOptions;
6
+ active: boolean;
7
+ }
8
+ export declare enum NotificationChannel {
9
+ sms = "sms",
10
+ email = "email",
11
+ webhook = "webhook"
12
+ }
13
+ export interface NotificationType {
14
+ notificationType: NotificationChannel;
15
+ active: boolean;
16
+ }
17
+ export declare enum RecieptUserType {
18
+ merchant = "merchant",
19
+ customer = "customer"
20
+ }
21
+ export declare enum SettlementType {
22
+ bankaccount = "bankaccount",
23
+ wallet = "wallet"
24
+ }
25
+ export interface PaymentReceiptReceiver {
26
+ userType: RecieptUserType;
27
+ active: boolean;
28
+ }
29
+ export interface Settlement {
30
+ settlementType: SettlementType;
31
+ active: boolean;
32
+ }
33
+ export interface UserExpiringCard extends PaymentReceiptReceiver {
34
+ }
35
+ export interface Subscription {
36
+ completed?: boolean;
37
+ failed?: boolean;
38
+ cancelled?: boolean;
39
+ expiringCard?: UserExpiringCard[];
40
+ webhookForExpiringCard?: boolean;
41
+ }
42
+ export interface Alert {
43
+ status: Status;
44
+ currency: CURRENCY_TYPE;
45
+ notificationChannel: NotificationType[];
46
+ warningAmount: number;
47
+ criticalAmount: number;
48
+ }
49
+ export interface ApprovalUrl {
50
+ status: Status;
51
+ url?: string;
52
+ active: boolean;
53
+ }
54
+ export declare enum RejectActions {
55
+ blackList = "blackList"
56
+ }
57
+ export interface Transfer {
58
+ approvalUrl: ApprovalUrl[];
59
+ notification: NotificationType[];
60
+ onReject: RejectActions[];
61
+ otp: NotificationType[];
62
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RejectActions = exports.SettlementType = exports.RecieptUserType = exports.NotificationChannel = void 0;
4
+ var NotificationChannel;
5
+ (function (NotificationChannel) {
6
+ NotificationChannel["sms"] = "sms";
7
+ NotificationChannel["email"] = "email";
8
+ NotificationChannel["webhook"] = "webhook";
9
+ })(NotificationChannel = exports.NotificationChannel || (exports.NotificationChannel = {}));
10
+ var RecieptUserType;
11
+ (function (RecieptUserType) {
12
+ RecieptUserType["merchant"] = "merchant";
13
+ RecieptUserType["customer"] = "customer";
14
+ })(RecieptUserType = exports.RecieptUserType || (exports.RecieptUserType = {}));
15
+ var SettlementType;
16
+ (function (SettlementType) {
17
+ SettlementType["bankaccount"] = "bankaccount";
18
+ SettlementType["wallet"] = "wallet";
19
+ })(SettlementType = exports.SettlementType || (exports.SettlementType = {}));
20
+ var RejectActions;
21
+ (function (RejectActions) {
22
+ RejectActions["blackList"] = "blackList";
23
+ })(RejectActions = exports.RejectActions || (exports.RejectActions = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.108",
3
+ "version": "1.0.110",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",