@konplit-services/common 1.22.2 → 1.24.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.
@@ -375,6 +375,12 @@ declare class AppConfigs {
375
375
  account_id: string;
376
376
  webhook_secret: string;
377
377
  };
378
+ getFirsDetails(): {
379
+ apiUrl: string;
380
+ encryptionUrl: string;
381
+ apiKey: string;
382
+ apiSecret: string;
383
+ };
378
384
  getValue(key: string): string;
379
385
  ensureValues(keys?: string[]): this;
380
386
  getNODE_ENV(): string | undefined;
@@ -968,6 +968,27 @@ class AppConfigs {
968
968
  webhook_secret: this.env.MONO_WEBHOOK_SECRET,
969
969
  };
970
970
  }
971
+ // FIRS
972
+ getFirsDetails() {
973
+ if (!this.env.FIRS_API_KEY) {
974
+ throw new Error("FIRS_API_KEY is required");
975
+ }
976
+ if (!this.env.FIRS_SECRET) {
977
+ throw new Error("FIRS_SECRET is required");
978
+ }
979
+ if (!this.env.FIRS_API_URL) {
980
+ throw new Error("FIRS_API_URL is required");
981
+ }
982
+ if (!this.env.FIRS_ENCRYPTION_URL) {
983
+ throw new Error("FIRS_ENCRYPTION_URL is required");
984
+ }
985
+ return {
986
+ apiUrl: this.env.FIRS_API_URL,
987
+ apiKey: this.env.FIRS_API_KEY,
988
+ encryptionUrl: this.env.FIRS_ENCRYPTION_URL,
989
+ apiSecret: this.env.FIRS_SECRET,
990
+ };
991
+ }
971
992
  getValue(key) {
972
993
  const value = this.env[key];
973
994
  if (!value) {
@@ -6,6 +6,7 @@ export interface EmailBase {
6
6
  business_support_email?: string;
7
7
  year: number;
8
8
  usage?: Usage;
9
+ metaData?: Record<string, any>;
9
10
  }
10
11
  export interface InvoiceTemplateData extends EmailBase {
11
12
  customer_name?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.22.2",
3
+ "version": "1.24.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",