@zwerm/zwermapi-client
Advanced tools
Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "@zwerm/zwermapi-client", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Client for using the ZwermAPI", |
@@ -714,2 +714,3 @@ 'use strict'; | ||
* @param {number} [value] a value. | ||
* @param {string} [timestamp] ISO Datetime for when the event should get triggered | ||
* | ||
@@ -721,8 +722,8 @@ * @return {Promise} | ||
*/ | ||
postEvent(teamSlug, botId, userId, event, payload, { conversationId, channelId, route, value }) { | ||
postEvent(teamSlug, botId, userId, event, payload, { conversationId, channelId, route, value, timestamp }) { | ||
if (conversationId) { | ||
return this.postEventToConversation(teamSlug, botId, userId, conversationId, event, payload, { channelId, route, value }); | ||
return this.postEventToConversation(teamSlug, botId, userId, conversationId, event, payload, { channelId, route, value, timestamp }); | ||
} | ||
return this.postEventToUser(teamSlug, botId, userId, event, payload, { channelId, route, value }); | ||
return this.postEventToUser(teamSlug, botId, userId, event, payload, { channelId, route, value, timestamp }); | ||
} | ||
@@ -741,6 +742,7 @@ | ||
* @param {number} [value] a value. | ||
* @param {string} [timestamp] ISO Datetime for when the event should get triggered | ||
* | ||
* @return {Promise} | ||
*/ | ||
postEventToUser(teamSlug, botId, userId, event, payload, { channelId, route, value }) { | ||
postEventToUser(teamSlug, botId, userId, event, payload, { channelId, route, value, timestamp }) { | ||
return this._zwermRequest.post(`bots/${teamSlug}/${botId}/users/${userId}/event`, { | ||
@@ -751,3 +753,4 @@ event, | ||
route, | ||
value | ||
value, | ||
timestamp | ||
}) | ||
@@ -769,6 +772,7 @@ .then(response => response.data); | ||
* @param {number} [value] a value. | ||
* @param {string} [timestamp] ISO Datetime for when the event should get triggered | ||
* | ||
* @return {Promise} | ||
*/ | ||
postEventToConversation(teamSlug, botId, userId, conversationId, event, payload, { channelId, route, value }) { | ||
postEventToConversation(teamSlug, botId, userId, conversationId, event, payload, { channelId, route, value, timestamp }) { | ||
return this._zwermRequest.post(`bots/${teamSlug}/${botId}/users/${userId}/conversations/${conversationId}/event`, { | ||
@@ -779,3 +783,4 @@ event, | ||
route, | ||
value | ||
value, | ||
timestamp | ||
}) | ||
@@ -782,0 +787,0 @@ .then(response => response.data); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
8
63600
11
1502
2