@konplit-services/common 1.25.7 → 1.26.0

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.
@@ -388,6 +388,7 @@ declare class AppConfigs {
388
388
  isStaging(): boolean;
389
389
  isProduction(): boolean;
390
390
  getDSN_Key(): DSN;
391
+ getComplianceEmail(): string;
391
392
  }
392
393
  declare const appConfigs: AppConfigs;
393
394
  export { appConfigs };
@@ -1024,6 +1024,12 @@ class AppConfigs {
1024
1024
  dsn: this.env.SENTRY_LOG_DNS,
1025
1025
  };
1026
1026
  }
1027
+ getComplianceEmail() {
1028
+ if (!this.env.COMPLIANCE_EMAIL) {
1029
+ throw new Error("COMPLIANCE_EMAIL is required");
1030
+ }
1031
+ return this.env.COMPLIANCE_EMAIL;
1032
+ }
1027
1033
  }
1028
1034
  // make sure all keys are available on startup
1029
1035
  const appConfigs = new AppConfigs(process.env);
@@ -0,0 +1,8 @@
1
+ import { ComplianceTransactionNotificationTemplateData } from "../../../../notification";
2
+ import { StreamEvent, StreamName, Subjects } from "../../../subjects";
3
+ export interface ComplianceTransactionNotificationEmailCreatedEvent {
4
+ subject: Subjects.ComplianceTransactionNotificationEmailCreated;
5
+ streamName: StreamName.name;
6
+ streamEvents: StreamEvent.Event;
7
+ data: ComplianceTransactionNotificationTemplateData;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -19,3 +19,4 @@ export * from "./sub-payment-fail-notify.interface";
19
19
  export * from "./token-verification-notify.interface";
20
20
  export * from "./two2factor-auth-notify.interface";
21
21
  export * from "./merchant-settlement-notification.event";
22
+ export * from "./compliance-monitorying.interface";
@@ -35,3 +35,4 @@ __exportStar(require("./sub-payment-fail-notify.interface"), exports);
35
35
  __exportStar(require("./token-verification-notify.interface"), exports);
36
36
  __exportStar(require("./two2factor-auth-notify.interface"), exports);
37
37
  __exportStar(require("./merchant-settlement-notification.event"), exports);
38
+ __exportStar(require("./compliance-monitorying.interface"), exports);
@@ -49,6 +49,7 @@ export declare enum Subjects {
49
49
  TokenVerificationNotificationEmailCreated = "events.token.verification.notification",
50
50
  MerchantUserInviteNotificationEmailCreated = "events.merchant.user.invite.notification",
51
51
  CustomerWelcomeNotificationEmailCreated = "events.customer.welcome.notification",
52
+ ComplianceTransactionNotificationEmailCreated = "events.compliance.transaction.notification",
52
53
  UserRoleUpdated = "events.user.role.updated",
53
54
  AdminLogCreated = "events.admin.log.created",
54
55
  WalletCreated = "events.wallet.created",
@@ -63,6 +63,7 @@ var Subjects;
63
63
  Subjects["TokenVerificationNotificationEmailCreated"] = "events.token.verification.notification";
64
64
  Subjects["MerchantUserInviteNotificationEmailCreated"] = "events.merchant.user.invite.notification";
65
65
  Subjects["CustomerWelcomeNotificationEmailCreated"] = "events.customer.welcome.notification";
66
+ Subjects["ComplianceTransactionNotificationEmailCreated"] = "events.compliance.transaction.notification";
66
67
  // Roles
67
68
  Subjects["UserRoleUpdated"] = "events.user.role.updated";
68
69
  Subjects["AdminLogCreated"] = "events.admin.log.created";
@@ -1,4 +1,4 @@
1
- import { Usage } from "../helper";
1
+ import { PaymentOptions, Usage } from "../helper";
2
2
  export interface EmailBase {
3
3
  merchant_id?: string;
4
4
  business_logo?: string;
@@ -118,6 +118,7 @@ export interface MerchantSettlementReceiptTemplateData extends EmailBase {
118
118
  }
119
119
  export interface MerchantTransactionNotificationTemplateData extends EmailBase {
120
120
  customer_name: string;
121
+ customer_email: string;
121
122
  merchant_name: string;
122
123
  merchant_email: string;
123
124
  amount: number;
@@ -192,3 +193,16 @@ export interface CustomerWelcomeTemplateData extends EmailBase {
192
193
  login_url: string;
193
194
  to: string;
194
195
  }
196
+ export interface ComplianceTransactionNotificationTemplateData extends EmailBase {
197
+ customer_name: string;
198
+ customer_email: string;
199
+ merchant_name: string;
200
+ merchant_email: string;
201
+ amount: number;
202
+ reference: string;
203
+ providerId: string;
204
+ transaction_date: string;
205
+ completed_date?: string;
206
+ payment_method: PaymentOptions;
207
+ [key: string]: any;
208
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.25.7",
3
+ "version": "1.26.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",