@digipair/skill-twilio 0.20.0 → 0.20.1

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.
package/index.cjs.js CHANGED
@@ -25,9 +25,9 @@ let TwilioService = class TwilioService {
25
25
  if (!response.ok) throw new Error('[SKILL-TWILIO] REQUEST FAILED: ' + response.status);
26
26
  return await response.json();
27
27
  }
28
- async sendSms(params, _pinsSettingsList, _context, whatsapp = false) {
28
+ async sendSms(params, _pinsSettingsList, _context) {
29
29
  const { message, phoneNumber } = params;
30
- return await this.call(`/Accounts/${this.TWILIO_SID}/Messages.json`, 'POST', `From=${encodeURIComponent(`${whatsapp ? 'whatsapp:' : ''}${this.FROM_NUMBER}`)}&Body=${encodeURIComponent(message)}&To=${encodeURIComponent(`${whatsapp ? 'whatsapp:' : ''}${phoneNumber}`)}`, {
30
+ return await this.call(`/Accounts/${this.TWILIO_SID}/Messages.json`, 'POST', `From=${encodeURIComponent(`${this.FROM_NUMBER}`)}&Body=${encodeURIComponent(message)}&To=${encodeURIComponent(`${phoneNumber}`)}`, {
31
31
  'Content-Type': 'application/x-www-form-urlencoded'
32
32
  });
33
33
  }
@@ -43,7 +43,7 @@ let TwilioService = class TwilioService {
43
43
  }
44
44
  };
45
45
  const sendSms = (params, pinsSettingsList, context)=>new TwilioService(context, params).sendSms(params, pinsSettingsList, context);
46
- const sendWhatsapp = (params, pinsSettingsList, context)=>new TwilioService(context, params).sendSms(params, pinsSettingsList, context, true);
46
+ const sendWhatsapp = (params, pinsSettingsList, context)=>new TwilioService(context, params).sendSms(params, pinsSettingsList, context);
47
47
 
48
48
  exports.sendSms = sendSms;
49
49
  exports.sendWhatsapp = sendWhatsapp;
package/index.esm.js CHANGED
@@ -21,9 +21,9 @@ let TwilioService = class TwilioService {
21
21
  if (!response.ok) throw new Error('[SKILL-TWILIO] REQUEST FAILED: ' + response.status);
22
22
  return await response.json();
23
23
  }
24
- async sendSms(params, _pinsSettingsList, _context, whatsapp = false) {
24
+ async sendSms(params, _pinsSettingsList, _context) {
25
25
  const { message, phoneNumber } = params;
26
- return await this.call(`/Accounts/${this.TWILIO_SID}/Messages.json`, 'POST', `From=${encodeURIComponent(`${whatsapp ? 'whatsapp:' : ''}${this.FROM_NUMBER}`)}&Body=${encodeURIComponent(message)}&To=${encodeURIComponent(`${whatsapp ? 'whatsapp:' : ''}${phoneNumber}`)}`, {
26
+ return await this.call(`/Accounts/${this.TWILIO_SID}/Messages.json`, 'POST', `From=${encodeURIComponent(`${this.FROM_NUMBER}`)}&Body=${encodeURIComponent(message)}&To=${encodeURIComponent(`${phoneNumber}`)}`, {
27
27
  'Content-Type': 'application/x-www-form-urlencoded'
28
28
  });
29
29
  }
@@ -39,6 +39,6 @@ let TwilioService = class TwilioService {
39
39
  }
40
40
  };
41
41
  const sendSms = (params, pinsSettingsList, context)=>new TwilioService(context, params).sendSms(params, pinsSettingsList, context);
42
- const sendWhatsapp = (params, pinsSettingsList, context)=>new TwilioService(context, params).sendSms(params, pinsSettingsList, context, true);
42
+ const sendWhatsapp = (params, pinsSettingsList, context)=>new TwilioService(context, params).sendSms(params, pinsSettingsList, context);
43
43
 
44
44
  export { sendSms, sendWhatsapp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-twilio",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"