@platform-x/hep-notification-client 1.2.7 → 1.2.8

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.
@@ -7,7 +7,7 @@ export declare class TwilioService {
7
7
  * @param authToken - Twilio Auth Token
8
8
  * @param senderNumber - Twilio Sender Phone Number
9
9
  */
10
- constructor(accountSid: string, authToken: string, senderNumber: string);
10
+ constructor();
11
11
  /**
12
12
  * Send an SMS using Twilio
13
13
  * @param to - Recipient's phone number
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.TwilioService = void 0;
16
16
  const twilio_1 = __importDefault(require("twilio"));
17
17
  const logger_1 = require("../util/logger");
18
+ const config_1 = __importDefault(require("../../config"));
18
19
  class TwilioService {
19
20
  /**
20
21
  * Constructor to initialize Twilio client and sender number
@@ -22,9 +23,9 @@ class TwilioService {
22
23
  * @param authToken - Twilio Auth Token
23
24
  * @param senderNumber - Twilio Sender Phone Number
24
25
  */
25
- constructor(accountSid, authToken, senderNumber) {
26
- this.client = (0, twilio_1.default)(accountSid, authToken);
27
- this.senderNumber = senderNumber;
26
+ constructor() {
27
+ this.client = (0, twilio_1.default)(config_1.default === null || config_1.default === void 0 ? void 0 : config_1.default.TWILIO.ACCOUNT_SID, config_1.default === null || config_1.default === void 0 ? void 0 : config_1.default.TWILIO.AUTH_TOKEN);
28
+ this.senderNumber = config_1.default === null || config_1.default === void 0 ? void 0 : config_1.default.TWILIO.SENDER_NUMBER;
28
29
  }
29
30
  /**
30
31
  * Send an SMS using Twilio
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-x/hep-notification-client",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "@platform-x/hep-notification-client",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",