@digipair/skill-pushbullet 0.48.3 → 0.49.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.
- package/index.cjs.js +5 -3
- package/index.esm.js +5 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -14,8 +14,9 @@ function _extends() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
let PushbulletService = class PushbulletService {
|
|
17
|
-
async call(url, method, data
|
|
17
|
+
async call(url, method, data, headers, signal) {
|
|
18
18
|
const response = await fetch(`${this.API_ENDPOINT}${url}`, {
|
|
19
|
+
signal,
|
|
19
20
|
method,
|
|
20
21
|
headers: _extends({
|
|
21
22
|
'Access-Token': this.PUSHBULLET_ACCESS_TOKEN
|
|
@@ -25,7 +26,8 @@ let PushbulletService = class PushbulletService {
|
|
|
25
26
|
if (!response.ok) throw new Error('[SKILL-PUSHBULLET] REQUEST FAILED: ' + response.status);
|
|
26
27
|
return await response.json();
|
|
27
28
|
}
|
|
28
|
-
async sendSms(params, _pinsSettingsList,
|
|
29
|
+
async sendSms(params, _pinsSettingsList, context) {
|
|
30
|
+
var _context_protected;
|
|
29
31
|
const { message, phoneNumber } = params;
|
|
30
32
|
return await this.call('/texts', 'POST', JSON.stringify({
|
|
31
33
|
data: {
|
|
@@ -37,7 +39,7 @@ let PushbulletService = class PushbulletService {
|
|
|
37
39
|
}
|
|
38
40
|
}), {
|
|
39
41
|
'Content-Type': 'application/json'
|
|
40
|
-
});
|
|
42
|
+
}, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
|
|
41
43
|
}
|
|
42
44
|
constructor(context, params){
|
|
43
45
|
var _context_privates_PUSHBULLET_ACCESS_TOKEN, _ref;
|
package/index.esm.js
CHANGED
|
@@ -10,8 +10,9 @@ function _extends() {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
let PushbulletService = class PushbulletService {
|
|
13
|
-
async call(url, method, data
|
|
13
|
+
async call(url, method, data, headers, signal) {
|
|
14
14
|
const response = await fetch(`${this.API_ENDPOINT}${url}`, {
|
|
15
|
+
signal,
|
|
15
16
|
method,
|
|
16
17
|
headers: _extends({
|
|
17
18
|
'Access-Token': this.PUSHBULLET_ACCESS_TOKEN
|
|
@@ -21,7 +22,8 @@ let PushbulletService = class PushbulletService {
|
|
|
21
22
|
if (!response.ok) throw new Error('[SKILL-PUSHBULLET] REQUEST FAILED: ' + response.status);
|
|
22
23
|
return await response.json();
|
|
23
24
|
}
|
|
24
|
-
async sendSms(params, _pinsSettingsList,
|
|
25
|
+
async sendSms(params, _pinsSettingsList, context) {
|
|
26
|
+
var _context_protected;
|
|
25
27
|
const { message, phoneNumber } = params;
|
|
26
28
|
return await this.call('/texts', 'POST', JSON.stringify({
|
|
27
29
|
data: {
|
|
@@ -33,7 +35,7 @@ let PushbulletService = class PushbulletService {
|
|
|
33
35
|
}
|
|
34
36
|
}), {
|
|
35
37
|
'Content-Type': 'application/json'
|
|
36
|
-
});
|
|
38
|
+
}, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
|
|
37
39
|
}
|
|
38
40
|
constructor(context, params){
|
|
39
41
|
var _context_privates_PUSHBULLET_ACCESS_TOKEN, _ref;
|