@mindful-web/marko-web-omeda-identity-x 1.26.1 → 1.30.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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
|
5
|
-
marko_componentType = "/@mindful-web/marko-web-omeda-identity-x$1.
|
|
5
|
+
marko_componentType = "/@mindful-web/marko-web-omeda-identity-x$1.30.0/components/identify.marko",
|
|
6
6
|
marko_component = require("./identify.marko"),
|
|
7
7
|
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
|
8
8
|
module_getCookieId = require("@mindful-web/marko-web-omeda-identity-x/utils/get-cookie-id"),
|
|
@@ -51,7 +51,7 @@ marko_template._ = marko_renderer(render, {
|
|
|
51
51
|
}, marko_component);
|
|
52
52
|
|
|
53
53
|
marko_template.meta = {
|
|
54
|
-
id: "/@mindful-web/marko-web-omeda-identity-x$1.
|
|
54
|
+
id: "/@mindful-web/marko-web-omeda-identity-x$1.30.0/components/identify.marko",
|
|
55
55
|
component: "./identify.marko",
|
|
56
56
|
tags: [
|
|
57
57
|
"@mindful-web/marko-web-identity-x/components/identify.marko",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const Joi = require('@parameter1/joi');
|
|
2
2
|
const { validate } = require('@parameter1/joi/utils');
|
|
3
|
+
const generateRequiredFieldPayload = require('@mindful-web/marko-web-identity-x/utils/generate-required-field-payload');
|
|
3
4
|
const extractPromoCode = require('../utils/extract-promo-code');
|
|
4
5
|
const schemas = require('../validation/schemas');
|
|
5
6
|
const {
|
|
@@ -57,7 +58,11 @@ module.exports = async (params = {}) => {
|
|
|
57
58
|
cookies: req.cookies,
|
|
58
59
|
});
|
|
59
60
|
|
|
60
|
-
const
|
|
61
|
+
const { requiredFieldKeys } = generateRequiredFieldPayload({
|
|
62
|
+
appUser: user,
|
|
63
|
+
body: {},
|
|
64
|
+
definitions: identityX.config.getRequiredCreateFieldRows().flat(),
|
|
65
|
+
});
|
|
61
66
|
|
|
62
67
|
const [omedaLinkedFields, { encryptedCustomerId }] = await Promise.all([
|
|
63
68
|
getOmedaLinkedFields({ identityX, brandKey }),
|
|
@@ -67,7 +72,7 @@ module.exports = async (params = {}) => {
|
|
|
67
72
|
source,
|
|
68
73
|
payload: {
|
|
69
74
|
user: user.verified ? user : {
|
|
70
|
-
...(
|
|
75
|
+
...(requiredFieldKeys.reduce((obj, key) => ({ ...obj, [key]: user[key] }), {})),
|
|
71
76
|
id: user.id,
|
|
72
77
|
email: user.email,
|
|
73
78
|
},
|
|
@@ -24,6 +24,7 @@ module.exports = ({
|
|
|
24
24
|
appendBehaviors,
|
|
25
25
|
appendDemographics,
|
|
26
26
|
appendPromoCodes,
|
|
27
|
+
appendSubscriptions,
|
|
27
28
|
behavior,
|
|
28
29
|
} = {}) => idxOmedaRapidIdentify({
|
|
29
30
|
brandKey,
|
|
@@ -41,6 +42,7 @@ module.exports = ({
|
|
|
41
42
|
appendBehaviors,
|
|
42
43
|
appendDemographics,
|
|
43
44
|
appendPromoCodes,
|
|
45
|
+
appendSubscriptions,
|
|
44
46
|
|
|
45
47
|
// The pre-configured behavior/attribute definitions.
|
|
46
48
|
behavior,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindful-web/marko-web-omeda-identity-x",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.0",
|
|
4
4
|
"description": "Marko Omeda+IdentityX integration tools",
|
|
5
5
|
"repository": "https://github.com/parameter1/mindful-web/tree/main/packages/marko-web-omeda-identity-x",
|
|
6
6
|
"author": "Josh Worden <josh@parameter1.com>",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "yarn compile --no-clean && yarn lint"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@mindful-web/marko-web-identity-x": "^1.
|
|
16
|
+
"@mindful-web/marko-web-identity-x": "^1.30.0",
|
|
17
17
|
"@mindful-web/marko-web-omeda": "^1.26.1",
|
|
18
18
|
"@mindful-web/object-path": "^1.11.9",
|
|
19
19
|
"@mindful-web/utils": "^1.11.9",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "c2ba676d09db1fbcec92843863485ea36469f242"
|
|
33
33
|
}
|
package/rapid-identify.js
CHANGED
|
@@ -41,6 +41,7 @@ module.exports = async ({
|
|
|
41
41
|
appendBehaviors,
|
|
42
42
|
appendDemographics,
|
|
43
43
|
appendPromoCodes,
|
|
44
|
+
appendSubscriptions,
|
|
44
45
|
|
|
45
46
|
behavior,
|
|
46
47
|
|
|
@@ -147,6 +148,13 @@ module.exports = async ({
|
|
|
147
148
|
});
|
|
148
149
|
}
|
|
149
150
|
|
|
151
|
+
// Append subscriptions, if specified
|
|
152
|
+
if (appendSubscriptions && appendSubscriptions.length) {
|
|
153
|
+
appendSubscriptions.forEach((subscription) => {
|
|
154
|
+
subscriptions.push(subscription);
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
150
158
|
const promoCodes = [];
|
|
151
159
|
if (promoCode) promoCodes.push(promoCode);
|
|
152
160
|
|