@plusscommunities/pluss-core-aws 2.0.7-beta.2 → 2.0.7-beta.4
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.
|
@@ -155,13 +155,17 @@ const getEventMatches = async (users, audienceTypeSelection) => {
|
|
|
155
155
|
* @param {string} audienceType - The type of audience to retrieve.
|
|
156
156
|
* @param {string | Array} audienceTypeSelection - The selection criteria for the audience.
|
|
157
157
|
* @param {boolean} [preview=true] - Indicates whether to retrieve a preview of the users in the audience.
|
|
158
|
+
* @param {boolean} [includeType=true] - Indicates whether to include the user type in the preview.
|
|
159
|
+
* @param {boolean} [includeSite=true] - Indicates whether to include the site in the preview.
|
|
158
160
|
* @returns {Array} - The audience that matches the specified criteria.
|
|
159
161
|
*/
|
|
160
162
|
module.exports = async (
|
|
161
163
|
site,
|
|
162
164
|
audienceType,
|
|
163
165
|
audienceTypeSelection,
|
|
164
|
-
preview = true
|
|
166
|
+
preview = true,
|
|
167
|
+
includeType = true,
|
|
168
|
+
includeSite = true
|
|
165
169
|
) => {
|
|
166
170
|
//TODO handle includes and excludes
|
|
167
171
|
const userData = await getUsers(site);
|
|
@@ -169,7 +173,7 @@ module.exports = async (
|
|
|
169
173
|
_.filter(userData, (u) => !u.Deleted),
|
|
170
174
|
(u) => {
|
|
171
175
|
return preview
|
|
172
|
-
? userToUserPreview(u,
|
|
176
|
+
? userToUserPreview(u, includeType, includeSite)
|
|
173
177
|
: { id: u.Id || u.userId, ...u };
|
|
174
178
|
}
|
|
175
179
|
);
|
|
@@ -20,7 +20,14 @@ module.exports = async (site, permissions) => {
|
|
|
20
20
|
};
|
|
21
21
|
});
|
|
22
22
|
log("getUsersByPermission", "audienceMatches", audienceMatches, logId);
|
|
23
|
-
const audience = await getAudience(
|
|
23
|
+
const audience = await getAudience(
|
|
24
|
+
site,
|
|
25
|
+
"Custom",
|
|
26
|
+
audienceMatches,
|
|
27
|
+
true,
|
|
28
|
+
false,
|
|
29
|
+
false
|
|
30
|
+
);
|
|
24
31
|
log("getUsersByPermission", "audienceLength", audience.length, logId);
|
|
25
32
|
|
|
26
33
|
return audience;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-core-aws",
|
|
3
|
-
"version": "2.0.7-beta.
|
|
3
|
+
"version": "2.0.7-beta.4",
|
|
4
4
|
"description": "Core extension package for Pluss Communities platform",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"betapatch": "npm version prepatch --preid=beta",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"upload": "npm i && npm i && npm publish --access public",
|
|
11
11
|
"upload:p": "npm run patch && npm run upload"
|
|
12
12
|
},
|
|
13
|
-
"author": "
|
|
13
|
+
"author": "Thorbjorn Kappel Davis",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|