node-red-contrib-wazo-platform
Advanced tools
Comparing version 1.0.31 to 1.0.32
@@ -187,2 +187,30 @@ const { WazoApiClient } = require('@wazo/sdk'); | ||
const sendPush = async (url, token, msg, tenant_uuid) => { | ||
const body = { | ||
notification_type: msg.notification_type, | ||
user_uuid: msg.user_uuid, | ||
title: msg.title, | ||
body: msg.body, | ||
extra: msg.extra | ||
} | ||
const options = { | ||
method: 'POST', | ||
agent: agent, | ||
body: JSON.stringify(body), | ||
headers: { | ||
'content-type': 'application/json', | ||
'X-Auth-Token': token | ||
} | ||
} | ||
if (tenant_uuid) { | ||
options.headers['Wazo-Tenant'] = tenant_uuid; | ||
} | ||
return fetch(url, options); | ||
} | ||
const apiRequest = (url, method, token, body, header, tenant_uuid) => { | ||
@@ -203,3 +231,3 @@ const options = { | ||
if (body) { | ||
if (body && header == 'application/json') { | ||
options.body = JSON.stringify(body); | ||
@@ -225,10 +253,11 @@ } | ||
module.exports = { | ||
apiRequest, | ||
createNodeAddCall, | ||
getVoicemail, | ||
hangupCall, | ||
initiateCallUser, | ||
internalHTTP, | ||
makeCall, | ||
initiateCallUser, | ||
createNodeAddCall, | ||
getVoicemail, | ||
sendFax, | ||
apiRequest, | ||
hangupCall | ||
sendPush | ||
} |
{ | ||
"name": "node-red-contrib-wazo-platform", | ||
"version": "1.0.31", | ||
"version": "1.0.32", | ||
"description": "Node Red module for the Wazo Platform API", | ||
@@ -18,4 +18,4 @@ "main": "index.js", | ||
"request": "~2.88.2", | ||
"uuid": "~9.0.0", | ||
"ws": "~8.11.0" | ||
"uuid": "~9.0.1", | ||
"ws": "~8.14.2" | ||
}, | ||
@@ -69,2 +69,3 @@ "keywords": [ | ||
"progress": "nodes/progress.js", | ||
"push": "nodes/push.js", | ||
"stop_progress": "nodes/stop_progress.js", | ||
@@ -71,0 +72,0 @@ "request": "nodes/request.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
923926
91
2282
18
+ Addedws@8.14.2(transitive)
- Removedws@8.11.0(transitive)
Updateduuid@~9.0.1
Updatedws@~8.14.2