@konplit-services/common 1.0.387 → 1.0.388

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.
@@ -191,6 +191,10 @@ interface PayPlus {
191
191
  clientId: string;
192
192
  secret: string;
193
193
  }
194
+ interface BucketI {
195
+ bucketName: string;
196
+ region: string;
197
+ }
194
198
  interface BVN {
195
199
  bvnclientid: string;
196
200
  bvnSecret: string;
@@ -280,6 +284,7 @@ declare class AppConfigs {
280
284
  password: string;
281
285
  };
282
286
  getMessageQueueNames(): MessageQueue;
287
+ getS3BucketDetail(): BucketI;
283
288
  getEmailTemplates(): EmailTemplate;
284
289
  getCloudinaryKey(): string;
285
290
  getMailSenderKey(): string;
@@ -335,6 +335,18 @@ class AppConfigs {
335
335
  reminder: this.env.MESSAGEQUEUE_REMINDER,
336
336
  };
337
337
  }
338
+ getS3BucketDetail() {
339
+ if (!this.env.BUCKET_NAME) {
340
+ throw new Error("BUCKET_NAME is required");
341
+ }
342
+ if (!this.env.BUCKET_REGION) {
343
+ throw new Error("BUCKET_REGION is required");
344
+ }
345
+ return {
346
+ bucketName: this.env.BUCKET_NAME,
347
+ region: this.env.BUCKET_REGION,
348
+ };
349
+ }
338
350
  getEmailTemplates() {
339
351
  if (!this.env.EMAIL_TEMPLATE_FORGET_PASSWORD) {
340
352
  throw new Error("EMAIL_TEMPLATE_FORGET_PASSWORD is required");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.0.387",
3
+ "version": "1.0.388",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",