@quintype/framework 7.18.9 → 7.18.10-webengage-update.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/framework",
3
- "version": "7.18.9",
3
+ "version": "7.18.10-webengage-update.0",
4
4
  "description": "Libraries to help build Quintype Node.js apps",
5
5
  "main": "index.js",
6
6
  "engines": {
@@ -1,5 +1,6 @@
1
1
  const get = require("lodash/get");
2
2
  const request = require("request-promise");
3
+ const { user_type } = require("../webengage-user-attributes");
3
4
 
4
5
  exports.triggerWebengageNotifications = async function triggerWebengageNotifications(
5
6
  req,
@@ -18,7 +19,7 @@ exports.triggerWebengageNotifications = async function triggerWebengageNotificat
18
19
  Authorization: `Bearer ${apiKey}`,
19
20
  "content-type": "application/json",
20
21
  },
21
- body: { eventName: eventName, eventData: { ...req.body, user_type: "malibu_user" } },
22
+ body: { eventName: eventName, eventData: { ...req.body, user_type } },
22
23
  json: true,
23
24
  });
24
25
  res.status(200).send("webengage event triggered successfully");
@@ -0,0 +1,3 @@
1
+ const user_type = "malibu_user";
2
+
3
+ module.exports = { user_type };