@konplit-services/common 1.0.266 → 1.0.268

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.
@@ -215,6 +215,7 @@ declare class AppConfigs {
215
215
  constructor(processEnv: typeof env);
216
216
  getAppName(): string;
217
217
  getJWTKEY(): string;
218
+ getTransactionJWTKEY(): string;
218
219
  getDBURI(): string;
219
220
  getActivityLogDBURI(): string;
220
221
  getAccountDBURI(): string;
@@ -249,6 +250,11 @@ declare class AppConfigs {
249
250
  refresh_in: string;
250
251
  access_in: string;
251
252
  };
253
+ getRSAKeys(): {
254
+ private: string;
255
+ public: string;
256
+ };
257
+ getTransactionTokenAccessTime(): string;
252
258
  getAPIPrivateKey(): string;
253
259
  getEmailVendor(): string;
254
260
  getZeptoMailAPIKey(): string;
@@ -17,6 +17,12 @@ class AppConfigs {
17
17
  }
18
18
  return this.env.JWT_KEY;
19
19
  }
20
+ getTransactionJWTKEY() {
21
+ if (!this.env.TRANSACTION_JWT_KEY) {
22
+ throw new Error("TRANSACTION_JWT_KEY is required");
23
+ }
24
+ return this.env.TRANSACTION_JWT_KEY;
25
+ }
20
26
  getDBURI() {
21
27
  if (!this.env.Mongo_URI) {
22
28
  throw new Error("Mongo_URI is required");
@@ -193,6 +199,24 @@ class AppConfigs {
193
199
  access_in: this.env.ACCESS_TOKEN_IN,
194
200
  };
195
201
  }
202
+ getRSAKeys() {
203
+ if (!this.env.PRIVATE_RSA_KEY) {
204
+ throw new Error("PRIVATE_RSA_KEY is required");
205
+ }
206
+ if (!this.env.PUBLIC_RSA_KEY) {
207
+ throw new Error("PUBLIC_RSA_KEY is required");
208
+ }
209
+ return {
210
+ private: this.env.PRIVATE_RSA_KEY,
211
+ public: this.env.PUBLIC_RSA_KEY,
212
+ };
213
+ }
214
+ getTransactionTokenAccessTime() {
215
+ if (!this.env.ACCESS_TRANSACTION_TOKEN_IN) {
216
+ throw new Error("ACCESS_TRANSACTION_TOKEN_IN is required");
217
+ }
218
+ return this.env.ACCESS_TRANSACTION_TOKEN_IN;
219
+ }
196
220
  getAPIPrivateKey() {
197
221
  if (!this.env.API_PRIVATE_KEY) {
198
222
  throw new Error("API_PRIVATE_KEY is required");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.266",
3
+ "version": "1.0.268",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",