@plusscommunities/pluss-newsletter-aws 1.4.6 → 1.4.7
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/newsletterChanged.js +12 -0
- package/package-lock.json +4 -4
- package/package.json +2 -2
package/newsletterChanged.js
CHANGED
|
@@ -9,6 +9,7 @@ const logUpdate = require("./common/db/strings/logUpdate");
|
|
|
9
9
|
const publishNotifications = require("./common/db/notifications/publishNotifications");
|
|
10
10
|
const getAudience = require("./common/helper/audience/getAudience");
|
|
11
11
|
const updateAttribute = require("./common/db/common/updateAttribute");
|
|
12
|
+
const logAnalyticsActivity = require("@plusscommunities/pluss-core-aws/db/analytics/logAnalyticsActivity");
|
|
12
13
|
const { values } = require("./values.config");
|
|
13
14
|
|
|
14
15
|
const marshaller = new Marshaller();
|
|
@@ -107,6 +108,16 @@ const checkSendNotifications = (update) => {
|
|
|
107
108
|
});
|
|
108
109
|
};
|
|
109
110
|
|
|
111
|
+
const logAnalytics = (post) => {
|
|
112
|
+
logAnalyticsActivity(
|
|
113
|
+
post.Private ? "PrivatePost" : "Post",
|
|
114
|
+
values.entityKey,
|
|
115
|
+
post.Site,
|
|
116
|
+
post.SubmittedBy,
|
|
117
|
+
post.Id
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
|
|
110
121
|
module.exports.newsletterChanged = (event, context, callback) => {
|
|
111
122
|
console.log("newsletter changed");
|
|
112
123
|
|
|
@@ -134,6 +145,7 @@ module.exports.newsletterChanged = (event, context, callback) => {
|
|
|
134
145
|
|
|
135
146
|
site = data.Site;
|
|
136
147
|
checkSendNotifications(data);
|
|
148
|
+
logAnalytics(data);
|
|
137
149
|
} else if (record.eventName == "MODIFY") {
|
|
138
150
|
console.log("MODIFY");
|
|
139
151
|
const data = marshaller.unmarshallItem(record.dynamodb.NewImage);
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-newsletter-aws",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"@plusscommunities/pluss-core-aws": {
|
|
16
|
-
"version": "1.6.
|
|
17
|
-
"resolved": "https://registry.npmjs.org/@plusscommunities/pluss-core-aws/-/pluss-core-aws-1.6.
|
|
18
|
-
"integrity": "sha512-
|
|
16
|
+
"version": "1.6.4",
|
|
17
|
+
"resolved": "https://registry.npmjs.org/@plusscommunities/pluss-core-aws/-/pluss-core-aws-1.6.4.tgz",
|
|
18
|
+
"integrity": "sha512-pWMKIq5yE53VuluV1U6Ft67kNcZ43z+MT2neU8Tds2HLVzaAHcsE5jl57T56nktIDUIWggXWqY3MkPsjNbtarA==",
|
|
19
19
|
"requires": {
|
|
20
20
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|
|
21
21
|
"amazon-cognito-identity-js": "^2.0.19",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-newsletter-aws",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "Extension package to enable newsletter on Pluss Communities Platform",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"gc": "node ../../tools/gc ./",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "ISC",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|
|
26
|
-
"@plusscommunities/pluss-core-aws": "1.6.
|
|
26
|
+
"@plusscommunities/pluss-core-aws": "1.6.4",
|
|
27
27
|
"amazon-cognito-identity-js": "^2.0.19",
|
|
28
28
|
"axios": "^0.18.0",
|
|
29
29
|
"expo-server-sdk": "^3.0.1",
|